Skip to content

Commit fbb4acf

Browse files
chore(api): update composite API spec
1 parent e2e9bbd commit fbb4acf

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1891
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7e4d0f06a14e00e1fded122c6e363b955753c19f529887d691584630b9625544.yml
3-
openapi_spec_hash: f04905b36443a3e136496c9dc28ea51d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6d83cb5b55796ad6fb90e4941b68bf0814dee7735ce3a458dd249f5c5bcea2cb.yml
3+
openapi_spec_hash: 1c6947fbdbd925e0acbe688861673092
44
config_hash: f8ad41a1e87119e46c6452f8f1ea0440

src/resources/api-gateway/configurations.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ export class Configurations extends APIResource {
1919
* ```
2020
*/
2121
update(params: ConfigurationUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Configuration> {
22-
const { zone_id, ...body } = params;
22+
const { zone_id, normalize, ...body } = params;
2323
return (
2424
this._client.put(`/zones/${zone_id}/api_gateway/configuration`, {
25+
query: { normalize },
2526
body,
2627
...options,
2728
}) as Core.APIPromise<{ result: Configuration }>
@@ -40,11 +41,12 @@ export class Configurations extends APIResource {
4041
* ```
4142
*/
4243
get(params: ConfigurationGetParams, options?: Core.RequestOptions): Core.APIPromise<Configuration> {
43-
const { zone_id } = params;
44+
const { zone_id, ...query } = params;
4445
return (
45-
this._client.get(`/zones/${zone_id}/api_gateway/configuration`, options) as Core.APIPromise<{
46-
result: Configuration;
47-
}>
46+
this._client.get(`/zones/${zone_id}/api_gateway/configuration`, {
47+
query,
48+
...options,
49+
}) as Core.APIPromise<{ result: Configuration }>
4850
)._thenUnwrap((obj) => obj.result);
4951
}
5052
}
@@ -106,6 +108,12 @@ export interface ConfigurationUpdateParams {
106108
| ConfigurationUpdateParams.APIShieldAuthIDCharacteristic
107109
| ConfigurationUpdateParams.APIShieldAuthIDCharacteristicJWTClaim
108110
>;
111+
112+
/**
113+
* Query param: Ensures that the configuration is written or retrieved in
114+
* normalized fashion
115+
*/
116+
normalize?: boolean;
109117
}
110118

111119
export namespace ConfigurationUpdateParams {
@@ -148,9 +156,15 @@ export namespace ConfigurationUpdateParams {
148156

149157
export interface ConfigurationGetParams {
150158
/**
151-
* Identifier.
159+
* Path param: Identifier.
152160
*/
153161
zone_id: string;
162+
163+
/**
164+
* Query param: Ensures that the configuration is written or retrieved in
165+
* normalized fashion
166+
*/
167+
normalize?: boolean;
154168
}
155169

156170
export declare namespace Configurations {

tests/api-resources/api-gateway/configurations.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ describe('resource configurations', () => {
2828
const response = await client.apiGateway.configurations.update({
2929
zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
3030
auth_id_characteristics: [{ name: 'authorization', type: 'header' }],
31+
normalize: true,
3132
});
3233
});
3334

@@ -47,6 +48,7 @@ describe('resource configurations', () => {
4748
test('get: required and optional params', async () => {
4849
const response = await client.apiGateway.configurations.get({
4950
zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
51+
normalize: true,
5052
});
5153
});
5254
});

0 commit comments

Comments
 (0)