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 #479

Merged
merged 1 commit into from
May 8, 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
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ class WAFManagedRulesTraditionalAllowRule(BaseModel):
allowed_modes: List[Literal["on", "off"]]
"""Defines the available modes for the current WAF rule."""

default_mode: object

description: str
"""The public description of the WAF rule."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ class WAFManagedRulesTraditionalAllowRule(BaseModel):
allowed_modes: List[Literal["on", "off"]]
"""Defines the available modes for the current WAF rule."""

default_mode: object

description: str
"""The public description of the WAF rule."""

Expand Down
2 changes: 0 additions & 2 deletions src/cloudflare/types/intel/whois_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@


class WhoisGetResponse(BaseModel):
dnnsec: object

domain: str

extension: str
Expand Down
2 changes: 0 additions & 2 deletions src/cloudflare/types/workers/mtls_cert_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@


class MTLSCERTBinding(BaseModel):
certificate: object

name: str
"""A JavaScript variable name for the binding."""

Expand Down
2 changes: 0 additions & 2 deletions src/cloudflare/types/workers/mtls_cert_binding_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@


class MTLSCERTBindingParam(TypedDict, total=False):
certificate: Required[object]

type: Required[Literal["mtls_certificate"]]
"""The class of resource that the binding provides."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@ class DeviceListResponse(BaseModel):
device_id: str = FieldInfo(alias="deviceId")
"""Device identifier (UUID v4)"""

mode: object

platform: str
"""Operating system"""

status: str
"""Network status"""

timestamp: object

version: str
"""WARP client version"""

Expand Down
32 changes: 16 additions & 16 deletions tests/api_resources/durable_objects/namespaces/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ class TestObjects:

@parametrize
def test_method_list(self, client: Cloudflare) -> None:
object = client.durable_objects.namespaces.objects.list(
object_ = client.durable_objects.namespaces.objects.list(
"5fd1cafff895419c8bcc647fc64ab8f0",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"])
assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"])

@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
object = client.durable_objects.namespaces.objects.list(
object_ = client.durable_objects.namespaces.objects.list(
"5fd1cafff895419c8bcc647fc64ab8f0",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc",
limit=10,
)
assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"])
assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"])

@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
Expand All @@ -45,8 +45,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None:

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
object = response.parse()
assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"])
object_ = response.parse()
assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"])

@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
Expand All @@ -57,8 +57,8 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

object = response.parse()
assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"])
object_ = response.parse()
assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"])

assert cast(Any, response.is_closed) is True

Expand All @@ -82,21 +82,21 @@ class TestAsyncObjects:

@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
object = await async_client.durable_objects.namespaces.objects.list(
object_ = await async_client.durable_objects.namespaces.objects.list(
"5fd1cafff895419c8bcc647fc64ab8f0",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"])
assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"])

@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
object = await async_client.durable_objects.namespaces.objects.list(
object_ = await async_client.durable_objects.namespaces.objects.list(
"5fd1cafff895419c8bcc647fc64ab8f0",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc",
limit=10,
)
assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"])
assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"])

@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
Expand All @@ -107,8 +107,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
object = await response.parse()
assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"])
object_ = await response.parse()
assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"])

@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
Expand All @@ -119,8 +119,8 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

object = await response.parse()
assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"])
object_ = await response.parse()
assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"])

assert cast(Any, response.is_closed) is True

Expand Down
Loading