Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 2404
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-874436f83bd9c383144c69da47c4b767bb9c6f4f2bb4945af58cf3b6015f0f62.yml
openapi_spec_hash: beaf9a654991bf65d642e05c03460e4c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-dffae42e60784ca8228f71e302fcc65e835e71f92ab075e9dbf5bd050cb1d17f.yml
openapi_spec_hash: 847c9ce39141b8ec5d94dffc1ddcd032
config_hash: 2f529580a17438fc62cd0b47db41b6f1
70 changes: 68 additions & 2 deletions src/cloudflare/resources/email_security/investigate/move.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ def create(
destination: Literal[
"Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"
],
expected_disposition: Literal[
"MALICIOUS",
"MALICIOUS-BEC",
"SUSPICIOUS",
"SPOOF",
"SPAM",
"BULK",
"ENCRYPTED",
"EXTERNAL",
"UNKNOWN",
"NONE",
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -89,7 +102,13 @@ def create(
investigate_id=investigate_id,
),
page=SyncSinglePage[MoveCreateResponse],
body=maybe_transform({"destination": destination}, move_create_params.MoveCreateParams),
body=maybe_transform(
{
"destination": destination,
"expected_disposition": expected_disposition,
},
move_create_params.MoveCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand All @@ -104,6 +123,19 @@ def bulk(
destination: Literal[
"Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"
],
expected_disposition: Literal[
"MALICIOUS",
"MALICIOUS-BEC",
"SUSPICIOUS",
"SPOOF",
"SPAM",
"BULK",
"ENCRYPTED",
"EXTERNAL",
"UNKNOWN",
"NONE",
]
| Omit = omit,
ids: SequenceNotStr[str] | Omit = omit,
postfix_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -142,6 +174,7 @@ def bulk(
body=maybe_transform(
{
"destination": destination,
"expected_disposition": expected_disposition,
"ids": ids,
"postfix_ids": postfix_ids,
},
Expand Down Expand Up @@ -183,6 +216,19 @@ def create(
destination: Literal[
"Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"
],
expected_disposition: Literal[
"MALICIOUS",
"MALICIOUS-BEC",
"SUSPICIOUS",
"SPOOF",
"SPAM",
"BULK",
"ENCRYPTED",
"EXTERNAL",
"UNKNOWN",
"NONE",
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -219,7 +265,13 @@ def create(
investigate_id=investigate_id,
),
page=AsyncSinglePage[MoveCreateResponse],
body=maybe_transform({"destination": destination}, move_create_params.MoveCreateParams),
body=maybe_transform(
{
"destination": destination,
"expected_disposition": expected_disposition,
},
move_create_params.MoveCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand All @@ -234,6 +286,19 @@ def bulk(
destination: Literal[
"Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"
],
expected_disposition: Literal[
"MALICIOUS",
"MALICIOUS-BEC",
"SUSPICIOUS",
"SPOOF",
"SPAM",
"BULK",
"ENCRYPTED",
"EXTERNAL",
"UNKNOWN",
"NONE",
]
| Omit = omit,
ids: SequenceNotStr[str] | Omit = omit,
postfix_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -272,6 +337,7 @@ def bulk(
body=maybe_transform(
{
"destination": destination,
"expected_disposition": expected_disposition,
"ids": ids,
"postfix_ids": postfix_ids,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class MoveBulkParams(TypedDict, total=False):
Literal["Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"]
]

expected_disposition: Literal[
"MALICIOUS", "MALICIOUS-BEC", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "ENCRYPTED", "EXTERNAL", "UNKNOWN", "NONE"
]

ids: SequenceNotStr[str]
"""List of message IDs to move"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ class MoveCreateParams(TypedDict, total=False):
destination: Required[
Literal["Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"]
]

expected_disposition: Literal[
"MALICIOUS", "MALICIOUS-BEC", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "ENCRYPTED", "EXTERNAL", "UNKNOWN", "NONE"
]
68 changes: 68 additions & 0 deletions src/cloudflare/types/rulesets/rule_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@
"SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange",
"SetCacheSettingsRuleActionParametersServeStale",
"SetCacheSettingsRuleActionParametersSharedDictionary",
"SetCacheSettingsRuleActionParametersVary",
"SetCacheSettingsRuleActionParametersVaryDefault",
"SetCacheSettingsRuleActionParametersVaryHeaders",
"SetCacheSettingsRuleExposedCredentialCheck",
"SetCacheSettingsRulePosition",
"SetCacheSettingsRulePositionBeforePosition",
Expand Down Expand Up @@ -3425,6 +3428,64 @@ class SetCacheSettingsRuleActionParametersSharedDictionary(TypedDict, total=Fals
"""


class SetCacheSettingsRuleActionParametersVaryDefault(TypedDict, total=False):
"""
Controls how a single request header (or the default for all headers) contributes to the cache key.
"""

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

languages: SequenceNotStr[str]
"""The set of languages to normalize against.

Only valid for the `accept-language` header.
"""

media_types: SequenceNotStr[str]
"""The set of media types to normalize against.

Only valid for the `accept` header.
"""


class SetCacheSettingsRuleActionParametersVaryHeaders(TypedDict, total=False):
"""
Controls how a single request header (or the default for all headers) contributes to the cache key.
"""

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

languages: SequenceNotStr[str]
"""The set of languages to normalize against.

Only valid for the `accept-language` header.
"""

media_types: SequenceNotStr[str]
"""The set of media types to normalize against.

Only valid for the `accept` header.
"""


class SetCacheSettingsRuleActionParametersVary(TypedDict, total=False):
"""Controls how cached responses vary based on request headers.

At least one of `default` or `headers` must be set, and `default` is required when `headers` is set.
"""

default: SetCacheSettingsRuleActionParametersVaryDefault
"""
Controls how a single request header (or the default for all headers)
contributes to the cache key.
"""

headers: Dict[str, SetCacheSettingsRuleActionParametersVaryHeaders]
"""A mapping of lowercase request header names to their vary configuration."""


class SetCacheSettingsRuleActionParameters(TypedDict, total=False):
"""The parameters configuring the rule's action."""

Expand Down Expand Up @@ -3500,6 +3561,13 @@ class SetCacheSettingsRuleActionParameters(TypedDict, total=False):
strip_set_cookie: bool
"""Whether to strip Set-Cookie headers from the origin response before caching."""

vary: SetCacheSettingsRuleActionParametersVary
"""Controls how cached responses vary based on request headers.

At least one of `default` or `headers` must be set, and `default` is required
when `headers` is set.
"""


class SetCacheSettingsRuleExposedCredentialCheck(TypedDict, total=False):
"""Configuration for exposed credential checking."""
Expand Down
68 changes: 68 additions & 0 deletions src/cloudflare/types/rulesets/rule_edit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@
"SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange",
"SetCacheSettingsRuleActionParametersServeStale",
"SetCacheSettingsRuleActionParametersSharedDictionary",
"SetCacheSettingsRuleActionParametersVary",
"SetCacheSettingsRuleActionParametersVaryDefault",
"SetCacheSettingsRuleActionParametersVaryHeaders",
"SetCacheSettingsRuleExposedCredentialCheck",
"SetCacheSettingsRulePosition",
"SetCacheSettingsRulePositionBeforePosition",
Expand Down Expand Up @@ -3476,6 +3479,64 @@ class SetCacheSettingsRuleActionParametersSharedDictionary(TypedDict, total=Fals
"""


class SetCacheSettingsRuleActionParametersVaryDefault(TypedDict, total=False):
"""
Controls how a single request header (or the default for all headers) contributes to the cache key.
"""

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

languages: SequenceNotStr[str]
"""The set of languages to normalize against.

Only valid for the `accept-language` header.
"""

media_types: SequenceNotStr[str]
"""The set of media types to normalize against.

Only valid for the `accept` header.
"""


class SetCacheSettingsRuleActionParametersVaryHeaders(TypedDict, total=False):
"""
Controls how a single request header (or the default for all headers) contributes to the cache key.
"""

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

languages: SequenceNotStr[str]
"""The set of languages to normalize against.

Only valid for the `accept-language` header.
"""

media_types: SequenceNotStr[str]
"""The set of media types to normalize against.

Only valid for the `accept` header.
"""


class SetCacheSettingsRuleActionParametersVary(TypedDict, total=False):
"""Controls how cached responses vary based on request headers.

At least one of `default` or `headers` must be set, and `default` is required when `headers` is set.
"""

default: SetCacheSettingsRuleActionParametersVaryDefault
"""
Controls how a single request header (or the default for all headers)
contributes to the cache key.
"""

headers: Dict[str, SetCacheSettingsRuleActionParametersVaryHeaders]
"""A mapping of lowercase request header names to their vary configuration."""


class SetCacheSettingsRuleActionParameters(TypedDict, total=False):
"""The parameters configuring the rule's action."""

Expand Down Expand Up @@ -3551,6 +3612,13 @@ class SetCacheSettingsRuleActionParameters(TypedDict, total=False):
strip_set_cookie: bool
"""Whether to strip Set-Cookie headers from the origin response before caching."""

vary: SetCacheSettingsRuleActionParametersVary
"""Controls how cached responses vary based on request headers.

At least one of `default` or `headers` must be set, and `default` is required
when `headers` is set.
"""


class SetCacheSettingsRuleExposedCredentialCheck(TypedDict, total=False):
"""Configuration for exposed credential checking."""
Expand Down
Loading
Loading