Skip to content

Commit 27768b8

Browse files
feat(api): OpenAPI spec update via Stainless API (#350)
1 parent 8c3eb65 commit 27768b8

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

src/resources/healthchecks/healthchecks.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ export class Healthchecks extends APIResource {
4444
params: HealthcheckListParams,
4545
options?: Core.RequestOptions,
4646
): Core.PagePromise<HealthchecksSinglePage, Healthcheck> {
47-
const { zone_id } = params;
48-
return this._client.getAPIList(`/zones/${zone_id}/healthchecks`, HealthchecksSinglePage, options);
47+
const { zone_id, ...query } = params;
48+
return this._client.getAPIList(`/zones/${zone_id}/healthchecks`, HealthchecksSinglePage, {
49+
query,
50+
...options,
51+
});
4952
}
5053

5154
/**
@@ -528,9 +531,19 @@ export interface HealthcheckUpdateParams {
528531

529532
export interface HealthcheckListParams {
530533
/**
531-
* Identifier
534+
* Path param: Identifier
532535
*/
533536
zone_id: string;
537+
538+
/**
539+
* Query param: Page number of paginated results.
540+
*/
541+
page?: unknown;
542+
543+
/**
544+
* Query param: Maximum number of results per page. Must be a multiple of 5.
545+
*/
546+
per_page?: unknown;
534547
}
535548

536549
export interface HealthcheckDeleteParams {

tests/api-resources/healthchecks/healthchecks.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ describe('resource healthchecks', () => {
114114

115115
// skipped: tests are disabled for the time being
116116
test.skip('list: required and optional params', async () => {
117-
const response = await cloudflare.healthchecks.list({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' });
117+
const response = await cloudflare.healthchecks.list({
118+
zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
119+
page: {},
120+
per_page: {},
121+
});
118122
});
119123

120124
// skipped: tests are disabled for the time being

0 commit comments

Comments
 (0)