diff --git a/api.md b/api.md
index 2fd9d1c23e8..c92fa2a6d89 100644
--- a/api.md
+++ b/api.md
@@ -2050,7 +2050,7 @@ from cloudflare.types.logpush.datasets import JobGetResponse
Methods:
-- client.logpush.datasets.jobs.get(dataset_id, \*, account_id, zone_id) -> JobGetResponse
+- client.logpush.datasets.jobs.get(dataset_id, \*, account_id, zone_id) -> Optional
## Edge
@@ -2063,7 +2063,7 @@ from cloudflare.types.logpush import InstantLogpushJob, EdgeGetResponse
Methods:
- client.logpush.edge.create(\*, zone_id, \*\*params) -> Optional
-- client.logpush.edge.get(\*, zone_id) -> EdgeGetResponse
+- client.logpush.edge.get(\*, zone_id) -> Optional
## Jobs
@@ -2078,7 +2078,7 @@ Methods:
- client.logpush.jobs.create(\*, account_id, zone_id, \*\*params) -> Optional
- client.logpush.jobs.update(job_id, \*, account_id, zone_id, \*\*params) -> Optional
- client.logpush.jobs.list(\*, account_id, zone_id) -> SyncSinglePage[Optional]
-- client.logpush.jobs.delete(job_id, \*, account_id, zone_id, \*\*params) -> Optional
+- client.logpush.jobs.delete(job_id, \*, account_id, zone_id, \*\*params) -> object
- client.logpush.jobs.get(job_id, \*, account_id, zone_id) -> Optional
## Ownership
diff --git a/src/cloudflare/resources/hyperdrive/configs.py b/src/cloudflare/resources/hyperdrive/configs.py
index 37422cccc90..cb31f7565ae 100644
--- a/src/cloudflare/resources/hyperdrive/configs.py
+++ b/src/cloudflare/resources/hyperdrive/configs.py
@@ -44,8 +44,9 @@ def create(
self,
*,
account_id: str,
- name: object,
+ name: str,
origin: ConfigurationParam,
+ caching: config_create_params.Caching | NotGiven = NOT_GIVEN,
# 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,
@@ -75,6 +76,7 @@ def create(
{
"name": name,
"origin": origin,
+ "caching": caching,
},
config_create_params.ConfigCreateParams,
),
@@ -93,8 +95,9 @@ def update(
hyperdrive_id: str,
*,
account_id: str,
- name: object,
+ name: str,
origin: ConfigurationParam,
+ caching: config_update_params.Caching | NotGiven = NOT_GIVEN,
# 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,
@@ -128,6 +131,7 @@ def update(
{
"name": name,
"origin": origin,
+ "caching": caching,
},
config_update_params.ConfigUpdateParams,
),
@@ -231,6 +235,8 @@ def edit(
hyperdrive_id: str,
*,
account_id: str,
+ caching: config_edit_params.Caching | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
origin: ConfigurationParam | NotGiven = NOT_GIVEN,
# 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.
@@ -263,7 +269,14 @@ def edit(
raise ValueError(f"Expected a non-empty value for `hyperdrive_id` but received {hyperdrive_id!r}")
return self._patch(
f"/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}",
- body=maybe_transform({"origin": origin}, config_edit_params.ConfigEditParams),
+ body=maybe_transform(
+ {
+ "caching": caching,
+ "name": name,
+ "origin": origin,
+ },
+ config_edit_params.ConfigEditParams,
+ ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -332,8 +345,9 @@ async def create(
self,
*,
account_id: str,
- name: object,
+ name: str,
origin: ConfigurationParam,
+ caching: config_create_params.Caching | NotGiven = NOT_GIVEN,
# 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,
@@ -363,6 +377,7 @@ async def create(
{
"name": name,
"origin": origin,
+ "caching": caching,
},
config_create_params.ConfigCreateParams,
),
@@ -381,8 +396,9 @@ async def update(
hyperdrive_id: str,
*,
account_id: str,
- name: object,
+ name: str,
origin: ConfigurationParam,
+ caching: config_update_params.Caching | NotGiven = NOT_GIVEN,
# 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,
@@ -416,6 +432,7 @@ async def update(
{
"name": name,
"origin": origin,
+ "caching": caching,
},
config_update_params.ConfigUpdateParams,
),
@@ -519,6 +536,8 @@ async def edit(
hyperdrive_id: str,
*,
account_id: str,
+ caching: config_edit_params.Caching | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
origin: ConfigurationParam | NotGiven = NOT_GIVEN,
# 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.
@@ -551,7 +570,14 @@ async def edit(
raise ValueError(f"Expected a non-empty value for `hyperdrive_id` but received {hyperdrive_id!r}")
return await self._patch(
f"/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}",
- body=await async_maybe_transform({"origin": origin}, config_edit_params.ConfigEditParams),
+ body=await async_maybe_transform(
+ {
+ "caching": caching,
+ "name": name,
+ "origin": origin,
+ },
+ config_edit_params.ConfigEditParams,
+ ),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
diff --git a/src/cloudflare/resources/logpush/datasets/jobs.py b/src/cloudflare/resources/logpush/datasets/jobs.py
index b6ce88278f4..0f2629ce335 100644
--- a/src/cloudflare/resources/logpush/datasets/jobs.py
+++ b/src/cloudflare/resources/logpush/datasets/jobs.py
@@ -45,7 +45,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> JobGetResponse:
+ ) -> Optional[JobGetResponse]:
"""
Lists Logpush jobs for an account or zone for a dataset.
@@ -87,7 +87,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[JobGetResponse], ResultWrapper[JobGetResponse]),
+ cast_to=cast(Type[Optional[JobGetResponse]], ResultWrapper[JobGetResponse]),
)
@@ -112,7 +112,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> JobGetResponse:
+ ) -> Optional[JobGetResponse]:
"""
Lists Logpush jobs for an account or zone for a dataset.
@@ -154,7 +154,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[JobGetResponse], ResultWrapper[JobGetResponse]),
+ cast_to=cast(Type[Optional[JobGetResponse]], ResultWrapper[JobGetResponse]),
)
diff --git a/src/cloudflare/resources/logpush/edge.py b/src/cloudflare/resources/logpush/edge.py
index 6d7d106f081..0f6f8459d42 100644
--- a/src/cloudflare/resources/logpush/edge.py
+++ b/src/cloudflare/resources/logpush/edge.py
@@ -105,7 +105,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EdgeGetResponse:
+ ) -> Optional[EdgeGetResponse]:
"""
Lists Instant Logs jobs for a zone.
@@ -131,7 +131,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EdgeGetResponse], ResultWrapper[EdgeGetResponse]),
+ cast_to=cast(Type[Optional[EdgeGetResponse]], ResultWrapper[EdgeGetResponse]),
)
@@ -212,7 +212,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> EdgeGetResponse:
+ ) -> Optional[EdgeGetResponse]:
"""
Lists Instant Logs jobs for a zone.
@@ -238,7 +238,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[EdgeGetResponse], ResultWrapper[EdgeGetResponse]),
+ cast_to=cast(Type[Optional[EdgeGetResponse]], ResultWrapper[EdgeGetResponse]),
)
diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py
index 575b0beee35..ebb078e3439 100644
--- a/src/cloudflare/resources/logpush/jobs.py
+++ b/src/cloudflare/resources/logpush/jobs.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Type, Optional, cast
+from typing import Type, Optional, cast
from typing_extensions import Literal
import httpx
@@ -28,7 +28,6 @@
)
from ...types.logpush import (
LogpushJob,
- JobDeleteResponse,
OutputOptionsParam,
job_create_params,
job_delete_params,
@@ -302,7 +301,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[JobDeleteResponse]:
+ ) -> object:
"""
Deletes a Logpush job.
@@ -333,22 +332,17 @@ def delete(
account_or_zone = "zones"
account_or_zone_id = zone_id
- return cast(
- Optional[JobDeleteResponse],
- self._delete(
- f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs/{job_id}",
- body=maybe_transform(body, job_delete_params.JobDeleteParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[JobDeleteResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._delete(
+ f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs/{job_id}",
+ body=maybe_transform(body, job_delete_params.JobDeleteParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
def get(
@@ -671,7 +665,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[JobDeleteResponse]:
+ ) -> object:
"""
Deletes a Logpush job.
@@ -702,22 +696,17 @@ async def delete(
account_or_zone = "zones"
account_or_zone_id = zone_id
- return cast(
- Optional[JobDeleteResponse],
- await self._delete(
- f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs/{job_id}",
- body=await async_maybe_transform(body, job_delete_params.JobDeleteParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[JobDeleteResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._delete(
+ f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs/{job_id}",
+ body=await async_maybe_transform(body, job_delete_params.JobDeleteParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
),
+ cast_to=cast(Type[object], ResultWrapper[object]),
)
async def get(
diff --git a/src/cloudflare/types/custom_hostname_create_response.py b/src/cloudflare/types/custom_hostname_create_response.py
index fe61cff0ec7..049e1243208 100644
--- a/src/cloudflare/types/custom_hostname_create_response.py
+++ b/src/cloudflare/types/custom_hostname_create_response.py
@@ -9,7 +9,16 @@
from .bundle_method import BundleMethod
from .domain_validation_type import DomainValidationType
-__all__ = ["CustomHostnameCreateResponse", "SSL", "SSLSettings", "SSLValidationError", "SSLValidationRecord"]
+__all__ = [
+ "CustomHostnameCreateResponse",
+ "SSL",
+ "SSLSettings",
+ "SSLValidationError",
+ "SSLValidationRecord",
+ "CustomMetadata",
+ "OwnershipVerification",
+ "OwnershipVerificationHTTP",
+]
class SSLSettings(BaseModel):
@@ -159,6 +168,33 @@ class SSL(BaseModel):
"""Indicates whether the certificate covers a wildcard."""
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
+class OwnershipVerification(BaseModel):
+ name: Optional[str] = None
+ """DNS Name for record."""
+
+ type: Optional[Literal["txt"]] = None
+ """DNS Record type."""
+
+ value: Optional[str] = None
+ """Content for the record."""
+
+
+class OwnershipVerificationHTTP(BaseModel):
+ http_body: Optional[str] = None
+ """Token to be served."""
+
+ http_url: Optional[str] = None
+ """
+ The HTTP URL that will be checked during custom hostname verification and where
+ the customer should host the token.
+ """
+
+
class CustomHostnameCreateResponse(BaseModel):
id: str
"""Identifier"""
@@ -168,3 +204,58 @@ class CustomHostnameCreateResponse(BaseModel):
ssl: SSL
"""SSL properties for the custom hostname."""
+
+ created_at: Optional[datetime] = None
+ """This is the time the hostname was created."""
+
+ custom_metadata: Optional[CustomMetadata] = None
+ """These are per-hostname (customer) settings."""
+
+ custom_origin_server: Optional[str] = None
+ """
+ a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME
+ record.
+ """
+
+ custom_origin_sni: Optional[str] = None
+ """
+ A hostname that will be sent to your custom origin server as SNI for TLS
+ handshake. This can be a valid subdomain of the zone or custom origin server
+ name or the string ':request_host_header:' which will cause the host header in
+ the request to be used as SNI. Not configurable with default/fallback origin
+ server.
+ """
+
+ ownership_verification: Optional[OwnershipVerification] = None
+ """This is a record which can be placed to activate a hostname."""
+
+ ownership_verification_http: Optional[OwnershipVerificationHTTP] = None
+ """
+ This presents the token to be served by the given http url to activate a
+ hostname.
+ """
+
+ status: Optional[
+ Literal[
+ "active",
+ "pending",
+ "active_redeploying",
+ "moved",
+ "pending_deletion",
+ "deleted",
+ "pending_blocked",
+ "pending_migration",
+ "pending_provisioned",
+ "test_pending",
+ "test_active",
+ "test_active_apex",
+ "test_blocked",
+ "test_failed",
+ "provisioned",
+ "blocked",
+ ]
+ ] = None
+ """Status of the hostname's activation."""
+
+ verification_errors: Optional[List[object]] = None
+ """These are errors that were encountered while trying to activate a hostname."""
diff --git a/src/cloudflare/types/custom_hostname_edit_response.py b/src/cloudflare/types/custom_hostname_edit_response.py
index 9a109d4b75d..89161df0ddf 100644
--- a/src/cloudflare/types/custom_hostname_edit_response.py
+++ b/src/cloudflare/types/custom_hostname_edit_response.py
@@ -9,7 +9,16 @@
from .bundle_method import BundleMethod
from .domain_validation_type import DomainValidationType
-__all__ = ["CustomHostnameEditResponse", "SSL", "SSLSettings", "SSLValidationError", "SSLValidationRecord"]
+__all__ = [
+ "CustomHostnameEditResponse",
+ "SSL",
+ "SSLSettings",
+ "SSLValidationError",
+ "SSLValidationRecord",
+ "CustomMetadata",
+ "OwnershipVerification",
+ "OwnershipVerificationHTTP",
+]
class SSLSettings(BaseModel):
@@ -159,6 +168,33 @@ class SSL(BaseModel):
"""Indicates whether the certificate covers a wildcard."""
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
+class OwnershipVerification(BaseModel):
+ name: Optional[str] = None
+ """DNS Name for record."""
+
+ type: Optional[Literal["txt"]] = None
+ """DNS Record type."""
+
+ value: Optional[str] = None
+ """Content for the record."""
+
+
+class OwnershipVerificationHTTP(BaseModel):
+ http_body: Optional[str] = None
+ """Token to be served."""
+
+ http_url: Optional[str] = None
+ """
+ The HTTP URL that will be checked during custom hostname verification and where
+ the customer should host the token.
+ """
+
+
class CustomHostnameEditResponse(BaseModel):
id: str
"""Identifier"""
@@ -168,3 +204,58 @@ class CustomHostnameEditResponse(BaseModel):
ssl: SSL
"""SSL properties for the custom hostname."""
+
+ created_at: Optional[datetime] = None
+ """This is the time the hostname was created."""
+
+ custom_metadata: Optional[CustomMetadata] = None
+ """These are per-hostname (customer) settings."""
+
+ custom_origin_server: Optional[str] = None
+ """
+ a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME
+ record.
+ """
+
+ custom_origin_sni: Optional[str] = None
+ """
+ A hostname that will be sent to your custom origin server as SNI for TLS
+ handshake. This can be a valid subdomain of the zone or custom origin server
+ name or the string ':request_host_header:' which will cause the host header in
+ the request to be used as SNI. Not configurable with default/fallback origin
+ server.
+ """
+
+ ownership_verification: Optional[OwnershipVerification] = None
+ """This is a record which can be placed to activate a hostname."""
+
+ ownership_verification_http: Optional[OwnershipVerificationHTTP] = None
+ """
+ This presents the token to be served by the given http url to activate a
+ hostname.
+ """
+
+ status: Optional[
+ Literal[
+ "active",
+ "pending",
+ "active_redeploying",
+ "moved",
+ "pending_deletion",
+ "deleted",
+ "pending_blocked",
+ "pending_migration",
+ "pending_provisioned",
+ "test_pending",
+ "test_active",
+ "test_active_apex",
+ "test_blocked",
+ "test_failed",
+ "provisioned",
+ "blocked",
+ ]
+ ] = None
+ """Status of the hostname's activation."""
+
+ verification_errors: Optional[List[object]] = None
+ """These are errors that were encountered while trying to activate a hostname."""
diff --git a/src/cloudflare/types/custom_hostname_get_response.py b/src/cloudflare/types/custom_hostname_get_response.py
index c37b19685d9..533984de59a 100644
--- a/src/cloudflare/types/custom_hostname_get_response.py
+++ b/src/cloudflare/types/custom_hostname_get_response.py
@@ -9,7 +9,16 @@
from .bundle_method import BundleMethod
from .domain_validation_type import DomainValidationType
-__all__ = ["CustomHostnameGetResponse", "SSL", "SSLSettings", "SSLValidationError", "SSLValidationRecord"]
+__all__ = [
+ "CustomHostnameGetResponse",
+ "SSL",
+ "SSLSettings",
+ "SSLValidationError",
+ "SSLValidationRecord",
+ "CustomMetadata",
+ "OwnershipVerification",
+ "OwnershipVerificationHTTP",
+]
class SSLSettings(BaseModel):
@@ -159,6 +168,33 @@ class SSL(BaseModel):
"""Indicates whether the certificate covers a wildcard."""
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
+class OwnershipVerification(BaseModel):
+ name: Optional[str] = None
+ """DNS Name for record."""
+
+ type: Optional[Literal["txt"]] = None
+ """DNS Record type."""
+
+ value: Optional[str] = None
+ """Content for the record."""
+
+
+class OwnershipVerificationHTTP(BaseModel):
+ http_body: Optional[str] = None
+ """Token to be served."""
+
+ http_url: Optional[str] = None
+ """
+ The HTTP URL that will be checked during custom hostname verification and where
+ the customer should host the token.
+ """
+
+
class CustomHostnameGetResponse(BaseModel):
id: str
"""Identifier"""
@@ -168,3 +204,58 @@ class CustomHostnameGetResponse(BaseModel):
ssl: SSL
"""SSL properties for the custom hostname."""
+
+ created_at: Optional[datetime] = None
+ """This is the time the hostname was created."""
+
+ custom_metadata: Optional[CustomMetadata] = None
+ """These are per-hostname (customer) settings."""
+
+ custom_origin_server: Optional[str] = None
+ """
+ a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME
+ record.
+ """
+
+ custom_origin_sni: Optional[str] = None
+ """
+ A hostname that will be sent to your custom origin server as SNI for TLS
+ handshake. This can be a valid subdomain of the zone or custom origin server
+ name or the string ':request_host_header:' which will cause the host header in
+ the request to be used as SNI. Not configurable with default/fallback origin
+ server.
+ """
+
+ ownership_verification: Optional[OwnershipVerification] = None
+ """This is a record which can be placed to activate a hostname."""
+
+ ownership_verification_http: Optional[OwnershipVerificationHTTP] = None
+ """
+ This presents the token to be served by the given http url to activate a
+ hostname.
+ """
+
+ status: Optional[
+ Literal[
+ "active",
+ "pending",
+ "active_redeploying",
+ "moved",
+ "pending_deletion",
+ "deleted",
+ "pending_blocked",
+ "pending_migration",
+ "pending_provisioned",
+ "test_pending",
+ "test_active",
+ "test_active_apex",
+ "test_blocked",
+ "test_failed",
+ "provisioned",
+ "blocked",
+ ]
+ ] = None
+ """Status of the hostname's activation."""
+
+ verification_errors: Optional[List[object]] = None
+ """These are errors that were encountered while trying to activate a hostname."""
diff --git a/src/cloudflare/types/custom_hostname_list_response.py b/src/cloudflare/types/custom_hostname_list_response.py
index f8ed3baf91a..dbfdc887b48 100644
--- a/src/cloudflare/types/custom_hostname_list_response.py
+++ b/src/cloudflare/types/custom_hostname_list_response.py
@@ -9,7 +9,16 @@
from .bundle_method import BundleMethod
from .domain_validation_type import DomainValidationType
-__all__ = ["CustomHostnameListResponse", "SSL", "SSLSettings", "SSLValidationError", "SSLValidationRecord"]
+__all__ = [
+ "CustomHostnameListResponse",
+ "SSL",
+ "SSLSettings",
+ "SSLValidationError",
+ "SSLValidationRecord",
+ "CustomMetadata",
+ "OwnershipVerification",
+ "OwnershipVerificationHTTP",
+]
class SSLSettings(BaseModel):
@@ -159,6 +168,33 @@ class SSL(BaseModel):
"""Indicates whether the certificate covers a wildcard."""
+class CustomMetadata(BaseModel):
+ key: Optional[str] = None
+ """Unique metadata for this hostname."""
+
+
+class OwnershipVerification(BaseModel):
+ name: Optional[str] = None
+ """DNS Name for record."""
+
+ type: Optional[Literal["txt"]] = None
+ """DNS Record type."""
+
+ value: Optional[str] = None
+ """Content for the record."""
+
+
+class OwnershipVerificationHTTP(BaseModel):
+ http_body: Optional[str] = None
+ """Token to be served."""
+
+ http_url: Optional[str] = None
+ """
+ The HTTP URL that will be checked during custom hostname verification and where
+ the customer should host the token.
+ """
+
+
class CustomHostnameListResponse(BaseModel):
id: str
"""Identifier"""
@@ -168,3 +204,58 @@ class CustomHostnameListResponse(BaseModel):
ssl: SSL
"""SSL properties for the custom hostname."""
+
+ created_at: Optional[datetime] = None
+ """This is the time the hostname was created."""
+
+ custom_metadata: Optional[CustomMetadata] = None
+ """These are per-hostname (customer) settings."""
+
+ custom_origin_server: Optional[str] = None
+ """
+ a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME
+ record.
+ """
+
+ custom_origin_sni: Optional[str] = None
+ """
+ A hostname that will be sent to your custom origin server as SNI for TLS
+ handshake. This can be a valid subdomain of the zone or custom origin server
+ name or the string ':request_host_header:' which will cause the host header in
+ the request to be used as SNI. Not configurable with default/fallback origin
+ server.
+ """
+
+ ownership_verification: Optional[OwnershipVerification] = None
+ """This is a record which can be placed to activate a hostname."""
+
+ ownership_verification_http: Optional[OwnershipVerificationHTTP] = None
+ """
+ This presents the token to be served by the given http url to activate a
+ hostname.
+ """
+
+ status: Optional[
+ Literal[
+ "active",
+ "pending",
+ "active_redeploying",
+ "moved",
+ "pending_deletion",
+ "deleted",
+ "pending_blocked",
+ "pending_migration",
+ "pending_provisioned",
+ "test_pending",
+ "test_active",
+ "test_active_apex",
+ "test_blocked",
+ "test_failed",
+ "provisioned",
+ "blocked",
+ ]
+ ] = None
+ """Status of the hostname's activation."""
+
+ verification_errors: Optional[List[object]] = None
+ """These are errors that were encountered while trying to activate a hostname."""
diff --git a/src/cloudflare/types/hyperdrive/config_create_params.py b/src/cloudflare/types/hyperdrive/config_create_params.py
index 10244dcb06d..a9468fc4ba2 100644
--- a/src/cloudflare/types/hyperdrive/config_create_params.py
+++ b/src/cloudflare/types/hyperdrive/config_create_params.py
@@ -6,13 +6,33 @@
from ..configuration_param import ConfigurationParam
-__all__ = ["ConfigCreateParams"]
+__all__ = ["ConfigCreateParams", "Caching"]
class ConfigCreateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
- name: Required[object]
+ name: Required[str]
origin: Required[ConfigurationParam]
+
+ caching: Caching
+
+
+class Caching(TypedDict, total=False):
+ disabled: bool
+ """When set to true, disables the caching of SQL responses. (Default: false)"""
+
+ max_age: int
+ """When present, specifies max duration for which items should persist in the
+ cache.
+
+ (Default: 60)
+ """
+
+ stale_while_revalidate: int
+ """
+ When present, indicates the number of seconds cache may serve the response after
+ it becomes stale. (Default: 15)
+ """
diff --git a/src/cloudflare/types/hyperdrive/config_edit_params.py b/src/cloudflare/types/hyperdrive/config_edit_params.py
index e3343c427f7..3769cf1b752 100644
--- a/src/cloudflare/types/hyperdrive/config_edit_params.py
+++ b/src/cloudflare/types/hyperdrive/config_edit_params.py
@@ -6,11 +6,33 @@
from ..configuration_param import ConfigurationParam
-__all__ = ["ConfigEditParams"]
+__all__ = ["ConfigEditParams", "Caching"]
class ConfigEditParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
+ caching: Caching
+
+ name: str
+
origin: ConfigurationParam
+
+
+class Caching(TypedDict, total=False):
+ disabled: bool
+ """When set to true, disables the caching of SQL responses. (Default: false)"""
+
+ max_age: int
+ """When present, specifies max duration for which items should persist in the
+ cache.
+
+ (Default: 60)
+ """
+
+ stale_while_revalidate: int
+ """
+ When present, indicates the number of seconds cache may serve the response after
+ it becomes stale. (Default: 15)
+ """
diff --git a/src/cloudflare/types/hyperdrive/config_update_params.py b/src/cloudflare/types/hyperdrive/config_update_params.py
index a38d5864ca1..f4c2909a50b 100644
--- a/src/cloudflare/types/hyperdrive/config_update_params.py
+++ b/src/cloudflare/types/hyperdrive/config_update_params.py
@@ -6,13 +6,33 @@
from ..configuration_param import ConfigurationParam
-__all__ = ["ConfigUpdateParams"]
+__all__ = ["ConfigUpdateParams", "Caching"]
class ConfigUpdateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
- name: Required[object]
+ name: Required[str]
origin: Required[ConfigurationParam]
+
+ caching: Caching
+
+
+class Caching(TypedDict, total=False):
+ disabled: bool
+ """When set to true, disables the caching of SQL responses. (Default: false)"""
+
+ max_age: int
+ """When present, specifies max duration for which items should persist in the
+ cache.
+
+ (Default: 60)
+ """
+
+ stale_while_revalidate: int
+ """
+ When present, indicates the number of seconds cache may serve the response after
+ it becomes stale. (Default: 15)
+ """
diff --git a/src/cloudflare/types/logpush/__init__.py b/src/cloudflare/types/logpush/__init__.py
index 3cb4874d683..e3eaa13d9d2 100644
--- a/src/cloudflare/types/logpush/__init__.py
+++ b/src/cloudflare/types/logpush/__init__.py
@@ -10,7 +10,6 @@
from .job_update_params import JobUpdateParams as JobUpdateParams
from .edge_create_params import EdgeCreateParams as EdgeCreateParams
from .instant_logpush_job import InstantLogpushJob as InstantLogpushJob
-from .job_delete_response import JobDeleteResponse as JobDeleteResponse
from .output_options_param import OutputOptionsParam as OutputOptionsParam
from .ownership_validation import OwnershipValidation as OwnershipValidation
from .validate_origin_params import ValidateOriginParams as ValidateOriginParams
diff --git a/src/cloudflare/types/logpush/job_delete_response.py b/src/cloudflare/types/logpush/job_delete_response.py
deleted file mode 100644
index fef20041b3f..00000000000
--- a/src/cloudflare/types/logpush/job_delete_response.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Union
-
-__all__ = ["JobDeleteResponse"]
-
-JobDeleteResponse = Union[List[object], str, object, None]
diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py
index 283a1f7d4f3..60007df0833 100644
--- a/tests/api_resources/hyperdrive/test_configs.py
+++ b/tests/api_resources/hyperdrive/test_configs.py
@@ -26,8 +26,35 @@ class TestConfigs:
def test_method_create(self, client: Cloudflare) -> None:
config = client.hyperdrive.configs.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
+ )
+ assert_matches_type(Optional[Hyperdrive], config, path=["response"])
+
+ @pytest.mark.skip()
+ @parametrize
+ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
+ config = client.hyperdrive.configs.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
+ caching={
+ "disabled": False,
+ "max_age": 60,
+ "stale_while_revalidate": 15,
+ },
)
assert_matches_type(Optional[Hyperdrive], config, path=["response"])
@@ -36,8 +63,14 @@ def test_method_create(self, client: Cloudflare) -> None:
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.hyperdrive.configs.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
assert response.is_closed is True
@@ -50,8 +83,14 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.hyperdrive.configs.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -67,8 +106,14 @@ def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.hyperdrive.configs.with_raw_response.create(
account_id="",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
@pytest.mark.skip()
@@ -77,8 +122,36 @@ def test_method_update(self, client: Cloudflare) -> None:
config = client.hyperdrive.configs.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
+ )
+ assert_matches_type(Optional[Hyperdrive], config, path=["response"])
+
+ @pytest.mark.skip()
+ @parametrize
+ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
+ config = client.hyperdrive.configs.update(
+ "023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
+ caching={
+ "disabled": False,
+ "max_age": 60,
+ "stale_while_revalidate": 15,
+ },
)
assert_matches_type(Optional[Hyperdrive], config, path=["response"])
@@ -88,8 +161,14 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.hyperdrive.configs.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
assert response.is_closed is True
@@ -103,8 +182,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.hyperdrive.configs.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -121,16 +206,28 @@ def test_path_params_update(self, client: Cloudflare) -> None:
client.hyperdrive.configs.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"):
client.hyperdrive.configs.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
@pytest.mark.skip()
@@ -242,7 +339,19 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
config = client.hyperdrive.configs.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- origin={"password": "password1234!"},
+ caching={
+ "disabled": False,
+ "max_age": 60,
+ "stale_while_revalidate": 15,
+ },
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
assert_matches_type(Optional[Hyperdrive], config, path=["response"])
@@ -350,8 +459,35 @@ class TestAsyncConfigs:
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
config = await async_client.hyperdrive.configs.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
+ )
+ assert_matches_type(Optional[Hyperdrive], config, path=["response"])
+
+ @pytest.mark.skip()
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ config = await async_client.hyperdrive.configs.create(
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
+ caching={
+ "disabled": False,
+ "max_age": 60,
+ "stale_while_revalidate": 15,
+ },
)
assert_matches_type(Optional[Hyperdrive], config, path=["response"])
@@ -360,8 +496,14 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.hyperdrive.configs.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
assert response.is_closed is True
@@ -374,8 +516,14 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.hyperdrive.configs.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -391,8 +539,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.hyperdrive.configs.with_raw_response.create(
account_id="",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
@pytest.mark.skip()
@@ -401,8 +555,36 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
config = await async_client.hyperdrive.configs.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
+ )
+ assert_matches_type(Optional[Hyperdrive], config, path=["response"])
+
+ @pytest.mark.skip()
+ @parametrize
+ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
+ config = await async_client.hyperdrive.configs.update(
+ "023e105f4ecef8ad9ca31a8372d0c353",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
+ caching={
+ "disabled": False,
+ "max_age": 60,
+ "stale_while_revalidate": 15,
+ },
)
assert_matches_type(Optional[Hyperdrive], config, path=["response"])
@@ -412,8 +594,14 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.hyperdrive.configs.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
assert response.is_closed is True
@@ -427,8 +615,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
async with async_client.hyperdrive.configs.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -445,16 +639,28 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
await async_client.hyperdrive.configs.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"):
await async_client.hyperdrive.configs.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- name={},
- origin={"password": "password1234!"},
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
@pytest.mark.skip()
@@ -566,7 +772,19 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
config = await async_client.hyperdrive.configs.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
- origin={"password": "password1234!"},
+ caching={
+ "disabled": False,
+ "max_age": 60,
+ "stale_while_revalidate": 15,
+ },
+ name="example-hyperdrive",
+ origin={
+ "database": "postgres",
+ "host": "database.example.com",
+ "port": 0,
+ "scheme": "postgres",
+ "user": "postgres",
+ },
)
assert_matches_type(Optional[Hyperdrive], config, path=["response"])
diff --git a/tests/api_resources/logpush/datasets/test_jobs.py b/tests/api_resources/logpush/datasets/test_jobs.py
index 39c7401990e..d15c3873dd5 100644
--- a/tests/api_resources/logpush/datasets/test_jobs.py
+++ b/tests/api_resources/logpush/datasets/test_jobs.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -25,7 +25,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(JobGetResponse, job, path=["response"])
+ assert_matches_type(Optional[JobGetResponse], job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -35,7 +35,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(JobGetResponse, job, path=["response"])
+ assert_matches_type(Optional[JobGetResponse], job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -49,7 +49,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
job = response.parse()
- assert_matches_type(JobGetResponse, job, path=["response"])
+ assert_matches_type(Optional[JobGetResponse], job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -63,7 +63,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
job = response.parse()
- assert_matches_type(JobGetResponse, job, path=["response"])
+ assert_matches_type(Optional[JobGetResponse], job, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -103,7 +103,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(JobGetResponse, job, path=["response"])
+ assert_matches_type(Optional[JobGetResponse], job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -113,7 +113,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
account_id="string",
zone_id="string",
)
- assert_matches_type(JobGetResponse, job, path=["response"])
+ assert_matches_type(Optional[JobGetResponse], job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -127,7 +127,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
job = await response.parse()
- assert_matches_type(JobGetResponse, job, path=["response"])
+ assert_matches_type(Optional[JobGetResponse], job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -141,7 +141,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
job = await response.parse()
- assert_matches_type(JobGetResponse, job, path=["response"])
+ assert_matches_type(Optional[JobGetResponse], job, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/logpush/test_edge.py b/tests/api_resources/logpush/test_edge.py
index 3c0826f48f8..b1bdf576c70 100644
--- a/tests/api_resources/logpush/test_edge.py
+++ b/tests/api_resources/logpush/test_edge.py
@@ -76,7 +76,7 @@ def test_method_get(self, client: Cloudflare) -> None:
edge = client.logpush.edge.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(EdgeGetResponse, edge, path=["response"])
+ assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -88,7 +88,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
edge = response.parse()
- assert_matches_type(EdgeGetResponse, edge, path=["response"])
+ assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -100,7 +100,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
edge = response.parse()
- assert_matches_type(EdgeGetResponse, edge, path=["response"])
+ assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -175,7 +175,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
edge = await async_client.logpush.edge.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(EdgeGetResponse, edge, path=["response"])
+ assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -187,7 +187,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
edge = await response.parse()
- assert_matches_type(EdgeGetResponse, edge, path=["response"])
+ assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -199,7 +199,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
edge = await response.parse()
- assert_matches_type(EdgeGetResponse, edge, path=["response"])
+ assert_matches_type(Optional[EdgeGetResponse], edge, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py
index ced0fa8530c..00c5ac7f89a 100644
--- a/tests/api_resources/logpush/test_jobs.py
+++ b/tests/api_resources/logpush/test_jobs.py
@@ -10,10 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.logpush import (
- LogpushJob,
- JobDeleteResponse,
-)
+from cloudflare.types.logpush import LogpushJob
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -264,7 +261,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Optional[JobDeleteResponse], job, path=["response"])
+ assert_matches_type(object, job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -275,7 +272,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Optional[JobDeleteResponse], job, path=["response"])
+ assert_matches_type(object, job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -290,7 +287,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
job = response.parse()
- assert_matches_type(Optional[JobDeleteResponse], job, path=["response"])
+ assert_matches_type(object, job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -305,7 +302,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
job = response.parse()
- assert_matches_type(Optional[JobDeleteResponse], job, path=["response"])
+ assert_matches_type(object, job, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -642,7 +639,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Optional[JobDeleteResponse], job, path=["response"])
+ assert_matches_type(object, job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -653,7 +650,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(Optional[JobDeleteResponse], job, path=["response"])
+ assert_matches_type(object, job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -668,7 +665,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
job = await response.parse()
- assert_matches_type(Optional[JobDeleteResponse], job, path=["response"])
+ assert_matches_type(object, job, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -683,7 +680,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
job = await response.parse()
- assert_matches_type(Optional[JobDeleteResponse], job, path=["response"])
+ assert_matches_type(object, job, path=["response"])
assert cast(Any, response.is_closed) is True