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
8 changes: 4 additions & 4 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
config_hash: 2f529580a17438fc62cd0b47db41b6f1
configured_endpoints: 2409
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-26b407db284a9e5c2ae968d8134f1682fd10ffd1dc4a79aa3b2c6fe10f2251db.yml
openapi_spec_hash: c0570ee25e7fd6eea844983b22b042fd
config_hash: 517f3639f0355eae78476ce617456698
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ from cloudflare.types import (

# [Calls](src/cloudflare/resources/calls/api.md)

# [MoQ](src/cloudflare/resources/moq/api.md)

# [CloudforceOne](src/cloudflare/resources/cloudforce_one/api.md)

# [AIGateway](src/cloudflare/resources/ai_gateway/api.md)
Expand Down
38 changes: 38 additions & 0 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
dns,
iam,
ips,
moq,
rum,
ssl,
argo,
Expand Down Expand Up @@ -163,6 +164,7 @@
from .resources.dns.dns import DNSResource, AsyncDNSResource
from .resources.iam.iam import IAMResource, AsyncIAMResource
from .resources.ips.ips import IPsResource, AsyncIPsResource
from .resources.moq.moq import MoQResource, AsyncMoQResource
from .resources.rum.rum import RUMResource, AsyncRUMResource
from .resources.ssl.ssl import SSLResource, AsyncSSLResource
from .resources.argo.argo import ArgoResource, AsyncArgoResource
Expand Down Expand Up @@ -965,6 +967,12 @@ def calls(self) -> CallsResource:

return CallsResource(self)

@cached_property
def moq(self) -> MoQResource:
from .resources.moq import MoQResource

return MoQResource(self)

@cached_property
def cloudforce_one(self) -> CloudforceOneResource:
from .resources.cloudforce_one import CloudforceOneResource
Expand Down Expand Up @@ -1917,6 +1925,12 @@ def calls(self) -> AsyncCallsResource:

return AsyncCallsResource(self)

@cached_property
def moq(self) -> AsyncMoQResource:
from .resources.moq import AsyncMoQResource

return AsyncMoQResource(self)

@cached_property
def cloudforce_one(self) -> AsyncCloudforceOneResource:
from .resources.cloudforce_one import AsyncCloudforceOneResource
Expand Down Expand Up @@ -2793,6 +2807,12 @@ def calls(self) -> calls.CallsResourceWithRawResponse:

return CallsResourceWithRawResponse(self._client.calls)

@cached_property
def moq(self) -> moq.MoQResourceWithRawResponse:
from .resources.moq import MoQResourceWithRawResponse

return MoQResourceWithRawResponse(self._client.moq)

@cached_property
def cloudforce_one(self) -> cloudforce_one.CloudforceOneResourceWithRawResponse:
from .resources.cloudforce_one import CloudforceOneResourceWithRawResponse
Expand Down Expand Up @@ -3496,6 +3516,12 @@ def calls(self) -> calls.AsyncCallsResourceWithRawResponse:

return AsyncCallsResourceWithRawResponse(self._client.calls)

@cached_property
def moq(self) -> moq.AsyncMoQResourceWithRawResponse:
from .resources.moq import AsyncMoQResourceWithRawResponse

return AsyncMoQResourceWithRawResponse(self._client.moq)

@cached_property
def cloudforce_one(self) -> cloudforce_one.AsyncCloudforceOneResourceWithRawResponse:
from .resources.cloudforce_one import AsyncCloudforceOneResourceWithRawResponse
Expand Down Expand Up @@ -4199,6 +4225,12 @@ def calls(self) -> calls.CallsResourceWithStreamingResponse:

return CallsResourceWithStreamingResponse(self._client.calls)

@cached_property
def moq(self) -> moq.MoQResourceWithStreamingResponse:
from .resources.moq import MoQResourceWithStreamingResponse

return MoQResourceWithStreamingResponse(self._client.moq)

@cached_property
def cloudforce_one(self) -> cloudforce_one.CloudforceOneResourceWithStreamingResponse:
from .resources.cloudforce_one import CloudforceOneResourceWithStreamingResponse
Expand Down Expand Up @@ -4910,6 +4942,12 @@ def calls(self) -> calls.AsyncCallsResourceWithStreamingResponse:

return AsyncCallsResourceWithStreamingResponse(self._client.calls)

@cached_property
def moq(self) -> moq.AsyncMoQResourceWithStreamingResponse:
from .resources.moq import AsyncMoQResourceWithStreamingResponse

return AsyncMoQResourceWithStreamingResponse(self._client.moq)

@cached_property
def cloudforce_one(self) -> cloudforce_one.AsyncCloudforceOneResourceWithStreamingResponse:
from .resources.cloudforce_one import AsyncCloudforceOneResourceWithStreamingResponse
Expand Down
1 change: 0 additions & 1 deletion src/cloudflare/resources/email_routing/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Methods:

- <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>
- <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>
- <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>
- <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>
- <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>

Expand Down
129 changes: 2 additions & 127 deletions src/cloudflare/resources/email_routing/rules/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
async_to_streamed_response_wrapper,
)
from ...._wrappers import ResultWrapper
from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from ...._base_client import AsyncPaginator, make_request_options
from ....types.email_routing import rule_list_params, rule_create_params, rule_update_params
from ...._base_client import make_request_options
from ....types.email_routing import rule_create_params, rule_update_params
from ....types.email_routing.action_param import ActionParam
from ....types.email_routing.matcher_param import MatcherParam
from ....types.email_routing.email_routing_rule import EmailRoutingRule
Expand Down Expand Up @@ -202,62 +201,6 @@ def update(
cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]),
)

def list(
self,
*,
zone_id: str,
enabled: Literal[True, False] | Omit = omit,
page: float | Omit = omit,
per_page: float | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[EmailRoutingRule]:
"""
Lists existing routing rules.

Args:
zone_id: Identifier.

enabled: Filter by enabled routing rules.

page: Page number of paginated results.

per_page: Maximum number of results per page.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._get_api_list(
path_template("/zones/{zone_id}/email/routing/rules", zone_id=zone_id),
page=SyncV4PagePaginationArray[EmailRoutingRule],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"enabled": enabled,
"page": page,
"per_page": per_page,
},
rule_list_params.RuleListParams,
),
),
model=EmailRoutingRule,
)

def delete(
self,
rule_identifier: str,
Expand Down Expand Up @@ -521,62 +464,6 @@ async def update(
cast_to=cast(Type[Optional[EmailRoutingRule]], ResultWrapper[EmailRoutingRule]),
)

def list(
self,
*,
zone_id: str,
enabled: Literal[True, False] | Omit = omit,
page: float | Omit = omit,
per_page: float | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[EmailRoutingRule, AsyncV4PagePaginationArray[EmailRoutingRule]]:
"""
Lists existing routing rules.

Args:
zone_id: Identifier.

enabled: Filter by enabled routing rules.

page: Page number of paginated results.

per_page: Maximum number of results per page.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._get_api_list(
path_template("/zones/{zone_id}/email/routing/rules", zone_id=zone_id),
page=AsyncV4PagePaginationArray[EmailRoutingRule],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"enabled": enabled,
"page": page,
"per_page": per_page,
},
rule_list_params.RuleListParams,
),
),
model=EmailRoutingRule,
)

async def delete(
self,
rule_identifier: str,
Expand Down Expand Up @@ -684,9 +571,6 @@ def __init__(self, rules: RulesResource) -> None:
self.update = to_raw_response_wrapper(
rules.update,
)
self.list = to_raw_response_wrapper(
rules.list,
)
self.delete = to_raw_response_wrapper(
rules.delete,
)
Expand All @@ -709,9 +593,6 @@ def __init__(self, rules: AsyncRulesResource) -> None:
self.update = async_to_raw_response_wrapper(
rules.update,
)
self.list = async_to_raw_response_wrapper(
rules.list,
)
self.delete = async_to_raw_response_wrapper(
rules.delete,
)
Expand All @@ -734,9 +615,6 @@ def __init__(self, rules: RulesResource) -> None:
self.update = to_streamed_response_wrapper(
rules.update,
)
self.list = to_streamed_response_wrapper(
rules.list,
)
self.delete = to_streamed_response_wrapper(
rules.delete,
)
Expand All @@ -759,9 +637,6 @@ def __init__(self, rules: AsyncRulesResource) -> None:
self.update = async_to_streamed_response_wrapper(
rules.update,
)
self.list = async_to_streamed_response_wrapper(
rules.list,
)
self.delete = async_to_streamed_response_wrapper(
rules.delete,
)
Expand Down
Loading
Loading