Skip to content

Commit 2b0e272

Browse files
stainless-app[bot]meorphis
authored andcommitted
feat(api): api update (#2285)
1 parent f0140e7 commit 2b0e272

File tree

19 files changed

+197
-381
lines changed

19 files changed

+197
-381
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 1490
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-85569f0482730af4e8c6afc9b33c7ba894e47b2d8fa36a3e013daf5390adb647.yml
1+
configured_endpoints: 1489
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-de7ae109130349e5b0b35b4d0944270435dfddb3ce7079da9b85f5dffaf86639.yml

api.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -615,12 +615,13 @@ Methods:
615615
Types:
616616

617617
- <code><a href="./src/resources/cache/variants.ts">CacheVariant</a></code>
618+
- <code><a href="./src/resources/cache/variants.ts">VariantDeleteResponse</a></code>
618619
- <code><a href="./src/resources/cache/variants.ts">VariantEditResponse</a></code>
619620
- <code><a href="./src/resources/cache/variants.ts">VariantGetResponse</a></code>
620621

621622
Methods:
622623

623-
- <code title="delete /zones/{zone_id}/cache/variants">client.cache.variants.<a href="./src/resources/cache/variants.ts">delete</a>({ ...params }) -> CacheVariant</code>
624+
- <code title="delete /zones/{zone_id}/cache/variants">client.cache.variants.<a href="./src/resources/cache/variants.ts">delete</a>({ ...params }) -> VariantDeleteResponse</code>
624625
- <code title="patch /zones/{zone_id}/cache/variants">client.cache.variants.<a href="./src/resources/cache/variants.ts">edit</a>({ ...params }) -> VariantEditResponse</code>
625626
- <code title="get /zones/{zone_id}/cache/variants">client.cache.variants.<a href="./src/resources/cache/variants.ts">get</a>({ ...params }) -> VariantGetResponse</code>
626627

@@ -4318,8 +4319,8 @@ Types:
43184319

43194320
Methods:
43204321

4321-
- <code title="patch /zones/{zone_id}/devices/policy/certificates">client.zeroTrust.devices.policies.default.certificates.<a href="./src/resources/zero-trust/devices/policies/default/certificates.ts">edit</a>({ ...params }) -> CertificateEditResponse</code>
4322-
- <code title="get /zones/{zone_id}/devices/policy/certificates">client.zeroTrust.devices.policies.default.certificates.<a href="./src/resources/zero-trust/devices/policies/default/certificates.ts">get</a>({ ...params }) -> CertificateGetResponse</code>
4322+
- <code title="patch /zones/{zone_id}/devices/policy/certificates">client.zeroTrust.devices.policies.default.certificates.<a href="./src/resources/zero-trust/devices/policies/default/certificates.ts">edit</a>({ ...params }) -> CertificateEditResponse | null</code>
4323+
- <code title="get /zones/{zone_id}/devices/policy/certificates">client.zeroTrust.devices.policies.default.certificates.<a href="./src/resources/zero-trust/devices/policies/default/certificates.ts">get</a>({ ...params }) -> CertificateGetResponse | null</code>
43234324

43244325
#### Custom
43254326

@@ -4414,7 +4415,7 @@ Methods:
44144415

44154416
- <code title="post /accounts/{account_id}/devices/posture/integration">client.zeroTrust.devices.posture.integrations.<a href="./src/resources/zero-trust/devices/posture/integrations.ts">create</a>({ ...params }) -> Integration | null</code>
44164417
- <code title="get /accounts/{account_id}/devices/posture/integration">client.zeroTrust.devices.posture.integrations.<a href="./src/resources/zero-trust/devices/posture/integrations.ts">list</a>({ ...params }) -> IntegrationsSinglePage</code>
4417-
- <code title="delete /accounts/{account_id}/devices/posture/integration/{integration_id}">client.zeroTrust.devices.posture.integrations.<a href="./src/resources/zero-trust/devices/posture/integrations.ts">delete</a>(integrationId, { ...params }) -> IntegrationDeleteResponse</code>
4418+
- <code title="delete /accounts/{account_id}/devices/posture/integration/{integration_id}">client.zeroTrust.devices.posture.integrations.<a href="./src/resources/zero-trust/devices/posture/integrations.ts">delete</a>(integrationId, { ...params }) -> IntegrationDeleteResponse | null</code>
44184419
- <code title="patch /accounts/{account_id}/devices/posture/integration/{integration_id}">client.zeroTrust.devices.posture.integrations.<a href="./src/resources/zero-trust/devices/posture/integrations.ts">edit</a>(integrationId, { ...params }) -> Integration | null</code>
44194420
- <code title="get /accounts/{account_id}/devices/posture/integration/{integration_id}">client.zeroTrust.devices.posture.integrations.<a href="./src/resources/zero-trust/devices/posture/integrations.ts">get</a>(integrationId, { ...params }) -> Integration | null</code>
44204421

@@ -4426,7 +4427,7 @@ Types:
44264427

44274428
Methods:
44284429

4429-
- <code title="post /accounts/{account_id}/devices/revoke">client.zeroTrust.devices.revoke.<a href="./src/resources/zero-trust/devices/revoke.ts">create</a>([ ...body ]) -> RevokeCreateResponse</code>
4430+
- <code title="post /accounts/{account_id}/devices/revoke">client.zeroTrust.devices.revoke.<a href="./src/resources/zero-trust/devices/revoke.ts">create</a>([ ...body ]) -> RevokeCreateResponse | null</code>
44304431

44314432
### Settings
44324433

@@ -4448,7 +4449,7 @@ Types:
44484449

44494450
Methods:
44504451

4451-
- <code title="post /accounts/{account_id}/devices/unrevoke">client.zeroTrust.devices.unrevoke.<a href="./src/resources/zero-trust/devices/unrevoke.ts">create</a>([ ...body ]) -> UnrevokeCreateResponse</code>
4452+
- <code title="post /accounts/{account_id}/devices/unrevoke">client.zeroTrust.devices.unrevoke.<a href="./src/resources/zero-trust/devices/unrevoke.ts">create</a>([ ...body ]) -> UnrevokeCreateResponse | null</code>
44524453

44534454
### OverrideCodes
44544455

@@ -5689,7 +5690,7 @@ Methods:
56895690

56905691
- <code title="post /accounts/{account_id}/vectorize/v2/indexes">client.vectorize.indexes.<a href="./src/resources/vectorize/indexes/indexes.ts">create</a>({ ...params }) -> CreateIndex | null</code>
56915692
- <code title="get /accounts/{account_id}/vectorize/v2/indexes">client.vectorize.indexes.<a href="./src/resources/vectorize/indexes/indexes.ts">list</a>({ ...params }) -> CreateIndicesSinglePage</code>
5692-
- <code title="delete /accounts/{account_id}/vectorize/v2/indexes/{index_name}">client.vectorize.indexes.<a href="./src/resources/vectorize/indexes/indexes.ts">delete</a>(indexName, { ...params }) -> IndexDeleteResponse</code>
5693+
- <code title="delete /accounts/{account_id}/vectorize/v2/indexes/{index_name}">client.vectorize.indexes.<a href="./src/resources/vectorize/indexes/indexes.ts">delete</a>(indexName, { ...params }) -> IndexDeleteResponse | null</code>
56935694
- <code title="post /accounts/{account_id}/vectorize/v2/indexes/{index_name}/delete_by_ids">client.vectorize.indexes.<a href="./src/resources/vectorize/indexes/indexes.ts">deleteByIds</a>(indexName, { ...params }) -> IndexDeleteByIDsResponse | null</code>
56945695
- <code title="get /accounts/{account_id}/vectorize/v2/indexes/{index_name}">client.vectorize.indexes.<a href="./src/resources/vectorize/indexes/indexes.ts">get</a>(indexName, { ...params }) -> CreateIndex | null</code>
56955696
- <code title="post /accounts/{account_id}/vectorize/v2/indexes/{index_name}/get_by_ids">client.vectorize.indexes.<a href="./src/resources/vectorize/indexes/indexes.ts">getByIds</a>(indexName, { ...params }) -> IndexGetByIDsResponse | null</code>
@@ -6743,12 +6744,10 @@ Methods:
67436744

67446745
Types:
67456746

6746-
- <code><a href="./src/resources/origin-post-quantum-encryption.ts">OriginPostQuantumEncryptionUpdateResponse</a></code>
67476747
- <code><a href="./src/resources/origin-post-quantum-encryption.ts">OriginPostQuantumEncryptionGetResponse</a></code>
67486748

67496749
Methods:
67506750

6751-
- <code title="put /zones/{zone_id}/cache/origin_post_quantum_encryption">client.originPostQuantumEncryption.<a href="./src/resources/origin-post-quantum-encryption.ts">update</a>({ ...params }) -> OriginPostQuantumEncryptionUpdateResponse</code>
67526751
- <code title="get /zones/{zone_id}/cache/origin_post_quantum_encryption">client.originPostQuantumEncryption.<a href="./src/resources/origin-post-quantum-encryption.ts">get</a>({ ...params }) -> OriginPostQuantumEncryptionGetResponse</code>
67536752

67546753
# Speed

src/resources/argo/tiered-caching.ts

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@ import * as Core from '../../core';
55

66
export class TieredCaching extends APIResource {
77
/**
8-
* Updates enablement of Tiered Caching
8+
* Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of
9+
* lower-tiers and upper-tiers. If content is not cached in lower-tier data centers
10+
* (generally the ones closest to a visitor), the lower-tier must ask an upper-tier
11+
* to see if it has the content. If the upper-tier does not have the content, only
12+
* the upper-tier can ask the origin for content. This practice improves bandwidth
13+
* efficiency by limiting the number of data centers that can ask the origin for
14+
* content, which reduces origin load and makes websites more cost-effective to
15+
* operate. Additionally, Tiered Cache concentrates connections to origin servers
16+
* so they come from a small number of data centers rather than the full set of
17+
* network locations. This results in fewer open connections using server
18+
* resources.
919
*/
1020
edit(
1121
params: TieredCachingEditParams,
@@ -20,7 +30,17 @@ export class TieredCaching extends APIResource {
2030
}
2131

2232
/**
23-
* Get Tiered Caching setting
33+
* Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of
34+
* lower-tiers and upper-tiers. If content is not cached in lower-tier data centers
35+
* (generally the ones closest to a visitor), the lower-tier must ask an upper-tier
36+
* to see if it has the content. If the upper-tier does not have the content, only
37+
* the upper-tier can ask the origin for content. This practice improves bandwidth
38+
* efficiency by limiting the number of data centers that can ask the origin for
39+
* content, which reduces origin load and makes websites more cost-effective to
40+
* operate. Additionally, Tiered Cache concentrates connections to origin servers
41+
* so they come from a small number of data centers rather than the full set of
42+
* network locations. This results in fewer open connections using server
43+
* resources.
2444
*/
2545
get(
2646
params: TieredCachingGetParams,
@@ -37,46 +57,46 @@ export class TieredCaching extends APIResource {
3757

3858
export interface TieredCachingEditResponse {
3959
/**
40-
* The identifier of the caching setting
60+
* ID of the zone setting.
4161
*/
42-
id: string;
62+
id: 'tiered_caching';
4363

4464
/**
4565
* Whether the setting is editable
4666
*/
4767
editable: boolean;
4868

4969
/**
50-
* The time when the setting was last modified
70+
* The value of the feature
5171
*/
52-
modified_on: string;
72+
value: 'on' | 'off';
5373

5474
/**
55-
* The status of the feature being on / off
75+
* Last time this setting was modified.
5676
*/
57-
value: 'on' | 'off';
77+
modified_on?: string | null;
5878
}
5979

6080
export interface TieredCachingGetResponse {
6181
/**
62-
* The identifier of the caching setting
82+
* ID of the zone setting.
6383
*/
64-
id: string;
84+
id: 'tiered_caching';
6585

6686
/**
6787
* Whether the setting is editable
6888
*/
6989
editable: boolean;
7090

7191
/**
72-
* The time when the setting was last modified
92+
* The value of the feature
7393
*/
74-
modified_on: string;
94+
value: 'on' | 'off';
7595

7696
/**
77-
* The status of the feature being on / off
97+
* Last time this setting was modified.
7898
*/
79-
value: 'on' | 'off';
99+
modified_on?: string | null;
80100
}
81101

82102
export interface TieredCachingEditParams {

src/resources/cache/cache-reserve.ts

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,6 @@ export interface CacheReserveClearResponse {
109109
*/
110110
id: CacheReserveClear;
111111

112-
/**
113-
* last time this setting was modified.
114-
*/
115-
modified_on: string | null;
116-
117112
/**
118113
* The time that the latest Cache Reserve Clear operation started.
119114
*/
@@ -128,56 +123,55 @@ export interface CacheReserveClearResponse {
128123
* The time that the latest Cache Reserve Clear operation completed.
129124
*/
130125
end_ts?: string;
126+
127+
/**
128+
* Last time this setting was modified.
129+
*/
130+
modified_on?: string | null;
131131
}
132132

133-
/**
134-
* Increase cache lifetimes by automatically storing all cacheable files into
135-
* Cloudflare's persistent object storage buckets. Requires Cache Reserve
136-
* subscription. Note: using Tiered Cache with Cache Reserve is highly recommended
137-
* to reduce Reserve operations costs. See the
138-
* [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve)
139-
* for more information.
140-
*/
141133
export interface CacheReserveEditResponse {
142134
/**
143135
* ID of the zone setting.
144136
*/
145137
id: CacheReserve;
146138

147139
/**
148-
* last time this setting was modified.
140+
* Whether the setting is editable
149141
*/
150-
modified_on: string | null;
142+
editable: boolean;
151143

152144
/**
153-
* Value of the Cache Reserve zone setting.
145+
* The value of the feature
154146
*/
155147
value: 'on' | 'off';
148+
149+
/**
150+
* Last time this setting was modified.
151+
*/
152+
modified_on?: string | null;
156153
}
157154

158-
/**
159-
* Increase cache lifetimes by automatically storing all cacheable files into
160-
* Cloudflare's persistent object storage buckets. Requires Cache Reserve
161-
* subscription. Note: using Tiered Cache with Cache Reserve is highly recommended
162-
* to reduce Reserve operations costs. See the
163-
* [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve)
164-
* for more information.
165-
*/
166155
export interface CacheReserveGetResponse {
167156
/**
168157
* ID of the zone setting.
169158
*/
170159
id: CacheReserve;
171160

172161
/**
173-
* last time this setting was modified.
162+
* Whether the setting is editable
174163
*/
175-
modified_on: string | null;
164+
editable: boolean;
176165

177166
/**
178-
* Value of the Cache Reserve zone setting.
167+
* The value of the feature
179168
*/
180169
value: 'on' | 'off';
170+
171+
/**
172+
* Last time this setting was modified.
173+
*/
174+
modified_on?: string | null;
181175
}
182176

183177
/**
@@ -192,11 +186,6 @@ export interface CacheReserveStatusResponse {
192186
*/
193187
id: CacheReserveClear;
194188

195-
/**
196-
* last time this setting was modified.
197-
*/
198-
modified_on: string | null;
199-
200189
/**
201190
* The time that the latest Cache Reserve Clear operation started.
202191
*/
@@ -211,6 +200,11 @@ export interface CacheReserveStatusResponse {
211200
* The time that the latest Cache Reserve Clear operation completed.
212201
*/
213202
end_ts?: string;
203+
204+
/**
205+
* Last time this setting was modified.
206+
*/
207+
modified_on?: string | null;
214208
}
215209

216210
export interface CacheReserveClearParams {

src/resources/cache/cache.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import * as VariantsAPI from './variants';
4040
import {
4141
CacheVariant,
4242
VariantDeleteParams,
43+
VariantDeleteResponse,
4344
VariantEditParams,
4445
VariantEditResponse,
4546
VariantGetParams,
@@ -273,6 +274,7 @@ export declare namespace Cache {
273274
export {
274275
Variants as Variants,
275276
type CacheVariant as CacheVariant,
277+
type VariantDeleteResponse as VariantDeleteResponse,
276278
type VariantEditResponse as VariantEditResponse,
277279
type VariantGetResponse as VariantGetResponse,
278280
type VariantDeleteParams as VariantDeleteParams,

src/resources/cache/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export {
3535
export {
3636
Variants,
3737
type CacheVariant,
38+
type VariantDeleteResponse,
3839
type VariantEditResponse,
3940
type VariantGetResponse,
4041
type VariantDeleteParams,

0 commit comments

Comments
 (0)