Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 28, 2024
1 parent 2e4a3ce commit 3bc98a0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,11 @@ export class CursorLimitPagination<Item>
}
}

export type SinglePageResponse<Item> = Item[];
export interface SinglePageResponse<Item> {
items: Array<Item>;
}

export class SinglePage<Item> extends AbstractPage<Item> {
export class SinglePage<Item> extends AbstractPage<Item> implements SinglePageResponse<Item> {
items: Array<Item>;

constructor(
Expand All @@ -277,7 +279,7 @@ export class SinglePage<Item> extends AbstractPage<Item> {
) {
super(client, response, body, options);

this.items = body || [];
this.items = body.items || [];
}

getPaginatedItems(): Item[] {
Expand Down

0 comments on commit 3bc98a0

Please sign in to comment.