Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#2190)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Nov 20, 2024
1 parent 93cfe28 commit 4b59193
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2684,7 +2684,7 @@ Types:

```python
from cloudflare.types.api_gateway import (
APIShieldOperation,
APIShieldOperationModel,
OperationCreateResponse,
OperationListResponse,
OperationDeleteResponse,
Expand Down
10 changes: 5 additions & 5 deletions src/cloudflare/resources/api_gateway/operations/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
from ....types.api_gateway.operation_list_response import OperationListResponse
from ....types.api_gateway.operation_create_response import OperationCreateResponse
from ....types.api_gateway.operation_delete_response import OperationDeleteResponse
from ....types.api_gateway.api_shield_operation_param import APIShieldOperationParam
from ....types.api_gateway.operation_bulk_delete_response import OperationBulkDeleteResponse
from ....types.api_gateway.api_shield_operation_model_param import APIShieldOperationModelParam

__all__ = ["OperationsResource", "AsyncOperationsResource"]

Expand Down Expand Up @@ -70,7 +70,7 @@ def create(
self,
*,
zone_id: str,
body: Iterable[APIShieldOperationParam],
body: Iterable[APIShieldOperationModelParam],
# 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 @@ -101,7 +101,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[APIShieldOperationParam]),
body=maybe_transform(body, Iterable[APIShieldOperationModelParam]),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down Expand Up @@ -345,7 +345,7 @@ async def create(
self,
*,
zone_id: str,
body: Iterable[APIShieldOperationParam],
body: Iterable[APIShieldOperationModelParam],
# 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 @@ -376,7 +376,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[APIShieldOperationParam]),
body=await async_maybe_transform(body, Iterable[APIShieldOperationModelParam]),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/api_gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .public_schema import PublicSchema as PublicSchema
from .schema_upload import SchemaUpload as SchemaUpload
from .schema_list_params import SchemaListParams as SchemaListParams
from .api_shield_operation import APIShieldOperation as APIShieldOperation
from .operation_get_params import OperationGetParams as OperationGetParams
from .schema_list_response import SchemaListResponse as SchemaListResponse
from .operation_list_params import OperationListParams as OperationListParams
Expand All @@ -23,8 +22,9 @@
from .operation_create_response import OperationCreateResponse as OperationCreateResponse
from .operation_delete_response import OperationDeleteResponse as OperationDeleteResponse
from .user_schema_create_params import UserSchemaCreateParams as UserSchemaCreateParams
from .api_shield_operation_param import APIShieldOperationParam as APIShieldOperationParam
from .api_shield_operation_model import APIShieldOperationModel as APIShieldOperationModel
from .configuration_update_params import ConfigurationUpdateParams as ConfigurationUpdateParams
from .user_schema_delete_response import UserSchemaDeleteResponse as UserSchemaDeleteResponse
from .configuration_update_response import ConfigurationUpdateResponse as ConfigurationUpdateResponse
from .operation_bulk_delete_response import OperationBulkDeleteResponse as OperationBulkDeleteResponse
from .api_shield_operation_model_param import APIShieldOperationModelParam as APIShieldOperationModelParam
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from ..._models import BaseModel

__all__ = ["APIShieldOperation"]
__all__ = ["APIShieldOperationModel"]


class APIShieldOperation(BaseModel):
class APIShieldOperationModel(BaseModel):
endpoint: str
"""
The endpoint which can contain path parameter templates in curly braces, each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from typing_extensions import Literal, Required, TypedDict

__all__ = ["APIShieldOperationParam"]
__all__ = ["APIShieldOperationModelParam"]


class APIShieldOperationParam(TypedDict, total=False):
class APIShieldOperationModelParam(TypedDict, total=False):
endpoint: Required[str]
"""
The endpoint which can contain path parameter templates in curly braces, each
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/api_gateway/operation_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Iterable
from typing_extensions import Required, TypedDict

from .api_shield_operation_param import APIShieldOperationParam
from .api_shield_operation_model_param import APIShieldOperationModelParam

__all__ = ["OperationCreateParams"]

Expand All @@ -14,4 +14,4 @@ class OperationCreateParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""

body: Required[Iterable[APIShieldOperationParam]]
body: Required[Iterable[APIShieldOperationModelParam]]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from datetime import datetime
from typing_extensions import Literal, TypeAlias

from .. import api_shield_operation
from ...._models import BaseModel
from ..api_shield_operation_model import APIShieldOperationModel

__all__ = [
"OperationListResponse",
Expand Down Expand Up @@ -233,4 +233,4 @@ class APIShieldOperation(BaseModel):
features: Optional[APIShieldOperationFeatures] = None


OperationListResponse: TypeAlias = Union[APIShieldOperation, api_shield_operation.APIShieldOperation]
OperationListResponse: TypeAlias = Union[APIShieldOperation, APIShieldOperationModel]

0 comments on commit 4b59193

Please sign in to comment.