File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
configured_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>
43
43
44
44
export interface CursorPageResponse < Item > {
45
45
data : Array < Item > ;
46
+
47
+ has_more : boolean ;
46
48
}
47
49
48
50
export interface CursorPageParams {
@@ -57,6 +59,8 @@ export class CursorPage<Item extends { id: string }>
57
59
{
58
60
data : Array < Item > ;
59
61
62
+ has_more : boolean ;
63
+
60
64
constructor (
61
65
client : APIClient ,
62
66
response : Response ,
@@ -66,12 +70,21 @@ export class CursorPage<Item extends { id: string }>
66
70
super ( client , response , body , options ) ;
67
71
68
72
this . data = body . data || [ ] ;
73
+ this . has_more = body . has_more || false ;
69
74
}
70
75
71
76
getPaginatedItems ( ) : Item [ ] {
72
77
return this . data ?? [ ] ;
73
78
}
74
79
80
+ override hasNextPage ( ) {
81
+ if ( this . has_more === false ) {
82
+ return false ;
83
+ }
84
+
85
+ return super . hasNextPage ( ) ;
86
+ }
87
+
75
88
// @deprecated Please use `nextPageInfo()` instead
76
89
nextPageParams ( ) : Partial < CursorPageParams > | null {
77
90
const info = this . nextPageInfo ( ) ;
You can’t perform that action at this time.
0 commit comments