Skip to content

Commit

Permalink
- Add TS docstring for getNextPage function in User service
Browse files Browse the repository at this point in the history
  • Loading branch information
nwithan8 committed Jan 5, 2024
1 parent a6a2430 commit 3c5fa14
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions types/User/User.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,20 @@ export declare class User implements IUser {
* @returns {Object} - An object containing a list of {@link Children children} and pagination information.
*/
static allChildren(params: Object): Promise<{ children: User[]; has_more: boolean }>;

/**
* Retrieve the next page of {@link User child users}.
*
* This automatically reuses the parameters from the previous call or the original {@link User.allChildren} call.
*
* @see https://www.easypost.com/docs/api/node#child-users
*
* @param {Object} children - The previous page of child users (the response from the last {@link User.getNextPage} or {@link User.allChildren} call).
* @param {number} [pageSize] - The number of child users to retrieve per page, optional. Defaults to server-side default.
* @returns {Object} - An object containing a list of {@link User child users} and pagination information.
*/
static getNextPage(
children: Object,
pageSize?: number,
): Promise<{ children: User[]; has_more: boolean }>;
}

0 comments on commit 3c5fa14

Please sign in to comment.