Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #456

Merged
merged 1 commit into from
May 6, 2024
Merged
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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1269
configured_endpoints: 1275
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ecba01cd225d19e1decd3caa323399e3f580a2abbdd4a756fa536063651facee.yml
34 changes: 34 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7435,3 +7435,37 @@ 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>

# AIGateway

Types:

```python
from cloudflare.types.ai_gateway import (
AIGatewayCreateResponse,
AIGatewayUpdateResponse,
AIGatewayListResponse,
AIGatewayDeleteResponse,
AIGatewayGetResponse,
)
```

Methods:

- <code title="post /accounts/{account_tag}/ai-gateway/gateways">client.ai_gateway.<a href="./src/cloudflare/resources/ai_gateway/ai_gateway.py">create</a>(account_tag, \*\*<a href="src/cloudflare/types/ai_gateway/ai_gateway_create_params.py">params</a>) -> <a href="./src/cloudflare/types/ai_gateway/ai_gateway_create_response.py">AIGatewayCreateResponse</a></code>
- <code title="put /accounts/{account_tag}/ai-gateway/gateways/{id}">client.ai_gateway.<a href="./src/cloudflare/resources/ai_gateway/ai_gateway.py">update</a>(id, \*, account_tag, \*\*<a href="src/cloudflare/types/ai_gateway/ai_gateway_update_params.py">params</a>) -> <a href="./src/cloudflare/types/ai_gateway/ai_gateway_update_response.py">AIGatewayUpdateResponse</a></code>
- <code title="get /accounts/{account_tag}/ai-gateway/gateways">client.ai_gateway.<a href="./src/cloudflare/resources/ai_gateway/ai_gateway.py">list</a>(account_tag, \*\*<a href="src/cloudflare/types/ai_gateway/ai_gateway_list_params.py">params</a>) -> <a href="./src/cloudflare/types/ai_gateway/ai_gateway_list_response.py">SyncV4PagePaginationArray[AIGatewayListResponse]</a></code>
- <code title="delete /accounts/{account_tag}/ai-gateway/gateways/{id}">client.ai_gateway.<a href="./src/cloudflare/resources/ai_gateway/ai_gateway.py">delete</a>(id, \*, account_tag) -> <a href="./src/cloudflare/types/ai_gateway/ai_gateway_delete_response.py">AIGatewayDeleteResponse</a></code>
- <code title="get /accounts/{account_tag}/ai-gateway/gateways/{id}">client.ai_gateway.<a href="./src/cloudflare/resources/ai_gateway/ai_gateway.py">get</a>(id, \*, account_tag) -> <a href="./src/cloudflare/types/ai_gateway/ai_gateway_get_response.py">AIGatewayGetResponse</a></code>

## Logs

Types:

```python
from cloudflare.types.ai_gateway import LogGetResponse
```

Methods:

- <code title="get /accounts/{account_tag}/ai-gateway/gateways/{id}/logs">client.ai_gateway.logs.<a href="./src/cloudflare/resources/ai_gateway/logs.py">get</a>(id, \*, account_tag, \*\*<a href="src/cloudflare/types/ai_gateway/log_get_params.py">params</a>) -> <a href="./src/cloudflare/types/ai_gateway/log_get_response.py">LogGetResponse</a></code>
8 changes: 8 additions & 0 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class Cloudflare(SyncAPIClient):
calls: resources.CallsResource
cloudforce_one: resources.CloudforceOneResource
event_notifications: resources.EventNotificationsResource
ai_gateway: resources.AIGatewayResource
with_raw_response: CloudflareWithRawResponse
with_streaming_response: CloudflareWithStreamedResponse

Expand Down Expand Up @@ -284,6 +285,7 @@ def __init__(
self.calls = resources.CallsResource(self)
self.cloudforce_one = resources.CloudforceOneResource(self)
self.event_notifications = resources.EventNotificationsResource(self)
self.ai_gateway = resources.AIGatewayResource(self)
self.with_raw_response = CloudflareWithRawResponse(self)
self.with_streaming_response = CloudflareWithStreamedResponse(self)

Expand Down Expand Up @@ -543,6 +545,7 @@ class AsyncCloudflare(AsyncAPIClient):
calls: resources.AsyncCallsResource
cloudforce_one: resources.AsyncCloudforceOneResource
event_notifications: resources.AsyncEventNotificationsResource
ai_gateway: resources.AsyncAIGatewayResource
with_raw_response: AsyncCloudflareWithRawResponse
with_streaming_response: AsyncCloudflareWithStreamedResponse

Expand Down Expand Up @@ -699,6 +702,7 @@ def __init__(
self.calls = resources.AsyncCallsResource(self)
self.cloudforce_one = resources.AsyncCloudforceOneResource(self)
self.event_notifications = resources.AsyncEventNotificationsResource(self)
self.ai_gateway = resources.AsyncAIGatewayResource(self)
self.with_raw_response = AsyncCloudflareWithRawResponse(self)
self.with_streaming_response = AsyncCloudflareWithStreamedResponse(self)

Expand Down Expand Up @@ -969,6 +973,7 @@ def __init__(self, client: Cloudflare) -> None:
self.calls = resources.CallsResourceWithRawResponse(client.calls)
self.cloudforce_one = resources.CloudforceOneResourceWithRawResponse(client.cloudforce_one)
self.event_notifications = resources.EventNotificationsResourceWithRawResponse(client.event_notifications)
self.ai_gateway = resources.AIGatewayResourceWithRawResponse(client.ai_gateway)


class AsyncCloudflareWithRawResponse:
Expand Down Expand Up @@ -1068,6 +1073,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.calls = resources.AsyncCallsResourceWithRawResponse(client.calls)
self.cloudforce_one = resources.AsyncCloudforceOneResourceWithRawResponse(client.cloudforce_one)
self.event_notifications = resources.AsyncEventNotificationsResourceWithRawResponse(client.event_notifications)
self.ai_gateway = resources.AsyncAIGatewayResourceWithRawResponse(client.ai_gateway)


class CloudflareWithStreamedResponse:
Expand Down Expand Up @@ -1167,6 +1173,7 @@ def __init__(self, client: Cloudflare) -> None:
self.calls = resources.CallsResourceWithStreamingResponse(client.calls)
self.cloudforce_one = resources.CloudforceOneResourceWithStreamingResponse(client.cloudforce_one)
self.event_notifications = resources.EventNotificationsResourceWithStreamingResponse(client.event_notifications)
self.ai_gateway = resources.AIGatewayResourceWithStreamingResponse(client.ai_gateway)


class AsyncCloudflareWithStreamedResponse:
Expand Down Expand Up @@ -1274,6 +1281,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.event_notifications = resources.AsyncEventNotificationsResourceWithStreamingResponse(
client.event_notifications
)
self.ai_gateway = resources.AsyncAIGatewayResourceWithStreamingResponse(client.ai_gateway)


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 @@ -336,6 +336,14 @@
AddressingResourceWithStreamingResponse,
AsyncAddressingResourceWithStreamingResponse,
)
from .ai_gateway import (
AIGatewayResource,
AsyncAIGatewayResource,
AIGatewayResourceWithRawResponse,
AsyncAIGatewayResourceWithRawResponse,
AIGatewayResourceWithStreamingResponse,
AsyncAIGatewayResourceWithStreamingResponse,
)
from .audit_logs import (
AuditLogsResource,
AsyncAuditLogsResource,
Expand Down Expand Up @@ -1136,4 +1144,10 @@
"AsyncEventNotificationsResourceWithRawResponse",
"EventNotificationsResourceWithStreamingResponse",
"AsyncEventNotificationsResourceWithStreamingResponse",
"AIGatewayResource",
"AsyncAIGatewayResource",
"AIGatewayResourceWithRawResponse",
"AsyncAIGatewayResourceWithRawResponse",
"AIGatewayResourceWithStreamingResponse",
"AsyncAIGatewayResourceWithStreamingResponse",
]
33 changes: 33 additions & 0 deletions src/cloudflare/resources/ai_gateway/__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 .ai_gateway import (
AIGatewayResource,
AsyncAIGatewayResource,
AIGatewayResourceWithRawResponse,
AsyncAIGatewayResourceWithRawResponse,
AIGatewayResourceWithStreamingResponse,
AsyncAIGatewayResourceWithStreamingResponse,
)

__all__ = [
"LogsResource",
"AsyncLogsResource",
"LogsResourceWithRawResponse",
"AsyncLogsResourceWithRawResponse",
"LogsResourceWithStreamingResponse",
"AsyncLogsResourceWithStreamingResponse",
"AIGatewayResource",
"AsyncAIGatewayResource",
"AIGatewayResourceWithRawResponse",
"AsyncAIGatewayResourceWithRawResponse",
"AIGatewayResourceWithStreamingResponse",
"AsyncAIGatewayResourceWithStreamingResponse",
]
Loading