Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#2194)
Browse files Browse the repository at this point in the history
stainless-app[bot] authored and stainless-bot committed Nov 20, 2024
1 parent d4deaed commit 9949651
Showing 21 changed files with 298 additions and 608 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1448
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a87c8380ec40a8719b4385109e29fd5ec40c54f39d6fe216861c55e43ab74fd3.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4acaaed718bd08d16e3866d5ad032fbf2bbfeb978df2cf5164edb81fe41e4f89.yml
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
@@ -2684,7 +2684,7 @@ Types:

```python
from cloudflare.types.api_gateway import (
APIShieldOperationModel,
APIShield,
OperationCreateResponse,
OperationListResponse,
OperationDeleteResponse,
11 changes: 5 additions & 6 deletions src/cloudflare/resources/api_gateway/operations/operations.py
Original file line number Diff line number Diff line change
@@ -31,13 +31,12 @@
SchemaValidationResourceWithStreamingResponse,
AsyncSchemaValidationResourceWithStreamingResponse,
)
from ....types.api_gateway import operation_get_params, operation_list_params
from ....types.api_gateway import operation_get_params, operation_list_params, operation_create_params
from ....types.api_gateway.operation_get_response import OperationGetResponse
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.operation_bulk_delete_response import OperationBulkDeleteResponse
from ....types.api_gateway.api_shield_operation_model_param import APIShieldOperationModelParam

__all__ = ["OperationsResource", "AsyncOperationsResource"]

@@ -70,7 +69,7 @@ def create(
self,
*,
zone_id: str,
body: Iterable[APIShieldOperationModelParam],
body: Iterable[operation_create_params.Body],
# 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,
@@ -101,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[APIShieldOperationModelParam]),
body=maybe_transform(body, Iterable[operation_create_params.Body]),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -345,7 +344,7 @@ async def create(
self,
*,
zone_id: str,
body: Iterable[APIShieldOperationModelParam],
body: Iterable[operation_create_params.Body],
# 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,
@@ -376,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[APIShieldOperationModelParam]),
body=await async_maybe_transform(body, Iterable[operation_create_params.Body]),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Original file line number Diff line number Diff line change
@@ -216,8 +216,7 @@ def create(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -409,8 +408,7 @@ def create(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -534,8 +532,7 @@ def create(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -1098,8 +1095,7 @@ def update(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -1297,8 +1293,7 @@ def update(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -1425,8 +1420,7 @@ def update(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -2290,8 +2284,7 @@ async def create(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -2483,8 +2476,7 @@ async def create(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -2608,8 +2600,7 @@ async def create(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -3172,8 +3163,7 @@ async def update(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -3371,8 +3361,7 @@ async def update(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
@@ -3499,8 +3488,7 @@ async def update(
self_hosted_domains: List of domains that Access will secure.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy
foo.
service_auth_401_redirect: Returns a 401 status code when the request is blocked by a Service Auth policy.
session_duration: The amount of time that tokens issued for this application will be valid. Must
be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms,
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ class IP(BaseModel):
created_at: Optional[datetime] = None

ip: Optional[str] = None
"""An IPv4 or IPv6 address. foo"""
"""An IPv4 or IPv6 address."""


class Membership(BaseModel):
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ class IP(BaseModel):
created_at: Optional[datetime] = None

ip: Optional[str] = None
"""An IPv4 or IPv6 address. foo"""
"""An IPv4 or IPv6 address."""


class Membership(BaseModel):
3 changes: 1 addition & 2 deletions src/cloudflare/types/api_gateway/__init__.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@

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
@@ -22,9 +23,7 @@
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_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
Loading

0 comments on commit 9949651

Please sign in to comment.