Skip to content

Commit e7936f6

Browse files
feat(api): api shield operations updates; rename discovery resource (#2296)
1 parent a3043d4 commit e7936f6

File tree

7 files changed

+477
-252
lines changed

7 files changed

+477
-252
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def create(
6969
self,
7070
*,
7171
zone_id: str,
72-
body: Iterable[operation_create_params.Body],
72+
operations: Iterable[operation_create_params.Operation],
7373
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7474
# The extra values given here take precedence over values defined on the client or passed to this method.
7575
extra_headers: Headers | None = None,
@@ -100,7 +100,7 @@ def create(
100100
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
101101
return self._post(
102102
f"/zones/{zone_id}/api_gateway/operations",
103-
body=maybe_transform(body, Iterable[operation_create_params.Body]),
103+
body=maybe_transform(operations, Iterable[operation_create_params.Operation]),
104104
options=make_request_options(
105105
extra_headers=extra_headers,
106106
extra_query=extra_query,
@@ -344,7 +344,7 @@ async def create(
344344
self,
345345
*,
346346
zone_id: str,
347-
body: Iterable[operation_create_params.Body],
347+
operations: Iterable[operation_create_params.Operation],
348348
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
349349
# The extra values given here take precedence over values defined on the client or passed to this method.
350350
extra_headers: Headers | None = None,
@@ -375,7 +375,7 @@ async def create(
375375
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
376376
return await self._post(
377377
f"/zones/{zone_id}/api_gateway/operations",
378-
body=await async_maybe_transform(body, Iterable[operation_create_params.Body]),
378+
body=await async_maybe_transform(operations, Iterable[operation_create_params.Operation]),
379379
options=make_request_options(
380380
extra_headers=extra_headers,
381381
extra_query=extra_query,

src/cloudflare/types/api_gateway/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
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

src/cloudflare/types/api_gateway/api_shield.py

-227
This file was deleted.

src/cloudflare/types/api_gateway/operation_create_params.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
from typing import Iterable
66
from typing_extensions import Literal, Required, TypedDict
77

8-
__all__ = ["OperationCreateParams", "Body"]
8+
__all__ = ["OperationCreateParams", "Operation"]
99

1010

1111
class OperationCreateParams(TypedDict, total=False):
1212
zone_id: Required[str]
1313
"""Identifier"""
1414

15-
body: Required[Iterable[Body]]
15+
operations: Required[Iterable[Operation]]
1616

1717

18-
class Body(TypedDict, total=False):
18+
class Operation(TypedDict, total=False):
1919
endpoint: Required[str]
2020
"""
2121
The endpoint which can contain path parameter templates in curly braces, each

0 commit comments

Comments
 (0)