Skip to content

feat(api): api shield operations updates; rename discovery resource #2296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/cloudflare/resources/api_gateway/operations/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def create(
self,
*,
zone_id: str,
body: Iterable[operation_create_params.Body],
operations: Iterable[operation_create_params.Operation],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -100,7 +100,7 @@ def create(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._post(
f"/zones/{zone_id}/api_gateway/operations",
body=maybe_transform(body, Iterable[operation_create_params.Body]),
body=maybe_transform(operations, Iterable[operation_create_params.Operation]),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down Expand Up @@ -344,7 +344,7 @@ async def create(
self,
*,
zone_id: str,
body: Iterable[operation_create_params.Body],
operations: Iterable[operation_create_params.Operation],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -375,7 +375,7 @@ async def create(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return await self._post(
f"/zones/{zone_id}/api_gateway/operations",
body=await async_maybe_transform(body, Iterable[operation_create_params.Body]),
body=await async_maybe_transform(operations, Iterable[operation_create_params.Operation]),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down
1 change: 0 additions & 1 deletion src/cloudflare/types/api_gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from .message import Message as Message
from .settings import Settings as Settings
from .api_shield import APIShield as APIShield
from .configuration import Configuration as Configuration
from .public_schema import PublicSchema as PublicSchema
from .schema_upload import SchemaUpload as SchemaUpload
Expand Down
227 changes: 0 additions & 227 deletions src/cloudflare/types/api_gateway/api_shield.py

This file was deleted.

6 changes: 3 additions & 3 deletions src/cloudflare/types/api_gateway/operation_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
from typing import Iterable
from typing_extensions import Literal, Required, TypedDict

__all__ = ["OperationCreateParams", "Body"]
__all__ = ["OperationCreateParams", "Operation"]


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

body: Required[Iterable[Body]]
operations: Required[Iterable[Operation]]


class Body(TypedDict, total=False):
class Operation(TypedDict, total=False):
endpoint: Required[str]
"""
The endpoint which can contain path parameter templates in curly braces, each
Expand Down
Loading