Skip to content

Commit 9a6518a

Browse files
chore(api): update composite API spec
1 parent f781a02 commit 9a6518a

18 files changed

Lines changed: 304 additions & 29 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2185
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8afbe34627bb47c62422bcfe82d49e1ab7e5ea8e2f0d655a6a0ba3e4648c5e47.yml
3-
openapi_spec_hash: 5a1a5d008c6f779c308ac0ae5a096de0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea5d30bcded86d4f9fca4175a9bfdd0713e6dea3b9224506ebf03c104e652df7.yml
3+
openapi_spec_hash: 85e897c979f187c5170264420489e9f0
44
config_hash: 95239e8fc62638979bc21e538307bbe3

src/cloudflare/resources/api_gateway/operations/operations.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ def get(
354354
*,
355355
zone_id: str,
356356
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
357+
with_schemas: bool | Omit = omit,
357358
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
358359
# The extra values given here take precedence over values defined on the client or passed to this method.
359360
extra_headers: Headers | None = None,
@@ -374,6 +375,10 @@ def get(
374375
to the resulting feature object. Have a look at the top-level object description
375376
for more details on the specific meaning.
376377
378+
with_schemas: When true, includes OpenAPI schemas (both uploaded and learned) for the
379+
operation in the response. Due to the conversion overhead, this parameter is
380+
only supported on single-operation retrieval.
381+
377382
extra_headers: Send extra headers
378383
379384
extra_query: Add additional query parameters to the request
@@ -395,7 +400,13 @@ def get(
395400
extra_query=extra_query,
396401
extra_body=extra_body,
397402
timeout=timeout,
398-
query=maybe_transform({"feature": feature}, operation_get_params.OperationGetParams),
403+
query=maybe_transform(
404+
{
405+
"feature": feature,
406+
"with_schemas": with_schemas,
407+
},
408+
operation_get_params.OperationGetParams,
409+
),
399410
post_parser=ResultWrapper[OperationGetResponse]._unwrapper,
400411
),
401412
cast_to=cast(Type[OperationGetResponse], ResultWrapper[OperationGetResponse]),
@@ -704,6 +715,7 @@ async def get(
704715
*,
705716
zone_id: str,
706717
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
718+
with_schemas: bool | Omit = omit,
707719
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
708720
# The extra values given here take precedence over values defined on the client or passed to this method.
709721
extra_headers: Headers | None = None,
@@ -724,6 +736,10 @@ async def get(
724736
to the resulting feature object. Have a look at the top-level object description
725737
for more details on the specific meaning.
726738
739+
with_schemas: When true, includes OpenAPI schemas (both uploaded and learned) for the
740+
operation in the response. Due to the conversion overhead, this parameter is
741+
only supported on single-operation retrieval.
742+
727743
extra_headers: Send extra headers
728744
729745
extra_query: Add additional query parameters to the request
@@ -745,7 +761,13 @@ async def get(
745761
extra_query=extra_query,
746762
extra_body=extra_body,
747763
timeout=timeout,
748-
query=await async_maybe_transform({"feature": feature}, operation_get_params.OperationGetParams),
764+
query=await async_maybe_transform(
765+
{
766+
"feature": feature,
767+
"with_schemas": with_schemas,
768+
},
769+
operation_get_params.OperationGetParams,
770+
),
749771
post_parser=ResultWrapper[OperationGetResponse]._unwrapper,
750772
),
751773
cast_to=cast(Type[OperationGetResponse], ResultWrapper[OperationGetResponse]),

src/cloudflare/resources/zero_trust/devices/policies/custom/custom.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def create(
109109
support_url: str | Omit = omit,
110110
switch_locked: bool | Omit = omit,
111111
tunnel_protocol: str | Omit = omit,
112+
virtual_networks: Optional[custom_create_params.VirtualNetworks] | Omit = omit,
112113
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
113114
# The extra values given here take precedence over values defined on the client or passed to this method.
114115
extra_headers: Headers | None = None,
@@ -178,6 +179,8 @@ def create(
178179
179180
tunnel_protocol: Determines which tunnel protocol to use.
180181
182+
virtual_networks: Virtual network access settings for the device.
183+
181184
extra_headers: Send extra headers
182185
183186
extra_query: Add additional query parameters to the request
@@ -214,6 +217,7 @@ def create(
214217
"support_url": support_url,
215218
"switch_locked": switch_locked,
216219
"tunnel_protocol": tunnel_protocol,
220+
"virtual_networks": virtual_networks,
217221
},
218222
custom_create_params.CustomCreateParams,
219223
),
@@ -329,6 +333,7 @@ def edit(
329333
support_url: str | Omit = omit,
330334
switch_locked: bool | Omit = omit,
331335
tunnel_protocol: str | Omit = omit,
336+
virtual_networks: Optional[custom_edit_params.VirtualNetworks] | Omit = omit,
332337
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
333338
# The extra values given here take precedence over values defined on the client or passed to this method.
334339
extra_headers: Headers | None = None,
@@ -397,6 +402,8 @@ def edit(
397402
398403
tunnel_protocol: Determines which tunnel protocol to use.
399404
405+
virtual_networks: Virtual network access settings for the device.
406+
400407
extra_headers: Send extra headers
401408
402409
extra_query: Add additional query parameters to the request
@@ -437,6 +444,7 @@ def edit(
437444
"support_url": support_url,
438445
"switch_locked": switch_locked,
439446
"tunnel_protocol": tunnel_protocol,
447+
"virtual_networks": virtual_networks,
440448
},
441449
custom_edit_params.CustomEditParams,
442450
),
@@ -551,6 +559,7 @@ async def create(
551559
support_url: str | Omit = omit,
552560
switch_locked: bool | Omit = omit,
553561
tunnel_protocol: str | Omit = omit,
562+
virtual_networks: Optional[custom_create_params.VirtualNetworks] | Omit = omit,
554563
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
555564
# The extra values given here take precedence over values defined on the client or passed to this method.
556565
extra_headers: Headers | None = None,
@@ -620,6 +629,8 @@ async def create(
620629
621630
tunnel_protocol: Determines which tunnel protocol to use.
622631
632+
virtual_networks: Virtual network access settings for the device.
633+
623634
extra_headers: Send extra headers
624635
625636
extra_query: Add additional query parameters to the request
@@ -656,6 +667,7 @@ async def create(
656667
"support_url": support_url,
657668
"switch_locked": switch_locked,
658669
"tunnel_protocol": tunnel_protocol,
670+
"virtual_networks": virtual_networks,
659671
},
660672
custom_create_params.CustomCreateParams,
661673
),
@@ -771,6 +783,7 @@ async def edit(
771783
support_url: str | Omit = omit,
772784
switch_locked: bool | Omit = omit,
773785
tunnel_protocol: str | Omit = omit,
786+
virtual_networks: Optional[custom_edit_params.VirtualNetworks] | Omit = omit,
774787
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
775788
# The extra values given here take precedence over values defined on the client or passed to this method.
776789
extra_headers: Headers | None = None,
@@ -839,6 +852,8 @@ async def edit(
839852
840853
tunnel_protocol: Determines which tunnel protocol to use.
841854
855+
virtual_networks: Virtual network access settings for the device.
856+
842857
extra_headers: Send extra headers
843858
844859
extra_query: Add additional query parameters to the request
@@ -879,6 +894,7 @@ async def edit(
879894
"support_url": support_url,
880895
"switch_locked": switch_locked,
881896
"tunnel_protocol": tunnel_protocol,
897+
"virtual_networks": virtual_networks,
882898
},
883899
custom_edit_params.CustomEditParams,
884900
),

src/cloudflare/resources/zero_trust/devices/policies/default/default.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def edit(
116116
support_url: str | Omit = omit,
117117
switch_locked: bool | Omit = omit,
118118
tunnel_protocol: str | Omit = omit,
119+
virtual_networks: Optional[default_edit_params.VirtualNetworks] | Omit = omit,
119120
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
120121
# The extra values given here take precedence over values defined on the client or passed to this method.
121122
extra_headers: Headers | None = None,
@@ -170,6 +171,8 @@ def edit(
170171
171172
tunnel_protocol: Determines which tunnel protocol to use.
172173
174+
virtual_networks: Virtual network access settings for the device.
175+
173176
extra_headers: Send extra headers
174177
175178
extra_query: Add additional query parameters to the request
@@ -201,6 +204,7 @@ def edit(
201204
"support_url": support_url,
202205
"switch_locked": switch_locked,
203206
"tunnel_protocol": tunnel_protocol,
207+
"virtual_networks": virtual_networks,
204208
},
205209
default_edit_params.DefaultEditParams,
206210
),
@@ -309,6 +313,7 @@ async def edit(
309313
support_url: str | Omit = omit,
310314
switch_locked: bool | Omit = omit,
311315
tunnel_protocol: str | Omit = omit,
316+
virtual_networks: Optional[default_edit_params.VirtualNetworks] | Omit = omit,
312317
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
313318
# The extra values given here take precedence over values defined on the client or passed to this method.
314319
extra_headers: Headers | None = None,
@@ -363,6 +368,8 @@ async def edit(
363368
364369
tunnel_protocol: Determines which tunnel protocol to use.
365370
371+
virtual_networks: Virtual network access settings for the device.
372+
366373
extra_headers: Send extra headers
367374
368375
extra_query: Add additional query parameters to the request
@@ -394,6 +401,7 @@ async def edit(
394401
"support_url": support_url,
395402
"switch_locked": switch_locked,
396403
"tunnel_protocol": tunnel_protocol,
404+
"virtual_networks": virtual_networks,
397405
},
398406
default_edit_params.DefaultEditParams,
399407
),

src/cloudflare/types/api_gateway/operation_create_response.py

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Union, Optional
3+
from typing import Dict, List, Union, Optional
44
from datetime import datetime
55
from typing_extensions import Literal, TypeAlias
66

7+
from pydantic import Field as FieldInfo
8+
79
from ..._models import BaseModel
810

911
__all__ = [
@@ -26,6 +28,9 @@
2628
"FeaturesAPIShieldOperationFeatureSchemaInfo",
2729
"FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo",
2830
"FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema",
31+
"Schemas",
32+
"SchemasLearned",
33+
"SchemasUploaded",
2934
]
3035

3136

@@ -216,6 +221,50 @@ class FeaturesAPIShieldOperationFeatureSchemaInfo(BaseModel):
216221
]
217222

218223

224+
class SchemasLearned(BaseModel):
225+
"""
226+
An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension.
227+
"""
228+
229+
parameters: Optional[List[Dict[str, object]]] = None
230+
"""OpenAPI parameter objects describing path, query, header, or cookie parameters."""
231+
232+
request_body: Optional[Dict[str, object]] = FieldInfo(alias="requestBody", default=None)
233+
"""OpenAPI request body object describing the expected request payload."""
234+
235+
236+
class SchemasUploaded(BaseModel):
237+
"""
238+
An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension.
239+
"""
240+
241+
parameters: Optional[List[Dict[str, object]]] = None
242+
"""OpenAPI parameter objects describing path, query, header, or cookie parameters."""
243+
244+
request_body: Optional[Dict[str, object]] = FieldInfo(alias="requestBody", default=None)
245+
"""OpenAPI request body object describing the expected request payload."""
246+
247+
248+
class Schemas(BaseModel):
249+
"""
250+
OpenAPI JSON schemas for an operation, including both user-uploaded and Cloudflare-learned schemas.
251+
"""
252+
253+
learned: Optional[SchemasLearned] = None
254+
"""
255+
An OpenAPI operation object fragment containing schema information for an
256+
operation. May include parameter definitions, request body specifications, and a
257+
component schema extension.
258+
"""
259+
260+
uploaded: Optional[SchemasUploaded] = None
261+
"""
262+
An OpenAPI operation object fragment containing schema information for an
263+
operation. May include parameter definitions, request body specifications, and a
264+
component schema extension.
265+
"""
266+
267+
219268
class OperationCreateResponse(BaseModel):
220269
endpoint: str
221270
"""
@@ -237,3 +286,9 @@ class OperationCreateResponse(BaseModel):
237286
"""UUID."""
238287

239288
features: Optional[Features] = None
289+
290+
schemas: Optional[Schemas] = None
291+
"""
292+
OpenAPI JSON schemas for an operation, including both user-uploaded and
293+
Cloudflare-learned schemas.
294+
"""

src/cloudflare/types/api_gateway/operation_get_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ class OperationGetParams(TypedDict, total=False):
1919
Have a look at the top-level object description for more details on the specific
2020
meaning.
2121
"""
22+
23+
with_schemas: bool
24+
"""
25+
When true, includes OpenAPI schemas (both uploaded and learned) for the
26+
operation in the response. Due to the conversion overhead, this parameter is
27+
only supported on single-operation retrieval.
28+
"""

0 commit comments

Comments
 (0)