Skip to content

Commit 93cfe28

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#2189)
1 parent 09acf0a commit 93cfe28

File tree

13 files changed

+534
-286
lines changed

13 files changed

+534
-286
lines changed

api.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -2653,7 +2653,7 @@ Methods:
26532653
Types:
26542654

26552655
```python
2656-
from cloudflare.types.api_gateway import DiscoveryOperation, DiscoveryGetResponse
2656+
from cloudflare.types.api_gateway import DiscoveryGetResponse
26572657
```
26582658

26592659
Methods:
@@ -2665,12 +2665,16 @@ Methods:
26652665
Types:
26662666

26672667
```python
2668-
from cloudflare.types.api_gateway.discovery import OperationBulkEditResponse, OperationEditResponse
2668+
from cloudflare.types.api_gateway.discovery import (
2669+
OperationListResponse,
2670+
OperationBulkEditResponse,
2671+
OperationEditResponse,
2672+
)
26692673
```
26702674

26712675
Methods:
26722676

2673-
- <code title="get /zones/{zone_id}/api_gateway/discovery/operations">client.api_gateway.discovery.operations.<a href="./src/cloudflare/resources/api_gateway/discovery/operations.py">list</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/api_gateway/discovery/operation_list_params.py">params</a>) -> <a href="./src/cloudflare/types/api_gateway/discovery_operation.py">SyncV4PagePaginationArray[DiscoveryOperation]</a></code>
2677+
- <code title="get /zones/{zone_id}/api_gateway/discovery/operations">client.api_gateway.discovery.operations.<a href="./src/cloudflare/resources/api_gateway/discovery/operations.py">list</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/api_gateway/discovery/operation_list_params.py">params</a>) -> <a href="./src/cloudflare/types/api_gateway/discovery/operation_list_response.py">SyncV4PagePaginationArray[OperationListResponse]</a></code>
26742678
- <code title="patch /zones/{zone_id}/api_gateway/discovery/operations">client.api_gateway.discovery.operations.<a href="./src/cloudflare/resources/api_gateway/discovery/operations.py">bulk_edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/api_gateway/discovery/operation_bulk_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/api_gateway/discovery/operation_bulk_edit_response.py">OperationBulkEditResponse</a></code>
26752679
- <code title="patch /zones/{zone_id}/api_gateway/discovery/operations/{operation_id}">client.api_gateway.discovery.operations.<a href="./src/cloudflare/resources/api_gateway/discovery/operations.py">edit</a>(operation_id, \*, zone_id, \*\*<a href="src/cloudflare/types/api_gateway/discovery/operation_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/api_gateway/discovery/operation_edit_response.py">OperationEditResponse</a></code>
26762680

@@ -2680,7 +2684,7 @@ Types:
26802684

26812685
```python
26822686
from cloudflare.types.api_gateway import (
2683-
APIShield,
2687+
APIShieldOperation,
26842688
OperationCreateResponse,
26852689
OperationListResponse,
26862690
OperationDeleteResponse,

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
2525
from ...._base_client import AsyncPaginator, make_request_options
2626
from ....types.api_gateway.discovery import operation_edit_params, operation_list_params, operation_bulk_edit_params
27-
from ....types.api_gateway.discovery_operation import DiscoveryOperation
2827
from ....types.api_gateway.discovery.operation_edit_response import OperationEditResponse
28+
from ....types.api_gateway.discovery.operation_list_response import OperationListResponse
2929
from ....types.api_gateway.discovery.operation_bulk_edit_response import OperationBulkEditResponse
3030

3131
__all__ = ["OperationsResource", "AsyncOperationsResource"]
@@ -72,7 +72,7 @@ def list(
7272
extra_query: Query | None = None,
7373
extra_body: Body | None = None,
7474
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
75-
) -> SyncV4PagePaginationArray[DiscoveryOperation]:
75+
) -> SyncV4PagePaginationArray[OperationListResponse]:
7676
"""
7777
Retrieve the most up to date view of discovered operations
7878
@@ -124,7 +124,7 @@ def list(
124124
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
125125
return self._get_api_list(
126126
f"/zones/{zone_id}/api_gateway/discovery/operations",
127-
page=SyncV4PagePaginationArray[DiscoveryOperation],
127+
page=SyncV4PagePaginationArray[OperationListResponse],
128128
options=make_request_options(
129129
extra_headers=extra_headers,
130130
extra_query=extra_query,
@@ -146,7 +146,7 @@ def list(
146146
operation_list_params.OperationListParams,
147147
),
148148
),
149-
model=DiscoveryOperation,
149+
model=OperationListResponse,
150150
)
151151

152152
def bulk_edit(
@@ -283,7 +283,7 @@ def list(
283283
extra_query: Query | None = None,
284284
extra_body: Body | None = None,
285285
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
286-
) -> AsyncPaginator[DiscoveryOperation, AsyncV4PagePaginationArray[DiscoveryOperation]]:
286+
) -> AsyncPaginator[OperationListResponse, AsyncV4PagePaginationArray[OperationListResponse]]:
287287
"""
288288
Retrieve the most up to date view of discovered operations
289289
@@ -335,7 +335,7 @@ def list(
335335
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
336336
return self._get_api_list(
337337
f"/zones/{zone_id}/api_gateway/discovery/operations",
338-
page=AsyncV4PagePaginationArray[DiscoveryOperation],
338+
page=AsyncV4PagePaginationArray[OperationListResponse],
339339
options=make_request_options(
340340
extra_headers=extra_headers,
341341
extra_query=extra_query,
@@ -357,7 +357,7 @@ def list(
357357
operation_list_params.OperationListParams,
358358
),
359359
),
360-
model=DiscoveryOperation,
360+
model=OperationListResponse,
361361
)
362362

363363
async def bulk_edit(

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@
3131
SchemaValidationResourceWithStreamingResponse,
3232
AsyncSchemaValidationResourceWithStreamingResponse,
3333
)
34-
from ....types.api_gateway import operation_get_params, operation_list_params, operation_create_params
34+
from ....types.api_gateway import operation_get_params, operation_list_params
3535
from ....types.api_gateway.operation_get_response import OperationGetResponse
3636
from ....types.api_gateway.operation_list_response import OperationListResponse
3737
from ....types.api_gateway.operation_create_response import OperationCreateResponse
3838
from ....types.api_gateway.operation_delete_response import OperationDeleteResponse
39+
from ....types.api_gateway.api_shield_operation_param import APIShieldOperationParam
3940
from ....types.api_gateway.operation_bulk_delete_response import OperationBulkDeleteResponse
4041

4142
__all__ = ["OperationsResource", "AsyncOperationsResource"]
@@ -69,7 +70,7 @@ def create(
6970
self,
7071
*,
7172
zone_id: str,
72-
body: Iterable[operation_create_params.Body],
73+
body: Iterable[APIShieldOperationParam],
7374
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7475
# The extra values given here take precedence over values defined on the client or passed to this method.
7576
extra_headers: Headers | None = None,
@@ -100,7 +101,7 @@ def create(
100101
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
101102
return self._post(
102103
f"/zones/{zone_id}/api_gateway/operations",
103-
body=maybe_transform(body, Iterable[operation_create_params.Body]),
104+
body=maybe_transform(body, Iterable[APIShieldOperationParam]),
104105
options=make_request_options(
105106
extra_headers=extra_headers,
106107
extra_query=extra_query,
@@ -344,7 +345,7 @@ async def create(
344345
self,
345346
*,
346347
zone_id: str,
347-
body: Iterable[operation_create_params.Body],
348+
body: Iterable[APIShieldOperationParam],
348349
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
349350
# The extra values given here take precedence over values defined on the client or passed to this method.
350351
extra_headers: Headers | None = None,
@@ -375,7 +376,7 @@ async def create(
375376
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
376377
return await self._post(
377378
f"/zones/{zone_id}/api_gateway/operations",
378-
body=await async_maybe_transform(body, Iterable[operation_create_params.Body]),
379+
body=await async_maybe_transform(body, Iterable[APIShieldOperationParam]),
379380
options=make_request_options(
380381
extra_headers=extra_headers,
381382
extra_query=extra_query,

src/cloudflare/types/api_gateway/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
from .message import Message as Message
66
from .settings import Settings as Settings
7-
from .api_shield import APIShield as APIShield
87
from .configuration import Configuration as Configuration
98
from .public_schema import PublicSchema as PublicSchema
109
from .schema_upload import SchemaUpload as SchemaUpload
1110
from .schema_list_params import SchemaListParams as SchemaListParams
12-
from .discovery_operation import DiscoveryOperation as DiscoveryOperation
11+
from .api_shield_operation import APIShieldOperation as APIShieldOperation
1312
from .operation_get_params import OperationGetParams as OperationGetParams
1413
from .schema_list_response import SchemaListResponse as SchemaListResponse
1514
from .operation_list_params import OperationListParams as OperationListParams
@@ -24,6 +23,7 @@
2423
from .operation_create_response import OperationCreateResponse as OperationCreateResponse
2524
from .operation_delete_response import OperationDeleteResponse as OperationDeleteResponse
2625
from .user_schema_create_params import UserSchemaCreateParams as UserSchemaCreateParams
26+
from .api_shield_operation_param import APIShieldOperationParam as APIShieldOperationParam
2727
from .configuration_update_params import ConfigurationUpdateParams as ConfigurationUpdateParams
2828
from .user_schema_delete_response import UserSchemaDeleteResponse as UserSchemaDeleteResponse
2929
from .configuration_update_response import ConfigurationUpdateResponse as ConfigurationUpdateResponse

0 commit comments

Comments
 (0)