Skip to content

Commit 2be295c

Browse files
OpenAPI Publisher Productionrotem-cloud
authored andcommitted
Update schema
Stainless-Generated-From: fc2f198a587669fe407d8c2e8e77ab5686b7aca9
1 parent c64ba47 commit 2be295c

115 files changed

Lines changed: 6499 additions & 11874 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 2523
1+
configured_endpoints: 2521

scripts/mock

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/cloudflare/resources/accounts/api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ from cloudflare.types.accounts import SubscriptionDeleteResponse
4747

4848
Methods:
4949

50-
- <code title="post /accounts/{account_id}/subscriptions">client.accounts.subscriptions.<a href="./src/cloudflare/resources/accounts/subscriptions.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/accounts/subscription_create_params.py">params</a>) -> <a href="./src/cloudflare/types/shared/subscription.py">Subscription</a></code>
5150
- <code title="put /accounts/{account_id}/subscriptions/{subscription_identifier}">client.accounts.subscriptions.<a href="./src/cloudflare/resources/accounts/subscriptions.py">update</a>(subscription_identifier, \*, account_id, \*\*<a href="src/cloudflare/types/accounts/subscription_update_params.py">params</a>) -> <a href="./src/cloudflare/types/shared/subscription.py">Subscription</a></code>
5251
- <code title="delete /accounts/{account_id}/subscriptions/{subscription_identifier}">client.accounts.subscriptions.<a href="./src/cloudflare/resources/accounts/subscriptions.py">delete</a>(subscription_identifier, \*, account_id) -> <a href="./src/cloudflare/types/accounts/subscription_delete_response.py">SubscriptionDeleteResponse</a></code>
53-
- <code title="get /accounts/{account_id}/subscriptions">client.accounts.subscriptions.<a href="./src/cloudflare/resources/accounts/subscriptions.py">get</a>(\*, account_id) -> <a href="./src/cloudflare/types/shared/subscription.py">SyncSinglePage[Subscription]</a></code>
5452

5553
## Tokens
5654

src/cloudflare/resources/accounts/subscriptions.py

Lines changed: 2 additions & 203 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
async_to_streamed_response_wrapper,
1919
)
2020
from ..._wrappers import ResultWrapper
21-
from ...pagination import SyncSinglePage, AsyncSinglePage
22-
from ..._base_client import AsyncPaginator, make_request_options
23-
from ...types.accounts import subscription_create_params, subscription_update_params
21+
from ..._base_client import make_request_options
22+
from ...types.accounts import subscription_update_params
2423
from ...types.shared.subscription import Subscription
2524
from ...types.shared_params.rate_plan import RatePlan
2625
from ...types.accounts.subscription_delete_response import SubscriptionDeleteResponse
@@ -48,58 +47,6 @@ def with_streaming_response(self) -> SubscriptionsResourceWithStreamingResponse:
4847
"""
4948
return SubscriptionsResourceWithStreamingResponse(self)
5049

51-
def create(
52-
self,
53-
*,
54-
account_id: str,
55-
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | Omit = omit,
56-
rate_plan: RatePlan | Omit = omit,
57-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
58-
# The extra values given here take precedence over values defined on the client or passed to this method.
59-
extra_headers: Headers | None = None,
60-
extra_query: Query | None = None,
61-
extra_body: Body | None = None,
62-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
63-
) -> Subscription:
64-
"""
65-
Creates an account subscription.
66-
67-
Args:
68-
account_id: Identifier
69-
70-
frequency: How often the subscription is renewed automatically.
71-
72-
rate_plan: The rate plan applied to the subscription.
73-
74-
extra_headers: Send extra headers
75-
76-
extra_query: Add additional query parameters to the request
77-
78-
extra_body: Add additional JSON properties to the request
79-
80-
timeout: Override the client-level default timeout for this request, in seconds
81-
"""
82-
if not account_id:
83-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
84-
return self._post(
85-
path_template("/accounts/{account_id}/subscriptions", account_id=account_id),
86-
body=maybe_transform(
87-
{
88-
"frequency": frequency,
89-
"rate_plan": rate_plan,
90-
},
91-
subscription_create_params.SubscriptionCreateParams,
92-
),
93-
options=make_request_options(
94-
extra_headers=extra_headers,
95-
extra_query=extra_query,
96-
extra_body=extra_body,
97-
timeout=timeout,
98-
post_parser=ResultWrapper[Subscription]._unwrapper,
99-
),
100-
cast_to=cast(Type[Subscription], ResultWrapper[Subscription]),
101-
)
102-
10350
def update(
10451
self,
10552
subscription_identifier: str,
@@ -213,42 +160,6 @@ def delete(
213160
cast_to=cast(Type[SubscriptionDeleteResponse], ResultWrapper[SubscriptionDeleteResponse]),
214161
)
215162

216-
def get(
217-
self,
218-
*,
219-
account_id: str,
220-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
221-
# The extra values given here take precedence over values defined on the client or passed to this method.
222-
extra_headers: Headers | None = None,
223-
extra_query: Query | None = None,
224-
extra_body: Body | None = None,
225-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
226-
) -> SyncSinglePage[Subscription]:
227-
"""
228-
Lists all of an account's subscriptions.
229-
230-
Args:
231-
account_id: Identifier
232-
233-
extra_headers: Send extra headers
234-
235-
extra_query: Add additional query parameters to the request
236-
237-
extra_body: Add additional JSON properties to the request
238-
239-
timeout: Override the client-level default timeout for this request, in seconds
240-
"""
241-
if not account_id:
242-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
243-
return self._get_api_list(
244-
path_template("/accounts/{account_id}/subscriptions", account_id=account_id),
245-
page=SyncSinglePage[Subscription],
246-
options=make_request_options(
247-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
248-
),
249-
model=Subscription,
250-
)
251-
252163

253164
class AsyncSubscriptionsResource(AsyncAPIResource):
254165
@cached_property
@@ -270,58 +181,6 @@ def with_streaming_response(self) -> AsyncSubscriptionsResourceWithStreamingResp
270181
"""
271182
return AsyncSubscriptionsResourceWithStreamingResponse(self)
272183

273-
async def create(
274-
self,
275-
*,
276-
account_id: str,
277-
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | Omit = omit,
278-
rate_plan: RatePlan | Omit = omit,
279-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
280-
# The extra values given here take precedence over values defined on the client or passed to this method.
281-
extra_headers: Headers | None = None,
282-
extra_query: Query | None = None,
283-
extra_body: Body | None = None,
284-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
285-
) -> Subscription:
286-
"""
287-
Creates an account subscription.
288-
289-
Args:
290-
account_id: Identifier
291-
292-
frequency: How often the subscription is renewed automatically.
293-
294-
rate_plan: The rate plan applied to the subscription.
295-
296-
extra_headers: Send extra headers
297-
298-
extra_query: Add additional query parameters to the request
299-
300-
extra_body: Add additional JSON properties to the request
301-
302-
timeout: Override the client-level default timeout for this request, in seconds
303-
"""
304-
if not account_id:
305-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
306-
return await self._post(
307-
path_template("/accounts/{account_id}/subscriptions", account_id=account_id),
308-
body=await async_maybe_transform(
309-
{
310-
"frequency": frequency,
311-
"rate_plan": rate_plan,
312-
},
313-
subscription_create_params.SubscriptionCreateParams,
314-
),
315-
options=make_request_options(
316-
extra_headers=extra_headers,
317-
extra_query=extra_query,
318-
extra_body=extra_body,
319-
timeout=timeout,
320-
post_parser=ResultWrapper[Subscription]._unwrapper,
321-
),
322-
cast_to=cast(Type[Subscription], ResultWrapper[Subscription]),
323-
)
324-
325184
async def update(
326185
self,
327186
subscription_identifier: str,
@@ -435,110 +294,50 @@ async def delete(
435294
cast_to=cast(Type[SubscriptionDeleteResponse], ResultWrapper[SubscriptionDeleteResponse]),
436295
)
437296

438-
def get(
439-
self,
440-
*,
441-
account_id: str,
442-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
443-
# The extra values given here take precedence over values defined on the client or passed to this method.
444-
extra_headers: Headers | None = None,
445-
extra_query: Query | None = None,
446-
extra_body: Body | None = None,
447-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
448-
) -> AsyncPaginator[Subscription, AsyncSinglePage[Subscription]]:
449-
"""
450-
Lists all of an account's subscriptions.
451-
452-
Args:
453-
account_id: Identifier
454-
455-
extra_headers: Send extra headers
456-
457-
extra_query: Add additional query parameters to the request
458-
459-
extra_body: Add additional JSON properties to the request
460-
461-
timeout: Override the client-level default timeout for this request, in seconds
462-
"""
463-
if not account_id:
464-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
465-
return self._get_api_list(
466-
path_template("/accounts/{account_id}/subscriptions", account_id=account_id),
467-
page=AsyncSinglePage[Subscription],
468-
options=make_request_options(
469-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
470-
),
471-
model=Subscription,
472-
)
473-
474297

475298
class SubscriptionsResourceWithRawResponse:
476299
def __init__(self, subscriptions: SubscriptionsResource) -> None:
477300
self._subscriptions = subscriptions
478301

479-
self.create = to_raw_response_wrapper(
480-
subscriptions.create,
481-
)
482302
self.update = to_raw_response_wrapper(
483303
subscriptions.update,
484304
)
485305
self.delete = to_raw_response_wrapper(
486306
subscriptions.delete,
487307
)
488-
self.get = to_raw_response_wrapper(
489-
subscriptions.get,
490-
)
491308

492309

493310
class AsyncSubscriptionsResourceWithRawResponse:
494311
def __init__(self, subscriptions: AsyncSubscriptionsResource) -> None:
495312
self._subscriptions = subscriptions
496313

497-
self.create = async_to_raw_response_wrapper(
498-
subscriptions.create,
499-
)
500314
self.update = async_to_raw_response_wrapper(
501315
subscriptions.update,
502316
)
503317
self.delete = async_to_raw_response_wrapper(
504318
subscriptions.delete,
505319
)
506-
self.get = async_to_raw_response_wrapper(
507-
subscriptions.get,
508-
)
509320

510321

511322
class SubscriptionsResourceWithStreamingResponse:
512323
def __init__(self, subscriptions: SubscriptionsResource) -> None:
513324
self._subscriptions = subscriptions
514325

515-
self.create = to_streamed_response_wrapper(
516-
subscriptions.create,
517-
)
518326
self.update = to_streamed_response_wrapper(
519327
subscriptions.update,
520328
)
521329
self.delete = to_streamed_response_wrapper(
522330
subscriptions.delete,
523331
)
524-
self.get = to_streamed_response_wrapper(
525-
subscriptions.get,
526-
)
527332

528333

529334
class AsyncSubscriptionsResourceWithStreamingResponse:
530335
def __init__(self, subscriptions: AsyncSubscriptionsResource) -> None:
531336
self._subscriptions = subscriptions
532337

533-
self.create = async_to_streamed_response_wrapper(
534-
subscriptions.create,
535-
)
536338
self.update = async_to_streamed_response_wrapper(
537339
subscriptions.update,
538340
)
539341
self.delete = async_to_streamed_response_wrapper(
540342
subscriptions.delete,
541343
)
542-
self.get = async_to_streamed_response_wrapper(
543-
subscriptions.get,
544-
)

src/cloudflare/resources/api_gateway/schemas.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def list(
5151
zone_id: str,
5252
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
5353
host: SequenceNotStr[str] | Omit = omit,
54+
include_schema_kind: List[Literal["learned"]] | Omit = omit,
5455
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5556
# The extra values given here take precedence over values defined on the client or passed to this method.
5657
extra_headers: Headers | None = None,
@@ -70,6 +71,8 @@ def list(
7071
7172
host: Receive schema only for the given host(s).
7273
74+
include_schema_kind: Schema kinds to include in exported OpenAPI schemas.
75+
7376
extra_headers: Send extra headers
7477
7578
extra_query: Add additional query parameters to the request
@@ -91,6 +94,7 @@ def list(
9194
{
9295
"feature": feature,
9396
"host": host,
97+
"include_schema_kind": include_schema_kind,
9498
},
9599
schema_list_params.SchemaListParams,
96100
),
@@ -126,6 +130,7 @@ async def list(
126130
zone_id: str,
127131
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
128132
host: SequenceNotStr[str] | Omit = omit,
133+
include_schema_kind: List[Literal["learned"]] | Omit = omit,
129134
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
130135
# The extra values given here take precedence over values defined on the client or passed to this method.
131136
extra_headers: Headers | None = None,
@@ -145,6 +150,8 @@ async def list(
145150
146151
host: Receive schema only for the given host(s).
147152
153+
include_schema_kind: Schema kinds to include in exported OpenAPI schemas.
154+
148155
extra_headers: Send extra headers
149156
150157
extra_query: Add additional query parameters to the request
@@ -166,6 +173,7 @@ async def list(
166173
{
167174
"feature": feature,
168175
"host": host,
176+
"include_schema_kind": include_schema_kind,
169177
},
170178
schema_list_params.SchemaListParams,
171179
),

0 commit comments

Comments
 (0)