Skip to content

Commit ba5b5fc

Browse files
chore(api): update composite API spec
1 parent dd0b6fb commit ba5b5fc

File tree

12 files changed

+350
-6
lines changed

12 files changed

+350
-6
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1856
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90808d61c82855d01afed337662c50972dc6ac8b779763650cecef6541c2d5cc.yml
3-
openapi_spec_hash: 5c9d36950e74e02161a89f5051bccef1
1+
configured_endpoints: 1857
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-25948e3293c7ca8798d7722f962cf2fc566faa8880489e0746d3a16f1e02e523.yml
3+
openapi_spec_hash: 97e3f177c34640dd60815a578f1ed7bd
44
config_hash: 8b4b3138e3a18ef5db3b0cadffd36a6e

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,6 +2772,7 @@ from cloudflare.types.queues import (
27722772
SubscriptionUpdateResponse,
27732773
SubscriptionListResponse,
27742774
SubscriptionDeleteResponse,
2775+
SubscriptionGetResponse,
27752776
)
27762777
```
27772778

@@ -2781,6 +2782,7 @@ Methods:
27812782
- <code title="patch /accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}">client.queues.subscriptions.<a href="./src/cloudflare/resources/queues/subscriptions.py">update</a>(subscription_id, \*, account_id, \*\*<a href="src/cloudflare/types/queues/subscription_update_params.py">params</a>) -> <a href="./src/cloudflare/types/queues/subscription_update_response.py">Optional[SubscriptionUpdateResponse]</a></code>
27822783
- <code title="get /accounts/{account_id}/event_subscriptions/subscriptions">client.queues.subscriptions.<a href="./src/cloudflare/resources/queues/subscriptions.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/queues/subscription_list_params.py">params</a>) -> <a href="./src/cloudflare/types/queues/subscription_list_response.py">SyncV4PagePaginationArray[SubscriptionListResponse]</a></code>
27832784
- <code title="delete /accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}">client.queues.subscriptions.<a href="./src/cloudflare/resources/queues/subscriptions.py">delete</a>(subscription_id, \*, account_id) -> <a href="./src/cloudflare/types/queues/subscription_delete_response.py">Optional[SubscriptionDeleteResponse]</a></code>
2785+
- <code title="get /accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}">client.queues.subscriptions.<a href="./src/cloudflare/resources/queues/subscriptions.py">get</a>(subscription_id, \*, account_id) -> <a href="./src/cloudflare/types/queues/subscription_get_response.py">Optional[SubscriptionGetResponse]</a></code>
27842786

27852787
# APIGateway
27862788

src/cloudflare/resources/queues/subscriptions.py

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
2222
from ..._base_client import AsyncPaginator, make_request_options
2323
from ...types.queues import subscription_list_params, subscription_create_params, subscription_update_params
24+
from ...types.queues.subscription_get_response import SubscriptionGetResponse
2425
from ...types.queues.subscription_list_response import SubscriptionListResponse
2526
from ...types.queues.subscription_create_response import SubscriptionCreateResponse
2627
from ...types.queues.subscription_delete_response import SubscriptionDeleteResponse
@@ -282,6 +283,50 @@ def delete(
282283
cast_to=cast(Type[Optional[SubscriptionDeleteResponse]], ResultWrapper[SubscriptionDeleteResponse]),
283284
)
284285

286+
def get(
287+
self,
288+
subscription_id: str,
289+
*,
290+
account_id: str,
291+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
292+
# The extra values given here take precedence over values defined on the client or passed to this method.
293+
extra_headers: Headers | None = None,
294+
extra_query: Query | None = None,
295+
extra_body: Body | None = None,
296+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
297+
) -> Optional[SubscriptionGetResponse]:
298+
"""
299+
Get details about an existing event subscription
300+
301+
Args:
302+
account_id: A Resource identifier.
303+
304+
subscription_id: A Resource identifier.
305+
306+
extra_headers: Send extra headers
307+
308+
extra_query: Add additional query parameters to the request
309+
310+
extra_body: Add additional JSON properties to the request
311+
312+
timeout: Override the client-level default timeout for this request, in seconds
313+
"""
314+
if not account_id:
315+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
316+
if not subscription_id:
317+
raise ValueError(f"Expected a non-empty value for `subscription_id` but received {subscription_id!r}")
318+
return self._get(
319+
f"/accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}",
320+
options=make_request_options(
321+
extra_headers=extra_headers,
322+
extra_query=extra_query,
323+
extra_body=extra_body,
324+
timeout=timeout,
325+
post_parser=ResultWrapper[Optional[SubscriptionGetResponse]]._unwrapper,
326+
),
327+
cast_to=cast(Type[Optional[SubscriptionGetResponse]], ResultWrapper[SubscriptionGetResponse]),
328+
)
329+
285330

286331
class AsyncSubscriptionsResource(AsyncAPIResource):
287332
@cached_property
@@ -536,6 +581,50 @@ async def delete(
536581
cast_to=cast(Type[Optional[SubscriptionDeleteResponse]], ResultWrapper[SubscriptionDeleteResponse]),
537582
)
538583

584+
async def get(
585+
self,
586+
subscription_id: str,
587+
*,
588+
account_id: str,
589+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
590+
# The extra values given here take precedence over values defined on the client or passed to this method.
591+
extra_headers: Headers | None = None,
592+
extra_query: Query | None = None,
593+
extra_body: Body | None = None,
594+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
595+
) -> Optional[SubscriptionGetResponse]:
596+
"""
597+
Get details about an existing event subscription
598+
599+
Args:
600+
account_id: A Resource identifier.
601+
602+
subscription_id: A Resource identifier.
603+
604+
extra_headers: Send extra headers
605+
606+
extra_query: Add additional query parameters to the request
607+
608+
extra_body: Add additional JSON properties to the request
609+
610+
timeout: Override the client-level default timeout for this request, in seconds
611+
"""
612+
if not account_id:
613+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
614+
if not subscription_id:
615+
raise ValueError(f"Expected a non-empty value for `subscription_id` but received {subscription_id!r}")
616+
return await self._get(
617+
f"/accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}",
618+
options=make_request_options(
619+
extra_headers=extra_headers,
620+
extra_query=extra_query,
621+
extra_body=extra_body,
622+
timeout=timeout,
623+
post_parser=ResultWrapper[Optional[SubscriptionGetResponse]]._unwrapper,
624+
),
625+
cast_to=cast(Type[Optional[SubscriptionGetResponse]], ResultWrapper[SubscriptionGetResponse]),
626+
)
627+
539628

540629
class SubscriptionsResourceWithRawResponse:
541630
def __init__(self, subscriptions: SubscriptionsResource) -> None:
@@ -553,6 +642,9 @@ def __init__(self, subscriptions: SubscriptionsResource) -> None:
553642
self.delete = to_raw_response_wrapper(
554643
subscriptions.delete,
555644
)
645+
self.get = to_raw_response_wrapper(
646+
subscriptions.get,
647+
)
556648

557649

558650
class AsyncSubscriptionsResourceWithRawResponse:
@@ -571,6 +663,9 @@ def __init__(self, subscriptions: AsyncSubscriptionsResource) -> None:
571663
self.delete = async_to_raw_response_wrapper(
572664
subscriptions.delete,
573665
)
666+
self.get = async_to_raw_response_wrapper(
667+
subscriptions.get,
668+
)
574669

575670

576671
class SubscriptionsResourceWithStreamingResponse:
@@ -589,6 +684,9 @@ def __init__(self, subscriptions: SubscriptionsResource) -> None:
589684
self.delete = to_streamed_response_wrapper(
590685
subscriptions.delete,
591686
)
687+
self.get = to_streamed_response_wrapper(
688+
subscriptions.get,
689+
)
592690

593691

594692
class AsyncSubscriptionsResourceWithStreamingResponse:
@@ -607,3 +705,6 @@ def __init__(self, subscriptions: AsyncSubscriptionsResource) -> None:
607705
self.delete = async_to_streamed_response_wrapper(
608706
subscriptions.delete,
609707
)
708+
self.get = async_to_streamed_response_wrapper(
709+
subscriptions.get,
710+
)

src/cloudflare/resources/r2/buckets/event_notifications.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def update(
5252
*,
5353
account_id: str,
5454
bucket_name: str,
55-
rules: Iterable[event_notification_update_params.Rule] | Omit = omit,
55+
rules: Iterable[event_notification_update_params.Rule],
5656
jurisdiction: Literal["default", "eu", "fedramp"] | Omit = omit,
5757
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5858
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -298,7 +298,7 @@ async def update(
298298
*,
299299
account_id: str,
300300
bucket_name: str,
301-
rules: Iterable[event_notification_update_params.Rule] | Omit = omit,
301+
rules: Iterable[event_notification_update_params.Rule],
302302
jurisdiction: Literal["default", "eu", "fedramp"] | Omit = omit,
303303
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
304304
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/resources/zero_trust/access/applications/applications.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,6 +2436,7 @@ def list(
24362436
page: int | Omit = omit,
24372437
per_page: int | Omit = omit,
24382438
search: str | Omit = omit,
2439+
target_attributes: str | Omit = omit,
24392440
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
24402441
# The extra values given here take precedence over values defined on the client or passed to this method.
24412442
extra_headers: Headers | None = None,
@@ -2465,6 +2466,8 @@ def list(
24652466
24662467
search: Search for apps by other listed query parameters.
24672468
2469+
target_attributes: Target Criteria attributes in key=value format.
2470+
24682471
extra_headers: Send extra headers
24692472
24702473
extra_query: Add additional query parameters to the request
@@ -2502,6 +2505,7 @@ def list(
25022505
"page": page,
25032506
"per_page": per_page,
25042507
"search": search,
2508+
"target_attributes": target_attributes,
25052509
},
25062510
application_list_params.ApplicationListParams,
25072511
),
@@ -5041,6 +5045,7 @@ def list(
50415045
page: int | Omit = omit,
50425046
per_page: int | Omit = omit,
50435047
search: str | Omit = omit,
5048+
target_attributes: str | Omit = omit,
50445049
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
50455050
# The extra values given here take precedence over values defined on the client or passed to this method.
50465051
extra_headers: Headers | None = None,
@@ -5070,6 +5075,8 @@ def list(
50705075
50715076
search: Search for apps by other listed query parameters.
50725077
5078+
target_attributes: Target Criteria attributes in key=value format.
5079+
50735080
extra_headers: Send extra headers
50745081
50755082
extra_query: Add additional query parameters to the request
@@ -5107,6 +5114,7 @@ def list(
51075114
"page": page,
51085115
"per_page": per_page,
51095116
"search": search,
5117+
"target_attributes": target_attributes,
51105118
},
51115119
application_list_params.ApplicationListParams,
51125120
),

src/cloudflare/types/queues/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .consumer_delete_response import ConsumerDeleteResponse as ConsumerDeleteResponse
2222
from .message_bulk_push_params import MessageBulkPushParams as MessageBulkPushParams
2323
from .subscription_list_params import SubscriptionListParams as SubscriptionListParams
24+
from .subscription_get_response import SubscriptionGetResponse as SubscriptionGetResponse
2425
from .message_bulk_push_response import MessageBulkPushResponse as MessageBulkPushResponse
2526
from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams
2627
from .subscription_list_response import SubscriptionListResponse as SubscriptionListResponse
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import List, Union, Optional
4+
from datetime import datetime
5+
from typing_extensions import Literal, TypeAlias
6+
7+
from pydantic import Field as FieldInfo
8+
9+
from ..._models import BaseModel
10+
11+
__all__ = [
12+
"SubscriptionGetResponse",
13+
"Destination",
14+
"Source",
15+
"SourceMqEventSourceImages",
16+
"SourceMqEventSourceKV",
17+
"SourceMqEventSourceR2",
18+
"SourceMqEventSourceSuperSlurper",
19+
"SourceMqEventSourceVectorize",
20+
"SourceMqEventSourceWorkersAIModel",
21+
"SourceMqEventSourceWorkersBuildsWorker",
22+
"SourceMqEventSourceWorkflowsWorkflow",
23+
]
24+
25+
26+
class Destination(BaseModel):
27+
queue_id: str
28+
"""ID of the target queue"""
29+
30+
type: Literal["queues.queue"]
31+
"""Type of destination"""
32+
33+
34+
class SourceMqEventSourceImages(BaseModel):
35+
type: Optional[Literal["images"]] = None
36+
"""Type of source"""
37+
38+
39+
class SourceMqEventSourceKV(BaseModel):
40+
type: Optional[Literal["kv"]] = None
41+
"""Type of source"""
42+
43+
44+
class SourceMqEventSourceR2(BaseModel):
45+
type: Optional[Literal["r2"]] = None
46+
"""Type of source"""
47+
48+
49+
class SourceMqEventSourceSuperSlurper(BaseModel):
50+
type: Optional[Literal["superSlurper"]] = None
51+
"""Type of source"""
52+
53+
54+
class SourceMqEventSourceVectorize(BaseModel):
55+
type: Optional[Literal["vectorize"]] = None
56+
"""Type of source"""
57+
58+
59+
class SourceMqEventSourceWorkersAIModel(BaseModel):
60+
ai_model_name: Optional[str] = FieldInfo(alias="model_name", default=None)
61+
"""Name of the Workers AI model"""
62+
63+
type: Optional[Literal["workersAi.model"]] = None
64+
"""Type of source"""
65+
66+
67+
class SourceMqEventSourceWorkersBuildsWorker(BaseModel):
68+
type: Optional[Literal["workersBuilds.worker"]] = None
69+
"""Type of source"""
70+
71+
worker_name: Optional[str] = None
72+
"""Name of the worker"""
73+
74+
75+
class SourceMqEventSourceWorkflowsWorkflow(BaseModel):
76+
type: Optional[Literal["workflows.workflow"]] = None
77+
"""Type of source"""
78+
79+
workflow_name: Optional[str] = None
80+
"""Name of the workflow"""
81+
82+
83+
Source: TypeAlias = Union[
84+
SourceMqEventSourceImages,
85+
SourceMqEventSourceKV,
86+
SourceMqEventSourceR2,
87+
SourceMqEventSourceSuperSlurper,
88+
SourceMqEventSourceVectorize,
89+
SourceMqEventSourceWorkersAIModel,
90+
SourceMqEventSourceWorkersBuildsWorker,
91+
SourceMqEventSourceWorkflowsWorkflow,
92+
]
93+
94+
95+
class SubscriptionGetResponse(BaseModel):
96+
id: str
97+
"""Unique identifier for the subscription"""
98+
99+
created_at: datetime
100+
"""When the subscription was created"""
101+
102+
destination: Destination
103+
"""Destination configuration for the subscription"""
104+
105+
enabled: bool
106+
"""Whether the subscription is active"""
107+
108+
events: List[str]
109+
"""List of event types this subscription handles"""
110+
111+
modified_at: datetime
112+
"""When the subscription was last modified"""
113+
114+
name: str
115+
"""Name of the subscription"""
116+
117+
source: Source
118+
"""Source configuration for the subscription"""

src/cloudflare/types/r2/buckets/event_notification_update_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class EventNotificationUpdateParams(TypedDict, total=False):
1717
bucket_name: Required[str]
1818
"""Name of the bucket."""
1919

20-
rules: Iterable[Rule]
20+
rules: Required[Iterable[Rule]]
2121
"""Array of rules to drive notifications."""
2222

2323
jurisdiction: Annotated[Literal["default", "eu", "fedramp"], PropertyInfo(alias="cf-r2-jurisdiction")]

src/cloudflare/types/zero_trust/access/application_list_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ class ApplicationListParams(TypedDict, total=False):
3434

3535
search: str
3636
"""Search for apps by other listed query parameters."""
37+
38+
target_attributes: str
39+
"""Target Criteria attributes in key=value format."""

0 commit comments

Comments
 (0)