Skip to content

Commit ce30887

Browse files
chore(api): update composite API spec
1 parent f70dfa8 commit ce30887

6 files changed

Lines changed: 34 additions & 106 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2412
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-9cadb6f47eb3d145352d0e7112605e553321aa88991fc55ba6efbe665bb2b52f.yml
3-
openapi_spec_hash: 653808896077b2132c43a0a8a383679c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-77454b7f4d8a6c1b61e16e7f01c2b7af393011c053722940267b38937660140b.yml
3+
openapi_spec_hash: 5929bc536ceca35c4f3ff7af07094fcb
44
config_hash: a23f4c71ccd6c6117c24f63ae415dcf7

src/cloudflare/types/rulesets/rule_create_params.py

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3430,29 +3430,15 @@ class SetCacheSettingsRuleActionParametersSharedDictionary(TypedDict, total=Fals
34303430

34313431
class SetCacheSettingsRuleActionParametersVaryDefault(TypedDict, total=False):
34323432
"""
3433-
Controls how a single request header (or the default for all headers) contributes to the cache key.
3433+
Controls how response Vary headers without a per-header override contribute to the cache key.
34343434
"""
34353435

34363436
action: Required[Literal["bypass", "passthrough", "normalize"]]
34373437
"""How the header value is treated when building the cache key."""
34383438

3439-
languages: SequenceNotStr[str]
3440-
"""The set of languages to normalize against.
3441-
3442-
Only valid for the `accept-language` header.
3443-
"""
3444-
3445-
media_types: SequenceNotStr[str]
3446-
"""The set of media types to normalize against.
3447-
3448-
Only valid for the `accept` header.
3449-
"""
3450-
34513439

34523440
class SetCacheSettingsRuleActionParametersVaryHeaders(TypedDict, total=False):
3453-
"""
3454-
Controls how a single request header (or the default for all headers) contributes to the cache key.
3455-
"""
3441+
"""Controls how a single request header contributes to the cache key."""
34563442

34573443
action: Required[Literal["bypass", "passthrough", "normalize"]]
34583444
"""How the header value is treated when building the cache key."""
@@ -3473,13 +3459,13 @@ class SetCacheSettingsRuleActionParametersVaryHeaders(TypedDict, total=False):
34733459
class SetCacheSettingsRuleActionParametersVary(TypedDict, total=False):
34743460
"""Controls how cached responses vary based on request headers.
34753461
3476-
At least one of `default` or `headers` must be set, and `default` is required when `headers` is set.
3462+
`default` is required by the API and applies to any Vary response header that does not have a per-header override.
34773463
"""
34783464

34793465
default: SetCacheSettingsRuleActionParametersVaryDefault
34803466
"""
3481-
Controls how a single request header (or the default for all headers)
3482-
contributes to the cache key.
3467+
Controls how response Vary headers without a per-header override contribute to
3468+
the cache key.
34833469
"""
34843470

34853471
headers: Dict[str, SetCacheSettingsRuleActionParametersVaryHeaders]
@@ -3564,8 +3550,8 @@ class SetCacheSettingsRuleActionParameters(TypedDict, total=False):
35643550
vary: SetCacheSettingsRuleActionParametersVary
35653551
"""Controls how cached responses vary based on request headers.
35663552
3567-
At least one of `default` or `headers` must be set, and `default` is required
3568-
when `headers` is set.
3553+
`default` is required by the API and applies to any Vary response header that
3554+
does not have a per-header override.
35693555
"""
35703556

35713557

src/cloudflare/types/rulesets/rule_edit_params.py

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3481,29 +3481,15 @@ class SetCacheSettingsRuleActionParametersSharedDictionary(TypedDict, total=Fals
34813481

34823482
class SetCacheSettingsRuleActionParametersVaryDefault(TypedDict, total=False):
34833483
"""
3484-
Controls how a single request header (or the default for all headers) contributes to the cache key.
3484+
Controls how response Vary headers without a per-header override contribute to the cache key.
34853485
"""
34863486

34873487
action: Required[Literal["bypass", "passthrough", "normalize"]]
34883488
"""How the header value is treated when building the cache key."""
34893489

3490-
languages: SequenceNotStr[str]
3491-
"""The set of languages to normalize against.
3492-
3493-
Only valid for the `accept-language` header.
3494-
"""
3495-
3496-
media_types: SequenceNotStr[str]
3497-
"""The set of media types to normalize against.
3498-
3499-
Only valid for the `accept` header.
3500-
"""
3501-
35023490

35033491
class SetCacheSettingsRuleActionParametersVaryHeaders(TypedDict, total=False):
3504-
"""
3505-
Controls how a single request header (or the default for all headers) contributes to the cache key.
3506-
"""
3492+
"""Controls how a single request header contributes to the cache key."""
35073493

35083494
action: Required[Literal["bypass", "passthrough", "normalize"]]
35093495
"""How the header value is treated when building the cache key."""
@@ -3524,13 +3510,13 @@ class SetCacheSettingsRuleActionParametersVaryHeaders(TypedDict, total=False):
35243510
class SetCacheSettingsRuleActionParametersVary(TypedDict, total=False):
35253511
"""Controls how cached responses vary based on request headers.
35263512
3527-
At least one of `default` or `headers` must be set, and `default` is required when `headers` is set.
3513+
`default` is required by the API and applies to any Vary response header that does not have a per-header override.
35283514
"""
35293515

35303516
default: SetCacheSettingsRuleActionParametersVaryDefault
35313517
"""
3532-
Controls how a single request header (or the default for all headers)
3533-
contributes to the cache key.
3518+
Controls how response Vary headers without a per-header override contribute to
3519+
the cache key.
35343520
"""
35353521

35363522
headers: Dict[str, SetCacheSettingsRuleActionParametersVaryHeaders]
@@ -3615,8 +3601,8 @@ class SetCacheSettingsRuleActionParameters(TypedDict, total=False):
36153601
vary: SetCacheSettingsRuleActionParametersVary
36163602
"""Controls how cached responses vary based on request headers.
36173603
3618-
At least one of `default` or `headers` must be set, and `default` is required
3619-
when `headers` is set.
3604+
`default` is required by the API and applies to any Vary response header that
3605+
does not have a per-header override.
36203606
"""
36213607

36223608

src/cloudflare/types/rulesets/set_cache_settings_rule.py

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -258,29 +258,15 @@ class ActionParametersSharedDictionary(BaseModel):
258258

259259
class ActionParametersVaryDefault(BaseModel):
260260
"""
261-
Controls how a single request header (or the default for all headers) contributes to the cache key.
261+
Controls how response Vary headers without a per-header override contribute to the cache key.
262262
"""
263263

264264
action: Literal["bypass", "passthrough", "normalize"]
265265
"""How the header value is treated when building the cache key."""
266266

267-
languages: Optional[List[str]] = None
268-
"""The set of languages to normalize against.
269-
270-
Only valid for the `accept-language` header.
271-
"""
272-
273-
media_types: Optional[List[str]] = None
274-
"""The set of media types to normalize against.
275-
276-
Only valid for the `accept` header.
277-
"""
278-
279267

280268
class ActionParametersVaryHeaders(BaseModel):
281-
"""
282-
Controls how a single request header (or the default for all headers) contributes to the cache key.
283-
"""
269+
"""Controls how a single request header contributes to the cache key."""
284270

285271
action: Literal["bypass", "passthrough", "normalize"]
286272
"""How the header value is treated when building the cache key."""
@@ -301,13 +287,13 @@ class ActionParametersVaryHeaders(BaseModel):
301287
class ActionParametersVary(BaseModel):
302288
"""Controls how cached responses vary based on request headers.
303289
304-
At least one of `default` or `headers` must be set, and `default` is required when `headers` is set.
290+
`default` is required by the API and applies to any Vary response header that does not have a per-header override.
305291
"""
306292

307293
default: Optional[ActionParametersVaryDefault] = None
308294
"""
309-
Controls how a single request header (or the default for all headers)
310-
contributes to the cache key.
295+
Controls how response Vary headers without a per-header override contribute to
296+
the cache key.
311297
"""
312298

313299
headers: Optional[Dict[str, ActionParametersVaryHeaders]] = None
@@ -392,8 +378,8 @@ class ActionParameters(BaseModel):
392378
vary: Optional[ActionParametersVary] = None
393379
"""Controls how cached responses vary based on request headers.
394380
395-
At least one of `default` or `headers` must be set, and `default` is required
396-
when `headers` is set.
381+
`default` is required by the API and applies to any Vary response header that
382+
does not have a per-header override.
397383
"""
398384

399385

src/cloudflare/types/rulesets/set_cache_settings_rule_param.py

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -265,29 +265,15 @@ class ActionParametersSharedDictionary(TypedDict, total=False):
265265

266266
class ActionParametersVaryDefault(TypedDict, total=False):
267267
"""
268-
Controls how a single request header (or the default for all headers) contributes to the cache key.
268+
Controls how response Vary headers without a per-header override contribute to the cache key.
269269
"""
270270

271271
action: Required[Literal["bypass", "passthrough", "normalize"]]
272272
"""How the header value is treated when building the cache key."""
273273

274-
languages: SequenceNotStr[str]
275-
"""The set of languages to normalize against.
276-
277-
Only valid for the `accept-language` header.
278-
"""
279-
280-
media_types: SequenceNotStr[str]
281-
"""The set of media types to normalize against.
282-
283-
Only valid for the `accept` header.
284-
"""
285-
286274

287275
class ActionParametersVaryHeaders(TypedDict, total=False):
288-
"""
289-
Controls how a single request header (or the default for all headers) contributes to the cache key.
290-
"""
276+
"""Controls how a single request header contributes to the cache key."""
291277

292278
action: Required[Literal["bypass", "passthrough", "normalize"]]
293279
"""How the header value is treated when building the cache key."""
@@ -308,13 +294,13 @@ class ActionParametersVaryHeaders(TypedDict, total=False):
308294
class ActionParametersVary(TypedDict, total=False):
309295
"""Controls how cached responses vary based on request headers.
310296
311-
At least one of `default` or `headers` must be set, and `default` is required when `headers` is set.
297+
`default` is required by the API and applies to any Vary response header that does not have a per-header override.
312298
"""
313299

314300
default: ActionParametersVaryDefault
315301
"""
316-
Controls how a single request header (or the default for all headers)
317-
contributes to the cache key.
302+
Controls how response Vary headers without a per-header override contribute to
303+
the cache key.
318304
"""
319305

320306
headers: Dict[str, ActionParametersVaryHeaders]
@@ -399,8 +385,8 @@ class ActionParameters(TypedDict, total=False):
399385
vary: ActionParametersVary
400386
"""Controls how cached responses vary based on request headers.
401387
402-
At least one of `default` or `headers` must be set, and `default` is required
403-
when `headers` is set.
388+
`default` is required by the API and applies to any Vary response header that
389+
does not have a per-header override.
404390
"""
405391

406392

tests/api_resources/rulesets/test_rules.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,11 +1689,7 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) ->
16891689
"strip_last_modified": True,
16901690
"strip_set_cookie": True,
16911691
"vary": {
1692-
"default": {
1693-
"action": "normalize",
1694-
"languages": ["en"],
1695-
"media_types": ["image/webp"],
1696-
},
1692+
"default": {"action": "normalize"},
16971693
"headers": {
16981694
"accept": {
16991695
"action": "normalize",
@@ -4057,11 +4053,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No
40574053
"strip_last_modified": True,
40584054
"strip_set_cookie": True,
40594055
"vary": {
4060-
"default": {
4061-
"action": "normalize",
4062-
"languages": ["en"],
4063-
"media_types": ["image/webp"],
4064-
},
4056+
"default": {"action": "normalize"},
40654057
"headers": {
40664058
"accept": {
40674059
"action": "normalize",
@@ -6178,11 +6170,7 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy
61786170
"strip_last_modified": True,
61796171
"strip_set_cookie": True,
61806172
"vary": {
6181-
"default": {
6182-
"action": "normalize",
6183-
"languages": ["en"],
6184-
"media_types": ["image/webp"],
6185-
},
6173+
"default": {"action": "normalize"},
61866174
"headers": {
61876175
"accept": {
61886176
"action": "normalize",
@@ -8546,11 +8534,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async
85468534
"strip_last_modified": True,
85478535
"strip_set_cookie": True,
85488536
"vary": {
8549-
"default": {
8550-
"action": "normalize",
8551-
"languages": ["en"],
8552-
"media_types": ["image/webp"],
8553-
},
8537+
"default": {"action": "normalize"},
85548538
"headers": {
85558539
"accept": {
85568540
"action": "normalize",

0 commit comments

Comments
 (0)