Skip to content

Commit

Permalink
feat(api): map more endpoints (#2287)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 17, 2024
1 parent efa8fcb commit ce7f872
Show file tree
Hide file tree
Showing 47 changed files with 4,767 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1467
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ace2cb0a08aa00d1675be9b68d04f10c86943a39c5a405f740863e4da89b3057.yml
configured_endpoints: 1480
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a2d9b92dd116fb25fdcd7969ee039a099a9cea04182925b450f5dd5e3b4dedfb.yml
75 changes: 75 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,20 @@ Methods:

- <code title="put /accounts/{account_id}/tokens/{token_id}/value">client.accounts.tokens.value.<a href="./src/cloudflare/resources/accounts/tokens/value.py">update</a>(token_id, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/tokens/value_update_params.py">params</a>) -> <a href="./src/cloudflare/types/shared/token_value.py">str</a></code>

## Logs

### Audit

Types:

```python
from cloudflare.types.accounts.logs import AuditListResponse
```

Methods:

- <code title="get /accounts/{account_id}/logs/audit">client.accounts.logs.audit.<a href="./src/cloudflare/resources/accounts/logs/audit.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/accounts/logs/audit_list_params.py">params</a>) -> <a href="./src/cloudflare/types/accounts/logs/audit_list_response.py">SyncCursorLimitPagination[AuditListResponse]</a></code>

# OriginCACertificates

Types:
Expand Down Expand Up @@ -3256,6 +3270,7 @@ from cloudflare.types.addressing.prefixes.bgp import BGPPrefix

Methods:

- <code title="post /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes">client.addressing.prefixes.bgp.prefixes.<a href="./src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py">create</a>(prefix_id, \*, account_id, \*\*<a href="src/cloudflare/types/addressing/prefixes/bgp/prefix_create_params.py">params</a>) -> <a href="./src/cloudflare/types/addressing/prefixes/bgp/bgp_prefix.py">Optional[BGPPrefix]</a></code>
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes">client.addressing.prefixes.bgp.prefixes.<a href="./src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py">list</a>(prefix_id, \*, account_id) -> <a href="./src/cloudflare/types/addressing/prefixes/bgp/bgp_prefix.py">SyncSinglePage[BGPPrefix]</a></code>
- <code title="patch /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}">client.addressing.prefixes.bgp.prefixes.<a href="./src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py">edit</a>(bgp_prefix_id, \*, account_id, prefix_id, \*\*<a href="src/cloudflare/types/addressing/prefixes/bgp/prefix_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/addressing/prefixes/bgp/bgp_prefix.py">Optional[BGPPrefix]</a></code>
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}">client.addressing.prefixes.bgp.prefixes.<a href="./src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py">get</a>(bgp_prefix_id, \*, account_id, prefix_id) -> <a href="./src/cloudflare/types/addressing/prefixes/bgp/bgp_prefix.py">Optional[BGPPrefix]</a></code>
Expand Down Expand Up @@ -5201,6 +5216,24 @@ from cloudflare.types.zero_trust import (
)
```

### GatewayCA

Types:

```python
from cloudflare.types.zero_trust.access import (
GatewayCACreateResponse,
GatewayCAListResponse,
GatewayCADeleteResponse,
)
```

Methods:

- <code title="post /accounts/{account_id}/access/gateway_ca">client.zero_trust.access.gateway_ca.<a href="./src/cloudflare/resources/zero_trust/access/gateway_ca.py">create</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/access/gateway_ca_create_response.py">Optional[GatewayCACreateResponse]</a></code>
- <code title="get /accounts/{account_id}/access/gateway_ca">client.zero_trust.access.gateway_ca.<a href="./src/cloudflare/resources/zero_trust/access/gateway_ca.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/access/gateway_ca_list_response.py">SyncSinglePage[GatewayCAListResponse]</a></code>
- <code title="delete /accounts/{account_id}/access/gateway_ca/{certificate_id}">client.zero_trust.access.gateway_ca.<a href="./src/cloudflare/resources/zero_trust/access/gateway_ca.py">delete</a>(certificate_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/access/gateway_ca_delete_response.py">Optional[GatewayCADeleteResponse]</a></code>

### Infrastructure

#### Targets
Expand Down Expand Up @@ -5938,6 +5971,48 @@ Methods:
- <code title="put /accounts/{account_id}/dlp/payload_log">client.zero_trust.dlp.payload_logs.<a href="./src/cloudflare/resources/zero_trust/dlp/payload_logs.py">update</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/payload_log_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/payload_log_update_response.py">Optional[PayloadLogUpdateResponse]</a></code>
- <code title="get /accounts/{account_id}/dlp/payload_log">client.zero_trust.dlp.payload_logs.<a href="./src/cloudflare/resources/zero_trust/dlp/payload_logs.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/payload_log_get_response.py">Optional[PayloadLogGetResponse]</a></code>

### Email

#### AccountMapping

Types:

```python
from cloudflare.types.zero_trust.dlp.email import (
AccountMappingCreateResponse,
AccountMappingGetResponse,
)
```

Methods:

- <code title="post /accounts/{account_id}/dlp/email/account_mapping">client.zero_trust.dlp.email.account_mapping.<a href="./src/cloudflare/resources/zero_trust/dlp/email/account_mapping.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/email/account_mapping_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/account_mapping_create_response.py">Optional[AccountMappingCreateResponse]</a></code>
- <code title="get /accounts/{account_id}/dlp/email/account_mapping">client.zero_trust.dlp.email.account_mapping.<a href="./src/cloudflare/resources/zero_trust/dlp/email/account_mapping.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/account_mapping_get_response.py">Optional[AccountMappingGetResponse]</a></code>

#### Rules

Types:

```python
from cloudflare.types.zero_trust.dlp.email import (
RuleCreateResponse,
RuleUpdateResponse,
RuleListResponse,
RuleDeleteResponse,
RuleBulkEditResponse,
RuleGetResponse,
)
```

Methods:

- <code title="post /accounts/{account_id}/dlp/email/rules">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/email/rule_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_create_response.py">Optional[RuleCreateResponse]</a></code>
- <code title="put /accounts/{account_id}/dlp/email/rules/{rule_id}">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">update</a>(rule_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/email/rule_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_update_response.py">Optional[RuleUpdateResponse]</a></code>
- <code title="get /accounts/{account_id}/dlp/email/rules">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_list_response.py">SyncSinglePage[RuleListResponse]</a></code>
- <code title="delete /accounts/{account_id}/dlp/email/rules/{rule_id}">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">delete</a>(rule_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_delete_response.py">Optional[RuleDeleteResponse]</a></code>
- <code title="patch /accounts/{account_id}/dlp/email/rules">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">bulk_edit</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/email/rule_bulk_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_bulk_edit_response.py">Optional[RuleBulkEditResponse]</a></code>
- <code title="get /accounts/{account_id}/dlp/email/rules/{rule_id}">client.zero_trust.dlp.email.rules.<a href="./src/cloudflare/resources/zero_trust/dlp/email/rules.py">get</a>(rule_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/email/rule_get_response.py">Optional[RuleGetResponse]</a></code>

### Profiles

Types:
Expand Down
14 changes: 14 additions & 0 deletions src/cloudflare/resources/accounts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .logs import (
LogsResource,
AsyncLogsResource,
LogsResourceWithRawResponse,
AsyncLogsResourceWithRawResponse,
LogsResourceWithStreamingResponse,
AsyncLogsResourceWithStreamingResponse,
)
from .roles import (
RolesResource,
AsyncRolesResource,
Expand Down Expand Up @@ -66,6 +74,12 @@
"AsyncTokensResourceWithRawResponse",
"TokensResourceWithStreamingResponse",
"AsyncTokensResourceWithStreamingResponse",
"LogsResource",
"AsyncLogsResource",
"LogsResourceWithRawResponse",
"AsyncLogsResourceWithRawResponse",
"LogsResourceWithStreamingResponse",
"AsyncLogsResourceWithStreamingResponse",
"AccountsResource",
"AsyncAccountsResource",
"AccountsResourceWithRawResponse",
Expand Down
32 changes: 32 additions & 0 deletions src/cloudflare/resources/accounts/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
async_maybe_transform,
)
from ..._compat import cached_property
from .logs.logs import (
LogsResource,
AsyncLogsResource,
LogsResourceWithRawResponse,
AsyncLogsResourceWithRawResponse,
LogsResourceWithStreamingResponse,
AsyncLogsResourceWithStreamingResponse,
)
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
to_raw_response_wrapper,
Expand Down Expand Up @@ -79,6 +87,10 @@ def subscriptions(self) -> SubscriptionsResource:
def tokens(self) -> TokensResource:
return TokensResource(self._client)

@cached_property
def logs(self) -> LogsResource:
return LogsResource(self._client)

@cached_property
def with_raw_response(self) -> AccountsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -358,6 +370,10 @@ def subscriptions(self) -> AsyncSubscriptionsResource:
def tokens(self) -> AsyncTokensResource:
return AsyncTokensResource(self._client)

@cached_property
def logs(self) -> AsyncLogsResource:
return AsyncLogsResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -656,6 +672,10 @@ def subscriptions(self) -> SubscriptionsResourceWithRawResponse:
def tokens(self) -> TokensResourceWithRawResponse:
return TokensResourceWithRawResponse(self._accounts.tokens)

@cached_property
def logs(self) -> LogsResourceWithRawResponse:
return LogsResourceWithRawResponse(self._accounts.logs)


class AsyncAccountsResourceWithRawResponse:
def __init__(self, accounts: AsyncAccountsResource) -> None:
Expand Down Expand Up @@ -693,6 +713,10 @@ def subscriptions(self) -> AsyncSubscriptionsResourceWithRawResponse:
def tokens(self) -> AsyncTokensResourceWithRawResponse:
return AsyncTokensResourceWithRawResponse(self._accounts.tokens)

@cached_property
def logs(self) -> AsyncLogsResourceWithRawResponse:
return AsyncLogsResourceWithRawResponse(self._accounts.logs)


class AccountsResourceWithStreamingResponse:
def __init__(self, accounts: AccountsResource) -> None:
Expand Down Expand Up @@ -730,6 +754,10 @@ def subscriptions(self) -> SubscriptionsResourceWithStreamingResponse:
def tokens(self) -> TokensResourceWithStreamingResponse:
return TokensResourceWithStreamingResponse(self._accounts.tokens)

@cached_property
def logs(self) -> LogsResourceWithStreamingResponse:
return LogsResourceWithStreamingResponse(self._accounts.logs)


class AsyncAccountsResourceWithStreamingResponse:
def __init__(self, accounts: AsyncAccountsResource) -> None:
Expand Down Expand Up @@ -766,3 +794,7 @@ def subscriptions(self) -> AsyncSubscriptionsResourceWithStreamingResponse:
@cached_property
def tokens(self) -> AsyncTokensResourceWithStreamingResponse:
return AsyncTokensResourceWithStreamingResponse(self._accounts.tokens)

@cached_property
def logs(self) -> AsyncLogsResourceWithStreamingResponse:
return AsyncLogsResourceWithStreamingResponse(self._accounts.logs)
33 changes: 33 additions & 0 deletions src/cloudflare/resources/accounts/logs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .logs import (
LogsResource,
AsyncLogsResource,
LogsResourceWithRawResponse,
AsyncLogsResourceWithRawResponse,
LogsResourceWithStreamingResponse,
AsyncLogsResourceWithStreamingResponse,
)
from .audit import (
AuditResource,
AsyncAuditResource,
AuditResourceWithRawResponse,
AsyncAuditResourceWithRawResponse,
AuditResourceWithStreamingResponse,
AsyncAuditResourceWithStreamingResponse,
)

__all__ = [
"AuditResource",
"AsyncAuditResource",
"AuditResourceWithRawResponse",
"AsyncAuditResourceWithRawResponse",
"AuditResourceWithStreamingResponse",
"AsyncAuditResourceWithStreamingResponse",
"LogsResource",
"AsyncLogsResource",
"LogsResourceWithRawResponse",
"AsyncLogsResourceWithRawResponse",
"LogsResourceWithStreamingResponse",
"AsyncLogsResourceWithStreamingResponse",
]
Loading

0 comments on commit ce7f872

Please sign in to comment.