Skip to content

Commit a45728a

Browse files
feat(api): api update
1 parent d900af3 commit a45728a

File tree

7 files changed

+48
-4
lines changed

7 files changed

+48
-4
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: 1713
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-757dd23ad06b15b028789d1283f60ed3e7169f633dcf7086f73aa6426a58f77d.yml
3-
openapi_spec_hash: 12b3a3a19bae02a2c87731d1d5294c07
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5218b755bd0ceff07cb73a969e00932c5d5eeb494c0fc5f9a125904978b55f00.yml
3+
openapi_spec_hash: 8779e81abd14068880891aace4563e30
44
config_hash: 4a6de620bf46745e17466ceac26f41d4

src/cloudflare/resources/email_security/settings/domains.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def edit(
213213
*,
214214
account_id: str,
215215
ip_restrictions: List[str],
216+
allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] | NotGiven = NOT_GIVEN,
216217
domain: Optional[str] | NotGiven = NOT_GIVEN,
217218
drop_dispositions: List[
218219
Literal[
@@ -265,6 +266,7 @@ def edit(
265266
body=maybe_transform(
266267
{
267268
"ip_restrictions": ip_restrictions,
269+
"allowed_delivery_modes": allowed_delivery_modes,
268270
"domain": domain,
269271
"drop_dispositions": drop_dispositions,
270272
"folder": folder,
@@ -512,6 +514,7 @@ async def edit(
512514
*,
513515
account_id: str,
514516
ip_restrictions: List[str],
517+
allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] | NotGiven = NOT_GIVEN,
515518
domain: Optional[str] | NotGiven = NOT_GIVEN,
516519
drop_dispositions: List[
517520
Literal[
@@ -564,6 +567,7 @@ async def edit(
564567
body=await async_maybe_transform(
565568
{
566569
"ip_restrictions": ip_restrictions,
570+
"allowed_delivery_modes": allowed_delivery_modes,
567571
"domain": domain,
568572
"drop_dispositions": drop_dispositions,
569573
"folder": folder,

src/cloudflare/resources/email_security/submissions.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
5+
from typing import Union, Optional
66
from datetime import datetime
77
from typing_extensions import Literal
88

@@ -51,8 +51,14 @@ def list(
5151
*,
5252
account_id: str,
5353
end: Union[str, datetime] | NotGiven = NOT_GIVEN,
54+
original_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
55+
| NotGiven = NOT_GIVEN,
56+
outcome_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"] | NotGiven = NOT_GIVEN,
5457
page: int | NotGiven = NOT_GIVEN,
5558
per_page: int | NotGiven = NOT_GIVEN,
59+
query: Optional[str] | NotGiven = NOT_GIVEN,
60+
requested_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
61+
| NotGiven = NOT_GIVEN,
5662
start: Union[str, datetime] | NotGiven = NOT_GIVEN,
5763
submission_id: str | NotGiven = NOT_GIVEN,
5864
type: Literal["TEAM", "USER"] | NotGiven = NOT_GIVEN,
@@ -98,8 +104,12 @@ def list(
98104
query=maybe_transform(
99105
{
100106
"end": end,
107+
"original_disposition": original_disposition,
108+
"outcome_disposition": outcome_disposition,
101109
"page": page,
102110
"per_page": per_page,
111+
"query": query,
112+
"requested_disposition": requested_disposition,
103113
"start": start,
104114
"submission_id": submission_id,
105115
"type": type,
@@ -136,8 +146,14 @@ def list(
136146
*,
137147
account_id: str,
138148
end: Union[str, datetime] | NotGiven = NOT_GIVEN,
149+
original_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
150+
| NotGiven = NOT_GIVEN,
151+
outcome_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"] | NotGiven = NOT_GIVEN,
139152
page: int | NotGiven = NOT_GIVEN,
140153
per_page: int | NotGiven = NOT_GIVEN,
154+
query: Optional[str] | NotGiven = NOT_GIVEN,
155+
requested_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
156+
| NotGiven = NOT_GIVEN,
141157
start: Union[str, datetime] | NotGiven = NOT_GIVEN,
142158
submission_id: str | NotGiven = NOT_GIVEN,
143159
type: Literal["TEAM", "USER"] | NotGiven = NOT_GIVEN,
@@ -183,8 +199,12 @@ def list(
183199
query=maybe_transform(
184200
{
185201
"end": end,
202+
"original_disposition": original_disposition,
203+
"outcome_disposition": outcome_disposition,
186204
"page": page,
187205
"per_page": per_page,
206+
"query": query,
207+
"requested_disposition": requested_disposition,
188208
"start": start,
189209
"submission_id": submission_id,
190210
"type": type,

src/cloudflare/types/email_security/settings/domain_edit_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class DomainEditParams(TypedDict, total=False):
1414

1515
ip_restrictions: Required[List[str]]
1616

17+
allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]]
18+
1719
domain: Optional[str]
1820

1921
drop_dispositions: List[

src/cloudflare/types/email_security/submission_list_params.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
5+
from typing import Union, Optional
66
from datetime import datetime
77
from typing_extensions import Literal, Required, Annotated, TypedDict
88

@@ -18,12 +18,20 @@ class SubmissionListParams(TypedDict, total=False):
1818
end: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
1919
"""The end of the search date range. Defaults to `now`."""
2020

21+
original_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
22+
23+
outcome_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
24+
2125
page: int
2226
"""The page number of paginated results."""
2327

2428
per_page: int
2529
"""The number of results per page."""
2630

31+
query: Optional[str]
32+
33+
requested_disposition: Literal["MALICIOUS", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "NONE"]
34+
2735
start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
2836
"""The beginning of the search date range. Defaults to `now - 30 days`."""
2937

tests/api_resources/email_security/settings/test_domains.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
172172
domain_id=2400,
173173
account_id="023e105f4ecef8ad9ca31a8372d0c353",
174174
ip_restrictions=["192.0.2.0/24", "2001:db8::/32"],
175+
allowed_delivery_modes=["DIRECT"],
175176
domain="domain",
176177
drop_dispositions=["MALICIOUS"],
177178
folder="AllItems",
@@ -414,6 +415,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
414415
domain_id=2400,
415416
account_id="023e105f4ecef8ad9ca31a8372d0c353",
416417
ip_restrictions=["192.0.2.0/24", "2001:db8::/32"],
418+
allowed_delivery_modes=["DIRECT"],
417419
domain="domain",
418420
drop_dispositions=["MALICIOUS"],
419421
folder="AllItems",

tests/api_resources/email_security/test_submissions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
3131
submission = client.email_security.submissions.list(
3232
account_id="023e105f4ecef8ad9ca31a8372d0c353",
3333
end=parse_datetime("2019-12-27T18:11:19.117Z"),
34+
original_disposition="MALICIOUS",
35+
outcome_disposition="MALICIOUS",
3436
page=1,
3537
per_page=1,
38+
query="query",
39+
requested_disposition="MALICIOUS",
3640
start=parse_datetime("2019-12-27T18:11:19.117Z"),
3741
submission_id="submission_id",
3842
type="TEAM",
@@ -86,8 +90,12 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
8690
submission = await async_client.email_security.submissions.list(
8791
account_id="023e105f4ecef8ad9ca31a8372d0c353",
8892
end=parse_datetime("2019-12-27T18:11:19.117Z"),
93+
original_disposition="MALICIOUS",
94+
outcome_disposition="MALICIOUS",
8995
page=1,
9096
per_page=1,
97+
query="query",
98+
requested_disposition="MALICIOUS",
9199
start=parse_datetime("2019-12-27T18:11:19.117Z"),
92100
submission_id="submission_id",
93101
type="TEAM",

0 commit comments

Comments
 (0)