File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 11configured_endpoints : 69
2- openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-7c699d4503077d06a4a44f52c0c1f902d19a87c766b8be75b97c8dfd484ad4aa .yml
2+ openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-dfb00c627f58e5180af7a9b29ed2f2aa0764a3b9daa6a32a1cc45bc8e48dfe15 .yml
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ export class Page<Item> extends AbstractPage<Item> implements PageResponse<Item>
4343
4444export interface CursorPageResponse < Item > {
4545 data : Array < Item > ;
46+
47+ has_more : boolean ;
4648}
4749
4850export interface CursorPageParams {
@@ -57,6 +59,8 @@ export class CursorPage<Item extends { id: string }>
5759{
5860 data : Array < Item > ;
5961
62+ has_more : boolean ;
63+
6064 constructor (
6165 client : APIClient ,
6266 response : Response ,
@@ -66,12 +70,21 @@ export class CursorPage<Item extends { id: string }>
6670 super ( client , response , body , options ) ;
6771
6872 this . data = body . data || [ ] ;
73+ this . has_more = body . has_more || false ;
6974 }
7075
7176 getPaginatedItems ( ) : Item [ ] {
7277 return this . data ?? [ ] ;
7378 }
7479
80+ override hasNextPage ( ) {
81+ if ( this . has_more === false ) {
82+ return false ;
83+ }
84+
85+ return super . hasNextPage ( ) ;
86+ }
87+
7588 // @deprecated Please use `nextPageInfo()` instead
7689 nextPageParams ( ) : Partial < CursorPageParams > | null {
7790 const info = this . nextPageInfo ( ) ;
You can’t perform that action at this time.
0 commit comments