diff --git a/src/client.ts b/src/client.ts index c1b176d..4c93d12 100644 --- a/src/client.ts +++ b/src/client.ts @@ -130,7 +130,12 @@ export class BinDistClient { async listApplications( options: ListApplicationsOptions = {} ): Promise> { - const queryString = this.buildQueryString(options as Record); + // The API reads the page-size parameter as `limit`; `pageSize` is ignored. + const { pageSize, ...rest } = options; + const queryString = this.buildQueryString({ + ...rest, + ...(pageSize === undefined ? {} : { limit: pageSize }), + } as Record); return this.request( `/v1/applications${queryString}` ); diff --git a/src/types.ts b/src/types.ts index ae7f2dc..bf5d48e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -130,6 +130,7 @@ export interface DownloadInfo { */ export interface ListApplicationsOptions { page?: number; + /** Items per page. Sent as the `limit` query parameter; the server caps it at 100. */ pageSize?: number; search?: string; tags?: string;