Skip to content

Commit 7255f4b

Browse files
chore(api): update composite API spec
1 parent 35e4152 commit 7255f4b

5 files changed

Lines changed: 100 additions & 4 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: 2404
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-fb021f40a5abbad7169d39096c9b01f68874398756b6b7b50cc31a09643eec21.yml
3-
openapi_spec_hash: 143c2791ffafd5757d615715c07ba7dc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-ccdcfb940281d6680dc124b744d0da4f9a95582b6131ab8368ae6f01686b8036.yml
3+
openapi_spec_hash: 05a000c7550306f31d4aa116f8c4b07a
44
config_hash: 2f529580a17438fc62cd0b47db41b6f1

src/cloudflare/resources/email_security/investigate/move.py

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ def create(
5353
destination: Literal[
5454
"Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"
5555
],
56+
expected_disposition: Literal[
57+
"MALICIOUS",
58+
"MALICIOUS-BEC",
59+
"SUSPICIOUS",
60+
"SPOOF",
61+
"SPAM",
62+
"BULK",
63+
"ENCRYPTED",
64+
"EXTERNAL",
65+
"UNKNOWN",
66+
"NONE",
67+
]
68+
| Omit = omit,
5669
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5770
# The extra values given here take precedence over values defined on the client or passed to this method.
5871
extra_headers: Headers | None = None,
@@ -89,7 +102,13 @@ def create(
89102
investigate_id=investigate_id,
90103
),
91104
page=SyncSinglePage[MoveCreateResponse],
92-
body=maybe_transform({"destination": destination}, move_create_params.MoveCreateParams),
105+
body=maybe_transform(
106+
{
107+
"destination": destination,
108+
"expected_disposition": expected_disposition,
109+
},
110+
move_create_params.MoveCreateParams,
111+
),
93112
options=make_request_options(
94113
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
95114
),
@@ -104,6 +123,19 @@ def bulk(
104123
destination: Literal[
105124
"Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"
106125
],
126+
expected_disposition: Literal[
127+
"MALICIOUS",
128+
"MALICIOUS-BEC",
129+
"SUSPICIOUS",
130+
"SPOOF",
131+
"SPAM",
132+
"BULK",
133+
"ENCRYPTED",
134+
"EXTERNAL",
135+
"UNKNOWN",
136+
"NONE",
137+
]
138+
| Omit = omit,
107139
ids: SequenceNotStr[str] | Omit = omit,
108140
postfix_ids: SequenceNotStr[str] | Omit = omit,
109141
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -142,6 +174,7 @@ def bulk(
142174
body=maybe_transform(
143175
{
144176
"destination": destination,
177+
"expected_disposition": expected_disposition,
145178
"ids": ids,
146179
"postfix_ids": postfix_ids,
147180
},
@@ -183,6 +216,19 @@ def create(
183216
destination: Literal[
184217
"Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"
185218
],
219+
expected_disposition: Literal[
220+
"MALICIOUS",
221+
"MALICIOUS-BEC",
222+
"SUSPICIOUS",
223+
"SPOOF",
224+
"SPAM",
225+
"BULK",
226+
"ENCRYPTED",
227+
"EXTERNAL",
228+
"UNKNOWN",
229+
"NONE",
230+
]
231+
| Omit = omit,
186232
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
187233
# The extra values given here take precedence over values defined on the client or passed to this method.
188234
extra_headers: Headers | None = None,
@@ -219,7 +265,13 @@ def create(
219265
investigate_id=investigate_id,
220266
),
221267
page=AsyncSinglePage[MoveCreateResponse],
222-
body=maybe_transform({"destination": destination}, move_create_params.MoveCreateParams),
268+
body=maybe_transform(
269+
{
270+
"destination": destination,
271+
"expected_disposition": expected_disposition,
272+
},
273+
move_create_params.MoveCreateParams,
274+
),
223275
options=make_request_options(
224276
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
225277
),
@@ -234,6 +286,19 @@ def bulk(
234286
destination: Literal[
235287
"Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"
236288
],
289+
expected_disposition: Literal[
290+
"MALICIOUS",
291+
"MALICIOUS-BEC",
292+
"SUSPICIOUS",
293+
"SPOOF",
294+
"SPAM",
295+
"BULK",
296+
"ENCRYPTED",
297+
"EXTERNAL",
298+
"UNKNOWN",
299+
"NONE",
300+
]
301+
| Omit = omit,
237302
ids: SequenceNotStr[str] | Omit = omit,
238303
postfix_ids: SequenceNotStr[str] | Omit = omit,
239304
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -272,6 +337,7 @@ def bulk(
272337
body=maybe_transform(
273338
{
274339
"destination": destination,
340+
"expected_disposition": expected_disposition,
275341
"ids": ids,
276342
"postfix_ids": postfix_ids,
277343
},

src/cloudflare/types/email_security/investigate/move_bulk_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class MoveBulkParams(TypedDict, total=False):
1717
Literal["Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"]
1818
]
1919

20+
expected_disposition: Literal[
21+
"MALICIOUS", "MALICIOUS-BEC", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "ENCRYPTED", "EXTERNAL", "UNKNOWN", "NONE"
22+
]
23+
2024
ids: SequenceNotStr[str]
2125
"""List of message IDs to move"""
2226

src/cloudflare/types/email_security/investigate/move_create_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ class MoveCreateParams(TypedDict, total=False):
1414
destination: Required[
1515
Literal["Inbox", "JunkEmail", "DeletedItems", "RecoverableItemsDeletions", "RecoverableItemsPurges"]
1616
]
17+
18+
expected_disposition: Literal[
19+
"MALICIOUS", "MALICIOUS-BEC", "SUSPICIOUS", "SPOOF", "SPAM", "BULK", "ENCRYPTED", "EXTERNAL", "UNKNOWN", "NONE"
20+
]

tests/api_resources/email_security/investigate/test_move.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ def test_method_create(self, client: Cloudflare) -> None:
3030
)
3131
assert_matches_type(SyncSinglePage[MoveCreateResponse], move, path=["response"])
3232

33+
@parametrize
34+
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
35+
move = client.email_security.investigate.move.create(
36+
investigate_id="4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678",
37+
account_id="023e105f4ecef8ad9ca31a8372d0c353",
38+
destination="Inbox",
39+
expected_disposition="MALICIOUS",
40+
)
41+
assert_matches_type(SyncSinglePage[MoveCreateResponse], move, path=["response"])
42+
3343
@parametrize
3444
def test_raw_response_create(self, client: Cloudflare) -> None:
3545
response = client.email_security.investigate.move.with_raw_response.create(
@@ -87,6 +97,7 @@ def test_method_bulk_with_all_params(self, client: Cloudflare) -> None:
8797
move = client.email_security.investigate.move.bulk(
8898
account_id="023e105f4ecef8ad9ca31a8372d0c353",
8999
destination="Inbox",
100+
expected_disposition="MALICIOUS",
90101
ids=["4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678"],
91102
postfix_ids=["4Njp3P0STMz2c02Q"],
92103
)
@@ -141,6 +152,16 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
141152
)
142153
assert_matches_type(AsyncSinglePage[MoveCreateResponse], move, path=["response"])
143154

155+
@parametrize
156+
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
157+
move = await async_client.email_security.investigate.move.create(
158+
investigate_id="4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678",
159+
account_id="023e105f4ecef8ad9ca31a8372d0c353",
160+
destination="Inbox",
161+
expected_disposition="MALICIOUS",
162+
)
163+
assert_matches_type(AsyncSinglePage[MoveCreateResponse], move, path=["response"])
164+
144165
@parametrize
145166
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
146167
response = await async_client.email_security.investigate.move.with_raw_response.create(
@@ -198,6 +219,7 @@ async def test_method_bulk_with_all_params(self, async_client: AsyncCloudflare)
198219
move = await async_client.email_security.investigate.move.bulk(
199220
account_id="023e105f4ecef8ad9ca31a8372d0c353",
200221
destination="Inbox",
222+
expected_disposition="MALICIOUS",
201223
ids=["4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678"],
202224
postfix_ids=["4Njp3P0STMz2c02Q"],
203225
)

0 commit comments

Comments
 (0)