feat(api): OpenAPI spec update via Stainless API (#141)

This commit is contained in:
stainless-app[bot] 2024-03-18 19:30:41 +00:00 committed by stainless-bot
parent 7fd2e70044
commit e7abd85662
12 changed files with 234 additions and 311 deletions

View file

@ -58,9 +58,7 @@ class Records(SyncAPIResource):
self,
*,
zone_id: str,
data: record_create_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
@ -84,7 +82,10 @@ class Records(SyncAPIResource):
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_create_params.Data | NotGiven = NOT_GIVEN,
meta: record_create_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
@ -110,14 +111,16 @@ class Records(SyncAPIResource):
name: DNS record name (or @ for the zone apex) in Punycode.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
type: Record type.
comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.
content: Formatted URI content. See 'data' to set URI properties.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.
@ -143,12 +146,13 @@ class Records(SyncAPIResource):
f"/zones/{zone_id}/dns_records",
body=maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
@ -173,9 +177,7 @@ class Records(SyncAPIResource):
dns_record_id: str,
*,
zone_id: str,
data: record_update_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
@ -199,7 +201,10 @@ class Records(SyncAPIResource):
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_update_params.Data | NotGiven = NOT_GIVEN,
meta: record_update_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
@ -226,14 +231,16 @@ class Records(SyncAPIResource):
name: DNS record name (or @ for the zone apex) in Punycode.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
type: Record type.
comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.
content: Formatted URI content. See 'data' to set URI properties.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.
@ -261,12 +268,13 @@ class Records(SyncAPIResource):
f"/zones/{zone_id}/dns_records/{dns_record_id}",
body=maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
@ -460,9 +468,7 @@ class Records(SyncAPIResource):
dns_record_id: str,
*,
zone_id: str,
data: record_edit_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
@ -486,7 +492,10 @@ class Records(SyncAPIResource):
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_edit_params.Data | NotGiven = NOT_GIVEN,
meta: record_edit_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
@ -513,14 +522,16 @@ class Records(SyncAPIResource):
name: DNS record name (or @ for the zone apex) in Punycode.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
type: Record type.
comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.
content: Formatted URI content. See 'data' to set URI properties.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.
@ -548,12 +559,13 @@ class Records(SyncAPIResource):
f"/zones/{zone_id}/dns_records/{dns_record_id}",
body=maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
@ -783,9 +795,7 @@ class AsyncRecords(AsyncAPIResource):
self,
*,
zone_id: str,
data: record_create_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
@ -809,7 +819,10 @@ class AsyncRecords(AsyncAPIResource):
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_create_params.Data | NotGiven = NOT_GIVEN,
meta: record_create_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
@ -835,14 +848,16 @@ class AsyncRecords(AsyncAPIResource):
name: DNS record name (or @ for the zone apex) in Punycode.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
type: Record type.
comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.
content: Formatted URI content. See 'data' to set URI properties.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.
@ -868,12 +883,13 @@ class AsyncRecords(AsyncAPIResource):
f"/zones/{zone_id}/dns_records",
body=await async_maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
@ -898,9 +914,7 @@ class AsyncRecords(AsyncAPIResource):
dns_record_id: str,
*,
zone_id: str,
data: record_update_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
@ -924,7 +938,10 @@ class AsyncRecords(AsyncAPIResource):
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_update_params.Data | NotGiven = NOT_GIVEN,
meta: record_update_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
@ -951,14 +968,16 @@ class AsyncRecords(AsyncAPIResource):
name: DNS record name (or @ for the zone apex) in Punycode.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
type: Record type.
comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.
content: Formatted URI content. See 'data' to set URI properties.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.
@ -986,12 +1005,13 @@ class AsyncRecords(AsyncAPIResource):
f"/zones/{zone_id}/dns_records/{dns_record_id}",
body=await async_maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
@ -1185,9 +1205,7 @@ class AsyncRecords(AsyncAPIResource):
dns_record_id: str,
*,
zone_id: str,
data: record_edit_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
@ -1211,7 +1229,10 @@ class AsyncRecords(AsyncAPIResource):
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_edit_params.Data | NotGiven = NOT_GIVEN,
meta: record_edit_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
@ -1238,14 +1259,16 @@ class AsyncRecords(AsyncAPIResource):
name: DNS record name (or @ for the zone apex) in Punycode.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
type: Record type.
comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.
content: Formatted URI content. See 'data' to set URI properties.
priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.
proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.
@ -1273,12 +1296,13 @@ class AsyncRecords(AsyncAPIResource):
f"/zones/{zone_id}/dns_records/{dns_record_id}",
body=await async_maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,

View file

@ -66,14 +66,14 @@ class PCAPs(SyncAPIResource):
self,
*,
account_id: str,
colo_name: str,
destination_conf: str,
packet_limit: float,
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
byte_limit: float | NotGiven = NOT_GIVEN,
colo_name: str | NotGiven = NOT_GIVEN,
destination_conf: str | NotGiven = NOT_GIVEN,
filter_v1: pcap_create_params.FilterV1 | NotGiven = NOT_GIVEN,
packet_limit: float | 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,
@ -87,14 +87,6 @@ class PCAPs(SyncAPIResource):
Args:
account_id: Identifier
colo_name: The name of the data center used for the packet capture. This can be a specific
colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
packet captures.
destination_conf: The full URI for the bucket. This field only applies to `full` packet captures.
packet_limit: The limit of packets contained in a packet capture.
system: The system used to collect packet captures.
time_limit: The packet capture duration in seconds.
@ -105,6 +97,14 @@ class PCAPs(SyncAPIResource):
byte_limit: The maximum number of bytes to capture. This field only applies to `full` packet
captures.
colo_name: The name of the data center used for the packet capture. This can be a specific
colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
packet captures.
destination_conf: The full URI for the bucket. This field only applies to `full` packet captures.
packet_limit: The limit of packets contained in a packet capture.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@ -121,14 +121,14 @@ class PCAPs(SyncAPIResource):
f"/accounts/{account_id}/pcaps",
body=maybe_transform(
{
"colo_name": colo_name,
"destination_conf": destination_conf,
"packet_limit": packet_limit,
"system": system,
"time_limit": time_limit,
"type": type,
"byte_limit": byte_limit,
"colo_name": colo_name,
"destination_conf": destination_conf,
"filter_v1": filter_v1,
"packet_limit": packet_limit,
},
pcap_create_params.PCAPCreateParams,
),
@ -255,14 +255,14 @@ class AsyncPCAPs(AsyncAPIResource):
self,
*,
account_id: str,
colo_name: str,
destination_conf: str,
packet_limit: float,
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
byte_limit: float | NotGiven = NOT_GIVEN,
colo_name: str | NotGiven = NOT_GIVEN,
destination_conf: str | NotGiven = NOT_GIVEN,
filter_v1: pcap_create_params.FilterV1 | NotGiven = NOT_GIVEN,
packet_limit: float | 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,
@ -276,14 +276,6 @@ class AsyncPCAPs(AsyncAPIResource):
Args:
account_id: Identifier
colo_name: The name of the data center used for the packet capture. This can be a specific
colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
packet captures.
destination_conf: The full URI for the bucket. This field only applies to `full` packet captures.
packet_limit: The limit of packets contained in a packet capture.
system: The system used to collect packet captures.
time_limit: The packet capture duration in seconds.
@ -294,6 +286,14 @@ class AsyncPCAPs(AsyncAPIResource):
byte_limit: The maximum number of bytes to capture. This field only applies to `full` packet
captures.
colo_name: The name of the data center used for the packet capture. This can be a specific
colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
packet captures.
destination_conf: The full URI for the bucket. This field only applies to `full` packet captures.
packet_limit: The limit of packets contained in a packet capture.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@ -310,14 +310,14 @@ class AsyncPCAPs(AsyncAPIResource):
f"/accounts/{account_id}/pcaps",
body=await async_maybe_transform(
{
"colo_name": colo_name,
"destination_conf": destination_conf,
"packet_limit": packet_limit,
"system": system,
"time_limit": time_limit,
"type": type,
"byte_limit": byte_limit,
"colo_name": colo_name,
"destination_conf": destination_conf,
"filter_v1": filter_v1,
"packet_limit": packet_limit,
},
pcap_create_params.PCAPCreateParams,
),

View file

@ -83,8 +83,6 @@ class Applications(SyncAPIResource):
def create(
self,
*,
domain: object,
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN,
@ -96,6 +94,7 @@ class Applications(SyncAPIResource):
custom_deny_url: str | NotGiven = NOT_GIVEN,
custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN,
custom_pages: List[str] | NotGiven = NOT_GIVEN,
domain: object | NotGiven = NOT_GIVEN,
enable_binding_cookie: bool | NotGiven = NOT_GIVEN,
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
@ -108,6 +107,8 @@ class Applications(SyncAPIResource):
session_duration: str | NotGiven = NOT_GIVEN,
skip_interstitial: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]
| 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,
@ -119,10 +120,6 @@ class Applications(SyncAPIResource):
Adds a new application to Access.
Args:
domain: The URL or domain of the bookmark.
type: The application type.
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
@ -149,6 +146,8 @@ class Applications(SyncAPIResource):
custom_pages: The custom pages that will be displayed when applicable for this application
domain: The URL or domain of the bookmark.
enable_binding_cookie: Enables the binding cookie, which increases security against compromised
authorization tokens and CSRF attacks.
@ -178,6 +177,8 @@ class Applications(SyncAPIResource):
tags: The tags you want assigned to an application. Tags are used to filter
applications in the App Launcher dashboard.
type: The application type.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@ -207,8 +208,6 @@ class Applications(SyncAPIResource):
f"/{account_or_zone}/{account_or_zone_id}/access/apps",
body=maybe_transform(
{
"domain": domain,
"type": type,
"allow_authenticate_via_warp": allow_authenticate_via_warp,
"allowed_idps": allowed_idps,
"app_launcher_visible": app_launcher_visible,
@ -218,6 +217,7 @@ class Applications(SyncAPIResource):
"custom_deny_url": custom_deny_url,
"custom_non_identity_deny_url": custom_non_identity_deny_url,
"custom_pages": custom_pages,
"domain": domain,
"enable_binding_cookie": enable_binding_cookie,
"http_only_cookie_attribute": http_only_cookie_attribute,
"logo_url": logo_url,
@ -230,6 +230,7 @@ class Applications(SyncAPIResource):
"session_duration": session_duration,
"skip_interstitial": skip_interstitial,
"tags": tags,
"type": type,
},
application_create_params.ApplicationCreateParams,
),
@ -250,8 +251,6 @@ class Applications(SyncAPIResource):
self,
app_id: Union[str, str],
*,
domain: object,
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN,
@ -263,6 +262,7 @@ class Applications(SyncAPIResource):
custom_deny_url: str | NotGiven = NOT_GIVEN,
custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN,
custom_pages: List[str] | NotGiven = NOT_GIVEN,
domain: object | NotGiven = NOT_GIVEN,
enable_binding_cookie: bool | NotGiven = NOT_GIVEN,
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
@ -275,6 +275,8 @@ class Applications(SyncAPIResource):
session_duration: str | NotGiven = NOT_GIVEN,
skip_interstitial: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]
| 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,
@ -288,10 +290,6 @@ class Applications(SyncAPIResource):
Args:
app_id: Identifier
domain: The URL or domain of the bookmark.
type: The application type.
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
@ -318,6 +316,8 @@ class Applications(SyncAPIResource):
custom_pages: The custom pages that will be displayed when applicable for this application
domain: The URL or domain of the bookmark.
enable_binding_cookie: Enables the binding cookie, which increases security against compromised
authorization tokens and CSRF attacks.
@ -347,6 +347,8 @@ class Applications(SyncAPIResource):
tags: The tags you want assigned to an application. Tags are used to filter
applications in the App Launcher dashboard.
type: The application type.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@ -376,8 +378,6 @@ class Applications(SyncAPIResource):
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}",
body=maybe_transform(
{
"domain": domain,
"type": type,
"allow_authenticate_via_warp": allow_authenticate_via_warp,
"allowed_idps": allowed_idps,
"app_launcher_visible": app_launcher_visible,
@ -387,6 +387,7 @@ class Applications(SyncAPIResource):
"custom_deny_url": custom_deny_url,
"custom_non_identity_deny_url": custom_non_identity_deny_url,
"custom_pages": custom_pages,
"domain": domain,
"enable_binding_cookie": enable_binding_cookie,
"http_only_cookie_attribute": http_only_cookie_attribute,
"logo_url": logo_url,
@ -399,6 +400,7 @@ class Applications(SyncAPIResource):
"session_duration": session_duration,
"skip_interstitial": skip_interstitial,
"tags": tags,
"type": type,
},
application_update_params.ApplicationUpdateParams,
),
@ -674,8 +676,6 @@ class AsyncApplications(AsyncAPIResource):
async def create(
self,
*,
domain: object,
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN,
@ -687,6 +687,7 @@ class AsyncApplications(AsyncAPIResource):
custom_deny_url: str | NotGiven = NOT_GIVEN,
custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN,
custom_pages: List[str] | NotGiven = NOT_GIVEN,
domain: object | NotGiven = NOT_GIVEN,
enable_binding_cookie: bool | NotGiven = NOT_GIVEN,
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
@ -699,6 +700,8 @@ class AsyncApplications(AsyncAPIResource):
session_duration: str | NotGiven = NOT_GIVEN,
skip_interstitial: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]
| 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,
@ -710,10 +713,6 @@ class AsyncApplications(AsyncAPIResource):
Adds a new application to Access.
Args:
domain: The URL or domain of the bookmark.
type: The application type.
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
@ -740,6 +739,8 @@ class AsyncApplications(AsyncAPIResource):
custom_pages: The custom pages that will be displayed when applicable for this application
domain: The URL or domain of the bookmark.
enable_binding_cookie: Enables the binding cookie, which increases security against compromised
authorization tokens and CSRF attacks.
@ -769,6 +770,8 @@ class AsyncApplications(AsyncAPIResource):
tags: The tags you want assigned to an application. Tags are used to filter
applications in the App Launcher dashboard.
type: The application type.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@ -798,8 +801,6 @@ class AsyncApplications(AsyncAPIResource):
f"/{account_or_zone}/{account_or_zone_id}/access/apps",
body=await async_maybe_transform(
{
"domain": domain,
"type": type,
"allow_authenticate_via_warp": allow_authenticate_via_warp,
"allowed_idps": allowed_idps,
"app_launcher_visible": app_launcher_visible,
@ -809,6 +810,7 @@ class AsyncApplications(AsyncAPIResource):
"custom_deny_url": custom_deny_url,
"custom_non_identity_deny_url": custom_non_identity_deny_url,
"custom_pages": custom_pages,
"domain": domain,
"enable_binding_cookie": enable_binding_cookie,
"http_only_cookie_attribute": http_only_cookie_attribute,
"logo_url": logo_url,
@ -821,6 +823,7 @@ class AsyncApplications(AsyncAPIResource):
"session_duration": session_duration,
"skip_interstitial": skip_interstitial,
"tags": tags,
"type": type,
},
application_create_params.ApplicationCreateParams,
),
@ -841,8 +844,6 @@ class AsyncApplications(AsyncAPIResource):
self,
app_id: Union[str, str],
*,
domain: object,
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"],
account_id: str | NotGiven = NOT_GIVEN,
zone_id: str | NotGiven = NOT_GIVEN,
allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN,
@ -854,6 +855,7 @@ class AsyncApplications(AsyncAPIResource):
custom_deny_url: str | NotGiven = NOT_GIVEN,
custom_non_identity_deny_url: str | NotGiven = NOT_GIVEN,
custom_pages: List[str] | NotGiven = NOT_GIVEN,
domain: object | NotGiven = NOT_GIVEN,
enable_binding_cookie: bool | NotGiven = NOT_GIVEN,
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
@ -866,6 +868,8 @@ class AsyncApplications(AsyncAPIResource):
session_duration: str | NotGiven = NOT_GIVEN,
skip_interstitial: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]
| 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,
@ -879,10 +883,6 @@ class AsyncApplications(AsyncAPIResource):
Args:
app_id: Identifier
domain: The URL or domain of the bookmark.
type: The application type.
account_id: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
@ -909,6 +909,8 @@ class AsyncApplications(AsyncAPIResource):
custom_pages: The custom pages that will be displayed when applicable for this application
domain: The URL or domain of the bookmark.
enable_binding_cookie: Enables the binding cookie, which increases security against compromised
authorization tokens and CSRF attacks.
@ -938,6 +940,8 @@ class AsyncApplications(AsyncAPIResource):
tags: The tags you want assigned to an application. Tags are used to filter
applications in the App Launcher dashboard.
type: The application type.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@ -967,8 +971,6 @@ class AsyncApplications(AsyncAPIResource):
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}",
body=await async_maybe_transform(
{
"domain": domain,
"type": type,
"allow_authenticate_via_warp": allow_authenticate_via_warp,
"allowed_idps": allowed_idps,
"app_launcher_visible": app_launcher_visible,
@ -978,6 +980,7 @@ class AsyncApplications(AsyncAPIResource):
"custom_deny_url": custom_deny_url,
"custom_non_identity_deny_url": custom_non_identity_deny_url,
"custom_pages": custom_pages,
"domain": domain,
"enable_binding_cookie": enable_binding_cookie,
"http_only_cookie_attribute": http_only_cookie_attribute,
"logo_url": logo_url,
@ -990,6 +993,7 @@ class AsyncApplications(AsyncAPIResource):
"session_duration": session_duration,
"skip_interstitial": skip_interstitial,
"tags": tags,
"type": type,
},
application_update_params.ApplicationUpdateParams,
),

View file

@ -12,17 +12,9 @@ class RecordCreateParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
data: Required[Data]
name: Required[str]
"""DNS record name (or @ for the zone apex) in Punycode."""
priority: Required[float]
"""Required for MX, SRV and URI records; unused by other record types.
Records with lower priorities are preferred.
"""
type: Required[
Literal[
"URI",
@ -55,8 +47,19 @@ class RecordCreateParams(TypedDict, total=False):
This field has no effect on DNS responses.
"""
content: object
"""Formatted URI content. See 'data' to set URI properties."""
data: Data
meta: Meta
priority: float
"""Required for MX, SRV and URI records; unused by other record types.
Records with lower priorities are preferred.
"""
proxied: bool
"""
Whether the record is receiving the performance and security benefits of

View file

@ -12,17 +12,9 @@ class RecordEditParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
data: Required[Data]
name: Required[str]
"""DNS record name (or @ for the zone apex) in Punycode."""
priority: Required[float]
"""Required for MX, SRV and URI records; unused by other record types.
Records with lower priorities are preferred.
"""
type: Required[
Literal[
"URI",
@ -55,8 +47,19 @@ class RecordEditParams(TypedDict, total=False):
This field has no effect on DNS responses.
"""
content: object
"""Formatted URI content. See 'data' to set URI properties."""
data: Data
meta: Meta
priority: float
"""Required for MX, SRV and URI records; unused by other record types.
Records with lower priorities are preferred.
"""
proxied: bool
"""
Whether the record is receiving the performance and security benefits of

View file

@ -12,17 +12,9 @@ class RecordUpdateParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
data: Required[Data]
name: Required[str]
"""DNS record name (or @ for the zone apex) in Punycode."""
priority: Required[float]
"""Required for MX, SRV and URI records; unused by other record types.
Records with lower priorities are preferred.
"""
type: Required[
Literal[
"URI",
@ -55,8 +47,19 @@ class RecordUpdateParams(TypedDict, total=False):
This field has no effect on DNS responses.
"""
content: object
"""Formatted URI content. See 'data' to set URI properties."""
data: Data
meta: Meta
priority: float
"""Required for MX, SRV and URI records; unused by other record types.
Records with lower priorities are preferred.
"""
proxied: bool
"""
Whether the record is receiving the performance and security benefits of

View file

@ -11,19 +11,6 @@ class PCAPCreateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
colo_name: Required[str]
"""The name of the data center used for the packet capture.
This can be a specific colo (ord02) or a multi-colo name (ORD). This field only
applies to `full` packet captures.
"""
destination_conf: Required[str]
"""The full URI for the bucket. This field only applies to `full` packet captures."""
packet_limit: Required[float]
"""The limit of packets contained in a packet capture."""
system: Required[Literal["magic-transit"]]
"""The system used to collect packet captures."""
@ -43,8 +30,21 @@ class PCAPCreateParams(TypedDict, total=False):
This field only applies to `full` packet captures.
"""
colo_name: str
"""The name of the data center used for the packet capture.
This can be a specific colo (ord02) or a multi-colo name (ORD). This field only
applies to `full` packet captures.
"""
destination_conf: str
"""The full URI for the bucket. This field only applies to `full` packet captures."""
filter_v1: FilterV1
packet_limit: float
"""The limit of packets contained in a packet capture."""
class FilterV1(TypedDict, total=False):
destination_address: str

View file

@ -3,7 +3,7 @@
from __future__ import annotations
from typing import List, Union, Iterable
from typing_extensions import Literal, Required, TypedDict
from typing_extensions import Literal, TypedDict
__all__ = [
"ApplicationCreateParams",
@ -17,12 +17,6 @@ __all__ = [
class ApplicationCreateParams(TypedDict, total=False):
domain: Required[object]
"""The URL or domain of the bookmark."""
type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]]
"""The application type."""
account_id: str
"""The Account ID to use for this endpoint. Mutually exclusive with the Zone ID."""
@ -76,6 +70,9 @@ class ApplicationCreateParams(TypedDict, total=False):
custom_pages: List[str]
"""The custom pages that will be displayed when applicable for this application"""
domain: object
"""The URL or domain of the bookmark."""
enable_binding_cookie: bool
"""
Enables the binding cookie, which increases security against compromised
@ -130,6 +127,9 @@ class ApplicationCreateParams(TypedDict, total=False):
Tags are used to filter applications in the App Launcher dashboard.
"""
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]
"""The application type."""
class CorsHeaders(TypedDict, total=False):
allow_all_headers: bool

View file

@ -3,7 +3,7 @@
from __future__ import annotations
from typing import List, Union, Iterable
from typing_extensions import Literal, Required, TypedDict
from typing_extensions import Literal, TypedDict
__all__ = [
"ApplicationUpdateParams",
@ -17,12 +17,6 @@ __all__ = [
class ApplicationUpdateParams(TypedDict, total=False):
domain: Required[object]
"""The URL or domain of the bookmark."""
type: Required[Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]]
"""The application type."""
account_id: str
"""The Account ID to use for this endpoint. Mutually exclusive with the Zone ID."""
@ -76,6 +70,9 @@ class ApplicationUpdateParams(TypedDict, total=False):
custom_pages: List[str]
"""The custom pages that will be displayed when applicable for this application"""
domain: object
"""The URL or domain of the bookmark."""
enable_binding_cookie: bool
"""
Enables the binding cookie, which increases security against compromised
@ -130,6 +127,9 @@ class ApplicationUpdateParams(TypedDict, total=False):
Tags are used to filter applications in the App Launcher dashboard.
"""
type: Literal["self_hosted", "saas", "ssh", "vnc", "app_launcher", "warp", "biso", "bookmark", "dash_sso"]
"""The application type."""
class CorsHeaders(TypedDict, total=False):
allow_all_headers: bool

View file

@ -32,9 +32,7 @@ class TestRecords:
def test_method_create(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
assert_matches_type(RecordCreateResponse, record, path=["response"])
@ -44,6 +42,10 @@ class TestRecords:
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
record = client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
type="URI",
comment="Domain verification record",
content={},
data={
"flags": {},
"tag": "issue",
@ -85,14 +87,11 @@ class TestRecords:
"fingerprint": "string",
"content": "http://example.com/example.html",
},
name="example.com",
priority=10,
type="URI",
comment="Domain verification record",
meta={
"auto_added": True,
"source": "primary",
},
priority=10,
proxied=False,
tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"],
ttl=3600,
@ -104,9 +103,7 @@ class TestRecords:
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -120,9 +117,7 @@ class TestRecords:
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
) as response:
assert not response.is_closed
@ -139,9 +134,7 @@ class TestRecords:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.dns.records.with_raw_response.create(
zone_id="",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -151,9 +144,7 @@ class TestRecords:
record = client.dns.records.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
assert_matches_type(RecordUpdateResponse, record, path=["response"])
@ -164,6 +155,10 @@ class TestRecords:
record = client.dns.records.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
type="URI",
comment="Domain verification record",
content={},
data={
"flags": {},
"tag": "issue",
@ -205,14 +200,11 @@ class TestRecords:
"fingerprint": "string",
"content": "http://example.com/example.html",
},
name="example.com",
priority=10,
type="URI",
comment="Domain verification record",
meta={
"auto_added": True,
"source": "primary",
},
priority=10,
proxied=False,
tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"],
ttl=3600,
@ -225,9 +217,7 @@ class TestRecords:
response = client.dns.records.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -242,9 +232,7 @@ class TestRecords:
with client.dns.records.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
) as response:
assert not response.is_closed
@ -262,9 +250,7 @@ class TestRecords:
client.dns.records.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -272,9 +258,7 @@ class TestRecords:
client.dns.records.with_raw_response.update(
"",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -413,9 +397,7 @@ class TestRecords:
record = client.dns.records.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
assert_matches_type(RecordEditResponse, record, path=["response"])
@ -426,6 +408,10 @@ class TestRecords:
record = client.dns.records.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
type="URI",
comment="Domain verification record",
content={},
data={
"flags": {},
"tag": "issue",
@ -467,14 +453,11 @@ class TestRecords:
"fingerprint": "string",
"content": "http://example.com/example.html",
},
name="example.com",
priority=10,
type="URI",
comment="Domain verification record",
meta={
"auto_added": True,
"source": "primary",
},
priority=10,
proxied=False,
tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"],
ttl=3600,
@ -487,9 +470,7 @@ class TestRecords:
response = client.dns.records.with_raw_response.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -504,9 +485,7 @@ class TestRecords:
with client.dns.records.with_streaming_response.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
) as response:
assert not response.is_closed
@ -524,9 +503,7 @@ class TestRecords:
client.dns.records.with_raw_response.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -534,9 +511,7 @@ class TestRecords:
client.dns.records.with_raw_response.edit(
"",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -741,9 +716,7 @@ class TestAsyncRecords:
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
assert_matches_type(RecordCreateResponse, record, path=["response"])
@ -753,6 +726,10 @@ class TestAsyncRecords:
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
record = await async_client.dns.records.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
type="URI",
comment="Domain verification record",
content={},
data={
"flags": {},
"tag": "issue",
@ -794,14 +771,11 @@ class TestAsyncRecords:
"fingerprint": "string",
"content": "http://example.com/example.html",
},
name="example.com",
priority=10,
type="URI",
comment="Domain verification record",
meta={
"auto_added": True,
"source": "primary",
},
priority=10,
proxied=False,
tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"],
ttl=3600,
@ -813,9 +787,7 @@ class TestAsyncRecords:
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.dns.records.with_raw_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -829,9 +801,7 @@ class TestAsyncRecords:
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.dns.records.with_streaming_response.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
) as response:
assert not response.is_closed
@ -848,9 +818,7 @@ class TestAsyncRecords:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.dns.records.with_raw_response.create(
zone_id="",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -860,9 +828,7 @@ class TestAsyncRecords:
record = await async_client.dns.records.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
assert_matches_type(RecordUpdateResponse, record, path=["response"])
@ -873,6 +839,10 @@ class TestAsyncRecords:
record = await async_client.dns.records.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
type="URI",
comment="Domain verification record",
content={},
data={
"flags": {},
"tag": "issue",
@ -914,14 +884,11 @@ class TestAsyncRecords:
"fingerprint": "string",
"content": "http://example.com/example.html",
},
name="example.com",
priority=10,
type="URI",
comment="Domain verification record",
meta={
"auto_added": True,
"source": "primary",
},
priority=10,
proxied=False,
tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"],
ttl=3600,
@ -934,9 +901,7 @@ class TestAsyncRecords:
response = await async_client.dns.records.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -951,9 +916,7 @@ class TestAsyncRecords:
async with async_client.dns.records.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
) as response:
assert not response.is_closed
@ -971,9 +934,7 @@ class TestAsyncRecords:
await async_client.dns.records.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -981,9 +942,7 @@ class TestAsyncRecords:
await async_client.dns.records.with_raw_response.update(
"",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -1122,9 +1081,7 @@ class TestAsyncRecords:
record = await async_client.dns.records.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
assert_matches_type(RecordEditResponse, record, path=["response"])
@ -1135,6 +1092,10 @@ class TestAsyncRecords:
record = await async_client.dns.records.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example.com",
type="URI",
comment="Domain verification record",
content={},
data={
"flags": {},
"tag": "issue",
@ -1176,14 +1137,11 @@ class TestAsyncRecords:
"fingerprint": "string",
"content": "http://example.com/example.html",
},
name="example.com",
priority=10,
type="URI",
comment="Domain verification record",
meta={
"auto_added": True,
"source": "primary",
},
priority=10,
proxied=False,
tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"],
ttl=3600,
@ -1196,9 +1154,7 @@ class TestAsyncRecords:
response = await async_client.dns.records.with_raw_response.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -1213,9 +1169,7 @@ class TestAsyncRecords:
async with async_client.dns.records.with_streaming_response.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
) as response:
assert not response.is_closed
@ -1233,9 +1187,7 @@ class TestAsyncRecords:
await async_client.dns.records.with_raw_response.edit(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_id="",
data={},
name="example.com",
priority=10,
type="URI",
)
@ -1243,9 +1195,7 @@ class TestAsyncRecords:
await async_client.dns.records.with_raw_response.edit(
"",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
data={},
name="example.com",
priority=10,
type="URI",
)

View file

@ -22,9 +22,6 @@ class TestPCAPs:
def test_method_create(self, client: Cloudflare) -> None:
pcap = client.pcaps.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
@ -36,13 +33,12 @@ class TestPCAPs:
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
pcap = client.pcaps.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
byte_limit=500000,
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
filter_v1={
"destination_address": "1.2.3.4",
"destination_port": 80,
@ -50,6 +46,7 @@ class TestPCAPs:
"source_address": "1.2.3.4",
"source_port": 123,
},
packet_limit=10000,
)
assert_matches_type(PCAPCreateResponse, pcap, path=["response"])
@ -58,9 +55,6 @@ class TestPCAPs:
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.pcaps.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
@ -76,9 +70,6 @@ class TestPCAPs:
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.pcaps.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
@ -97,9 +88,6 @@ class TestPCAPs:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.pcaps.with_raw_response.create(
account_id="",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
@ -208,9 +196,6 @@ class TestAsyncPCAPs:
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
pcap = await async_client.pcaps.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
@ -222,13 +207,12 @@ class TestAsyncPCAPs:
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
pcap = await async_client.pcaps.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
byte_limit=500000,
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
filter_v1={
"destination_address": "1.2.3.4",
"destination_port": 80,
@ -236,6 +220,7 @@ class TestAsyncPCAPs:
"source_address": "1.2.3.4",
"source_port": 123,
},
packet_limit=10000,
)
assert_matches_type(PCAPCreateResponse, pcap, path=["response"])
@ -244,9 +229,6 @@ class TestAsyncPCAPs:
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.pcaps.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
@ -262,9 +244,6 @@ class TestAsyncPCAPs:
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.pcaps.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",
@ -283,9 +262,6 @@ class TestAsyncPCAPs:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.pcaps.with_raw_response.create(
account_id="",
colo_name="ord02",
destination_conf="s3://pcaps-bucket?region=us-east-1",
packet_limit=10000,
system="magic-transit",
time_limit=300,
type="simple",

View file

@ -25,8 +25,6 @@ class TestApplications:
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
application = client.zero_trust.access.applications.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
)
@ -36,8 +34,6 @@ class TestApplications:
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
application = client.zero_trust.access.applications.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
allow_authenticate_via_warp=True,
@ -66,6 +62,7 @@ class TestApplications:
"699d98642c564d2e855e9661899b7252",
"699d98642c564d2e855e9661899b7252",
],
domain="https://mybookmark.com",
enable_binding_cookie=True,
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
@ -93,6 +90,7 @@ class TestApplications:
session_duration="24h",
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
type="bookmark",
)
assert_matches_type(AccessApps, application, path=["response"])
@ -100,8 +98,6 @@ class TestApplications:
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
response = client.zero_trust.access.applications.with_raw_response.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
)
@ -115,8 +111,6 @@ class TestApplications:
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
with client.zero_trust.access.applications.with_streaming_response.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
) as response:
@ -133,16 +127,12 @@ class TestApplications:
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.zero_trust.access.applications.with_raw_response.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="",
zone_id="string",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.zero_trust.access.applications.with_raw_response.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="",
)
@ -152,8 +142,6 @@ class TestApplications:
def test_method_update(self, client: Cloudflare) -> None:
application = client.zero_trust.access.applications.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
)
@ -164,8 +152,6 @@ class TestApplications:
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
application = client.zero_trust.access.applications.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
allow_authenticate_via_warp=True,
@ -194,6 +180,7 @@ class TestApplications:
"699d98642c564d2e855e9661899b7252",
"699d98642c564d2e855e9661899b7252",
],
domain="https://mybookmark.com",
enable_binding_cookie=True,
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
@ -221,6 +208,7 @@ class TestApplications:
session_duration="24h",
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
type="bookmark",
)
assert_matches_type(AccessApps, application, path=["response"])
@ -229,8 +217,6 @@ class TestApplications:
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.zero_trust.access.applications.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
)
@ -245,8 +231,6 @@ class TestApplications:
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.zero_trust.access.applications.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
) as response:
@ -264,8 +248,6 @@ class TestApplications:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.zero_trust.access.applications.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="",
zone_id="string",
)
@ -273,8 +255,6 @@ class TestApplications:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.zero_trust.access.applications.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="",
)
@ -549,8 +529,6 @@ class TestAsyncApplications:
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
application = await async_client.zero_trust.access.applications.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
)
@ -560,8 +538,6 @@ class TestAsyncApplications:
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
application = await async_client.zero_trust.access.applications.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
allow_authenticate_via_warp=True,
@ -590,6 +566,7 @@ class TestAsyncApplications:
"699d98642c564d2e855e9661899b7252",
"699d98642c564d2e855e9661899b7252",
],
domain="https://mybookmark.com",
enable_binding_cookie=True,
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
@ -617,6 +594,7 @@ class TestAsyncApplications:
session_duration="24h",
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
type="bookmark",
)
assert_matches_type(AccessApps, application, path=["response"])
@ -624,8 +602,6 @@ class TestAsyncApplications:
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.access.applications.with_raw_response.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
)
@ -639,8 +615,6 @@ class TestAsyncApplications:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
async with async_client.zero_trust.access.applications.with_streaming_response.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
) as response:
@ -657,16 +631,12 @@ class TestAsyncApplications:
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.zero_trust.access.applications.with_raw_response.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="",
zone_id="string",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.zero_trust.access.applications.with_raw_response.create(
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="",
)
@ -676,8 +646,6 @@ class TestAsyncApplications:
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
application = await async_client.zero_trust.access.applications.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
)
@ -688,8 +656,6 @@ class TestAsyncApplications:
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
application = await async_client.zero_trust.access.applications.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
allow_authenticate_via_warp=True,
@ -718,6 +684,7 @@ class TestAsyncApplications:
"699d98642c564d2e855e9661899b7252",
"699d98642c564d2e855e9661899b7252",
],
domain="https://mybookmark.com",
enable_binding_cookie=True,
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
@ -745,6 +712,7 @@ class TestAsyncApplications:
session_duration="24h",
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
type="bookmark",
)
assert_matches_type(AccessApps, application, path=["response"])
@ -753,8 +721,6 @@ class TestAsyncApplications:
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.zero_trust.access.applications.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
)
@ -769,8 +735,6 @@ class TestAsyncApplications:
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
async with async_client.zero_trust.access.applications.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="string",
) as response:
@ -788,8 +752,6 @@ class TestAsyncApplications:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.zero_trust.access.applications.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="",
zone_id="string",
)
@ -797,8 +759,6 @@ class TestAsyncApplications:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.zero_trust.access.applications.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
domain="https://mybookmark.com",
type="bookmark",
account_id="string",
zone_id="",
)