diff --git a/types/Address/Address.d.ts b/types/Address/Address.d.ts index 96ba9e92a..db7f1a008 100644 --- a/types/Address/Address.d.ts +++ b/types/Address/Address.d.ts @@ -173,4 +173,20 @@ export declare class Address implements IAddress { * @returns {Promise
} The verified {@link Address} address. */ static retrieve(addressId: string): Promise
; + + /** + * Retrieve the next page of {@link Address addresses}. + * + * This automatically reuses the parameters from the previous call or the original {@link Address.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-addresses + * + * @param {Object} addresses - The previous page of addresses (the response from the last {@link Address.getNextPage} or {@link Address.all} call). + * @param {number} [pageSize] - The number of addresses to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Address addresses} and pagination information. + */ + static getNextPage( + addresses: Object, + pageSize?: number, + ): Promise<{ addresses: Address[]; has_more: boolean }>; } diff --git a/types/Event/Event.d.ts b/types/Event/Event.d.ts index 86515b7ca..32786466c 100644 --- a/types/Event/Event.d.ts +++ b/types/Event/Event.d.ts @@ -73,4 +73,20 @@ export declare class Event implements IEvent { * @returns {Object} - An object containing a list of {@link Event events} and pagination information. */ static all(params: IEventListParameters): Promise<{ events: Event[]; has_more: boolean }>; + + /** + * Retrieve the next page of {@link Event events}. + * + * This automatically reuses the parameters from the previous call or the original {@link Event.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-events + * + * @param {Object} events - The previous page of events (the response from the last {@link Event.getNextPage} or {@link Event.all} call). + * @param {number} [pageSize] - The number of events to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Event events} and pagination information. + */ + static getNextPage( + events: Object, + pageSize?: number, + ): Promise<{ events: Event[]; has_more: boolean }>; } diff --git a/types/Insurance/Insurance.d.ts b/types/Insurance/Insurance.d.ts index 1d4c8e15a..0c3697f82 100644 --- a/types/Insurance/Insurance.d.ts +++ b/types/Insurance/Insurance.d.ts @@ -145,4 +145,20 @@ export declare class Insurance implements IInsurance { * @returns {Promise} The retrieved {@link Insurance}. */ static retrieve(insuranceId: string): Promise; + + /** + * Retrieve the next page of {@link Insurance insurances}. + * + * This automatically reuses the parameters from the previous call or the original {@link Insurance.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-insurances + * + * @param {Object} insurances - The previous page of insurances (the response from the last {@link Insurance.getNextPage} or {@link Insurance.all} call). + * @param {number} [pageSize] - The number of insurances to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Insurance insurances} and pagination information. + */ + static getNextPage( + insurances: Object, + pageSize?: number, + ): Promise<{ insurances: Insurance[]; has_more: boolean }>; } diff --git a/types/Pickup/Pickup.d.ts b/types/Pickup/Pickup.d.ts index 753b08343..258494697 100644 --- a/types/Pickup/Pickup.d.ts +++ b/types/Pickup/Pickup.d.ts @@ -173,6 +173,22 @@ export declare class Pickup implements IPickup { */ static cancel(pickupId: string): Promise; + /** + * Retrieve the next page of {@link Pickup pickups}. + * + * This automatically reuses the parameters from the previous call or the original {@link Pickup.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-pickups + * + * @param {Object} pickups - The previous page of pickups (the response from the last {@link Pickup.getNextPage} or {@link Pickup.all} call). + * @param {number} [pageSize] - The number of pickups to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Pickup pickups} and pagination information. + */ + static getNextPage( + pickups: Object, + pageSize?: number, + ): Promise<{ pickups: Pickup[]; has_more: boolean }>; + /** * * @param carriers a list of carriers to filter rates for. diff --git a/types/Referral/Referral.d.ts b/types/Referral/Referral.d.ts index f61dd0fdc..2150e1a51 100644 --- a/types/Referral/Referral.d.ts +++ b/types/Referral/Referral.d.ts @@ -96,4 +96,20 @@ export declare class Referral implements IReferral { * @returns {object} Object representing the newly-added payment method */ static refundByPaymentLog(paymentLogId: string): object; + + /** + * Retrieve the next page of {@link Referral referrals}. + * + * This automatically reuses the parameters from the previous call or the original {@link Referral.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-referral-customers + * + * @param {Object} referralCustomers - The previous page of referrals (the response from the last {@link Referral.getNextPage} or {@link Referral.all} call). + * @param {number} [pageSize] - The number of referrals to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Referral referrals} and pagination information. + */ + static getNextPage( + referralCustomers: Object, + pageSize?: number, + ): Promise<{ referrals: Referral[]; has_more: boolean }>; } diff --git a/types/Refund/Refund.d.ts b/types/Refund/Refund.d.ts index 406f8bbc5..30e2731a3 100644 --- a/types/Refund/Refund.d.ts +++ b/types/Refund/Refund.d.ts @@ -81,4 +81,20 @@ export declare class Refund implements IRefund { * @returns {Promise} The created and verified {@link Refund}. */ static retrieve(refundId: string): Promise; + + /** + * Retrieve the next page of {@link Refund refunds}. + * + * This automatically reuses the parameters from the previous call or the original {@link Refund.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-refunds + * + * @param {Object} refunds - The previous page of refunds (the response from the last {@link Refund.getNextPage} or {@link Refund.all} call). + * @param {number} [pageSize] - The number of refunds to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Refund refunds} and pagination information. + */ + static getNextPage( + refunds: Object, + pageSize?: number, + ): Promise<{ refunds: Refund[]; has_more: boolean }>; } diff --git a/types/Report/Report.d.ts b/types/Report/Report.d.ts index 54ad5eb69..665ee2e5a 100644 --- a/types/Report/Report.d.ts +++ b/types/Report/Report.d.ts @@ -114,4 +114,20 @@ export declare class Report implements IReport { * @see https://www.easypost.com/docs/api/node#retrieve-a-report */ static retrieve(reportId: string): Promise; + + /** + * Retrieve the next page of {@link Report reports}. + * + * This automatically reuses the parameters from the previous call or the original {@link Report.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-reports + * + * @param {Object} reports - The previous page of reports (the response from the last {@link Report.getNextPage} or {@link Report.all} call). + * @param {number} [pageSize] - The number of reports to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Report reports} and pagination information. + */ + static getNextPage( + reports: Object, + pageSize?: number, + ): Promise<{ reports: Report[]; has_more: boolean }>; } diff --git a/types/ScanForm/ScanForm.d.ts b/types/ScanForm/ScanForm.d.ts index 22f72a078..91502e07b 100644 --- a/types/ScanForm/ScanForm.d.ts +++ b/types/ScanForm/ScanForm.d.ts @@ -107,4 +107,20 @@ export declare class ScanForm implements IScanForm { * @param {string} scanFormId Unique, begins with "sf_". */ static retrieve(scanFormId: string): Promise; + + /** + * Retrieve the next page of {@link ScanForm scan forms}. + * + * This automatically reuses the parameters from the previous call or the original {@link ScanForm.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-scanforms + * + * @param {Object} scanforms - The previous page of scan forms (the response from the last {@link ScanForm.getNextPage} or {@link ScanForm.all} call). + * @param {number} [pageSize] - The number of scan forms to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link ScanForm scan forms} and pagination information. + */ + static getNextPage( + scanforms: Object, + pageSize?: number, + ): Promise<{ scanforms: ScanForm[]; has_more: boolean }>; } diff --git a/types/Shipment/Shipment.d.ts b/types/Shipment/Shipment.d.ts index 8a3848804..9b20d406d 100644 --- a/types/Shipment/Shipment.d.ts +++ b/types/Shipment/Shipment.d.ts @@ -327,4 +327,20 @@ export declare class Shipment implements IShipment { * @returns {Promise>} The array of estimated delivery dates and rates. */ static retrieveEstimatedDeliveryDate(id: string, plannedShipDate: string): Promise>; + + /** + * Retrieve the next page of {@link Shipment shipments}. + * + * This automatically reuses the parameters from the previous call or the original {@link Shipment.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-shipments + * + * @param {Object} shipments - The previous page of shipments (the response from the last {@link Shipment.getNextPage} or {@link Shipment.all} call). + * @param {number} [pageSize] - The number of shipments to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Shipment shipments} and pagination information. + */ + static getNextPage( + shipments: Object, + pageSize?: number, + ): Promise<{ shipments: Shipment[]; has_more: boolean }>; } diff --git a/types/Tracker/Tracker.d.ts b/types/Tracker/Tracker.d.ts index 250109183..74e85f86b 100644 --- a/types/Tracker/Tracker.d.ts +++ b/types/Tracker/Tracker.d.ts @@ -165,4 +165,20 @@ export declare class Tracker implements ITracker { * @returns {Promise} The retrieved {@link Tracker}. */ static retrieve(trackerId: string): Promise; + + /** + * Retrieve the next page of {@link Tracker trackers}. + * + * This automatically reuses the parameters from the previous call or the original {@link Tracker.all} call. + * + * @see https://www.easypost.com/docs/api/node#retrieve-a-list-of-trackers + * + * @param {Object} trackers - The previous page of trackers (the response from the last {@link Tracker.getNextPage} or {@link Tracker.all} call). + * @param {number} [pageSize] - The number of trackers to retrieve per page, optional. Defaults to server-side default. + * @returns {Object} - An object containing a list of {@link Tracker trackers} and pagination information. + */ + static getNextPage( + trackers: Object, + pageSize?: number, + ): Promise<{ trackers: Tracker[]; has_more: boolean }>; }