Skip to content

Commit 6fac09c

Browse files
chore(api): update composite API spec
1 parent 171964c commit 6fac09c

7 files changed

Lines changed: 11 additions & 250 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 2404
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-dffae42e60784ca8228f71e302fcc65e835e71f92ab075e9dbf5bd050cb1d17f.yml
3-
openapi_spec_hash: 847c9ce39141b8ec5d94dffc1ddcd032
1+
configured_endpoints: 2403
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-3d3e9856df2bb12cc1de02ce9b62d6efe533e3b8f3c17f1a7177a1915f3d2bf6.yml
3+
openapi_spec_hash: ba721c8e9fc329cb059935e94f7de823
44
config_hash: 2f529580a17438fc62cd0b47db41b6f1

src/cloudflare/resources/email_routing/api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Methods:
3939

4040
- <code title="post /zones/{zone_id}/email/routing/rules">client.email_routing.rules.<a href="./src/cloudflare/resources/email_routing/rules/rules.py">create</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/email_routing/rule_create_params.py">params</a>) -> <a href="./src/cloudflare/types/email_routing/email_routing_rule.py">Optional[EmailRoutingRule]</a></code>
4141
- <code title="put /zones/{zone_id}/email/routing/rules/{rule_identifier}">client.email_routing.rules.<a href="./src/cloudflare/resources/email_routing/rules/rules.py">update</a>(rule_identifier, \*, zone_id, \*\*<a href="src/cloudflare/types/email_routing/rule_update_params.py">params</a>) -> <a href="./src/cloudflare/types/email_routing/email_routing_rule.py">Optional[EmailRoutingRule]</a></code>
42-
- <code title="get /zones/{zone_id}/email/routing/rules">client.email_routing.rules.<a href="./src/cloudflare/resources/email_routing/rules/rules.py">list</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/email_routing/rule_list_params.py">params</a>) -> <a href="./src/cloudflare/types/email_routing/email_routing_rule.py">SyncV4PagePaginationArray[EmailRoutingRule]</a></code>
4342
- <code title="delete /zones/{zone_id}/email/routing/rules/{rule_identifier}">client.email_routing.rules.<a href="./src/cloudflare/resources/email_routing/rules/rules.py">delete</a>(rule_identifier, \*, zone_id) -> <a href="./src/cloudflare/types/email_routing/email_routing_rule.py">Optional[EmailRoutingRule]</a></code>
4443
- <code title="get /zones/{zone_id}/email/routing/rules/{rule_identifier}">client.email_routing.rules.<a href="./src/cloudflare/resources/email_routing/rules/rules.py">get</a>(rule_identifier, \*, zone_id) -> <a href="./src/cloudflare/types/email_routing/email_routing_rule.py">Optional[EmailRoutingRule]</a></code>
4544

src/cloudflare/resources/email_routing/rules/rules.py

Lines changed: 2 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
async_to_streamed_response_wrapper,
2727
)
2828
from ...._wrappers import ResultWrapper
29-
from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
30-
from ...._base_client import AsyncPaginator, make_request_options
31-
from ....types.email_routing import rule_list_params, rule_create_params, rule_update_params
29+
from ...._base_client import make_request_options
30+
from ....types.email_routing import rule_create_params, rule_update_params
3231
from ....types.email_routing.action_param import ActionParam
3332
from ....types.email_routing.matcher_param import MatcherParam
3433
from ....types.email_routing.email_routing_rule import EmailRoutingRule
@@ -202,62 +201,6 @@ def update(
202201
cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]),
203202
)
204203

205-
def list(
206-
self,
207-
*,
208-
zone_id: str,
209-
enabled: Literal[True, False] | Omit = omit,
210-
page: float | Omit = omit,
211-
per_page: float | Omit = omit,
212-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
213-
# The extra values given here take precedence over values defined on the client or passed to this method.
214-
extra_headers: Headers | None = None,
215-
extra_query: Query | None = None,
216-
extra_body: Body | None = None,
217-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
218-
) -> SyncV4PagePaginationArray[EmailRoutingRule]:
219-
"""
220-
Lists existing routing rules.
221-
222-
Args:
223-
zone_id: Identifier.
224-
225-
enabled: Filter by enabled routing rules.
226-
227-
page: Page number of paginated results.
228-
229-
per_page: Maximum number of results per page.
230-
231-
extra_headers: Send extra headers
232-
233-
extra_query: Add additional query parameters to the request
234-
235-
extra_body: Add additional JSON properties to the request
236-
237-
timeout: Override the client-level default timeout for this request, in seconds
238-
"""
239-
if not zone_id:
240-
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
241-
return self._get_api_list(
242-
path_template("/zones/{zone_id}/email/routing/rules", zone_id=zone_id),
243-
page=SyncV4PagePaginationArray[EmailRoutingRule],
244-
options=make_request_options(
245-
extra_headers=extra_headers,
246-
extra_query=extra_query,
247-
extra_body=extra_body,
248-
timeout=timeout,
249-
query=maybe_transform(
250-
{
251-
"enabled": enabled,
252-
"page": page,
253-
"per_page": per_page,
254-
},
255-
rule_list_params.RuleListParams,
256-
),
257-
),
258-
model=EmailRoutingRule,
259-
)
260-
261204
def delete(
262205
self,
263206
rule_identifier: str,
@@ -521,62 +464,6 @@ async def update(
521464
cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]),
522465
)
523466

524-
def list(
525-
self,
526-
*,
527-
zone_id: str,
528-
enabled: Literal[True, False] | Omit = omit,
529-
page: float | Omit = omit,
530-
per_page: float | Omit = omit,
531-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
532-
# The extra values given here take precedence over values defined on the client or passed to this method.
533-
extra_headers: Headers | None = None,
534-
extra_query: Query | None = None,
535-
extra_body: Body | None = None,
536-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
537-
) -> AsyncPaginator[EmailRoutingRule, AsyncV4PagePaginationArray[EmailRoutingRule]]:
538-
"""
539-
Lists existing routing rules.
540-
541-
Args:
542-
zone_id: Identifier.
543-
544-
enabled: Filter by enabled routing rules.
545-
546-
page: Page number of paginated results.
547-
548-
per_page: Maximum number of results per page.
549-
550-
extra_headers: Send extra headers
551-
552-
extra_query: Add additional query parameters to the request
553-
554-
extra_body: Add additional JSON properties to the request
555-
556-
timeout: Override the client-level default timeout for this request, in seconds
557-
"""
558-
if not zone_id:
559-
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
560-
return self._get_api_list(
561-
path_template("/zones/{zone_id}/email/routing/rules", zone_id=zone_id),
562-
page=AsyncV4PagePaginationArray[EmailRoutingRule],
563-
options=make_request_options(
564-
extra_headers=extra_headers,
565-
extra_query=extra_query,
566-
extra_body=extra_body,
567-
timeout=timeout,
568-
query=maybe_transform(
569-
{
570-
"enabled": enabled,
571-
"page": page,
572-
"per_page": per_page,
573-
},
574-
rule_list_params.RuleListParams,
575-
),
576-
),
577-
model=EmailRoutingRule,
578-
)
579-
580467
async def delete(
581468
self,
582469
rule_identifier: str,
@@ -684,9 +571,6 @@ def __init__(self, rules: RulesResource) -> None:
684571
self.update = to_raw_response_wrapper(
685572
rules.update,
686573
)
687-
self.list = to_raw_response_wrapper(
688-
rules.list,
689-
)
690574
self.delete = to_raw_response_wrapper(
691575
rules.delete,
692576
)
@@ -709,9 +593,6 @@ def __init__(self, rules: AsyncRulesResource) -> None:
709593
self.update = async_to_raw_response_wrapper(
710594
rules.update,
711595
)
712-
self.list = async_to_raw_response_wrapper(
713-
rules.list,
714-
)
715596
self.delete = async_to_raw_response_wrapper(
716597
rules.delete,
717598
)
@@ -734,9 +615,6 @@ def __init__(self, rules: RulesResource) -> None:
734615
self.update = to_streamed_response_wrapper(
735616
rules.update,
736617
)
737-
self.list = to_streamed_response_wrapper(
738-
rules.list,
739-
)
740618
self.delete = to_streamed_response_wrapper(
741619
rules.delete,
742620
)
@@ -759,9 +637,6 @@ def __init__(self, rules: AsyncRulesResource) -> None:
759637
self.update = async_to_streamed_response_wrapper(
760638
rules.update,
761639
)
762-
self.list = async_to_streamed_response_wrapper(
763-
rules.list,
764-
)
765640
self.delete = async_to_streamed_response_wrapper(
766641
rules.delete,
767642
)

src/cloudflare/types/email_routing/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from .dns_get_params import DNSGetParams as DNSGetParams
1313
from .dns_edit_params import DNSEditParams as DNSEditParams
1414
from .dns_get_response import DNSGetResponse as DNSGetResponse
15-
from .rule_list_params import RuleListParams as RuleListParams
1615
from .dns_create_params import DNSCreateParams as DNSCreateParams
1716
from .email_routing_rule import EmailRoutingRule as EmailRoutingRule
1817
from .rule_create_params import RuleCreateParams as RuleCreateParams

src/cloudflare/types/email_routing/rule_list_params.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/cloudflare/types/email_routing/settings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ class Settings(BaseModel):
3131
status: Optional[Literal["ready", "unconfigured", "misconfigured", "misconfigured/locked", "unlocked"]] = None
3232
"""Show the state of your account, and the type or configuration error."""
3333

34+
support_subaddress: Optional[Literal[True, False]] = None
35+
"""
36+
Whether subaddressing (plus-addressing) is honored when matching incoming mail
37+
against routing rules.
38+
"""
39+
3440
tag: Optional[str] = None
3541
"""Email Routing settings tag.
3642

tests/api_resources/email_routing/test_rules.py

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from cloudflare import Cloudflare, AsyncCloudflare
1111
from tests.utils import assert_matches_type
12-
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
1312
from cloudflare.types.email_routing import EmailRoutingRule
1413

1514
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -169,54 +168,6 @@ def test_path_params_update(self, client: Cloudflare) -> None:
169168
matchers=[{"type": "literal"}],
170169
)
171170

172-
@parametrize
173-
def test_method_list(self, client: Cloudflare) -> None:
174-
rule = client.email_routing.rules.list(
175-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
176-
)
177-
assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
178-
179-
@parametrize
180-
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
181-
rule = client.email_routing.rules.list(
182-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
183-
enabled=True,
184-
page=1,
185-
per_page=5,
186-
)
187-
assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
188-
189-
@parametrize
190-
def test_raw_response_list(self, client: Cloudflare) -> None:
191-
response = client.email_routing.rules.with_raw_response.list(
192-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
193-
)
194-
195-
assert response.is_closed is True
196-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
197-
rule = response.parse()
198-
assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
199-
200-
@parametrize
201-
def test_streaming_response_list(self, client: Cloudflare) -> None:
202-
with client.email_routing.rules.with_streaming_response.list(
203-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
204-
) as response:
205-
assert not response.is_closed
206-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
207-
208-
rule = response.parse()
209-
assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
210-
211-
assert cast(Any, response.is_closed) is True
212-
213-
@parametrize
214-
def test_path_params_list(self, client: Cloudflare) -> None:
215-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
216-
client.email_routing.rules.with_raw_response.list(
217-
zone_id="",
218-
)
219-
220171
@parametrize
221172
def test_method_delete(self, client: Cloudflare) -> None:
222173
rule = client.email_routing.rules.delete(
@@ -470,54 +421,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
470421
matchers=[{"type": "literal"}],
471422
)
472423

473-
@parametrize
474-
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
475-
rule = await async_client.email_routing.rules.list(
476-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
477-
)
478-
assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
479-
480-
@parametrize
481-
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
482-
rule = await async_client.email_routing.rules.list(
483-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
484-
enabled=True,
485-
page=1,
486-
per_page=5,
487-
)
488-
assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
489-
490-
@parametrize
491-
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
492-
response = await async_client.email_routing.rules.with_raw_response.list(
493-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
494-
)
495-
496-
assert response.is_closed is True
497-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
498-
rule = await response.parse()
499-
assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
500-
501-
@parametrize
502-
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
503-
async with async_client.email_routing.rules.with_streaming_response.list(
504-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
505-
) as response:
506-
assert not response.is_closed
507-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
508-
509-
rule = await response.parse()
510-
assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"])
511-
512-
assert cast(Any, response.is_closed) is True
513-
514-
@parametrize
515-
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
516-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
517-
await async_client.email_routing.rules.with_raw_response.list(
518-
zone_id="",
519-
)
520-
521424
@parametrize
522425
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
523426
rule = await async_client.email_routing.rules.delete(

0 commit comments

Comments
 (0)