Skip to content
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

feat(api): update via SDK Studio #184

Merged
merged 1 commit into from
Mar 28, 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
16 changes: 8 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2389,10 +2389,10 @@ Types:
from cloudflare.types.secondary_dns import (
SecondaryDNSDisableTransfer,
SecondaryDNSEnableTransfer,
SecondaryDNSForce,
OutgoingCreateResponse,
OutgoingUpdateResponse,
OutgoingDeleteResponse,
OutgoingForceNotifyResponse,
OutgoingGetResponse,
)
```
Expand All @@ -2404,7 +2404,7 @@ Methods:
- <code title="delete /zones/{zone_id}/secondary_dns/outgoing">client.secondary_dns.outgoing.<a href="./src/cloudflare/resources/secondary_dns/outgoing/outgoing.py">delete</a>(\*, zone_id) -> <a href="./src/cloudflare/types/secondary_dns/outgoing_delete_response.py">OutgoingDeleteResponse</a></code>
- <code title="post /zones/{zone_id}/secondary_dns/outgoing/disable">client.secondary_dns.outgoing.<a href="./src/cloudflare/resources/secondary_dns/outgoing/outgoing.py">disable</a>(\*, zone_id) -> <a href="./src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer.py">str</a></code>
- <code title="post /zones/{zone_id}/secondary_dns/outgoing/enable">client.secondary_dns.outgoing.<a href="./src/cloudflare/resources/secondary_dns/outgoing/outgoing.py">enable</a>(\*, zone_id) -> <a href="./src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer.py">str</a></code>
- <code title="post /zones/{zone_id}/secondary_dns/outgoing/force_notify">client.secondary_dns.outgoing.<a href="./src/cloudflare/resources/secondary_dns/outgoing/outgoing.py">force_notify</a>(\*, zone_id) -> <a href="./src/cloudflare/types/secondary_dns/secondary_dns_force.py">str</a></code>
- <code title="post /zones/{zone_id}/secondary_dns/outgoing/force_notify">client.secondary_dns.outgoing.<a href="./src/cloudflare/resources/secondary_dns/outgoing/outgoing.py">force_notify</a>(\*, zone_id) -> <a href="./src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py">str</a></code>
- <code title="get /zones/{zone_id}/secondary_dns/outgoing">client.secondary_dns.outgoing.<a href="./src/cloudflare/resources/secondary_dns/outgoing/outgoing.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/secondary_dns/outgoing_get_response.py">OutgoingGetResponse</a></code>

### Status
Expand Down Expand Up @@ -3515,16 +3515,16 @@ Methods:
Types:

```python
from cloudflare.types.images.v1 import ImageVariant, ImageVariants, VariantDeleteResponse
from cloudflare.types.images.v1 import V1ImageVariant, V1ImageVariants, VariantDeleteResponse
```

Methods:

- <code title="post /accounts/{account_id}/images/v1/variants">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/images/v1/variant_create_params.py">params</a>) -> <a href="./src/cloudflare/types/images/v1/image_variant.py">ImageVariant</a></code>
- <code title="get /accounts/{account_id}/images/v1/variants">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/images/v1/image_variants.py">ImageVariants</a></code>
- <code title="post /accounts/{account_id}/images/v1/variants">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/images/v1/variant_create_params.py">params</a>) -> <a href="./src/cloudflare/types/images/v1/v1_image_variant.py">V1ImageVariant</a></code>
- <code title="get /accounts/{account_id}/images/v1/variants">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/images/v1/v1_image_variants.py">V1ImageVariants</a></code>
- <code title="delete /accounts/{account_id}/images/v1/variants/{variant_id}">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">delete</a>(variant_id, \*, account_id) -> <a href="./src/cloudflare/types/images/v1/variant_delete_response.py">VariantDeleteResponse</a></code>
- <code title="patch /accounts/{account_id}/images/v1/variants/{variant_id}">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">edit</a>(variant_id, \*, account_id, \*\*<a href="src/cloudflare/types/images/v1/variant_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/images/v1/image_variant.py">ImageVariant</a></code>
- <code title="get /accounts/{account_id}/images/v1/variants/{variant_id}">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">get</a>(variant_id, \*, account_id) -> <a href="./src/cloudflare/types/images/v1/image_variant.py">ImageVariant</a></code>
- <code title="patch /accounts/{account_id}/images/v1/variants/{variant_id}">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">edit</a>(variant_id, \*, account_id, \*\*<a href="src/cloudflare/types/images/v1/variant_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/images/v1/v1_image_variant.py">V1ImageVariant</a></code>
- <code title="get /accounts/{account_id}/images/v1/variants/{variant_id}">client.images.v1.variants.<a href="./src/cloudflare/resources/images/v1/variants.py">get</a>(variant_id, \*, account_id) -> <a href="./src/cloudflare/types/images/v1/v1_image_variant.py">V1ImageVariant</a></code>

### Blobs

Expand Down Expand Up @@ -4167,7 +4167,7 @@ Methods:
Types:

```python
from cloudflare.types.request_tracers import RequestTrace, TraceCreateResponse
from cloudflare.types.request_tracers import RequestTracerTrace, TraceCreateResponse
```

Methods:
Expand Down
36 changes: 18 additions & 18 deletions src/cloudflare/resources/images/v1/variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
make_request_options,
)
from ....types.images.v1 import (
ImageVariant,
ImageVariants,
V1ImageVariant,
V1ImageVariants,
VariantDeleteResponse,
variant_edit_params,
variant_create_params,
Expand Down Expand Up @@ -56,7 +56,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ImageVariant:
) -> V1ImageVariant:
"""
Specify variants that allow you to resize images for different use cases.

Expand Down Expand Up @@ -95,7 +95,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]),
cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]),
)

def list(
Expand All @@ -108,7 +108,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ImageVariants:
) -> V1ImageVariants:
"""
Lists existing variants.

Expand All @@ -134,7 +134,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ImageVariants], ResultWrapper[ImageVariants]),
cast_to=cast(Type[V1ImageVariants], ResultWrapper[V1ImageVariants]),
)

def delete(
Expand Down Expand Up @@ -197,7 +197,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ImageVariant:
) -> V1ImageVariant:
"""
Updating a variant purges the cache for all images associated with the variant.

Expand Down Expand Up @@ -237,7 +237,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]),
cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]),
)

def get(
Expand All @@ -251,7 +251,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ImageVariant:
) -> V1ImageVariant:
"""
Fetch details for a single variant.

Expand Down Expand Up @@ -279,7 +279,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]),
cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]),
)


Expand All @@ -305,7 +305,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ImageVariant:
) -> V1ImageVariant:
"""
Specify variants that allow you to resize images for different use cases.

Expand Down Expand Up @@ -344,7 +344,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]),
cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]),
)

async def list(
Expand All @@ -357,7 +357,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ImageVariants:
) -> V1ImageVariants:
"""
Lists existing variants.

Expand All @@ -383,7 +383,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ImageVariants], ResultWrapper[ImageVariants]),
cast_to=cast(Type[V1ImageVariants], ResultWrapper[V1ImageVariants]),
)

async def delete(
Expand Down Expand Up @@ -446,7 +446,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ImageVariant:
) -> V1ImageVariant:
"""
Updating a variant purges the cache for all images associated with the variant.

Expand Down Expand Up @@ -486,7 +486,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]),
cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]),
)

async def get(
Expand All @@ -500,7 +500,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ImageVariant:
) -> V1ImageVariant:
"""
Fetch details for a single variant.

Expand Down Expand Up @@ -528,7 +528,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]),
cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]),
)


Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/images/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from __future__ import annotations

from .image_variant import ImageVariant as ImageVariant
from .image_variants import ImageVariants as ImageVariants
from .v1_image_variant import V1ImageVariant as V1ImageVariant
from .images_image_keys import ImagesImageKeys as ImagesImageKeys
from .v1_image_variants import V1ImageVariants as V1ImageVariants
from .images_images_stats import ImagesImagesStats as ImagesImagesStats
from .variant_edit_params import VariantEditParams as VariantEditParams
from .variant_create_params import VariantCreateParams as VariantCreateParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from ...._models import BaseModel

__all__ = ["ImageVariant", "Variant", "VariantOptions"]
__all__ = ["V1ImageVariant", "Variant", "VariantOptions"]


class VariantOptions(BaseModel):
Expand Down Expand Up @@ -40,5 +40,5 @@ class Variant(BaseModel):
"""


class ImageVariant(BaseModel):
class V1ImageVariant(BaseModel):
variant: Optional[Variant] = None
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from ...._models import BaseModel

__all__ = ["ImageVariants", "Variants", "VariantsHero", "VariantsHeroOptions"]
__all__ = ["V1ImageVariants", "Variants", "VariantsHero", "VariantsHeroOptions"]


class VariantsHeroOptions(BaseModel):
Expand Down Expand Up @@ -44,5 +44,5 @@ class Variants(BaseModel):
hero: Optional[VariantsHero] = None


class ImageVariants(BaseModel):
class V1ImageVariants(BaseModel):
variants: Optional[Variants] = None
2 changes: 1 addition & 1 deletion src/cloudflare/types/request_tracers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from __future__ import annotations

from .request_trace import RequestTrace as RequestTrace
from .trace_create_params import TraceCreateParams as TraceCreateParams
from .request_tracer_trace import RequestTracerTrace as RequestTracerTrace
from .trace_create_response import TraceCreateResponse as TraceCreateResponse
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from ..._compat import PYDANTIC_V2
from ..._models import BaseModel

__all__ = ["RequestTrace", "RequestTraceItem"]
__all__ = ["RequestTracerTrace", "RequestTracerTraceItem"]


class RequestTraceItem(BaseModel):
class RequestTracerTraceItem(BaseModel):
action: Optional[str] = None
"""If step type is rule, then action performed by this rule"""

Expand All @@ -35,15 +35,15 @@ class RequestTraceItem(BaseModel):
step_name: Optional[str] = None
"""Tracing step identifying name"""

trace: Optional[RequestTrace] = None
trace: Optional[RequestTracerTrace] = None

type: Optional[str] = None
"""Tracing step type"""


RequestTrace = List[RequestTraceItem]
RequestTracerTrace = List[RequestTracerTraceItem]

if PYDANTIC_V2:
RequestTraceItem.model_rebuild()
RequestTracerTraceItem.model_rebuild()
else:
RequestTraceItem.update_forward_refs() # type: ignore
RequestTracerTraceItem.update_forward_refs() # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class TraceCreateResponse(BaseModel):
status_code: Optional[int] = None
"""HTTP Status code of zone response"""

trace: Optional["RequestTrace"] = None
trace: Optional["RequestTracerTrace"] = None


from .request_trace import RequestTrace
from .request_tracer_trace import RequestTracerTrace

if PYDANTIC_V2:
TraceCreateResponse.model_rebuild()
Expand Down
1 change: 1 addition & 0 deletions src/cloudflare/types/secondary_dns/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
from .outgoing_delete_response import OutgoingDeleteResponse as OutgoingDeleteResponse
from .outgoing_update_response import OutgoingUpdateResponse as OutgoingUpdateResponse
from .secondary_dns_enable_transfer import SecondaryDNSEnableTransfer as SecondaryDNSEnableTransfer
from .outgoing_force_notify_response import OutgoingForceNotifyResponse as OutgoingForceNotifyResponse
from .secondary_dns_disable_transfer import SecondaryDNSDisableTransfer as SecondaryDNSDisableTransfer
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.


__all__ = ["OutgoingForceNotifyResponse"]

OutgoingForceNotifyResponse = str
Loading