diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index be04e38f6b4..72c5b630e8b 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -58,12 +58,33 @@ def create( self, *, zone_id: str, + data: record_create_params.Data, name: str, - type: Literal["URI"], + priority: float, + type: Literal[ + "URI", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ], comment: str | 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, @@ -89,14 +110,14 @@ def create( 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. - 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. @@ -122,12 +143,12 @@ def create( f"/zones/{zone_id}/dns_records", body=maybe_transform( { + "data": data, "name": name, + "priority": priority, "type": type, "comment": comment, - "data": data, "meta": meta, - "priority": priority, "proxied": proxied, "tags": tags, "ttl": ttl, @@ -152,12 +173,33 @@ def update( dns_record_id: str, *, zone_id: str, + data: record_update_params.Data, name: str, - type: Literal["URI"], + priority: float, + type: Literal[ + "URI", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ], comment: str | 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, @@ -184,14 +226,14 @@ def update( 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. - 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. @@ -219,12 +261,12 @@ def update( f"/zones/{zone_id}/dns_records/{dns_record_id}", body=maybe_transform( { + "data": data, "name": name, + "priority": priority, "type": type, "comment": comment, - "data": data, "meta": meta, - "priority": priority, "proxied": proxied, "tags": tags, "ttl": ttl, @@ -418,12 +460,33 @@ def edit( dns_record_id: str, *, zone_id: str, + data: record_edit_params.Data, name: str, - type: Literal["URI"], + priority: float, + type: Literal[ + "URI", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ], comment: str | 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, @@ -450,14 +513,14 @@ def edit( 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. - 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. @@ -485,12 +548,12 @@ def edit( f"/zones/{zone_id}/dns_records/{dns_record_id}", body=maybe_transform( { + "data": data, "name": name, + "priority": priority, "type": type, "comment": comment, - "data": data, "meta": meta, - "priority": priority, "proxied": proxied, "tags": tags, "ttl": ttl, @@ -720,12 +783,33 @@ async def create( self, *, zone_id: str, + data: record_create_params.Data, name: str, - type: Literal["URI"], + priority: float, + type: Literal[ + "URI", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ], comment: str | 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, @@ -751,14 +835,14 @@ async def create( 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. - 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. @@ -784,12 +868,12 @@ async def create( f"/zones/{zone_id}/dns_records", body=await async_maybe_transform( { + "data": data, "name": name, + "priority": priority, "type": type, "comment": comment, - "data": data, "meta": meta, - "priority": priority, "proxied": proxied, "tags": tags, "ttl": ttl, @@ -814,12 +898,33 @@ async def update( dns_record_id: str, *, zone_id: str, + data: record_update_params.Data, name: str, - type: Literal["URI"], + priority: float, + type: Literal[ + "URI", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ], comment: str | 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, @@ -846,14 +951,14 @@ async def update( 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. - 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. @@ -881,12 +986,12 @@ async def update( f"/zones/{zone_id}/dns_records/{dns_record_id}", body=await async_maybe_transform( { + "data": data, "name": name, + "priority": priority, "type": type, "comment": comment, - "data": data, "meta": meta, - "priority": priority, "proxied": proxied, "tags": tags, "ttl": ttl, @@ -1080,12 +1185,33 @@ async def edit( dns_record_id: str, *, zone_id: str, + data: record_edit_params.Data, name: str, - type: Literal["URI"], + priority: float, + type: Literal[ + "URI", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ], comment: str | 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, @@ -1112,14 +1238,14 @@ async def edit( 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. - 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. @@ -1147,12 +1273,12 @@ async def edit( f"/zones/{zone_id}/dns_records/{dns_record_id}", body=await async_maybe_transform( { + "data": data, "name": name, + "priority": priority, "type": type, "comment": comment, - "data": data, "meta": meta, - "priority": priority, "proxied": proxied, "tags": tags, "ttl": ttl, diff --git a/src/cloudflare/resources/pcaps/pcaps.py b/src/cloudflare/resources/pcaps/pcaps.py index b22a74ff76c..9c95aa6407b 100644 --- a/src/cloudflare/resources/pcaps/pcaps.py +++ b/src/cloudflare/resources/pcaps/pcaps.py @@ -66,14 +66,14 @@ def create( 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,6 +87,14 @@ def create( 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. @@ -97,14 +105,6 @@ def create( 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 @@ def create( 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 @@ async def create( 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,6 +276,14 @@ async def create( 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. @@ -286,14 +294,6 @@ async def create( 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 @@ async def create( 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, ), diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index 713e0b515ba..783b2e849b5 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import Any, List, Type, Union, Optional, cast +from typing_extensions import Literal import httpx @@ -82,6 +83,8 @@ def with_streaming_response(self) -> ApplicationsWithStreamingResponse: 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, @@ -93,7 +96,6 @@ def create( 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, @@ -106,7 +108,6 @@ def create( session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, tags: List[str] | NotGiven = NOT_GIVEN, - type: str | 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, @@ -118,6 +119,10 @@ def create( 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. @@ -144,8 +149,6 @@ def create( 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. @@ -175,8 +178,6 @@ def create( 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 @@ -206,6 +207,8 @@ def create( 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, @@ -215,7 +218,6 @@ def create( "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, @@ -228,7 +230,6 @@ def create( "session_duration": session_duration, "skip_interstitial": skip_interstitial, "tags": tags, - "type": type, }, application_create_params.ApplicationCreateParams, ), @@ -249,6 +250,8 @@ def update( 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, @@ -260,7 +263,6 @@ def update( 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, @@ -273,7 +275,6 @@ def update( session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, tags: List[str] | NotGiven = NOT_GIVEN, - type: str | 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, @@ -287,6 +288,10 @@ def update( 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. @@ -313,8 +318,6 @@ def update( 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. @@ -344,8 +347,6 @@ def update( 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 @@ -375,6 +376,8 @@ def update( 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, @@ -384,7 +387,6 @@ def update( "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, @@ -397,7 +399,6 @@ def update( "session_duration": session_duration, "skip_interstitial": skip_interstitial, "tags": tags, - "type": type, }, application_update_params.ApplicationUpdateParams, ), @@ -673,6 +674,8 @@ def with_streaming_response(self) -> AsyncApplicationsWithStreamingResponse: 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, @@ -684,7 +687,6 @@ async def create( 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, @@ -697,7 +699,6 @@ async def create( session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, tags: List[str] | NotGiven = NOT_GIVEN, - type: str | 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, @@ -709,6 +710,10 @@ async def create( 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. @@ -735,8 +740,6 @@ async def create( 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. @@ -766,8 +769,6 @@ async def create( 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 @@ -797,6 +798,8 @@ async def create( 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, @@ -806,7 +809,6 @@ async def create( "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, @@ -819,7 +821,6 @@ async def create( "session_duration": session_duration, "skip_interstitial": skip_interstitial, "tags": tags, - "type": type, }, application_create_params.ApplicationCreateParams, ), @@ -840,6 +841,8 @@ async def update( 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, @@ -851,7 +854,6 @@ async def update( 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, @@ -864,7 +866,6 @@ async def update( session_duration: str | NotGiven = NOT_GIVEN, skip_interstitial: bool | NotGiven = NOT_GIVEN, tags: List[str] | NotGiven = NOT_GIVEN, - type: str | 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, @@ -878,6 +879,10 @@ async def update( 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. @@ -904,8 +909,6 @@ async def update( 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. @@ -935,8 +938,6 @@ async def update( 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 @@ -966,6 +967,8 @@ async def update( 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, @@ -975,7 +978,6 @@ async def update( "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, @@ -988,7 +990,6 @@ async def update( "session_duration": session_duration, "skip_interstitial": skip_interstitial, "tags": tags, - "type": type, }, application_update_params.ApplicationUpdateParams, ), diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py index cad0e751873..682e1e13c71 100644 --- a/src/cloudflare/types/dns/record_create_params.py +++ b/src/cloudflare/types/dns/record_create_params.py @@ -12,10 +12,41 @@ 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.""" - type: Required[Literal["URI"]] + 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", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ] + ] """Record type.""" comment: str @@ -24,16 +55,8 @@ class RecordCreateParams(TypedDict, total=False): This field has no effect on DNS responses. """ - 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 @@ -73,7 +96,7 @@ class Data(TypedDict, total=False): fingerprint: str """fingerprint.""" - flags: str + flags: object """Flags.""" key_tag: float diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py index cb602b73b51..7d8d4627507 100644 --- a/src/cloudflare/types/dns/record_edit_params.py +++ b/src/cloudflare/types/dns/record_edit_params.py @@ -12,10 +12,41 @@ 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.""" - type: Required[Literal["URI"]] + 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", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ] + ] """Record type.""" comment: str @@ -24,16 +55,8 @@ class RecordEditParams(TypedDict, total=False): This field has no effect on DNS responses. """ - 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 @@ -73,7 +96,7 @@ class Data(TypedDict, total=False): fingerprint: str """fingerprint.""" - flags: str + flags: object """Flags.""" key_tag: float diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py index eead5724c75..6de57b2d3b5 100644 --- a/src/cloudflare/types/dns/record_update_params.py +++ b/src/cloudflare/types/dns/record_update_params.py @@ -12,10 +12,41 @@ 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.""" - type: Required[Literal["URI"]] + 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", + "TXT", + "TLSA", + "SVCB", + "SSHFP", + "SRV", + "SMIMEA", + "PTR", + "NS", + "NAPTR", + "MX", + "LOC", + "HTTPS", + "DS", + "DNSKEY", + "CNAME", + "CERT", + "CAA", + "AAAA", + "A", + ] + ] """Record type.""" comment: str @@ -24,16 +55,8 @@ class RecordUpdateParams(TypedDict, total=False): This field has no effect on DNS responses. """ - 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 @@ -73,7 +96,7 @@ class Data(TypedDict, total=False): fingerprint: str """fingerprint.""" - flags: str + flags: object """Flags.""" key_tag: float diff --git a/src/cloudflare/types/pcap_create_params.py b/src/cloudflare/types/pcap_create_params.py index f73c38da082..05be7c6d1a9 100644 --- a/src/cloudflare/types/pcap_create_params.py +++ b/src/cloudflare/types/pcap_create_params.py @@ -11,6 +11,19 @@ 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.""" @@ -30,21 +43,8 @@ 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 diff --git a/src/cloudflare/types/r2/sippy_update_params.py b/src/cloudflare/types/r2/sippy_update_params.py index afbe697ba9b..54df4649070 100644 --- a/src/cloudflare/types/r2/sippy_update_params.py +++ b/src/cloudflare/types/r2/sippy_update_params.py @@ -55,7 +55,7 @@ class Source(TypedDict, total=False): private_key: Annotated[str, PropertyInfo(alias="privateKey")] """Private Key of an IAM credential (ideally scoped to a single GCS bucket)""" - provider: Literal["gcs"] + provider: Literal["gcs", "aws"] region: str """Name of the AWS availability zone""" diff --git a/src/cloudflare/types/zero_trust/access/application_create_params.py b/src/cloudflare/types/zero_trust/access/application_create_params.py index 41e60b17452..97873dfc3b4 100644 --- a/src/cloudflare/types/zero_trust/access/application_create_params.py +++ b/src/cloudflare/types/zero_trust/access/application_create_params.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import List, Union, Iterable -from typing_extensions import Literal, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = [ "ApplicationCreateParams", @@ -17,6 +17,12 @@ 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.""" @@ -70,9 +76,6 @@ 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 @@ -127,9 +130,6 @@ class ApplicationCreateParams(TypedDict, total=False): Tags are used to filter applications in the App Launcher dashboard. """ - type: str - """The application type.""" - class CorsHeaders(TypedDict, total=False): allow_all_headers: bool diff --git a/src/cloudflare/types/zero_trust/access/application_update_params.py b/src/cloudflare/types/zero_trust/access/application_update_params.py index 4c670113154..ff4cf930a50 100644 --- a/src/cloudflare/types/zero_trust/access/application_update_params.py +++ b/src/cloudflare/types/zero_trust/access/application_update_params.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import List, Union, Iterable -from typing_extensions import Literal, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = [ "ApplicationUpdateParams", @@ -17,6 +17,12 @@ 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.""" @@ -70,9 +76,6 @@ 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 @@ -127,9 +130,6 @@ class ApplicationUpdateParams(TypedDict, total=False): Tags are used to filter applications in the App Launcher dashboard. """ - type: str - """The application type.""" - class CorsHeaders(TypedDict, total=False): allow_all_headers: bool diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 706e260cf28..8489cdf0e4a 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -32,7 +32,9 @@ 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"]) @@ -42,11 +44,8 @@ def test_method_create(self, client: Cloudflare) -> None: 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", data={ - "flags": "string", + "flags": {}, "tag": "issue", "value": 'alpn="h3,h2" ipv4hint="127.0.0.1" ipv6hint="::1"', "algorithm": 2, @@ -86,11 +85,14 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "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, @@ -102,7 +104,9 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: 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", ) @@ -116,7 +120,9 @@ def test_raw_response_create(self, client: Cloudflare) -> None: 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 @@ -133,7 +139,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: 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", ) @@ -143,7 +151,9 @@ def test_method_update(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) assert_matches_type(RecordUpdateResponse, record, path=["response"]) @@ -154,11 +164,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: record = client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - name="example.com", - type="URI", - comment="Domain verification record", data={ - "flags": "string", + "flags": {}, "tag": "issue", "value": 'alpn="h3,h2" ipv4hint="127.0.0.1" ipv6hint="::1"', "algorithm": 2, @@ -198,11 +205,14 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "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, @@ -215,7 +225,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) @@ -230,7 +242,9 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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 @@ -248,7 +262,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", + data={}, name="example.com", + priority=10, type="URI", ) @@ -256,7 +272,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.update( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) @@ -395,7 +413,9 @@ def test_method_edit(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) assert_matches_type(RecordEditResponse, record, path=["response"]) @@ -406,11 +426,8 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: record = client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - name="example.com", - type="URI", - comment="Domain verification record", data={ - "flags": "string", + "flags": {}, "tag": "issue", "value": 'alpn="h3,h2" ipv4hint="127.0.0.1" ipv6hint="::1"', "algorithm": 2, @@ -450,11 +467,14 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "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, @@ -467,7 +487,9 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) @@ -482,7 +504,9 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 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 @@ -500,7 +524,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", + data={}, name="example.com", + priority=10, type="URI", ) @@ -508,7 +534,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.edit( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) @@ -713,7 +741,9 @@ 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"]) @@ -723,11 +753,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: 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", data={ - "flags": "string", + "flags": {}, "tag": "issue", "value": 'alpn="h3,h2" ipv4hint="127.0.0.1" ipv6hint="::1"', "algorithm": 2, @@ -767,11 +794,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "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, @@ -783,7 +813,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare 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", ) @@ -797,7 +829,9 @@ 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.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) as response: assert not response.is_closed @@ -814,7 +848,9 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: 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", ) @@ -824,7 +860,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: 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"]) @@ -835,11 +873,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare record = await async_client.dns.records.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - name="example.com", - type="URI", - comment="Domain verification record", data={ - "flags": "string", + "flags": {}, "tag": "issue", "value": 'alpn="h3,h2" ipv4hint="127.0.0.1" ipv6hint="::1"', "algorithm": 2, @@ -879,11 +914,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "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, @@ -896,7 +934,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) @@ -911,7 +951,9 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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 @@ -929,7 +971,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.dns.records.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", + data={}, name="example.com", + priority=10, type="URI", ) @@ -937,7 +981,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.dns.records.with_raw_response.update( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) @@ -1076,7 +1122,9 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: 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"]) @@ -1087,11 +1135,8 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) record = await async_client.dns.records.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - name="example.com", - type="URI", - comment="Domain verification record", data={ - "flags": "string", + "flags": {}, "tag": "issue", "value": 'alpn="h3,h2" ipv4hint="127.0.0.1" ipv6hint="::1"', "algorithm": 2, @@ -1131,11 +1176,14 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "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, @@ -1148,7 +1196,9 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) @@ -1163,7 +1213,9 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 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 @@ -1181,7 +1233,9 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: await async_client.dns.records.with_raw_response.edit( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", + data={}, name="example.com", + priority=10, type="URI", ) @@ -1189,7 +1243,9 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: await async_client.dns.records.with_raw_response.edit( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", + data={}, name="example.com", + priority=10, type="URI", ) diff --git a/tests/api_resources/test_pcaps.py b/tests/api_resources/test_pcaps.py index 45b7207c89c..a93453905af 100644 --- a/tests/api_resources/test_pcaps.py +++ b/tests/api_resources/test_pcaps.py @@ -22,6 +22,9 @@ 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", @@ -33,12 +36,13 @@ def test_method_create(self, client: Cloudflare) -> None: 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, @@ -46,7 +50,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "source_address": "1.2.3.4", "source_port": 123, }, - packet_limit=10000, ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) @@ -55,6 +58,9 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: 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", @@ -70,6 +76,9 @@ def test_raw_response_create(self, client: Cloudflare) -> None: 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", @@ -88,6 +97,9 @@ 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.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", @@ -196,6 +208,9 @@ 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", @@ -207,12 +222,13 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: 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, @@ -220,7 +236,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "source_address": "1.2.3.4", "source_port": 123, }, - packet_limit=10000, ) assert_matches_type(PCAPCreateResponse, pcap, path=["response"]) @@ -229,6 +244,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare 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", @@ -244,6 +262,9 @@ 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.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", @@ -262,6 +283,9 @@ 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.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", diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index add993f4720..cde5a8b17a1 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -25,6 +25,8 @@ 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", ) @@ -34,6 +36,8 @@ def test_method_create(self, client: Cloudflare) -> None: @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, @@ -62,7 +66,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "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", @@ -90,7 +93,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: session_duration="24h", skip_interstitial=True, tags=["engineers", "engineers", "engineers"], - type="bookmark", ) assert_matches_type(AccessApps, application, path=["response"]) @@ -98,6 +100,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @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", ) @@ -111,6 +115,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @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: @@ -127,12 +133,16 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: 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="", ) @@ -142,6 +152,8 @@ def test_path_params_create(self, client: Cloudflare) -> None: 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", ) @@ -152,6 +164,8 @@ def test_method_update(self, client: Cloudflare) -> None: 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, @@ -180,7 +194,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "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", @@ -208,7 +221,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: session_duration="24h", skip_interstitial=True, tags=["engineers", "engineers", "engineers"], - type="bookmark", ) assert_matches_type(AccessApps, application, path=["response"]) @@ -217,6 +229,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: 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", ) @@ -231,6 +245,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: 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: @@ -248,6 +264,8 @@ def test_path_params_update(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.update( "023e105f4ecef8ad9ca31a8372d0c353", + domain="https://mybookmark.com", + type="bookmark", account_id="", zone_id="string", ) @@ -255,6 +273,8 @@ def test_path_params_update(self, client: Cloudflare) -> None: 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="", ) @@ -529,6 +549,8 @@ 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", ) @@ -538,6 +560,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @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, @@ -566,7 +590,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "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", @@ -594,7 +617,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare session_duration="24h", skip_interstitial=True, tags=["engineers", "engineers", "engineers"], - type="bookmark", ) assert_matches_type(AccessApps, application, path=["response"]) @@ -602,6 +624,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @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", ) @@ -615,6 +639,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @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: @@ -631,12 +657,16 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> 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="", ) @@ -646,6 +676,8 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: 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", ) @@ -656,6 +688,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: 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, @@ -684,7 +718,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "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", @@ -712,7 +745,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare session_duration="24h", skip_interstitial=True, tags=["engineers", "engineers", "engineers"], - type="bookmark", ) assert_matches_type(AccessApps, application, path=["response"]) @@ -721,6 +753,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare 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", ) @@ -735,6 +769,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: 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: @@ -752,6 +788,8 @@ async def test_path_params_update(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.update( "023e105f4ecef8ad9ca31a8372d0c353", + domain="https://mybookmark.com", + type="bookmark", account_id="", zone_id="string", ) @@ -759,6 +797,8 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: 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="", )