Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent 289d760 commit 5a49713
Show file tree
Hide file tree
Showing 23 changed files with 1,401 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 1256
configured_endpoints: 1259
32 changes: 32 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7345,3 +7345,35 @@ Methods:
- <code title="delete /accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">delete</a>(priority_identifer, \*, account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/requests/priority_delete_response.py">PriorityDeleteResponse</a></code>
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">get</a>(priority_identifer, \*, account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/item.py">Item</a></code>
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/priority/quota">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">quota</a>(account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/quota.py">Quota</a></code>

# EventNotifications

## R2

### Configuration

Types:

```python
from cloudflare.types.event_notifications.r2 import ConfigurationGetResponse
```

Methods:

- <code title="get /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration">client.event_notifications.r2.configuration.<a href="./src/cloudflare/resources/event_notifications/r2/configuration/configuration.py">get</a>(bucket_name, \*, account_id) -> <a href="./src/cloudflare/types/event_notifications/r2/configuration_get_response.py">ConfigurationGetResponse</a></code>

#### Queues

Types:

```python
from cloudflare.types.event_notifications.r2.configuration import (
QueueUpdateResponse,
QueueDeleteResponse,
)
```

Methods:

- <code title="put /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}">client.event_notifications.r2.configuration.queues.<a href="./src/cloudflare/resources/event_notifications/r2/configuration/queues.py">update</a>(queue_id, \*, account_id, bucket_name, \*\*<a href="src/cloudflare/types/event_notifications/r2/configuration/queue_update_params.py">params</a>) -> <a href="./src/cloudflare/types/event_notifications/r2/configuration/queue_update_response.py">QueueUpdateResponse</a></code>
- <code title="delete /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}">client.event_notifications.r2.configuration.queues.<a href="./src/cloudflare/resources/event_notifications/r2/configuration/queues.py">delete</a>(queue_id, \*, account_id, bucket_name) -> <a href="./src/cloudflare/types/event_notifications/r2/configuration/queue_delete_response.py">QueueDeleteResponse</a></code>
8 changes: 8 additions & 0 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class Cloudflare(SyncAPIClient):
snippets: resources.Snippets
calls: resources.Calls
cloudforce_one: resources.CloudforceOne
event_notifications: resources.EventNotifications
with_raw_response: CloudflareWithRawResponse
with_streaming_response: CloudflareWithStreamedResponse

Expand Down Expand Up @@ -282,6 +283,7 @@ def __init__(
self.snippets = resources.Snippets(self)
self.calls = resources.Calls(self)
self.cloudforce_one = resources.CloudforceOne(self)
self.event_notifications = resources.EventNotifications(self)
self.with_raw_response = CloudflareWithRawResponse(self)
self.with_streaming_response = CloudflareWithStreamedResponse(self)

Expand Down Expand Up @@ -540,6 +542,7 @@ class AsyncCloudflare(AsyncAPIClient):
snippets: resources.AsyncSnippets
calls: resources.AsyncCalls
cloudforce_one: resources.AsyncCloudforceOne
event_notifications: resources.AsyncEventNotifications
with_raw_response: AsyncCloudflareWithRawResponse
with_streaming_response: AsyncCloudflareWithStreamedResponse

Expand Down Expand Up @@ -695,6 +698,7 @@ def __init__(
self.snippets = resources.AsyncSnippets(self)
self.calls = resources.AsyncCalls(self)
self.cloudforce_one = resources.AsyncCloudforceOne(self)
self.event_notifications = resources.AsyncEventNotifications(self)
self.with_raw_response = AsyncCloudflareWithRawResponse(self)
self.with_streaming_response = AsyncCloudflareWithStreamedResponse(self)

Expand Down Expand Up @@ -956,6 +960,7 @@ def __init__(self, client: Cloudflare) -> None:
self.snippets = resources.SnippetsWithRawResponse(client.snippets)
self.calls = resources.CallsWithRawResponse(client.calls)
self.cloudforce_one = resources.CloudforceOneWithRawResponse(client.cloudforce_one)
self.event_notifications = resources.EventNotificationsWithRawResponse(client.event_notifications)


class AsyncCloudflareWithRawResponse:
Expand Down Expand Up @@ -1046,6 +1051,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.snippets = resources.AsyncSnippetsWithRawResponse(client.snippets)
self.calls = resources.AsyncCallsWithRawResponse(client.calls)
self.cloudforce_one = resources.AsyncCloudforceOneWithRawResponse(client.cloudforce_one)
self.event_notifications = resources.AsyncEventNotificationsWithRawResponse(client.event_notifications)


class CloudflareWithStreamedResponse:
Expand Down Expand Up @@ -1136,6 +1142,7 @@ def __init__(self, client: Cloudflare) -> None:
self.snippets = resources.SnippetsWithStreamingResponse(client.snippets)
self.calls = resources.CallsWithStreamingResponse(client.calls)
self.cloudforce_one = resources.CloudforceOneWithStreamingResponse(client.cloudforce_one)
self.event_notifications = resources.EventNotificationsWithStreamingResponse(client.event_notifications)


class AsyncCloudflareWithStreamedResponse:
Expand Down Expand Up @@ -1232,6 +1239,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.snippets = resources.AsyncSnippetsWithStreamingResponse(client.snippets)
self.calls = resources.AsyncCallsWithStreamingResponse(client.calls)
self.cloudforce_one = resources.AsyncCloudforceOneWithStreamingResponse(client.cloudforce_one)
self.event_notifications = resources.AsyncEventNotificationsWithStreamingResponse(client.event_notifications)


Client = Cloudflare
Expand Down
14 changes: 14 additions & 0 deletions src/cloudflare/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,14 @@
CustomCertificatesWithStreamingResponse,
AsyncCustomCertificatesWithStreamingResponse,
)
from .event_notifications import (
EventNotifications,
AsyncEventNotifications,
EventNotificationsWithRawResponse,
AsyncEventNotificationsWithRawResponse,
EventNotificationsWithStreamingResponse,
AsyncEventNotificationsWithStreamingResponse,
)
from .keyless_certificates import (
KeylessCertificates,
AsyncKeylessCertificates,
Expand Down Expand Up @@ -1122,4 +1130,10 @@
"AsyncCloudforceOneWithRawResponse",
"CloudforceOneWithStreamingResponse",
"AsyncCloudforceOneWithStreamingResponse",
"EventNotifications",
"AsyncEventNotifications",
"EventNotificationsWithRawResponse",
"AsyncEventNotificationsWithRawResponse",
"EventNotificationsWithStreamingResponse",
"AsyncEventNotificationsWithStreamingResponse",
]
33 changes: 33 additions & 0 deletions src/cloudflare/resources/event_notifications/__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 .r2 import (
R2,
AsyncR2,
R2WithRawResponse,
AsyncR2WithRawResponse,
R2WithStreamingResponse,
AsyncR2WithStreamingResponse,
)
from .event_notifications import (
EventNotifications,
AsyncEventNotifications,
EventNotificationsWithRawResponse,
AsyncEventNotificationsWithRawResponse,
EventNotificationsWithStreamingResponse,
AsyncEventNotificationsWithStreamingResponse,
)

__all__ = [
"R2",
"AsyncR2",
"R2WithRawResponse",
"AsyncR2WithRawResponse",
"R2WithStreamingResponse",
"AsyncR2WithStreamingResponse",
"EventNotifications",
"AsyncEventNotifications",
"EventNotificationsWithRawResponse",
"AsyncEventNotificationsWithRawResponse",
"EventNotificationsWithStreamingResponse",
"AsyncEventNotificationsWithStreamingResponse",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from .r2 import (
R2,
AsyncR2,
R2WithRawResponse,
AsyncR2WithRawResponse,
R2WithStreamingResponse,
AsyncR2WithStreamingResponse,
)
from .r2.r2 import R2, AsyncR2
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource

__all__ = ["EventNotifications", "AsyncEventNotifications"]


class EventNotifications(SyncAPIResource):
@cached_property
def r2(self) -> R2:
return R2(self._client)

@cached_property
def with_raw_response(self) -> EventNotificationsWithRawResponse:
return EventNotificationsWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> EventNotificationsWithStreamingResponse:
return EventNotificationsWithStreamingResponse(self)


class AsyncEventNotifications(AsyncAPIResource):
@cached_property
def r2(self) -> AsyncR2:
return AsyncR2(self._client)

@cached_property
def with_raw_response(self) -> AsyncEventNotificationsWithRawResponse:
return AsyncEventNotificationsWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncEventNotificationsWithStreamingResponse:
return AsyncEventNotificationsWithStreamingResponse(self)


class EventNotificationsWithRawResponse:
def __init__(self, event_notifications: EventNotifications) -> None:
self._event_notifications = event_notifications

@cached_property
def r2(self) -> R2WithRawResponse:
return R2WithRawResponse(self._event_notifications.r2)


class AsyncEventNotificationsWithRawResponse:
def __init__(self, event_notifications: AsyncEventNotifications) -> None:
self._event_notifications = event_notifications

@cached_property
def r2(self) -> AsyncR2WithRawResponse:
return AsyncR2WithRawResponse(self._event_notifications.r2)


class EventNotificationsWithStreamingResponse:
def __init__(self, event_notifications: EventNotifications) -> None:
self._event_notifications = event_notifications

@cached_property
def r2(self) -> R2WithStreamingResponse:
return R2WithStreamingResponse(self._event_notifications.r2)


class AsyncEventNotificationsWithStreamingResponse:
def __init__(self, event_notifications: AsyncEventNotifications) -> None:
self._event_notifications = event_notifications

@cached_property
def r2(self) -> AsyncR2WithStreamingResponse:
return AsyncR2WithStreamingResponse(self._event_notifications.r2)
33 changes: 33 additions & 0 deletions src/cloudflare/resources/event_notifications/r2/__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 .r2 import (
R2,
AsyncR2,
R2WithRawResponse,
AsyncR2WithRawResponse,
R2WithStreamingResponse,
AsyncR2WithStreamingResponse,
)
from .configuration import (
Configuration,
AsyncConfiguration,
ConfigurationWithRawResponse,
AsyncConfigurationWithRawResponse,
ConfigurationWithStreamingResponse,
AsyncConfigurationWithStreamingResponse,
)

__all__ = [
"Configuration",
"AsyncConfiguration",
"ConfigurationWithRawResponse",
"AsyncConfigurationWithRawResponse",
"ConfigurationWithStreamingResponse",
"AsyncConfigurationWithStreamingResponse",
"R2",
"AsyncR2",
"R2WithRawResponse",
"AsyncR2WithRawResponse",
"R2WithStreamingResponse",
"AsyncR2WithStreamingResponse",
]
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 .queues import (
Queues,
AsyncQueues,
QueuesWithRawResponse,
AsyncQueuesWithRawResponse,
QueuesWithStreamingResponse,
AsyncQueuesWithStreamingResponse,
)
from .configuration import (
Configuration,
AsyncConfiguration,
ConfigurationWithRawResponse,
AsyncConfigurationWithRawResponse,
ConfigurationWithStreamingResponse,
AsyncConfigurationWithStreamingResponse,
)

__all__ = [
"Queues",
"AsyncQueues",
"QueuesWithRawResponse",
"AsyncQueuesWithRawResponse",
"QueuesWithStreamingResponse",
"AsyncQueuesWithStreamingResponse",
"Configuration",
"AsyncConfiguration",
"ConfigurationWithRawResponse",
"AsyncConfigurationWithRawResponse",
"ConfigurationWithStreamingResponse",
"AsyncConfigurationWithStreamingResponse",
]
Loading

0 comments on commit 5a49713

Please sign in to comment.