From a2476e74a5df1d4ec6b3f0bf8fb81468ccd839b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 21:49:24 +0000 Subject: [PATCH 001/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 590d127c2cb..2d7f17ec3c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b15b44e0efd207de48e7e74e742b0b4b190c74f12a941a1a0ef59a51656a5224.yml openapi_spec_hash: 83243c9ee06f88d0fa91e9b185d8a42e -config_hash: 8601d43fd5ccaf9e3d08f26748a5a63a +config_hash: e4575ceccb44266d8c23990849b2a5ac From ad0f8c218463493e3a7798ed724debe91471ff35 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 00:10:33 +0000 Subject: [PATCH 002/392] chore(ci): enable for pull requests --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58fc28e9381..d0c4f8879e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,10 @@ on: - 'integrated/**' - 'stl-preview-head/**' - 'stl-preview-base/**' + pull_request: + branches-ignore: + - 'stl-preview-head/**' + - 'stl-preview-base/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 2f9af7be7ec065f07ed714c627777874b5e86f16 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 03:49:41 +0000 Subject: [PATCH 003/392] chore(api): TTL is required on DNS records --- .stats.yml | 4 +- src/cloudflare/resources/dns/records.py | 1296 ++++++++--------- src/cloudflare/types/dns/a_record.py | 14 +- src/cloudflare/types/dns/a_record_param.py | 14 +- src/cloudflare/types/dns/aaaa_record.py | 14 +- src/cloudflare/types/dns/aaaa_record_param.py | 14 +- src/cloudflare/types/dns/batch_patch_param.py | 14 +- src/cloudflare/types/dns/batch_put_param.py | 14 +- src/cloudflare/types/dns/caa_record.py | 14 +- src/cloudflare/types/dns/caa_record_param.py | 14 +- src/cloudflare/types/dns/cert_record.py | 14 +- src/cloudflare/types/dns/cert_record_param.py | 14 +- src/cloudflare/types/dns/cname_record.py | 14 +- .../types/dns/cname_record_param.py | 14 +- src/cloudflare/types/dns/dnskey_record.py | 14 +- .../types/dns/dnskey_record_param.py | 14 +- src/cloudflare/types/dns/ds_record.py | 14 +- src/cloudflare/types/dns/ds_record_param.py | 14 +- src/cloudflare/types/dns/https_record.py | 14 +- .../types/dns/https_record_param.py | 14 +- src/cloudflare/types/dns/loc_record.py | 14 +- src/cloudflare/types/dns/loc_record_param.py | 14 +- src/cloudflare/types/dns/mx_record.py | 14 +- src/cloudflare/types/dns/mx_record_param.py | 14 +- src/cloudflare/types/dns/naptr_record.py | 14 +- .../types/dns/naptr_record_param.py | 14 +- src/cloudflare/types/dns/ns_record.py | 14 +- src/cloudflare/types/dns/ns_record_param.py | 14 +- src/cloudflare/types/dns/ptr_record.py | 14 +- src/cloudflare/types/dns/ptr_record_param.py | 14 +- .../types/dns/record_batch_params.py | 14 +- .../types/dns/record_create_params.py | 294 ++-- .../types/dns/record_edit_params.py | 294 ++-- .../types/dns/record_update_params.py | 294 ++-- src/cloudflare/types/dns/smimea_record.py | 14 +- .../types/dns/smimea_record_param.py | 14 +- src/cloudflare/types/dns/srv_record.py | 14 +- src/cloudflare/types/dns/srv_record_param.py | 14 +- src/cloudflare/types/dns/sshfp_record.py | 14 +- .../types/dns/sshfp_record_param.py | 14 +- src/cloudflare/types/dns/svcb_record.py | 14 +- src/cloudflare/types/dns/svcb_record_param.py | 14 +- src/cloudflare/types/dns/tlsa_record.py | 14 +- src/cloudflare/types/dns/tlsa_record_param.py | 14 +- src/cloudflare/types/dns/txt_record.py | 14 +- src/cloudflare/types/dns/txt_record_param.py | 14 +- src/cloudflare/types/dns/uri_record.py | 14 +- src/cloudflare/types/dns/uri_record_param.py | 14 +- tests/api_resources/dns/test_records.py | 852 +++++++++-- 49 files changed, 2112 insertions(+), 1524 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2d7f17ec3c7..990c6efb477 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b15b44e0efd207de48e7e74e742b0b4b190c74f12a941a1a0ef59a51656a5224.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9cf8d97f015bd3c7509f68b4dea2c37dc5f97183372064702ea540b6dd999f8.yml openapi_spec_hash: 83243c9ee06f88d0fa91e9b185d8a42e -config_hash: e4575ceccb44266d8c23990849b2a5ac +config_hash: cce40d4d65a4d67d5df957a75a15b567 diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index 7fe82213b8c..d45b2de1d78 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -69,13 +69,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -98,6 +98,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -112,10 +116,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -132,13 +132,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -161,6 +161,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -175,10 +179,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -195,13 +195,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -224,6 +224,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -238,10 +242,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -258,6 +258,7 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -265,7 +266,6 @@ def create( proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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,6 +288,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -305,10 +309,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -325,13 +325,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -354,6 +354,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -368,10 +372,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -388,13 +388,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -417,6 +417,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -431,10 +435,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -451,13 +451,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -480,6 +480,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -494,10 +498,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -514,13 +514,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -543,6 +543,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -562,10 +566,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -582,13 +582,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -611,6 +611,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -625,10 +629,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -645,13 +645,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -674,6 +674,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -688,10 +692,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -708,13 +708,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -737,6 +737,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -751,10 +755,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -771,13 +771,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -800,6 +800,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -814,10 +818,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -834,13 +834,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -863,6 +863,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -877,10 +881,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -897,13 +897,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -926,6 +926,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -940,10 +944,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -960,13 +960,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -989,6 +989,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1003,10 +1007,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1023,13 +1023,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1052,6 +1052,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1066,10 +1070,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1086,13 +1086,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1115,6 +1115,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1129,10 +1133,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1149,13 +1149,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1178,6 +1178,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1192,10 +1196,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1212,13 +1212,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1241,6 +1241,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1255,10 +1259,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1275,13 +1275,13 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1304,6 +1304,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1318,10 +1322,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1338,6 +1338,7 @@ def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -1345,7 +1346,6 @@ def create( proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1368,6 +1368,10 @@ def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1385,10 +1389,6 @@ def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1399,12 +1399,13 @@ def create( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) def create( self, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -1433,7 +1434,6 @@ def create( | record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_create_params.CAARecordData | record_create_params.CERTRecordData @@ -1463,13 +1463,13 @@ def create( body=maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -1495,13 +1495,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1526,6 +1526,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1540,10 +1544,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1561,13 +1561,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1592,6 +1592,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1606,10 +1610,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1627,13 +1627,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1658,6 +1658,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1672,10 +1676,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1693,6 +1693,7 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -1700,7 +1701,6 @@ def update( proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1725,6 +1725,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1742,10 +1746,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1763,13 +1763,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1794,6 +1794,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1808,10 +1812,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1829,13 +1829,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1860,6 +1860,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1874,10 +1878,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1895,13 +1895,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1926,6 +1926,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -1940,10 +1944,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1961,13 +1961,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -1992,6 +1992,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2011,10 +2015,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2032,13 +2032,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2063,6 +2063,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2077,10 +2081,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2098,13 +2098,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2129,6 +2129,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2143,10 +2147,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2164,13 +2164,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2195,6 +2195,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2209,10 +2213,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2230,13 +2230,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2261,6 +2261,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2275,10 +2279,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2296,13 +2296,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2327,6 +2327,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2341,10 +2345,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2362,13 +2362,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2393,6 +2393,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2407,10 +2411,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2428,13 +2428,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2459,6 +2459,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2473,10 +2477,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2494,13 +2494,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2525,6 +2525,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2539,10 +2543,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2560,13 +2560,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2591,6 +2591,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2605,10 +2609,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2626,13 +2626,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2657,6 +2657,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2671,10 +2675,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2692,13 +2692,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2723,6 +2723,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2737,10 +2741,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2758,13 +2758,13 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2789,6 +2789,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2803,10 +2807,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2824,6 +2824,7 @@ def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -2831,7 +2832,6 @@ def update( proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -2856,6 +2856,10 @@ def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -2873,10 +2877,6 @@ def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2887,13 +2887,14 @@ def update( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) def update( self, dns_record_id: str, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -2922,7 +2923,6 @@ def update( | record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_update_params.CAARecordData | record_update_params.CERTRecordData @@ -2954,13 +2954,13 @@ def update( body=maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -3220,13 +3220,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3251,6 +3251,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3265,10 +3269,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3286,13 +3286,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3317,6 +3317,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3331,10 +3335,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3352,13 +3352,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3383,6 +3383,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3397,10 +3401,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3418,6 +3418,7 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -3425,7 +3426,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3450,6 +3450,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3467,10 +3471,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3488,13 +3488,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3519,6 +3519,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3533,10 +3537,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3554,13 +3554,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3585,6 +3585,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3599,10 +3603,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3620,13 +3620,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3651,6 +3651,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3665,10 +3669,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3686,13 +3686,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3717,6 +3717,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3736,10 +3740,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3757,13 +3757,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3788,6 +3788,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3802,10 +3806,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3823,13 +3823,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3854,6 +3854,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3868,10 +3872,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3889,13 +3889,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3920,6 +3920,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -3934,10 +3938,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3955,13 +3955,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -3986,6 +3986,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4000,10 +4004,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4021,13 +4021,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4052,6 +4052,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4066,10 +4070,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4087,13 +4087,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4118,6 +4118,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4132,10 +4136,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4153,13 +4153,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4184,6 +4184,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4198,10 +4202,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4219,13 +4219,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4250,6 +4250,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4264,10 +4268,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4285,13 +4285,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4316,6 +4316,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4330,10 +4334,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4351,13 +4351,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4382,6 +4382,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4396,10 +4400,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4417,13 +4417,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4448,6 +4448,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4462,10 +4466,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4483,13 +4483,13 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4514,6 +4514,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4528,10 +4532,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4549,6 +4549,7 @@ def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -4556,7 +4557,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4581,6 +4581,10 @@ def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4598,10 +4602,6 @@ def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4612,13 +4612,14 @@ def edit( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) def edit( self, dns_record_id: str, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -4645,7 +4646,6 @@ def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.ARecordSettings | record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_edit_params.CAARecordData | record_edit_params.CERTRecordData @@ -4677,13 +4677,13 @@ def edit( body=maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -4931,13 +4931,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -4960,6 +4960,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -4974,10 +4978,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4994,13 +4994,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5023,6 +5023,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5037,10 +5041,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5057,13 +5057,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5086,6 +5086,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5100,10 +5104,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5120,6 +5120,7 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -5127,7 +5128,6 @@ async def create( proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5150,6 +5150,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5167,10 +5171,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5187,13 +5187,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5216,6 +5216,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5230,10 +5234,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5250,13 +5250,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5279,6 +5279,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5293,10 +5297,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5313,13 +5313,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5342,6 +5342,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5356,10 +5360,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5376,13 +5376,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5405,6 +5405,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5424,10 +5428,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5444,13 +5444,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5473,6 +5473,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5487,10 +5491,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5507,13 +5507,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5536,6 +5536,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5550,10 +5554,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5570,13 +5570,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5599,6 +5599,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5613,10 +5617,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5633,13 +5633,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5662,6 +5662,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5676,10 +5680,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5696,13 +5696,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5725,6 +5725,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5739,10 +5743,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5759,13 +5759,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5788,6 +5788,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5802,10 +5806,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5822,13 +5822,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5851,6 +5851,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5865,10 +5869,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5885,13 +5885,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5914,6 +5914,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5928,10 +5932,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -5948,13 +5948,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -5977,6 +5977,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -5991,10 +5995,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6011,13 +6011,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6040,6 +6040,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6054,10 +6058,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6074,13 +6074,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6103,6 +6103,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6117,10 +6121,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6137,13 +6137,13 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6166,6 +6166,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6180,10 +6184,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6200,6 +6200,7 @@ async def create( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_create_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -6207,7 +6208,6 @@ async def create( proxied: bool | NotGiven = NOT_GIVEN, settings: record_create_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6230,6 +6230,10 @@ async def create( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6247,10 +6251,6 @@ async def create( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6261,12 +6261,13 @@ async def create( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) async def create( self, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -6295,7 +6296,6 @@ async def create( | record_create_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_create_params.CAARecordData | record_create_params.CERTRecordData @@ -6325,13 +6325,13 @@ async def create( body=await async_maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -6357,13 +6357,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6388,6 +6388,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6402,10 +6406,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6423,13 +6423,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6454,6 +6454,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6468,10 +6472,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6489,13 +6489,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6520,6 +6520,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6534,10 +6538,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6555,6 +6555,7 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -6562,7 +6563,6 @@ async def update( proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6587,6 +6587,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6604,10 +6608,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6625,13 +6625,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6656,6 +6656,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6670,10 +6674,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6691,13 +6691,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6722,6 +6722,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6736,10 +6740,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6757,13 +6757,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6788,6 +6788,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6802,10 +6806,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6823,13 +6823,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6854,6 +6854,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6873,10 +6877,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6894,13 +6894,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6925,6 +6925,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -6939,10 +6943,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -6960,13 +6960,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -6991,6 +6991,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7005,10 +7009,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7026,13 +7026,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7057,6 +7057,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7071,10 +7075,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7092,13 +7092,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7123,6 +7123,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7137,10 +7141,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7158,13 +7158,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7189,6 +7189,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7203,10 +7207,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7224,13 +7224,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7255,6 +7255,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7269,10 +7273,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7290,13 +7290,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7321,6 +7321,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7335,10 +7339,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7356,13 +7356,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7387,6 +7387,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7401,10 +7405,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7422,13 +7422,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7453,6 +7453,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7467,10 +7471,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7488,13 +7488,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7519,6 +7519,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7533,10 +7537,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7554,13 +7554,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7585,6 +7585,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7599,10 +7603,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7620,13 +7620,13 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7651,6 +7651,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7665,10 +7669,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7686,6 +7686,7 @@ async def update( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_update_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -7693,7 +7694,6 @@ async def update( proxied: bool | NotGiven = NOT_GIVEN, settings: record_update_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -7718,6 +7718,10 @@ async def update( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -7735,10 +7739,6 @@ async def update( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7749,13 +7749,14 @@ async def update( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) async def update( self, dns_record_id: str, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -7784,7 +7785,6 @@ async def update( | record_update_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_update_params.CAARecordData | record_update_params.CERTRecordData @@ -7816,13 +7816,13 @@ async def update( body=await async_maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, @@ -8082,13 +8082,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.ARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8113,6 +8113,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8127,10 +8131,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8148,13 +8148,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["AAAA"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.AAAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8179,6 +8179,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8193,10 +8197,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8214,13 +8214,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CNAME"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8245,6 +8245,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8259,10 +8263,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8280,6 +8280,7 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["MX"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, @@ -8287,7 +8288,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.MXRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8312,6 +8312,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8329,10 +8333,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8350,13 +8350,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NS"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.NSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8381,6 +8381,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8395,10 +8399,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8416,13 +8416,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["OPENPGPKEY"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DNSRecordsOpenpgpkeyRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8447,6 +8447,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8461,10 +8465,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8482,13 +8482,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["PTR"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.PTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8513,6 +8513,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8527,10 +8531,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8548,13 +8548,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TXT"], comment: str | NotGiven = NOT_GIVEN, content: str | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.TXTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8579,6 +8579,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8598,10 +8602,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8619,13 +8619,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CAA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.CAARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CAARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8650,6 +8650,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8664,10 +8668,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8685,13 +8685,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["CERT"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.CERTRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.CERTRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8716,6 +8716,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8730,10 +8734,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8751,13 +8751,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DNSKEY"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.DNSKEYRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DNSKEYRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8782,6 +8782,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8796,10 +8800,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8817,13 +8817,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["DS"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.DSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.DSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8848,6 +8848,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8862,10 +8866,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8883,13 +8883,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["HTTPS"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.HTTPSRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.HTTPSRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8914,6 +8914,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8928,10 +8932,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -8949,13 +8949,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["LOC"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.LOCRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.LOCRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -8980,6 +8980,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -8994,10 +8998,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9015,13 +9015,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["NAPTR"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.NAPTRRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.NAPTRRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9046,6 +9046,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9060,10 +9064,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9081,13 +9081,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SMIMEA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SMIMEARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SMIMEARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9112,6 +9112,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9126,10 +9130,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9147,13 +9147,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SRV"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SRVRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SRVRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9178,6 +9178,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9192,10 +9196,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9213,13 +9213,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SSHFP"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SSHFPRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SSHFPRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9244,6 +9244,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9258,10 +9262,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9279,13 +9279,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["SVCB"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.SVCBRecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.SVCBRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9310,6 +9310,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9324,10 +9328,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9345,13 +9345,13 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["TLSA"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.TLSARecordData | NotGiven = NOT_GIVEN, proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.TLSARecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9376,6 +9376,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9390,10 +9394,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9411,6 +9411,7 @@ async def edit( *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["URI"], comment: str | NotGiven = NOT_GIVEN, data: record_edit_params.URIRecordData | NotGiven = NOT_GIVEN, @@ -9418,7 +9419,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.URIRecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | 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, @@ -9443,6 +9443,10 @@ async def edit( name: DNS record name (or @ for the zone apex) in Punycode. + ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + Value must be between 60 and 86400, with the minimum reduced to 30 for + Enterprise zones. + type: Record type. comment: Comments or notes about the DNS record. This field has no effect on DNS @@ -9460,10 +9464,6 @@ async def edit( tags: Custom tags for the DNS record. This field has no effect on DNS responses. - ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. - Value must be between 60 and 86400, with the minimum reduced to 30 for - Enterprise zones. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -9474,13 +9474,14 @@ async def edit( """ ... - @required_args(["zone_id", "name", "type"]) + @required_args(["zone_id", "name", "ttl", "type"]) async def edit( self, dns_record_id: str, *, zone_id: str, name: str, + ttl: TTLParam, type: Literal["A"] | Literal["AAAA"] | Literal["CNAME"] @@ -9507,7 +9508,6 @@ async def edit( proxied: bool | NotGiven = NOT_GIVEN, settings: record_edit_params.ARecordSettings | record_edit_params.CNAMERecordSettings | NotGiven = NOT_GIVEN, tags: List[RecordTags] | NotGiven = NOT_GIVEN, - ttl: TTLParam | NotGiven = NOT_GIVEN, priority: float | NotGiven = NOT_GIVEN, data: record_edit_params.CAARecordData | record_edit_params.CERTRecordData @@ -9539,13 +9539,13 @@ async def edit( body=await async_maybe_transform( { "name": name, + "ttl": ttl, "type": type, "comment": comment, "content": content, "proxied": proxied, "settings": settings, "tags": tags, - "ttl": ttl, "priority": priority, "data": data, }, diff --git a/src/cloudflare/types/dns/a_record.py b/src/cloudflare/types/dns/a_record.py index 2dd809edd25..13dcaacf6c3 100644 --- a/src/cloudflare/types/dns/a_record.py +++ b/src/cloudflare/types/dns/a_record.py @@ -32,6 +32,13 @@ class ARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["A"] """Record type.""" @@ -55,10 +62,3 @@ class ARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/a_record_param.py b/src/cloudflare/types/dns/a_record_param.py index 60ceae7a5eb..be295ee88e8 100644 --- a/src/cloudflare/types/dns/a_record_param.py +++ b/src/cloudflare/types/dns/a_record_param.py @@ -33,6 +33,13 @@ class ARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["A"]] """Record type.""" @@ -56,10 +63,3 @@ class ARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/aaaa_record.py b/src/cloudflare/types/dns/aaaa_record.py index ee1099da332..2522f83b058 100644 --- a/src/cloudflare/types/dns/aaaa_record.py +++ b/src/cloudflare/types/dns/aaaa_record.py @@ -32,6 +32,13 @@ class AAAARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["AAAA"] """Record type.""" @@ -55,10 +62,3 @@ class AAAARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/aaaa_record_param.py b/src/cloudflare/types/dns/aaaa_record_param.py index f9cea4e61a9..f7b9414c26d 100644 --- a/src/cloudflare/types/dns/aaaa_record_param.py +++ b/src/cloudflare/types/dns/aaaa_record_param.py @@ -33,6 +33,13 @@ class AAAARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["AAAA"]] """Record type.""" @@ -56,10 +63,3 @@ class AAAARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/batch_patch_param.py b/src/cloudflare/types/dns/batch_patch_param.py index ce96ef8edce..1e60a7fff8f 100644 --- a/src/cloudflare/types/dns/batch_patch_param.py +++ b/src/cloudflare/types/dns/batch_patch_param.py @@ -105,6 +105,13 @@ class OpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -129,13 +136,6 @@ class OpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecord(PTRRecordParam, total=False): id: Required[str] diff --git a/src/cloudflare/types/dns/batch_put_param.py b/src/cloudflare/types/dns/batch_put_param.py index b747c350cfe..a22924e1f0b 100644 --- a/src/cloudflare/types/dns/batch_put_param.py +++ b/src/cloudflare/types/dns/batch_put_param.py @@ -105,6 +105,13 @@ class OpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -129,13 +136,6 @@ class OpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecord(PTRRecordParam, total=False): id: Required[str] diff --git a/src/cloudflare/types/dns/caa_record.py b/src/cloudflare/types/dns/caa_record.py index 1ef5bd859c2..db8b2a63f5d 100644 --- a/src/cloudflare/types/dns/caa_record.py +++ b/src/cloudflare/types/dns/caa_record.py @@ -43,6 +43,13 @@ class CAARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["CAA"] """Record type.""" @@ -69,10 +76,3 @@ class CAARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/caa_record_param.py b/src/cloudflare/types/dns/caa_record_param.py index b93e29827b2..d0e824f7999 100644 --- a/src/cloudflare/types/dns/caa_record_param.py +++ b/src/cloudflare/types/dns/caa_record_param.py @@ -44,6 +44,13 @@ class CAARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CAA"]] """Record type.""" @@ -67,10 +74,3 @@ class CAARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/cert_record.py b/src/cloudflare/types/dns/cert_record.py index 65b16674b18..6067b815486 100644 --- a/src/cloudflare/types/dns/cert_record.py +++ b/src/cloudflare/types/dns/cert_record.py @@ -46,6 +46,13 @@ class CERTRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["CERT"] """Record type.""" @@ -72,10 +79,3 @@ class CERTRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/cert_record_param.py b/src/cloudflare/types/dns/cert_record_param.py index 45693c6dca0..c4daeaa730f 100644 --- a/src/cloudflare/types/dns/cert_record_param.py +++ b/src/cloudflare/types/dns/cert_record_param.py @@ -47,6 +47,13 @@ class CERTRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CERT"]] """Record type.""" @@ -70,10 +77,3 @@ class CERTRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/cname_record.py b/src/cloudflare/types/dns/cname_record.py index 127dda55f61..62a38a2d048 100644 --- a/src/cloudflare/types/dns/cname_record.py +++ b/src/cloudflare/types/dns/cname_record.py @@ -40,6 +40,13 @@ class CNAMERecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["CNAME"] """Record type.""" @@ -63,10 +70,3 @@ class CNAMERecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/cname_record_param.py b/src/cloudflare/types/dns/cname_record_param.py index 8802ee8312d..5219a5de954 100644 --- a/src/cloudflare/types/dns/cname_record_param.py +++ b/src/cloudflare/types/dns/cname_record_param.py @@ -41,6 +41,13 @@ class CNAMERecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CNAME"]] """Record type.""" @@ -64,10 +71,3 @@ class CNAMERecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/dnskey_record.py b/src/cloudflare/types/dns/dnskey_record.py index bcb7831cc97..9f60483fe31 100644 --- a/src/cloudflare/types/dns/dnskey_record.py +++ b/src/cloudflare/types/dns/dnskey_record.py @@ -46,6 +46,13 @@ class DNSKEYRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["DNSKEY"] """Record type.""" @@ -72,10 +79,3 @@ class DNSKEYRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/dnskey_record_param.py b/src/cloudflare/types/dns/dnskey_record_param.py index 9476e6ac47b..74a888e5f15 100644 --- a/src/cloudflare/types/dns/dnskey_record_param.py +++ b/src/cloudflare/types/dns/dnskey_record_param.py @@ -47,6 +47,13 @@ class DNSKEYRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DNSKEY"]] """Record type.""" @@ -70,10 +77,3 @@ class DNSKEYRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ds_record.py b/src/cloudflare/types/dns/ds_record.py index 3af34140392..94efd3137aa 100644 --- a/src/cloudflare/types/dns/ds_record.py +++ b/src/cloudflare/types/dns/ds_record.py @@ -46,6 +46,13 @@ class DSRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["DS"] """Record type.""" @@ -72,10 +79,3 @@ class DSRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ds_record_param.py b/src/cloudflare/types/dns/ds_record_param.py index d696be3fa31..f50b033e0f1 100644 --- a/src/cloudflare/types/dns/ds_record_param.py +++ b/src/cloudflare/types/dns/ds_record_param.py @@ -47,6 +47,13 @@ class DSRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DS"]] """Record type.""" @@ -70,10 +77,3 @@ class DSRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/https_record.py b/src/cloudflare/types/dns/https_record.py index 80b38c42901..d7cda11cfba 100644 --- a/src/cloudflare/types/dns/https_record.py +++ b/src/cloudflare/types/dns/https_record.py @@ -43,6 +43,13 @@ class HTTPSRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["HTTPS"] """Record type.""" @@ -69,10 +76,3 @@ class HTTPSRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/https_record_param.py b/src/cloudflare/types/dns/https_record_param.py index 5636ae61c23..aa4befa7c73 100644 --- a/src/cloudflare/types/dns/https_record_param.py +++ b/src/cloudflare/types/dns/https_record_param.py @@ -44,6 +44,13 @@ class HTTPSRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["HTTPS"]] """Record type.""" @@ -67,10 +74,3 @@ class HTTPSRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/loc_record.py b/src/cloudflare/types/dns/loc_record.py index e485095d218..a714377b683 100644 --- a/src/cloudflare/types/dns/loc_record.py +++ b/src/cloudflare/types/dns/loc_record.py @@ -70,6 +70,13 @@ class LOCRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["LOC"] """Record type.""" @@ -96,10 +103,3 @@ class LOCRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/loc_record_param.py b/src/cloudflare/types/dns/loc_record_param.py index 00cb4b5225f..8dec7099270 100644 --- a/src/cloudflare/types/dns/loc_record_param.py +++ b/src/cloudflare/types/dns/loc_record_param.py @@ -71,6 +71,13 @@ class LOCRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["LOC"]] """Record type.""" @@ -94,10 +101,3 @@ class LOCRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/mx_record.py b/src/cloudflare/types/dns/mx_record.py index a27e72470f9..dd26678ac5b 100644 --- a/src/cloudflare/types/dns/mx_record.py +++ b/src/cloudflare/types/dns/mx_record.py @@ -32,6 +32,13 @@ class MXRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["MX"] """Record type.""" @@ -61,10 +68,3 @@ class MXRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/mx_record_param.py b/src/cloudflare/types/dns/mx_record_param.py index e3e17499870..98c3b1fbd01 100644 --- a/src/cloudflare/types/dns/mx_record_param.py +++ b/src/cloudflare/types/dns/mx_record_param.py @@ -33,6 +33,13 @@ class MXRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["MX"]] """Record type.""" @@ -62,10 +69,3 @@ class MXRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/naptr_record.py b/src/cloudflare/types/dns/naptr_record.py index 1fe64354fac..b35ae50aa85 100644 --- a/src/cloudflare/types/dns/naptr_record.py +++ b/src/cloudflare/types/dns/naptr_record.py @@ -52,6 +52,13 @@ class NAPTRRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["NAPTR"] """Record type.""" @@ -78,10 +85,3 @@ class NAPTRRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/naptr_record_param.py b/src/cloudflare/types/dns/naptr_record_param.py index 906b491c288..7890bb5123a 100644 --- a/src/cloudflare/types/dns/naptr_record_param.py +++ b/src/cloudflare/types/dns/naptr_record_param.py @@ -53,6 +53,13 @@ class NAPTRRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NAPTR"]] """Record type.""" @@ -76,10 +83,3 @@ class NAPTRRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ns_record.py b/src/cloudflare/types/dns/ns_record.py index db4c0bce8f3..8331850a7de 100644 --- a/src/cloudflare/types/dns/ns_record.py +++ b/src/cloudflare/types/dns/ns_record.py @@ -32,6 +32,13 @@ class NSRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["NS"] """Record type.""" @@ -55,10 +62,3 @@ class NSRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ns_record_param.py b/src/cloudflare/types/dns/ns_record_param.py index 8233112b1c8..84b238d47f5 100644 --- a/src/cloudflare/types/dns/ns_record_param.py +++ b/src/cloudflare/types/dns/ns_record_param.py @@ -33,6 +33,13 @@ class NSRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NS"]] """Record type.""" @@ -56,10 +63,3 @@ class NSRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ptr_record.py b/src/cloudflare/types/dns/ptr_record.py index ceafad5c9ad..55720adceb7 100644 --- a/src/cloudflare/types/dns/ptr_record.py +++ b/src/cloudflare/types/dns/ptr_record.py @@ -32,6 +32,13 @@ class PTRRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["PTR"] """Record type.""" @@ -55,10 +62,3 @@ class PTRRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/ptr_record_param.py b/src/cloudflare/types/dns/ptr_record_param.py index d5fbca6b7b7..fdb731e9a55 100644 --- a/src/cloudflare/types/dns/ptr_record_param.py +++ b/src/cloudflare/types/dns/ptr_record_param.py @@ -33,6 +33,13 @@ class PTRRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["PTR"]] """Record type.""" @@ -56,10 +63,3 @@ class PTRRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/record_batch_params.py b/src/cloudflare/types/dns/record_batch_params.py index 1bfa0dac5c2..03aac908b56 100644 --- a/src/cloudflare/types/dns/record_batch_params.py +++ b/src/cloudflare/types/dns/record_batch_params.py @@ -79,6 +79,13 @@ class PostDNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -103,13 +110,6 @@ class PostDNSRecordsOpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - Post: TypeAlias = Union[ ARecordParam, diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py index 64648001011..b452260454a 100644 --- a/src/cloudflare/types/dns/record_create_params.py +++ b/src/cloudflare/types/dns/record_create_params.py @@ -75,6 +75,13 @@ class ARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["A"]] """Record type.""" @@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class ARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -132,6 +132,13 @@ class AAAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["AAAA"]] """Record type.""" @@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class AAAARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -189,6 +189,13 @@ class CNAMERecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CNAME"]] """Record type.""" @@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CNAMERecordSettings(TypedDict, total=False): flatten_cname: bool @@ -254,6 +254,13 @@ class MXRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["MX"]] """Record type.""" @@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class MXRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -317,6 +317,13 @@ class NSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NS"]] """Record type.""" @@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NSRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -374,6 +374,13 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -431,6 +431,13 @@ class PTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["PTR"]] """Record type.""" @@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -488,6 +488,13 @@ class TXTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TXT"]] """Record type.""" @@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TXTRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -553,6 +553,13 @@ class CAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CAA"]] """Record type.""" @@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CAARecordData(TypedDict, total=False): flags: float @@ -621,6 +621,13 @@ class CERTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CERT"]] """Record type.""" @@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -692,6 +692,13 @@ class DNSKEYRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DNSKEY"]] """Record type.""" @@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -763,6 +763,13 @@ class DSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DS"]] """Record type.""" @@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DSRecordData(TypedDict, total=False): algorithm: float @@ -834,6 +834,13 @@ class HTTPSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["HTTPS"]] """Record type.""" @@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -902,6 +902,13 @@ class LOCRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["LOC"]] """Record type.""" @@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class LOCRecordData(TypedDict, total=False): altitude: float @@ -997,6 +997,13 @@ class NAPTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NAPTR"]] """Record type.""" @@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -1074,6 +1074,13 @@ class SMIMEARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SMIMEA"]] """Record type.""" @@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -1145,6 +1145,13 @@ class SRVRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SRV"]] """Record type.""" @@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SRVRecordData(TypedDict, total=False): port: float @@ -1219,6 +1219,13 @@ class SSHFPRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SSHFP"]] """Record type.""" @@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -1287,6 +1287,13 @@ class SVCBRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SVCB"]] """Record type.""" @@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SVCBRecordData(TypedDict, total=False): priority: float @@ -1355,6 +1355,13 @@ class TLSARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TLSA"]] """Record type.""" @@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TLSARecordData(TypedDict, total=False): certificate: str @@ -1426,6 +1426,13 @@ class URIRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["URI"]] """Record type.""" @@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py index 4fe64d7b17c..a1fbaf5c7fa 100644 --- a/src/cloudflare/types/dns/record_edit_params.py +++ b/src/cloudflare/types/dns/record_edit_params.py @@ -75,6 +75,13 @@ class ARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["A"]] """Record type.""" @@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class ARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -132,6 +132,13 @@ class AAAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["AAAA"]] """Record type.""" @@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class AAAARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -189,6 +189,13 @@ class CNAMERecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CNAME"]] """Record type.""" @@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CNAMERecordSettings(TypedDict, total=False): flatten_cname: bool @@ -254,6 +254,13 @@ class MXRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["MX"]] """Record type.""" @@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class MXRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -317,6 +317,13 @@ class NSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NS"]] """Record type.""" @@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NSRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -374,6 +374,13 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -431,6 +431,13 @@ class PTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["PTR"]] """Record type.""" @@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -488,6 +488,13 @@ class TXTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TXT"]] """Record type.""" @@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TXTRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -553,6 +553,13 @@ class CAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CAA"]] """Record type.""" @@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CAARecordData(TypedDict, total=False): flags: float @@ -621,6 +621,13 @@ class CERTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CERT"]] """Record type.""" @@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -692,6 +692,13 @@ class DNSKEYRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DNSKEY"]] """Record type.""" @@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -763,6 +763,13 @@ class DSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DS"]] """Record type.""" @@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DSRecordData(TypedDict, total=False): algorithm: float @@ -834,6 +834,13 @@ class HTTPSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["HTTPS"]] """Record type.""" @@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -902,6 +902,13 @@ class LOCRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["LOC"]] """Record type.""" @@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class LOCRecordData(TypedDict, total=False): altitude: float @@ -997,6 +997,13 @@ class NAPTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NAPTR"]] """Record type.""" @@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -1074,6 +1074,13 @@ class SMIMEARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SMIMEA"]] """Record type.""" @@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -1145,6 +1145,13 @@ class SRVRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SRV"]] """Record type.""" @@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SRVRecordData(TypedDict, total=False): port: float @@ -1219,6 +1219,13 @@ class SSHFPRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SSHFP"]] """Record type.""" @@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -1287,6 +1287,13 @@ class SVCBRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SVCB"]] """Record type.""" @@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SVCBRecordData(TypedDict, total=False): priority: float @@ -1355,6 +1355,13 @@ class TLSARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TLSA"]] """Record type.""" @@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TLSARecordData(TypedDict, total=False): certificate: str @@ -1426,6 +1426,13 @@ class URIRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["URI"]] """Record type.""" @@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py index 3420e186d33..c89e4dd6efd 100644 --- a/src/cloudflare/types/dns/record_update_params.py +++ b/src/cloudflare/types/dns/record_update_params.py @@ -75,6 +75,13 @@ class ARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["A"]] """Record type.""" @@ -99,13 +106,6 @@ class ARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class ARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -132,6 +132,13 @@ class AAAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["AAAA"]] """Record type.""" @@ -156,13 +163,6 @@ class AAAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class AAAARecordSettings(TypedDict, total=False): ipv4_only: bool @@ -189,6 +189,13 @@ class CNAMERecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CNAME"]] """Record type.""" @@ -213,13 +220,6 @@ class CNAMERecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CNAMERecordSettings(TypedDict, total=False): flatten_cname: bool @@ -254,6 +254,13 @@ class MXRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["MX"]] """Record type.""" @@ -284,13 +291,6 @@ class MXRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class MXRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -317,6 +317,13 @@ class NSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NS"]] """Record type.""" @@ -341,13 +348,6 @@ class NSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NSRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -374,6 +374,13 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["OPENPGPKEY"]] """Record type.""" @@ -398,13 +405,6 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -431,6 +431,13 @@ class PTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["PTR"]] """Record type.""" @@ -455,13 +462,6 @@ class PTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class PTRRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -488,6 +488,13 @@ class TXTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TXT"]] """Record type.""" @@ -520,13 +527,6 @@ class TXTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TXTRecordSettings(TypedDict, total=False): ipv4_only: bool @@ -553,6 +553,13 @@ class CAARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CAA"]] """Record type.""" @@ -577,13 +584,6 @@ class CAARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CAARecordData(TypedDict, total=False): flags: float @@ -621,6 +621,13 @@ class CERTRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["CERT"]] """Record type.""" @@ -645,13 +652,6 @@ class CERTRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class CERTRecordData(TypedDict, total=False): algorithm: float @@ -692,6 +692,13 @@ class DNSKEYRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DNSKEY"]] """Record type.""" @@ -716,13 +723,6 @@ class DNSKEYRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DNSKEYRecordData(TypedDict, total=False): algorithm: float @@ -763,6 +763,13 @@ class DSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["DS"]] """Record type.""" @@ -787,13 +794,6 @@ class DSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class DSRecordData(TypedDict, total=False): algorithm: float @@ -834,6 +834,13 @@ class HTTPSRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["HTTPS"]] """Record type.""" @@ -858,13 +865,6 @@ class HTTPSRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class HTTPSRecordData(TypedDict, total=False): priority: float @@ -902,6 +902,13 @@ class LOCRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["LOC"]] """Record type.""" @@ -926,13 +933,6 @@ class LOCRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class LOCRecordData(TypedDict, total=False): altitude: float @@ -997,6 +997,13 @@ class NAPTRRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["NAPTR"]] """Record type.""" @@ -1021,13 +1028,6 @@ class NAPTRRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class NAPTRRecordData(TypedDict, total=False): flags: str @@ -1074,6 +1074,13 @@ class SMIMEARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SMIMEA"]] """Record type.""" @@ -1098,13 +1105,6 @@ class SMIMEARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SMIMEARecordData(TypedDict, total=False): certificate: str @@ -1145,6 +1145,13 @@ class SRVRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SRV"]] """Record type.""" @@ -1169,13 +1176,6 @@ class SRVRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SRVRecordData(TypedDict, total=False): port: float @@ -1219,6 +1219,13 @@ class SSHFPRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SSHFP"]] """Record type.""" @@ -1243,13 +1250,6 @@ class SSHFPRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SSHFPRecordData(TypedDict, total=False): algorithm: float @@ -1287,6 +1287,13 @@ class SVCBRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SVCB"]] """Record type.""" @@ -1311,13 +1318,6 @@ class SVCBRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class SVCBRecordData(TypedDict, total=False): priority: float @@ -1355,6 +1355,13 @@ class TLSARecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TLSA"]] """Record type.""" @@ -1379,13 +1386,6 @@ class TLSARecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class TLSARecordData(TypedDict, total=False): certificate: str @@ -1426,6 +1426,13 @@ class URIRecord(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["URI"]] """Record type.""" @@ -1456,13 +1463,6 @@ class URIRecord(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - class URIRecordData(TypedDict, total=False): target: str diff --git a/src/cloudflare/types/dns/smimea_record.py b/src/cloudflare/types/dns/smimea_record.py index 36809d36e62..4b36fac03e8 100644 --- a/src/cloudflare/types/dns/smimea_record.py +++ b/src/cloudflare/types/dns/smimea_record.py @@ -46,6 +46,13 @@ class SMIMEARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["SMIMEA"] """Record type.""" @@ -72,10 +79,3 @@ class SMIMEARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/smimea_record_param.py b/src/cloudflare/types/dns/smimea_record_param.py index 88563331e7c..13cf50183c7 100644 --- a/src/cloudflare/types/dns/smimea_record_param.py +++ b/src/cloudflare/types/dns/smimea_record_param.py @@ -47,6 +47,13 @@ class SMIMEARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SMIMEA"]] """Record type.""" @@ -70,10 +77,3 @@ class SMIMEARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/srv_record.py b/src/cloudflare/types/dns/srv_record.py index c6af1db2cdb..13d5335ff63 100644 --- a/src/cloudflare/types/dns/srv_record.py +++ b/src/cloudflare/types/dns/srv_record.py @@ -49,6 +49,13 @@ class SRVRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["SRV"] """Record type.""" @@ -78,10 +85,3 @@ class SRVRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/srv_record_param.py b/src/cloudflare/types/dns/srv_record_param.py index 26661a4d488..0f1720dff42 100644 --- a/src/cloudflare/types/dns/srv_record_param.py +++ b/src/cloudflare/types/dns/srv_record_param.py @@ -50,6 +50,13 @@ class SRVRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SRV"]] """Record type.""" @@ -73,10 +80,3 @@ class SRVRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/sshfp_record.py b/src/cloudflare/types/dns/sshfp_record.py index 34eebe100af..a782b0fd0e7 100644 --- a/src/cloudflare/types/dns/sshfp_record.py +++ b/src/cloudflare/types/dns/sshfp_record.py @@ -43,6 +43,13 @@ class SSHFPRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["SSHFP"] """Record type.""" @@ -69,10 +76,3 @@ class SSHFPRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/sshfp_record_param.py b/src/cloudflare/types/dns/sshfp_record_param.py index 55300dd798c..f3eedcd2c71 100644 --- a/src/cloudflare/types/dns/sshfp_record_param.py +++ b/src/cloudflare/types/dns/sshfp_record_param.py @@ -44,6 +44,13 @@ class SSHFPRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SSHFP"]] """Record type.""" @@ -67,10 +74,3 @@ class SSHFPRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/svcb_record.py b/src/cloudflare/types/dns/svcb_record.py index 2047b8b3a6e..65512c5a265 100644 --- a/src/cloudflare/types/dns/svcb_record.py +++ b/src/cloudflare/types/dns/svcb_record.py @@ -43,6 +43,13 @@ class SVCBRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["SVCB"] """Record type.""" @@ -69,10 +76,3 @@ class SVCBRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/svcb_record_param.py b/src/cloudflare/types/dns/svcb_record_param.py index df50717f966..e0813ddaeac 100644 --- a/src/cloudflare/types/dns/svcb_record_param.py +++ b/src/cloudflare/types/dns/svcb_record_param.py @@ -44,6 +44,13 @@ class SVCBRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["SVCB"]] """Record type.""" @@ -67,10 +74,3 @@ class SVCBRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/tlsa_record.py b/src/cloudflare/types/dns/tlsa_record.py index d6e349d2002..b2b49eed3b7 100644 --- a/src/cloudflare/types/dns/tlsa_record.py +++ b/src/cloudflare/types/dns/tlsa_record.py @@ -46,6 +46,13 @@ class TLSARecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["TLSA"] """Record type.""" @@ -72,10 +79,3 @@ class TLSARecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/tlsa_record_param.py b/src/cloudflare/types/dns/tlsa_record_param.py index 2a0d3c80d73..b77b7e5c0bc 100644 --- a/src/cloudflare/types/dns/tlsa_record_param.py +++ b/src/cloudflare/types/dns/tlsa_record_param.py @@ -47,6 +47,13 @@ class TLSARecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TLSA"]] """Record type.""" @@ -70,10 +77,3 @@ class TLSARecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/txt_record.py b/src/cloudflare/types/dns/txt_record.py index e55205570da..97a556c49f1 100644 --- a/src/cloudflare/types/dns/txt_record.py +++ b/src/cloudflare/types/dns/txt_record.py @@ -32,6 +32,13 @@ class TXTRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["TXT"] """Record type.""" @@ -63,10 +70,3 @@ class TXTRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/txt_record_param.py b/src/cloudflare/types/dns/txt_record_param.py index 877cba3a547..54320f7874c 100644 --- a/src/cloudflare/types/dns/txt_record_param.py +++ b/src/cloudflare/types/dns/txt_record_param.py @@ -33,6 +33,13 @@ class TXTRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["TXT"]] """Record type.""" @@ -64,10 +71,3 @@ class TXTRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/uri_record.py b/src/cloudflare/types/dns/uri_record.py index deb5ec91ebb..12cf4a19589 100644 --- a/src/cloudflare/types/dns/uri_record.py +++ b/src/cloudflare/types/dns/uri_record.py @@ -40,6 +40,13 @@ class URIRecord(BaseModel): name: str """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: TTL + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Literal["URI"] """Record type.""" @@ -72,10 +79,3 @@ class URIRecord(BaseModel): tags: Optional[List[RecordTags]] = None """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Optional[TTL] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/src/cloudflare/types/dns/uri_record_param.py b/src/cloudflare/types/dns/uri_record_param.py index eff1a6684b8..c0c2b3a47bf 100644 --- a/src/cloudflare/types/dns/uri_record_param.py +++ b/src/cloudflare/types/dns/uri_record_param.py @@ -41,6 +41,13 @@ class URIRecordParam(TypedDict, total=False): name: Required[str] """DNS record name (or @ for the zone apex) in Punycode.""" + ttl: Required[TTLParam] + """Time To Live (TTL) of the DNS record in seconds. + + Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the + minimum reduced to 30 for Enterprise zones. + """ + type: Required[Literal["URI"]] """Record type.""" @@ -70,10 +77,3 @@ class URIRecordParam(TypedDict, total=False): tags: List[RecordTags] """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: TTLParam - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 19f3b30479b..55297baceb2 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -30,6 +30,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -40,6 +41,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -49,7 +51,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -59,6 +60,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -73,6 +75,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -90,6 +93,7 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -99,6 +103,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -109,6 +114,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -118,7 +124,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -128,6 +133,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -142,6 +148,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -159,6 +166,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -168,6 +176,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -178,6 +187,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -188,7 +198,6 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -198,6 +207,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -212,6 +222,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -229,6 +240,7 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -238,6 +250,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -248,6 +261,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -258,7 +272,6 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -268,6 +281,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -282,6 +296,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -299,6 +314,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -308,6 +324,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -318,6 +335,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -327,7 +345,6 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -337,6 +354,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -351,6 +369,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -368,6 +387,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -377,6 +397,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -387,6 +408,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -396,7 +418,6 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -406,6 +427,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -420,6 +442,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -437,6 +460,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -446,6 +470,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -456,6 +481,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -465,7 +491,6 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -475,6 +500,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -489,6 +515,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -506,6 +533,7 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -515,6 +543,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -525,6 +554,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -534,7 +564,6 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -544,6 +573,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -558,6 +588,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -575,6 +606,7 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -584,6 +616,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -594,6 +627,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -607,7 +641,6 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -617,6 +650,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -631,6 +665,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -648,6 +683,7 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -657,6 +693,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -667,6 +704,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -681,7 +719,6 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -691,6 +728,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -705,6 +743,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -722,6 +761,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -731,6 +771,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -741,6 +782,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -755,7 +797,6 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -765,6 +806,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -779,6 +821,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -796,6 +839,7 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -805,6 +849,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -815,6 +860,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -829,7 +875,6 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -839,6 +884,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -853,6 +899,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -870,6 +917,7 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -879,6 +927,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -889,6 +938,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -902,7 +952,6 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -912,6 +961,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -926,6 +976,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -943,6 +994,7 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -952,6 +1004,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -962,6 +1015,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -984,7 +1038,6 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -994,6 +1047,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -1008,6 +1062,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -1025,6 +1080,7 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -1034,6 +1090,7 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1044,6 +1101,7 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -1060,7 +1118,6 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1070,6 +1127,7 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -1084,6 +1142,7 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -1101,6 +1160,7 @@ def test_path_params_create_overload_15(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -1110,6 +1170,7 @@ def test_method_create_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1120,6 +1181,7 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -1134,7 +1196,6 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1144,6 +1205,7 @@ def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -1158,6 +1220,7 @@ def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -1175,6 +1238,7 @@ def test_path_params_create_overload_16(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -1184,6 +1248,7 @@ def test_method_create_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1194,6 +1259,7 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -1208,7 +1274,6 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1218,6 +1283,7 @@ def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -1232,6 +1298,7 @@ def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -1249,6 +1316,7 @@ def test_path_params_create_overload_17(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -1258,6 +1326,7 @@ def test_method_create_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1268,6 +1337,7 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -1281,7 +1351,6 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1291,6 +1360,7 @@ def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -1305,6 +1375,7 @@ def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -1322,6 +1393,7 @@ def test_path_params_create_overload_18(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -1331,6 +1403,7 @@ def test_method_create_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1341,6 +1414,7 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -1354,7 +1428,6 @@ def test_method_create_with_all_params_overload_19(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1364,6 +1437,7 @@ def test_raw_response_create_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -1378,6 +1452,7 @@ def test_streaming_response_create_overload_19(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -1395,6 +1470,7 @@ def test_path_params_create_overload_19(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -1404,6 +1480,7 @@ def test_method_create_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1414,6 +1491,7 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -1428,7 +1506,6 @@ def test_method_create_with_all_params_overload_20(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1438,6 +1515,7 @@ def test_raw_response_create_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -1452,6 +1530,7 @@ def test_streaming_response_create_overload_20(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -1469,6 +1548,7 @@ def test_path_params_create_overload_20(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -1478,6 +1558,7 @@ def test_method_create_overload_21(self, client: Cloudflare) -> None: record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1488,6 +1569,7 @@ def test_method_create_with_all_params_overload_21(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -1501,7 +1583,6 @@ def test_method_create_with_all_params_overload_21(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1511,6 +1592,7 @@ def test_raw_response_create_overload_21(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -1525,6 +1607,7 @@ def test_streaming_response_create_overload_21(self, client: Cloudflare) -> None with client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -1542,6 +1625,7 @@ def test_path_params_create_overload_21(self, client: Cloudflare) -> None: client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -1552,6 +1636,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1563,6 +1648,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -1572,7 +1658,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1583,6 +1668,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -1598,6 +1684,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -1616,6 +1703,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -1624,6 +1712,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -1634,6 +1723,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1645,6 +1735,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -1654,7 +1745,6 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1665,6 +1755,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -1680,6 +1771,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -1698,6 +1790,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -1706,6 +1799,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -1716,6 +1810,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1727,6 +1822,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -1737,7 +1833,6 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1748,6 +1843,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -1763,6 +1859,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -1781,6 +1878,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -1789,6 +1887,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -1799,6 +1898,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1810,6 +1910,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -1820,7 +1921,6 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1831,6 +1931,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -1846,6 +1947,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -1864,6 +1966,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -1872,6 +1975,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -1882,6 +1986,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1893,6 +1998,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -1902,7 +2008,6 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1913,6 +2018,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -1928,6 +2034,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -1946,6 +2053,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -1954,6 +2062,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -1964,6 +2073,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1975,6 +2085,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -1984,7 +2095,6 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -1995,6 +2105,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -2010,6 +2121,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -2028,6 +2140,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -2036,6 +2149,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -2046,6 +2160,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2057,6 +2172,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -2066,7 +2182,6 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2077,6 +2192,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -2092,6 +2208,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -2110,6 +2227,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -2118,6 +2236,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -2128,6 +2247,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2139,6 +2259,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -2148,7 +2269,6 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2159,6 +2279,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -2174,6 +2295,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -2192,6 +2314,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -2200,6 +2323,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -2210,6 +2334,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2221,6 +2346,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -2234,7 +2360,6 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2245,6 +2370,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -2260,6 +2386,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -2278,6 +2405,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -2286,6 +2414,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -2296,6 +2425,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2307,6 +2437,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -2321,7 +2452,6 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2332,6 +2462,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -2347,6 +2478,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -2365,6 +2497,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -2373,6 +2506,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -2383,6 +2517,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2394,6 +2529,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -2408,7 +2544,6 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2419,6 +2554,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -2434,6 +2570,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -2452,6 +2589,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -2460,6 +2598,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -2470,6 +2609,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2481,6 +2621,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -2495,7 +2636,6 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2506,6 +2646,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -2521,6 +2662,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -2539,6 +2681,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -2547,6 +2690,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -2557,6 +2701,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2568,6 +2713,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -2581,7 +2727,6 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2592,6 +2737,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -2607,6 +2753,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -2625,6 +2772,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -2633,6 +2781,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -2643,6 +2792,7 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2654,6 +2804,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -2676,7 +2827,6 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2687,6 +2837,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -2702,6 +2853,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -2720,6 +2872,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -2728,6 +2881,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -2738,6 +2892,7 @@ def test_method_update_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2749,6 +2904,7 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -2765,7 +2921,6 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2776,6 +2931,7 @@ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -2791,6 +2947,7 @@ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -2809,6 +2966,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -2817,6 +2975,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -2827,6 +2986,7 @@ def test_method_update_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2838,6 +2998,7 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -2852,7 +3013,6 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2863,6 +3023,7 @@ def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -2878,6 +3039,7 @@ def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -2896,6 +3058,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -2904,6 +3067,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -2914,6 +3078,7 @@ def test_method_update_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2925,6 +3090,7 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -2939,7 +3105,6 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -2950,6 +3115,7 @@ def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -2965,6 +3131,7 @@ def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -2983,6 +3150,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -2991,6 +3159,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -3001,6 +3170,7 @@ def test_method_update_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3012,6 +3182,7 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -3025,7 +3196,6 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3036,6 +3206,7 @@ def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -3051,6 +3222,7 @@ def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -3069,6 +3241,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -3077,6 +3250,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -3087,6 +3261,7 @@ def test_method_update_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3098,6 +3273,7 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -3111,7 +3287,6 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3122,6 +3297,7 @@ def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -3137,6 +3313,7 @@ def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -3155,6 +3332,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -3163,6 +3341,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -3173,6 +3352,7 @@ def test_method_update_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3184,6 +3364,7 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -3198,7 +3379,6 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3209,6 +3389,7 @@ def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -3224,6 +3405,7 @@ def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -3242,6 +3424,7 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -3250,6 +3433,7 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -3260,6 +3444,7 @@ def test_method_update_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3271,6 +3456,7 @@ def test_method_update_with_all_params_overload_21(self, client: Cloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -3284,7 +3470,6 @@ def test_method_update_with_all_params_overload_21(self, client: Cloudflare) -> "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3295,6 +3480,7 @@ def test_raw_response_update_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -3310,6 +3496,7 @@ def test_streaming_response_update_overload_21(self, client: Cloudflare) -> None dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -3328,6 +3515,7 @@ def test_path_params_update_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -3336,6 +3524,7 @@ def test_path_params_update_overload_21(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -3491,6 +3680,7 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None: patches=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -3500,13 +3690,13 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None: "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, "id": "023e105f4ecef8ad9ca31a8372d0c353", } ], posts=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -3516,12 +3706,12 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None: "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, } ], puts=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -3531,7 +3721,6 @@ def test_method_batch_with_all_params(self, client: Cloudflare) -> None: "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, "id": "023e105f4ecef8ad9ca31a8372d0c353", } ], @@ -3579,6 +3768,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3590,6 +3780,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -3599,7 +3790,6 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3610,6 +3800,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -3625,6 +3816,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -3643,6 +3835,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -3651,6 +3844,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -3661,6 +3855,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3672,6 +3867,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -3681,7 +3877,6 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3692,6 +3887,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -3707,6 +3903,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -3725,6 +3922,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -3733,6 +3931,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -3743,6 +3942,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3754,6 +3954,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -3764,7 +3965,6 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3775,6 +3975,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -3790,6 +3991,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -3808,6 +4010,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -3816,6 +4019,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -3826,6 +4030,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3837,6 +4042,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -3847,7 +4053,6 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3858,6 +4063,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -3873,6 +4079,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -3891,6 +4098,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -3899,6 +4107,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -3909,6 +4118,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3920,6 +4130,7 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -3929,7 +4140,6 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -3940,6 +4150,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -3955,6 +4166,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -3973,6 +4185,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -3981,6 +4194,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -3991,6 +4205,7 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4002,6 +4217,7 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -4011,7 +4227,6 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4022,6 +4237,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -4037,6 +4253,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -4055,6 +4272,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -4063,6 +4281,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -4073,6 +4292,7 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4084,6 +4304,7 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -4093,7 +4314,6 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4104,6 +4324,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -4119,6 +4340,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -4137,6 +4359,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -4145,6 +4368,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -4155,6 +4379,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4166,6 +4391,7 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -4175,7 +4401,6 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4186,6 +4411,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -4201,6 +4427,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -4219,6 +4446,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -4227,6 +4455,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -4237,6 +4466,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4248,6 +4478,7 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -4261,7 +4492,6 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4272,6 +4502,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -4287,6 +4518,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -4305,6 +4537,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -4313,6 +4546,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -4323,6 +4557,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4334,6 +4569,7 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -4348,7 +4584,6 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4359,6 +4594,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -4374,6 +4610,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -4392,6 +4629,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -4400,6 +4638,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -4410,6 +4649,7 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4421,6 +4661,7 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -4435,7 +4676,6 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4446,6 +4686,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -4461,6 +4702,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -4479,6 +4721,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -4487,6 +4730,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -4497,6 +4741,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4508,6 +4753,7 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -4522,7 +4768,6 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4533,6 +4778,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -4548,6 +4794,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -4566,6 +4813,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -4574,6 +4822,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -4584,6 +4833,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4595,6 +4845,7 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -4608,7 +4859,6 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4619,6 +4869,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -4634,6 +4885,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -4652,6 +4904,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -4660,6 +4913,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -4670,6 +4924,7 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4681,6 +4936,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -4703,7 +4959,6 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4714,6 +4969,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -4729,6 +4985,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -4747,6 +5004,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -4755,6 +5013,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -4765,6 +5024,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4776,6 +5036,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -4792,7 +5053,6 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4803,6 +5063,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -4818,6 +5079,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -4836,6 +5098,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -4844,6 +5107,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -4854,6 +5118,7 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4865,6 +5130,7 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -4879,7 +5145,6 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4890,6 +5155,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -4905,6 +5171,7 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -4923,6 +5190,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -4931,6 +5199,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -4941,6 +5210,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4952,6 +5222,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -4966,7 +5237,6 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -4977,6 +5247,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -4992,6 +5263,7 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -5010,6 +5282,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -5018,6 +5291,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -5028,6 +5302,7 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5039,6 +5314,7 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -5052,7 +5328,6 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5063,6 +5338,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -5078,6 +5354,7 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -5096,6 +5373,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -5104,6 +5382,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -5114,6 +5393,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5125,6 +5405,7 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -5138,7 +5419,6 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5149,6 +5429,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -5164,6 +5445,7 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -5182,6 +5464,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -5190,6 +5473,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -5200,6 +5484,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5211,6 +5496,7 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -5225,7 +5511,6 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5236,6 +5521,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -5251,6 +5537,7 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -5269,6 +5556,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -5277,6 +5565,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -5287,6 +5576,7 @@ def test_method_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5298,6 +5588,7 @@ def test_method_edit_with_all_params_overload_21(self, client: Cloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -5311,7 +5602,6 @@ def test_method_edit_with_all_params_overload_21(self, client: Cloudflare) -> No "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5322,6 +5612,7 @@ def test_raw_response_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -5337,6 +5628,7 @@ def test_streaming_response_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -5355,6 +5647,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -5363,6 +5656,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -5564,6 +5858,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5574,6 +5869,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -5583,7 +5879,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5593,6 +5888,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -5607,6 +5903,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -5624,6 +5921,7 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -5633,6 +5931,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5643,6 +5942,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -5652,7 +5952,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5662,6 +5961,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -5676,6 +5976,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -5693,6 +5994,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -5702,6 +6004,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5712,6 +6015,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -5722,7 +6026,6 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5732,6 +6035,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -5746,6 +6050,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -5763,6 +6068,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -5772,6 +6078,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5782,6 +6089,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -5792,7 +6100,6 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5802,6 +6109,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -5816,6 +6124,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -5833,6 +6142,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -5842,6 +6152,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5852,6 +6163,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -5861,7 +6173,6 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5871,6 +6182,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -5885,6 +6197,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -5902,6 +6215,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -5911,6 +6225,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5921,6 +6236,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -5930,7 +6246,6 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5940,6 +6255,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -5954,6 +6270,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -5971,6 +6288,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -5980,6 +6298,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -5990,6 +6309,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -5999,7 +6319,6 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6009,6 +6328,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -6023,6 +6343,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -6040,6 +6361,7 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -6049,6 +6371,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6059,6 +6382,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -6068,7 +6392,6 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6078,6 +6401,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -6092,6 +6416,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -6109,6 +6434,7 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -6118,6 +6444,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6128,6 +6455,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -6141,7 +6469,6 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6151,6 +6478,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -6165,6 +6493,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -6182,6 +6511,7 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -6191,6 +6521,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6201,6 +6532,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -6215,7 +6547,6 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6225,6 +6556,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -6239,6 +6571,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -6256,6 +6589,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -6265,6 +6599,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6275,6 +6610,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -6289,7 +6625,6 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6299,6 +6634,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -6313,6 +6649,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -6330,6 +6667,7 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -6339,6 +6677,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6349,6 +6688,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -6363,7 +6703,6 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6373,6 +6712,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -6387,6 +6727,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -6404,6 +6745,7 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -6413,6 +6755,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6423,6 +6766,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -6436,7 +6780,6 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6446,6 +6789,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -6460,6 +6804,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -6477,6 +6822,7 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -6486,6 +6832,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6496,6 +6843,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -6518,7 +6866,6 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6528,6 +6875,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -6542,6 +6890,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -6559,6 +6908,7 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -6568,6 +6918,7 @@ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6578,6 +6929,7 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -6594,7 +6946,6 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6604,6 +6955,7 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -6618,6 +6970,7 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -6635,6 +6988,7 @@ async def test_path_params_create_overload_15(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -6644,6 +6998,7 @@ async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6654,6 +7009,7 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -6668,7 +7024,6 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6678,6 +7033,7 @@ async def test_raw_response_create_overload_16(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -6692,6 +7048,7 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -6709,6 +7066,7 @@ async def test_path_params_create_overload_16(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -6718,6 +7076,7 @@ async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6728,6 +7087,7 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -6742,7 +7102,6 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6752,6 +7111,7 @@ async def test_raw_response_create_overload_17(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -6766,6 +7126,7 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -6783,6 +7144,7 @@ async def test_path_params_create_overload_17(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -6792,6 +7154,7 @@ async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6802,6 +7165,7 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -6815,7 +7179,6 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6825,6 +7188,7 @@ async def test_raw_response_create_overload_18(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -6839,6 +7203,7 @@ async def test_streaming_response_create_overload_18(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -6856,6 +7221,7 @@ async def test_path_params_create_overload_18(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -6865,6 +7231,7 @@ async def test_method_create_overload_19(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6875,6 +7242,7 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -6888,7 +7256,6 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6898,6 +7265,7 @@ async def test_raw_response_create_overload_19(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -6912,6 +7280,7 @@ async def test_streaming_response_create_overload_19(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -6929,6 +7298,7 @@ async def test_path_params_create_overload_19(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -6938,6 +7308,7 @@ async def test_method_create_overload_20(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6948,6 +7319,7 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -6962,7 +7334,6 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -6972,6 +7343,7 @@ async def test_raw_response_create_overload_20(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -6986,6 +7358,7 @@ async def test_streaming_response_create_overload_20(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -7003,6 +7376,7 @@ async def test_path_params_create_overload_20(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -7012,6 +7386,7 @@ async def test_method_create_overload_21(self, async_client: AsyncCloudflare) -> record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7022,6 +7397,7 @@ async def test_method_create_with_all_params_overload_21(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -7035,7 +7411,6 @@ async def test_method_create_with_all_params_overload_21(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7045,6 +7420,7 @@ async def test_raw_response_create_overload_21(self, async_client: AsyncCloudfla response = await async_client.dns.records.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -7059,6 +7435,7 @@ async def test_streaming_response_create_overload_21(self, async_client: AsyncCl async with async_client.dns.records.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -7076,6 +7453,7 @@ async def test_path_params_create_overload_21(self, async_client: AsyncCloudflar await async_client.dns.records.with_raw_response.create( zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -7086,6 +7464,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7097,6 +7476,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -7106,7 +7486,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7117,6 +7496,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -7132,6 +7512,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -7150,6 +7531,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -7158,6 +7540,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -7168,6 +7551,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7179,6 +7563,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -7188,7 +7573,6 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7199,6 +7583,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -7214,6 +7599,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -7232,6 +7618,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -7240,6 +7627,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -7250,6 +7638,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7261,6 +7650,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -7271,7 +7661,6 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7282,6 +7671,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -7297,6 +7687,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -7315,6 +7706,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -7323,6 +7715,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -7333,6 +7726,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7344,6 +7738,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -7354,7 +7749,6 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7365,6 +7759,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -7380,6 +7775,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -7398,6 +7794,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -7406,6 +7803,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -7416,6 +7814,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7427,6 +7826,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -7436,7 +7836,6 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7447,6 +7846,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -7462,6 +7862,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -7480,6 +7881,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -7488,6 +7890,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -7498,6 +7901,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7509,6 +7913,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -7518,7 +7923,6 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7529,6 +7933,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -7544,6 +7949,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -7562,6 +7968,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -7570,6 +7977,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -7580,6 +7988,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7591,6 +8000,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -7600,7 +8010,6 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7611,6 +8020,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -7626,6 +8036,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -7644,6 +8055,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -7652,6 +8064,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -7662,6 +8075,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7673,6 +8087,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -7682,7 +8097,6 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7693,6 +8107,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -7708,6 +8123,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -7726,6 +8142,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -7734,6 +8151,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -7744,6 +8162,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7755,6 +8174,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -7768,7 +8188,6 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7779,6 +8198,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -7794,6 +8214,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -7812,6 +8233,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -7820,6 +8242,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -7830,6 +8253,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7841,6 +8265,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -7855,7 +8280,6 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7866,6 +8290,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -7881,6 +8306,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -7899,6 +8325,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -7907,6 +8334,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -7917,6 +8345,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7928,6 +8357,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -7942,7 +8372,6 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -7953,6 +8382,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -7968,6 +8398,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -7986,6 +8417,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -7994,6 +8426,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -8004,6 +8437,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8015,6 +8449,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -8029,7 +8464,6 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8040,6 +8474,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -8055,6 +8490,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -8073,6 +8509,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -8081,6 +8518,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -8091,6 +8529,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8102,6 +8541,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -8115,7 +8555,6 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8126,6 +8565,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -8141,6 +8581,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -8159,6 +8600,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -8167,6 +8609,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -8177,6 +8620,7 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8188,6 +8632,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -8210,7 +8655,6 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8221,6 +8665,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -8236,6 +8681,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -8254,6 +8700,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -8262,6 +8709,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -8272,6 +8720,7 @@ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8283,6 +8732,7 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -8299,7 +8749,6 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8310,6 +8759,7 @@ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -8325,6 +8775,7 @@ async def test_streaming_response_update_overload_15(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -8343,6 +8794,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -8351,6 +8803,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -8361,6 +8814,7 @@ async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8372,6 +8826,7 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -8386,7 +8841,6 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8397,6 +8851,7 @@ async def test_raw_response_update_overload_16(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -8412,6 +8867,7 @@ async def test_streaming_response_update_overload_16(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -8430,6 +8886,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -8438,6 +8895,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -8448,6 +8906,7 @@ async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8459,6 +8918,7 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -8473,7 +8933,6 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8484,6 +8943,7 @@ async def test_raw_response_update_overload_17(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -8499,6 +8959,7 @@ async def test_streaming_response_update_overload_17(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -8517,6 +8978,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -8525,6 +8987,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -8535,6 +8998,7 @@ async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8546,6 +9010,7 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -8559,7 +9024,6 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8570,6 +9034,7 @@ async def test_raw_response_update_overload_18(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -8585,6 +9050,7 @@ async def test_streaming_response_update_overload_18(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -8603,6 +9069,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -8611,6 +9078,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -8621,6 +9089,7 @@ async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8632,6 +9101,7 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -8645,7 +9115,6 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8656,6 +9125,7 @@ async def test_raw_response_update_overload_19(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -8671,6 +9141,7 @@ async def test_streaming_response_update_overload_19(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -8689,6 +9160,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -8697,6 +9169,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -8707,6 +9180,7 @@ async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8718,6 +9192,7 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -8732,7 +9207,6 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8743,6 +9217,7 @@ async def test_raw_response_update_overload_20(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -8758,6 +9233,7 @@ async def test_streaming_response_update_overload_20(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -8776,6 +9252,7 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -8784,6 +9261,7 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -8794,6 +9272,7 @@ async def test_method_update_overload_21(self, async_client: AsyncCloudflare) -> dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8805,6 +9284,7 @@ async def test_method_update_with_all_params_overload_21(self, async_client: Asy dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -8818,7 +9298,6 @@ async def test_method_update_with_all_params_overload_21(self, async_client: Asy "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -8829,6 +9308,7 @@ async def test_raw_response_update_overload_21(self, async_client: AsyncCloudfla dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -8844,6 +9324,7 @@ async def test_streaming_response_update_overload_21(self, async_client: AsyncCl dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -8862,6 +9343,7 @@ async def test_path_params_update_overload_21(self, async_client: AsyncCloudflar dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -8870,6 +9352,7 @@ async def test_path_params_update_overload_21(self, async_client: AsyncCloudflar dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -9025,6 +9508,7 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) patches=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -9034,13 +9518,13 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, "id": "023e105f4ecef8ad9ca31a8372d0c353", } ], posts=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -9050,12 +9534,12 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, } ], puts=[ { "name": "example.com", + "ttl": 3600, "type": "A", "comment": "Domain verification record", "content": "198.51.100.4", @@ -9065,7 +9549,6 @@ async def test_method_batch_with_all_params(self, async_client: AsyncCloudflare) "ipv6_only": True, }, "tags": ["owner:dns-team"], - "ttl": 3600, "id": "023e105f4ecef8ad9ca31a8372d0c353", } ], @@ -9113,6 +9596,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9124,6 +9608,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", comment="Domain verification record", content="198.51.100.4", @@ -9133,7 +9618,6 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9144,6 +9628,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -9159,6 +9644,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) as response: assert not response.is_closed @@ -9177,6 +9663,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="A", ) @@ -9185,6 +9672,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="A", ) @@ -9195,6 +9683,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9206,6 +9695,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", comment="Domain verification record", content="2400:cb00:2049::1", @@ -9215,7 +9705,6 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9226,6 +9715,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -9241,6 +9731,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) as response: assert not response.is_closed @@ -9259,6 +9750,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="AAAA", ) @@ -9267,6 +9759,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="AAAA", ) @@ -9277,6 +9770,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9288,6 +9782,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", comment="Domain verification record", content="content", @@ -9298,7 +9793,6 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9309,6 +9803,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -9324,6 +9819,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) as response: assert not response.is_closed @@ -9342,6 +9838,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CNAME", ) @@ -9350,6 +9847,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CNAME", ) @@ -9360,6 +9858,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9371,6 +9870,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", comment="Domain verification record", content="mx.example.com", @@ -9381,7 +9881,6 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9392,6 +9891,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -9407,6 +9907,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) as response: assert not response.is_closed @@ -9425,6 +9926,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="MX", ) @@ -9433,6 +9935,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="MX", ) @@ -9443,6 +9946,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9454,6 +9958,7 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", comment="Domain verification record", content="ns1.example.com", @@ -9463,7 +9968,6 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9474,6 +9978,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -9489,6 +9994,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) as response: assert not response.is_closed @@ -9507,6 +10013,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NS", ) @@ -9515,6 +10022,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NS", ) @@ -9525,6 +10033,7 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9536,6 +10045,7 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", comment="Domain verification record", content="content", @@ -9545,7 +10055,6 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9556,6 +10065,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -9571,6 +10081,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) as response: assert not response.is_closed @@ -9589,6 +10100,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -9597,6 +10109,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="OPENPGPKEY", ) @@ -9607,6 +10120,7 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9618,6 +10132,7 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", comment="Domain verification record", content="example.com", @@ -9627,7 +10142,6 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9638,6 +10152,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -9653,6 +10168,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) as response: assert not response.is_closed @@ -9671,6 +10187,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="PTR", ) @@ -9679,6 +10196,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="PTR", ) @@ -9689,6 +10207,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9700,6 +10219,7 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", comment="Domain verification record", content='"v=spf1 include:example.com -all"', @@ -9709,7 +10229,6 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9720,6 +10239,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -9735,6 +10255,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) as response: assert not response.is_closed @@ -9753,6 +10274,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TXT", ) @@ -9761,6 +10283,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TXT", ) @@ -9771,6 +10294,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9782,6 +10306,7 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", comment="Domain verification record", data={ @@ -9795,7 +10320,6 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9806,6 +10330,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -9821,6 +10346,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) as response: assert not response.is_closed @@ -9839,6 +10365,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CAA", ) @@ -9847,6 +10374,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CAA", ) @@ -9857,6 +10385,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9868,6 +10397,7 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", comment="Domain verification record", data={ @@ -9882,7 +10412,6 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9893,6 +10422,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -9908,6 +10438,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) as response: assert not response.is_closed @@ -9926,6 +10457,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="CERT", ) @@ -9934,6 +10466,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="CERT", ) @@ -9944,6 +10477,7 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9955,6 +10489,7 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", comment="Domain verification record", data={ @@ -9969,7 +10504,6 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -9980,6 +10514,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -9995,6 +10530,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) as response: assert not response.is_closed @@ -10013,6 +10549,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -10021,6 +10558,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DNSKEY", ) @@ -10031,6 +10569,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10042,6 +10581,7 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", comment="Domain verification record", data={ @@ -10056,7 +10596,6 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10067,6 +10606,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -10082,6 +10622,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) as response: assert not response.is_closed @@ -10100,6 +10641,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="DS", ) @@ -10108,6 +10650,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="DS", ) @@ -10118,6 +10661,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10129,6 +10673,7 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", comment="Domain verification record", data={ @@ -10142,7 +10687,6 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10153,6 +10697,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -10168,6 +10713,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) as response: assert not response.is_closed @@ -10186,6 +10732,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="HTTPS", ) @@ -10194,6 +10741,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="HTTPS", ) @@ -10204,6 +10752,7 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10215,6 +10764,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", comment="Domain verification record", data={ @@ -10237,7 +10787,6 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10248,6 +10797,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -10263,6 +10813,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) as response: assert not response.is_closed @@ -10281,6 +10832,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="LOC", ) @@ -10289,6 +10841,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="LOC", ) @@ -10299,6 +10852,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10310,6 +10864,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", comment="Domain verification record", data={ @@ -10326,7 +10881,6 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10337,6 +10891,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -10352,6 +10907,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) as response: assert not response.is_closed @@ -10370,6 +10926,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="NAPTR", ) @@ -10378,6 +10935,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="NAPTR", ) @@ -10388,6 +10946,7 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10399,6 +10958,7 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", comment="Domain verification record", data={ @@ -10413,7 +10973,6 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10424,6 +10983,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -10439,6 +10999,7 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) as response: assert not response.is_closed @@ -10457,6 +11018,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -10465,6 +11027,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SMIMEA", ) @@ -10475,6 +11038,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10486,6 +11050,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", comment="Domain verification record", data={ @@ -10500,7 +11065,6 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10511,6 +11075,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -10526,6 +11091,7 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) as response: assert not response.is_closed @@ -10544,6 +11110,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SRV", ) @@ -10552,6 +11119,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SRV", ) @@ -10562,6 +11130,7 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10573,6 +11142,7 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", comment="Domain verification record", data={ @@ -10586,7 +11156,6 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10597,6 +11166,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -10612,6 +11182,7 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) as response: assert not response.is_closed @@ -10630,6 +11201,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SSHFP", ) @@ -10638,6 +11210,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SSHFP", ) @@ -10648,6 +11221,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10659,6 +11233,7 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", comment="Domain verification record", data={ @@ -10672,7 +11247,6 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10683,6 +11257,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -10698,6 +11273,7 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) as response: assert not response.is_closed @@ -10716,6 +11292,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="SVCB", ) @@ -10724,6 +11301,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="SVCB", ) @@ -10734,6 +11312,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10745,6 +11324,7 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", comment="Domain verification record", data={ @@ -10759,7 +11339,6 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10770,6 +11349,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -10785,6 +11365,7 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) as response: assert not response.is_closed @@ -10803,6 +11384,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="TLSA", ) @@ -10811,6 +11393,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="TLSA", ) @@ -10821,6 +11404,7 @@ async def test_method_edit_overload_21(self, async_client: AsyncCloudflare) -> N dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10832,6 +11416,7 @@ async def test_method_edit_with_all_params_overload_21(self, async_client: Async dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", comment="Domain verification record", data={ @@ -10845,7 +11430,6 @@ async def test_method_edit_with_all_params_overload_21(self, async_client: Async "ipv6_only": True, }, tags=["owner:dns-team"], - ttl=3600, ) assert_matches_type(Optional[RecordResponse], record, path=["response"]) @@ -10856,6 +11440,7 @@ async def test_raw_response_edit_overload_21(self, async_client: AsyncCloudflare dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) @@ -10871,6 +11456,7 @@ async def test_streaming_response_edit_overload_21(self, async_client: AsyncClou dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) as response: assert not response.is_closed @@ -10889,6 +11475,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", name="example.com", + ttl=3600, type="URI", ) @@ -10897,6 +11484,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", name="example.com", + ttl=3600, type="URI", ) From b84a94e1ba4d55e05cd07acc04fdbbdd7a0fd0ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:56:16 +0000 Subject: [PATCH 004/392] chore(readme): update badges --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 755e3162353..4943420c98e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cloudflare Python API library -[![PyPI version](https://img.shields.io/pypi/v/cloudflare.svg)](https://pypi.org/project/cloudflare/) +[![PyPI version]()](https://pypi.org/project/cloudflare/) The Cloudflare Python library provides convenient access to the Cloudflare REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, From 721188dddf88b71ba2c0754461c8d7f8d4359304 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 21:16:02 +0000 Subject: [PATCH 005/392] fix(tests): fix: tests which call HTTP endpoints directly with the example parameters --- tests/test_client.py | 69 ++++++++------------------------------------ 1 file changed, 12 insertions(+), 57 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 71aea28019c..76002040c33 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -23,9 +23,7 @@ from cloudflare import Cloudflare, AsyncCloudflare, APIResponseValidationError from cloudflare._types import Omit -from cloudflare._utils import maybe_transform from cloudflare._models import BaseModel, FinalRequestOptions -from cloudflare._constants import RAW_RESPONSE_HEADER from cloudflare._exceptions import APIStatusError, APITimeoutError, APIResponseValidationError from cloudflare._base_client import ( DEFAULT_TIMEOUT, @@ -35,7 +33,6 @@ DefaultAsyncHttpxClient, make_request_options, ) -from cloudflare.types.zones.zone_create_params import ZoneCreateParams from .utils import update_env @@ -893,44 +890,21 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str @mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, client: Cloudflare) -> None: respx_mock.post("/zones").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - self.client.post( - "/zones", - body=cast( - object, - maybe_transform( - dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"), - ZoneCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + client.zones.with_streaming_response.create(account={}, name="example.com").__enter__() assert _get_open_connections(self.client) == 0 @mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client: Cloudflare) -> None: respx_mock.post("/zones").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - self.client.post( - "/zones", - body=cast( - object, - maybe_transform( - dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"), - ZoneCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + client.zones.with_streaming_response.create(account={}, name="example.com").__enter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -1821,44 +1795,25 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte @mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_timeout_errors_doesnt_leak( + self, respx_mock: MockRouter, async_client: AsyncCloudflare + ) -> None: respx_mock.post("/zones").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - await self.client.post( - "/zones", - body=cast( - object, - maybe_transform( - dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"), - ZoneCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + await async_client.zones.with_streaming_response.create(account={}, name="example.com").__aenter__() assert _get_open_connections(self.client) == 0 @mock.patch("cloudflare._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_status_errors_doesnt_leak( + self, respx_mock: MockRouter, async_client: AsyncCloudflare + ) -> None: respx_mock.post("/zones").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - await self.client.post( - "/zones", - body=cast( - object, - maybe_transform( - dict(account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full"), - ZoneCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + await async_client.zones.with_streaming_response.create(account={}, name="example.com").__aenter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) From 61aabacbef250be82d18ba15d532c3ff1542a9c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 21:45:18 +0000 Subject: [PATCH 006/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 990c6efb477..37e64599318 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b9cf8d97f015bd3c7509f68b4dea2c37dc5f97183372064702ea540b6dd999f8.yml -openapi_spec_hash: 83243c9ee06f88d0fa91e9b185d8a42e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-29174d64a61919dbdebbd0c8d4ab3cb5eec6f9aacff888bdd0469ba2b8d08019.yml +openapi_spec_hash: b5909bd6882171a6ff0158b9f68b47cc config_hash: cce40d4d65a4d67d5df957a75a15b567 From 0114564d5cfb8459f19fe3dd80ce6e55617096ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:41:23 +0000 Subject: [PATCH 007/392] docs(client): fix httpx.Timeout documentation reference --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4943420c98e..e416014c625 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,7 @@ client.with_options(max_retries=5).zones.get( ### Timeouts By default requests time out after 1 minute. You can configure this with a `timeout` option, -which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object: +which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object: ```python from cloudflare import Cloudflare From 4c6cda072e94640d2ea181dd1de2e4ef3f943e76 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 15:49:42 +0000 Subject: [PATCH 008/392] feat(api): api update --- .stats.yml | 4 +- api.md | 8 +- .../threat_events/threat_events.py | 16 ++-- src/cloudflare/resources/images/v1/v1.py | 8 ++ .../resources/kv/namespaces/keys.py | 62 +++++++------- .../resources/kv/namespaces/metadata.py | 17 ++-- .../resources/kv/namespaces/namespaces.py | 62 +++++++------- .../resources/kv/namespaces/values.py | 38 ++++----- src/cloudflare/resources/logpush/jobs.py | 20 ++--- .../resources/zero_trust/devices/dex_tests.py | 4 +- .../zero_trust/gateway/lists/lists.py | 17 ++-- .../threat_event_bulk_create_params.py | 8 +- .../threat_event_create_params.py | 8 +- .../investigate_get_response.py | 2 + .../investigate_list_response.py | 2 + .../types/images/v1_create_params.py | 3 + .../types/kv/namespace_bulk_delete_params.py | 2 +- .../kv/namespace_bulk_delete_response.py | 2 +- .../types/kv/namespace_bulk_get_params.py | 8 +- .../types/kv/namespace_bulk_get_response.py | 14 ++-- .../types/kv/namespace_bulk_update_params.py | 42 +++++----- .../kv/namespace_bulk_update_response.py | 2 +- .../types/kv/namespace_create_params.py | 2 +- .../types/kv/namespace_list_params.py | 2 +- .../types/kv/namespace_update_params.py | 2 +- .../types/kv/namespaces/__init__.py | 1 - src/cloudflare/types/kv/namespaces/key.py | 5 +- .../kv/namespaces/key_bulk_delete_params.py | 2 +- .../kv/namespaces/key_bulk_delete_response.py | 2 +- .../kv/namespaces/key_bulk_get_params.py | 8 +- .../kv/namespaces/key_bulk_get_response.py | 14 ++-- .../kv/namespaces/key_bulk_update_params.py | 42 +++++----- .../kv/namespaces/key_bulk_update_response.py | 2 +- .../types/kv/namespaces/key_list_params.py | 6 +- .../kv/namespaces/metadata_get_response.py | 8 -- .../kv/namespaces/value_update_params.py | 14 ++-- .../types/logpush/job_create_params.py | 5 +- .../types/logpush/job_update_params.py | 5 +- src/cloudflare/types/logpush/logpush_job.py | 5 +- .../zero_trust/dlp/entry_get_response.py | 8 +- .../zero_trust/dlp/entry_list_response.py | 8 +- .../zero_trust/dlp/entry_update_response.py | 8 +- .../types/zero_trust/dlp/profile.py | 24 +++--- .../dlp/profiles/custom_create_params.py | 13 ++- .../dlp/profiles/custom_update_params.py | 13 ++- .../types/zero_trust/gateway/__init__.py | 1 - .../zero_trust/gateway/gateway_item_param.py | 15 ---- .../zero_trust/gateway/list_create_params.py | 16 ++-- .../zero_trust/gateway/list_update_params.py | 16 ++-- .../cloudforce_one/test_threat_events.py | 40 +-------- tests/api_resources/images/test_v1.py | 2 + .../api_resources/kv/namespaces/test_keys.py | 70 +++++++++++++--- .../kv/namespaces/test_metadata.py | 15 ++-- .../kv/namespaces/test_values.py | 16 +--- tests/api_resources/kv/test_namespaces.py | 70 +++++++++++++--- tests/api_resources/logpush/test_jobs.py | 84 +++++++++---------- 56 files changed, 466 insertions(+), 427 deletions(-) delete mode 100644 src/cloudflare/types/kv/namespaces/metadata_get_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/gateway_item_param.py diff --git a/.stats.yml b/.stats.yml index 37e64599318..a562f0115b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-29174d64a61919dbdebbd0c8d4ab3cb5eec6f9aacff888bdd0469ba2b8d08019.yml -openapi_spec_hash: b5909bd6882171a6ff0158b9f68b47cc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0d0950b4d6565ebd937ab7f58c20ec77ed448ada47e892675290ed602d1f1e5d.yml +openapi_spec_hash: 3471c05655ab2e06b07d7bab145428fa config_hash: cce40d4d65a4d67d5df957a75a15b567 diff --git a/api.md b/api.md index 04738525ed2..80849c44661 100644 --- a/api.md +++ b/api.md @@ -2570,15 +2570,9 @@ Methods: ### Metadata -Types: - -```python -from cloudflare.types.kv.namespaces import MetadataGetResponse -``` - Methods: -- client.kv.namespaces.metadata.get(key_name, \*, account_id, namespace_id) -> Optional[MetadataGetResponse] +- client.kv.namespaces.metadata.get(key_name, \*, account_id, namespace_id) -> object ### Values diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py index a313c5426f1..be583ad7b49 100644 --- a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py +++ b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py @@ -203,8 +203,6 @@ def create( self, *, path_account_id: str, - attacker: str, - attacker_country: str, category: str, date: Union[str, datetime], event: str, @@ -212,6 +210,8 @@ def create( raw: threat_event_create_params.Raw, tlp: str, body_account_id: float | NotGiven = NOT_GIVEN, + attacker: str | NotGiven = NOT_GIVEN, + attacker_country: str | NotGiven = NOT_GIVEN, dataset_id: str | NotGiven = NOT_GIVEN, indicator: str | NotGiven = NOT_GIVEN, tags: List[str] | NotGiven = NOT_GIVEN, @@ -247,8 +247,6 @@ def create( f"/accounts/{path_account_id}/cloudforce-one/events/create", body=maybe_transform( { - "attacker": attacker, - "attacker_country": attacker_country, "category": category, "date": date, "event": event, @@ -256,6 +254,8 @@ def create( "raw": raw, "tlp": tlp, "body_account_id": body_account_id, + "attacker": attacker, + "attacker_country": attacker_country, "dataset_id": dataset_id, "indicator": indicator, "tags": tags, @@ -600,8 +600,6 @@ async def create( self, *, path_account_id: str, - attacker: str, - attacker_country: str, category: str, date: Union[str, datetime], event: str, @@ -609,6 +607,8 @@ async def create( raw: threat_event_create_params.Raw, tlp: str, body_account_id: float | NotGiven = NOT_GIVEN, + attacker: str | NotGiven = NOT_GIVEN, + attacker_country: str | NotGiven = NOT_GIVEN, dataset_id: str | NotGiven = NOT_GIVEN, indicator: str | NotGiven = NOT_GIVEN, tags: List[str] | NotGiven = NOT_GIVEN, @@ -644,8 +644,6 @@ async def create( f"/accounts/{path_account_id}/cloudforce-one/events/create", body=await async_maybe_transform( { - "attacker": attacker, - "attacker_country": attacker_country, "category": category, "date": date, "event": event, @@ -653,6 +651,8 @@ async def create( "raw": raw, "tlp": tlp, "body_account_id": body_account_id, + "attacker": attacker, + "attacker_country": attacker_country, "dataset_id": dataset_id, "indicator": indicator, "tags": tags, diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index dda2c2061d3..f22695c42d3 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -100,6 +100,7 @@ def create( self, *, account_id: str, + id: object | NotGiven = NOT_GIVEN, file: object | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, @@ -119,6 +120,8 @@ def create( Args: account_id: Account identifier tag. + id: An optional custom unique identifier for your image. + file: An image binary data. Only needed when type is uploading a file. metadata: User modifiable key-value store. Can use used for keeping references to another @@ -147,6 +150,7 @@ def create( f"/accounts/{account_id}/images/v1", body=maybe_transform( { + "id": id, "file": file, "metadata": metadata, "require_signed_urls": require_signed_urls, @@ -417,6 +421,7 @@ async def create( self, *, account_id: str, + id: object | NotGiven = NOT_GIVEN, file: object | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, @@ -436,6 +441,8 @@ async def create( Args: account_id: Account identifier tag. + id: An optional custom unique identifier for your image. + file: An image binary data. Only needed when type is uploading a file. metadata: User modifiable key-value store. Can use used for keeping references to another @@ -464,6 +471,7 @@ async def create( f"/accounts/{account_id}/images/v1", body=await async_maybe_transform( { + "id": id, "file": file, "metadata": metadata, "require_signed_urls": require_signed_urls, diff --git a/src/cloudflare/resources/kv/namespaces/keys.py b/src/cloudflare/resources/kv/namespaces/keys.py index 6b5b71f0bb4..0b7d1e61b4d 100644 --- a/src/cloudflare/resources/kv/namespaces/keys.py +++ b/src/cloudflare/resources/kv/namespaces/keys.py @@ -69,7 +69,7 @@ def list( Lists a namespace's keys. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -78,11 +78,11 @@ def list( parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure. - limit: The number of keys to return. The cursor attribute may be used to iterate over - the next batch of keys if there are more than the limit. + limit: Limits the number of keys returned in the response. The cursor attribute may be + used to iterate over the next batch of keys if there are more than the limit. - prefix: A string prefix used to filter down which keys will be returned. Exact matches - and any key names that begin with the prefix will be returned. + prefix: Filters returned keys by a name prefix. Exact matches and any key names that + begin with the prefix will be returned. extra_headers: Send extra headers @@ -136,7 +136,7 @@ def bulk_delete( 10,000 keys to be removed. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -181,23 +181,22 @@ def bulk_get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[KeyBulkGetResponse]: - """Get multiple KV pairs from the namespace. + """Retrieve up to 100 KV pairs from the namespace. - Body should contain keys to retrieve - at most 100. Keys must contain text-based values. If value is json, it can be - requested to return in JSON, instead of string. Metadata can be return if - withMetadata is true. + Keys must contain text-based + values. JSON values can optionally be parsed instead of being returned as a + string value. Metadata can be included if `withMetadata` is true. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. - keys: Array of keys to retrieve (maximum 100) + keys: Array of keys to retrieve (maximum of 100). - type: Whether to parse JSON values in the response + type: Whether to parse JSON values in the response. - with_metadata: Whether to include metadata in the response + with_metadata: Whether to include metadata in the response. extra_headers: Send extra headers @@ -260,7 +259,7 @@ def bulk_update( size must be 100 megabytes or less. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -329,7 +328,7 @@ def list( Lists a namespace's keys. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -338,11 +337,11 @@ def list( parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure. - limit: The number of keys to return. The cursor attribute may be used to iterate over - the next batch of keys if there are more than the limit. + limit: Limits the number of keys returned in the response. The cursor attribute may be + used to iterate over the next batch of keys if there are more than the limit. - prefix: A string prefix used to filter down which keys will be returned. Exact matches - and any key names that begin with the prefix will be returned. + prefix: Filters returned keys by a name prefix. Exact matches and any key names that + begin with the prefix will be returned. extra_headers: Send extra headers @@ -396,7 +395,7 @@ async def bulk_delete( 10,000 keys to be removed. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -441,23 +440,22 @@ async def bulk_get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[KeyBulkGetResponse]: - """Get multiple KV pairs from the namespace. + """Retrieve up to 100 KV pairs from the namespace. - Body should contain keys to retrieve - at most 100. Keys must contain text-based values. If value is json, it can be - requested to return in JSON, instead of string. Metadata can be return if - withMetadata is true. + Keys must contain text-based + values. JSON values can optionally be parsed instead of being returned as a + string value. Metadata can be included if `withMetadata` is true. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. - keys: Array of keys to retrieve (maximum 100) + keys: Array of keys to retrieve (maximum of 100). - type: Whether to parse JSON values in the response + type: Whether to parse JSON values in the response. - with_metadata: Whether to include metadata in the response + with_metadata: Whether to include metadata in the response. extra_headers: Send extra headers @@ -520,7 +518,7 @@ async def bulk_update( size must be 100 megabytes or less. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. diff --git a/src/cloudflare/resources/kv/namespaces/metadata.py b/src/cloudflare/resources/kv/namespaces/metadata.py index fd5a0d2dad7..427734d81d1 100644 --- a/src/cloudflare/resources/kv/namespaces/metadata.py +++ b/src/cloudflare/resources/kv/namespaces/metadata.py @@ -17,7 +17,6 @@ ) from ...._wrappers import ResultWrapper from ...._base_client import make_request_options -from ....types.kv.namespaces.metadata_get_response import MetadataGetResponse __all__ = ["MetadataResource", "AsyncMetadataResource"] @@ -54,7 +53,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MetadataGetResponse]: + ) -> object: """Returns the metadata associated with the given key in the given namespace. Use @@ -62,7 +61,7 @@ def get( name. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -90,9 +89,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[MetadataGetResponse]]._unwrapper, + post_parser=ResultWrapper[Optional[object]]._unwrapper, ), - cast_to=cast(Type[Optional[MetadataGetResponse]], ResultWrapper[MetadataGetResponse]), + cast_to=cast(Type[object], ResultWrapper[object]), ) @@ -128,7 +127,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MetadataGetResponse]: + ) -> object: """Returns the metadata associated with the given key in the given namespace. Use @@ -136,7 +135,7 @@ async def get( name. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -164,9 +163,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[MetadataGetResponse]]._unwrapper, + post_parser=ResultWrapper[Optional[object]]._unwrapper, ), - cast_to=cast(Type[Optional[MetadataGetResponse]], ResultWrapper[MetadataGetResponse]), + cast_to=cast(Type[object], ResultWrapper[object]), ) diff --git a/src/cloudflare/resources/kv/namespaces/namespaces.py b/src/cloudflare/resources/kv/namespaces/namespaces.py index d033b2e28ab..d62c027d72b 100644 --- a/src/cloudflare/resources/kv/namespaces/namespaces.py +++ b/src/cloudflare/resources/kv/namespaces/namespaces.py @@ -111,7 +111,7 @@ def create( to be replaced. Args: - account_id: Identifier + account_id: Identifier. title: A human-readable string name for a Namespace. @@ -155,7 +155,7 @@ def update( Modifies a namespace's title. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -205,7 +205,7 @@ def list( Returns the namespaces owned by an account. Args: - account_id: Identifier + account_id: Identifier. direction: Direction to order namespaces. @@ -262,7 +262,7 @@ def delete( Deletes the namespace corresponding to the given ID. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -309,7 +309,7 @@ def bulk_delete( 10,000 keys to be removed. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -353,23 +353,22 @@ def bulk_get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[NamespaceBulkGetResponse]: - """Get multiple KV pairs from the namespace. + """Retrieve up to 100 KV pairs from the namespace. - Body should contain keys to retrieve - at most 100. Keys must contain text-based values. If value is json, it can be - requested to return in JSON, instead of string. Metadata can be return if - withMetadata is true. + Keys must contain text-based + values. JSON values can optionally be parsed instead of being returned as a + string value. Metadata can be included if `withMetadata` is true. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. - keys: Array of keys to retrieve (maximum 100) + keys: Array of keys to retrieve (maximum of 100). - type: Whether to parse JSON values in the response + type: Whether to parse JSON values in the response. - with_metadata: Whether to include metadata in the response + with_metadata: Whether to include metadata in the response. extra_headers: Send extra headers @@ -431,7 +430,7 @@ def bulk_update( size must be 100 megabytes or less. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -476,7 +475,7 @@ def get( Get the namespace corresponding to the given ID. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -556,7 +555,7 @@ async def create( to be replaced. Args: - account_id: Identifier + account_id: Identifier. title: A human-readable string name for a Namespace. @@ -600,7 +599,7 @@ async def update( Modifies a namespace's title. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -650,7 +649,7 @@ def list( Returns the namespaces owned by an account. Args: - account_id: Identifier + account_id: Identifier. direction: Direction to order namespaces. @@ -707,7 +706,7 @@ async def delete( Deletes the namespace corresponding to the given ID. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -754,7 +753,7 @@ async def bulk_delete( 10,000 keys to be removed. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -798,23 +797,22 @@ async def bulk_get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[NamespaceBulkGetResponse]: - """Get multiple KV pairs from the namespace. + """Retrieve up to 100 KV pairs from the namespace. - Body should contain keys to retrieve - at most 100. Keys must contain text-based values. If value is json, it can be - requested to return in JSON, instead of string. Metadata can be return if - withMetadata is true. + Keys must contain text-based + values. JSON values can optionally be parsed instead of being returned as a + string value. Metadata can be included if `withMetadata` is true. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. - keys: Array of keys to retrieve (maximum 100) + keys: Array of keys to retrieve (maximum of 100). - type: Whether to parse JSON values in the response + type: Whether to parse JSON values in the response. - with_metadata: Whether to include metadata in the response + with_metadata: Whether to include metadata in the response. extra_headers: Send extra headers @@ -876,7 +874,7 @@ async def bulk_update( size must be 100 megabytes or less. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -921,7 +919,7 @@ async def get( Get the namespace corresponding to the given ID. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. diff --git a/src/cloudflare/resources/kv/namespaces/values.py b/src/cloudflare/resources/kv/namespaces/values.py index 05e3e187510..34160c54f80 100644 --- a/src/cloudflare/resources/kv/namespaces/values.py +++ b/src/cloudflare/resources/kv/namespaces/values.py @@ -59,10 +59,10 @@ def update( *, account_id: str, namespace_id: str, - metadata: str, value: str, expiration: float | NotGiven = NOT_GIVEN, expiration_ttl: float | NotGiven = NOT_GIVEN, + metadata: object | 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, @@ -82,22 +82,19 @@ def update( `expiration` is ignored. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. key_name: A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL. - metadata: Arbitrary JSON to be associated with a key/value pair. - value: A byte sequence to be stored, up to 25 MiB in length. - expiration: The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + expiration: Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. - expiration_ttl: The number of seconds for which the key should be visible before it expires. At - least 60. + expiration_ttl: Expires the key after a number of seconds. Must be at least 60. extra_headers: Send extra headers @@ -117,8 +114,8 @@ def update( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", body=maybe_transform( { - "metadata": metadata, "value": value, + "metadata": metadata, }, value_update_params.ValueUpdateParams, ), @@ -158,7 +155,7 @@ def delete( (for example, `:`, `!`, `%`) in the key name. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -213,7 +210,7 @@ def get( response header. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -270,10 +267,10 @@ async def update( *, account_id: str, namespace_id: str, - metadata: str, value: str, expiration: float | NotGiven = NOT_GIVEN, expiration_ttl: float | NotGiven = NOT_GIVEN, + metadata: object | 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, @@ -293,22 +290,19 @@ async def update( `expiration` is ignored. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. key_name: A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL. - metadata: Arbitrary JSON to be associated with a key/value pair. - value: A byte sequence to be stored, up to 25 MiB in length. - expiration: The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + expiration: Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. - expiration_ttl: The number of seconds for which the key should be visible before it expires. At - least 60. + expiration_ttl: Expires the key after a number of seconds. Must be at least 60. extra_headers: Send extra headers @@ -328,8 +322,8 @@ async def update( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", body=await async_maybe_transform( { - "metadata": metadata, "value": value, + "metadata": metadata, }, value_update_params.ValueUpdateParams, ), @@ -369,7 +363,7 @@ async def delete( (for example, `:`, `!`, `%`) in the key name. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. @@ -424,7 +418,7 @@ async def get( response header. Args: - account_id: Identifier + account_id: Identifier. namespace_id: Namespace identifier tag. diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index fd6b3035775..108276bb85a 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -86,7 +86,7 @@ def create( enabled: bool | NotGiven = NOT_GIVEN, filter: Optional[str] | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, - kind: Literal["edge"] | NotGiven = NOT_GIVEN, + kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, @@ -128,8 +128,7 @@ def create( frequency to low sends logs in smaller quantities of larger files. kind: The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -223,7 +222,7 @@ def update( enabled: bool | NotGiven = NOT_GIVEN, filter: Optional[str] | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, - kind: Literal["edge"] | NotGiven = NOT_GIVEN, + kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, @@ -264,8 +263,7 @@ def update( frequency to low sends logs in smaller quantities of larger files. kind: The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -566,7 +564,7 @@ async def create( enabled: bool | NotGiven = NOT_GIVEN, filter: Optional[str] | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, - kind: Literal["edge"] | NotGiven = NOT_GIVEN, + kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, @@ -608,8 +606,7 @@ async def create( frequency to low sends logs in smaller quantities of larger files. kind: The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from @@ -703,7 +700,7 @@ async def update( enabled: bool | NotGiven = NOT_GIVEN, filter: Optional[str] | NotGiven = NOT_GIVEN, frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, - kind: Literal["edge"] | NotGiven = NOT_GIVEN, + kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, @@ -744,8 +741,7 @@ async def update( frequency to low sends logs in smaller quantities of larger files. kind: The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). logpull_options: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from diff --git a/src/cloudflare/resources/zero_trust/devices/dex_tests.py b/src/cloudflare/resources/zero_trust/devices/dex_tests.py index 241e238dee1..aaf02a38266 100644 --- a/src/cloudflare/resources/zero_trust/devices/dex_tests.py +++ b/src/cloudflare/resources/zero_trust/devices/dex_tests.py @@ -204,7 +204,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[DEXTestListResponse]: """ - Fetch all DEX tests. + Fetch all DEX tests Args: extra_headers: Send extra headers @@ -488,7 +488,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[DEXTestListResponse, AsyncSinglePage[DEXTestListResponse]]: """ - Fetch all DEX tests. + Fetch all DEX tests Args: extra_headers: Send extra headers diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index 62967f56cd0..7a1399e388c 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -30,7 +30,6 @@ from ....._base_client import AsyncPaginator, make_request_options from .....types.zero_trust.gateway import list_edit_params, list_list_params, list_create_params, list_update_params from .....types.zero_trust.gateway.gateway_list import GatewayList -from .....types.zero_trust.gateway.gateway_item_param import GatewayItemParam from .....types.zero_trust.gateway.list_create_response import ListCreateResponse __all__ = ["ListsResource", "AsyncListsResource"] @@ -67,7 +66,7 @@ def create( name: str, type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"], description: str | NotGiven = NOT_GIVEN, - items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN, + items: Iterable[list_create_params.Item] | 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, @@ -85,7 +84,7 @@ def create( description: The description of the list. - items: The items in the list. + items: items to add to the list. extra_headers: Send extra headers @@ -125,7 +124,7 @@ def update( account_id: str, name: str, description: str | NotGiven = NOT_GIVEN, - items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN, + items: Iterable[list_update_params.Item] | 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, @@ -145,7 +144,7 @@ def update( description: The description of the list. - items: The items in the list. + items: items to add to the list. extra_headers: Send extra headers @@ -391,7 +390,7 @@ async def create( name: str, type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"], description: str | NotGiven = NOT_GIVEN, - items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN, + items: Iterable[list_create_params.Item] | 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, @@ -409,7 +408,7 @@ async def create( description: The description of the list. - items: The items in the list. + items: items to add to the list. extra_headers: Send extra headers @@ -449,7 +448,7 @@ async def update( account_id: str, name: str, description: str | NotGiven = NOT_GIVEN, - items: Iterable[GatewayItemParam] | NotGiven = NOT_GIVEN, + items: Iterable[list_update_params.Item] | 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, @@ -469,7 +468,7 @@ async def update( description: The description of the list. - items: The items in the list. + items: items to add to the list. extra_headers: Send extra headers diff --git a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py index 366b219d1b6..816393ffb76 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py @@ -29,10 +29,6 @@ class DataRaw(TypedDict, total=False): class Data(TypedDict, total=False): - attacker: Required[str] - - attacker_country: Required[Annotated[str, PropertyInfo(alias="attackerCountry")]] - category: Required[str] date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] @@ -47,6 +43,10 @@ class Data(TypedDict, total=False): account_id: Annotated[float, PropertyInfo(alias="accountId")] + attacker: str + + attacker_country: Annotated[str, PropertyInfo(alias="attackerCountry")] + dataset_id: Annotated[str, PropertyInfo(alias="datasetId")] indicator: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_create_params.py b/src/cloudflare/types/cloudforce_one/threat_event_create_params.py index 225d471ad0b..890a2252d93 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_create_params.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_create_params.py @@ -15,10 +15,6 @@ class ThreatEventCreateParams(TypedDict, total=False): path_account_id: Required[Annotated[str, PropertyInfo(alias="account_id")]] """Account ID.""" - attacker: Required[str] - - attacker_country: Required[Annotated[str, PropertyInfo(alias="attackerCountry")]] - category: Required[str] date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] @@ -33,6 +29,10 @@ class ThreatEventCreateParams(TypedDict, total=False): body_account_id: Annotated[float, PropertyInfo(alias="accountId")] + attacker: str + + attacker_country: Annotated[str, PropertyInfo(alias="attackerCountry")] + dataset_id: Annotated[str, PropertyInfo(alias="datasetId")] indicator: str diff --git a/src/cloudflare/types/email_security/investigate_get_response.py b/src/cloudflare/types/email_security/investigate_get_response.py index 2e5495bcc9c..d0bb1ee5a9c 100644 --- a/src/cloudflare/types/email_security/investigate_get_response.py +++ b/src/cloudflare/types/email_security/investigate_get_response.py @@ -11,6 +11,8 @@ class Properties(BaseModel): + allowlisted_pattern_type: Optional[str] = None + whitelisted_pattern_type: Optional[str] = None diff --git a/src/cloudflare/types/email_security/investigate_list_response.py b/src/cloudflare/types/email_security/investigate_list_response.py index 580f118a42f..045fef68549 100644 --- a/src/cloudflare/types/email_security/investigate_list_response.py +++ b/src/cloudflare/types/email_security/investigate_list_response.py @@ -11,6 +11,8 @@ class Properties(BaseModel): + allowlisted_pattern_type: Optional[str] = None + whitelisted_pattern_type: Optional[str] = None diff --git a/src/cloudflare/types/images/v1_create_params.py b/src/cloudflare/types/images/v1_create_params.py index ede7cddf3e8..68b12b2e7d5 100644 --- a/src/cloudflare/types/images/v1_create_params.py +++ b/src/cloudflare/types/images/v1_create_params.py @@ -13,6 +13,9 @@ class V1CreateParams(TypedDict, total=False): account_id: Required[str] """Account identifier tag.""" + id: object + """An optional custom unique identifier for your image.""" + file: object """An image binary data. Only needed when type is uploading a file.""" diff --git a/src/cloudflare/types/kv/namespace_bulk_delete_params.py b/src/cloudflare/types/kv/namespace_bulk_delete_params.py index 1de9c109a16..48b7416598a 100644 --- a/src/cloudflare/types/kv/namespace_bulk_delete_params.py +++ b/src/cloudflare/types/kv/namespace_bulk_delete_params.py @@ -10,6 +10,6 @@ class NamespaceBulkDeleteParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" body: Required[List[str]] diff --git a/src/cloudflare/types/kv/namespace_bulk_delete_response.py b/src/cloudflare/types/kv/namespace_bulk_delete_response.py index 5cf86953b96..0c3592c90d5 100644 --- a/src/cloudflare/types/kv/namespace_bulk_delete_response.py +++ b/src/cloudflare/types/kv/namespace_bulk_delete_response.py @@ -9,7 +9,7 @@ class NamespaceBulkDeleteResponse(BaseModel): successful_key_count: Optional[float] = None - """Number of keys successfully updated""" + """Number of keys successfully updated.""" unsuccessful_keys: Optional[List[str]] = None """Name of the keys that failed to be fully updated. They should be retried.""" diff --git a/src/cloudflare/types/kv/namespace_bulk_get_params.py b/src/cloudflare/types/kv/namespace_bulk_get_params.py index 9f49de2a982..6b9964e2592 100644 --- a/src/cloudflare/types/kv/namespace_bulk_get_params.py +++ b/src/cloudflare/types/kv/namespace_bulk_get_params.py @@ -12,13 +12,13 @@ class NamespaceBulkGetParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" keys: Required[List[str]] - """Array of keys to retrieve (maximum 100)""" + """Array of keys to retrieve (maximum of 100).""" type: Literal["text", "json"] - """Whether to parse JSON values in the response""" + """Whether to parse JSON values in the response.""" with_metadata: Annotated[bool, PropertyInfo(alias="withMetadata")] - """Whether to include metadata in the response""" + """Whether to include metadata in the response.""" diff --git a/src/cloudflare/types/kv/namespace_bulk_get_response.py b/src/cloudflare/types/kv/namespace_bulk_get_response.py index 8a590e1caa2..e43c7fe848c 100644 --- a/src/cloudflare/types/kv/namespace_bulk_get_response.py +++ b/src/cloudflare/types/kv/namespace_bulk_get_response.py @@ -15,26 +15,24 @@ class WorkersKVBulkGetResult(BaseModel): values: Optional[Dict[str, Union[str, float, bool, Dict[str, object]]]] = None - """Requested keys are paired with their values in an object""" + """Requested keys are paired with their values in an object.""" class WorkersKVBulkGetResultWithMetadataValues(BaseModel): - metadata: Optional[Dict[str, object]] = None - """The metadata associated with the key""" + metadata: object - value: Union[str, float, bool, Dict[str, object]] - """The value associated with the key""" + value: object expiration: Optional[float] = None """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ class WorkersKVBulkGetResultWithMetadata(BaseModel): values: Optional[Dict[str, Optional[WorkersKVBulkGetResultWithMetadataValues]]] = None - """Requested keys are paired with their values and metadata in an object""" + """Requested keys are paired with their values and metadata in an object.""" NamespaceBulkGetResponse: TypeAlias = Union[WorkersKVBulkGetResult, WorkersKVBulkGetResultWithMetadata, None] diff --git a/src/cloudflare/types/kv/namespace_bulk_update_params.py b/src/cloudflare/types/kv/namespace_bulk_update_params.py index e1ce68a86b6..f5b480bf42f 100644 --- a/src/cloudflare/types/kv/namespace_bulk_update_params.py +++ b/src/cloudflare/types/kv/namespace_bulk_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Iterable from typing_extensions import Required, TypedDict __all__ = ["NamespaceBulkUpdateParams", "Body"] @@ -10,40 +10,36 @@ class NamespaceBulkUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" body: Required[Iterable[Body]] class Body(TypedDict, total=False): - base64: bool - """Whether or not the server should base64 decode the value before storing it. + key: Required[str] + """A key's name. - Useful for writing values that wouldn't otherwise be valid JSON strings, such as - images. + The name may be at most 512 bytes. All printable, non-whitespace characters are + valid. """ - expiration: float + value: Required[str] + """A UTF-8 encoded string to be stored, up to 25 MiB in length.""" + + base64: bool """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Indicates whether or not the server should base64 decode the value before + storing it. Useful for writing values that wouldn't otherwise be valid JSON + strings, such as images. """ - expiration_ttl: float - """The number of seconds for which the key should be visible before it expires. - - At least 60. + expiration: float """ - - key: str - """A key's name. - - The name may be at most 512 bytes. All printable, non-whitespace characters are - valid. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ - metadata: Dict[str, object] - """Arbitrary JSON that is associated with a key.""" + expiration_ttl: float + """Expires the key after a number of seconds. Must be at least 60.""" - value: str - """A UTF-8 encoded string to be stored, up to 25 MiB in length.""" + metadata: object diff --git a/src/cloudflare/types/kv/namespace_bulk_update_response.py b/src/cloudflare/types/kv/namespace_bulk_update_response.py index 6076c1444f5..3b67c223d81 100644 --- a/src/cloudflare/types/kv/namespace_bulk_update_response.py +++ b/src/cloudflare/types/kv/namespace_bulk_update_response.py @@ -9,7 +9,7 @@ class NamespaceBulkUpdateResponse(BaseModel): successful_key_count: Optional[float] = None - """Number of keys successfully updated""" + """Number of keys successfully updated.""" unsuccessful_keys: Optional[List[str]] = None """Name of the keys that failed to be fully updated. They should be retried.""" diff --git a/src/cloudflare/types/kv/namespace_create_params.py b/src/cloudflare/types/kv/namespace_create_params.py index 876990c7603..85397033b26 100644 --- a/src/cloudflare/types/kv/namespace_create_params.py +++ b/src/cloudflare/types/kv/namespace_create_params.py @@ -9,7 +9,7 @@ class NamespaceCreateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" title: Required[str] """A human-readable string name for a Namespace.""" diff --git a/src/cloudflare/types/kv/namespace_list_params.py b/src/cloudflare/types/kv/namespace_list_params.py index 2c832c88595..8c217e6fef4 100644 --- a/src/cloudflare/types/kv/namespace_list_params.py +++ b/src/cloudflare/types/kv/namespace_list_params.py @@ -9,7 +9,7 @@ class NamespaceListParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" direction: Literal["asc", "desc"] """Direction to order namespaces.""" diff --git a/src/cloudflare/types/kv/namespace_update_params.py b/src/cloudflare/types/kv/namespace_update_params.py index 531377b614b..71f317ca4e4 100644 --- a/src/cloudflare/types/kv/namespace_update_params.py +++ b/src/cloudflare/types/kv/namespace_update_params.py @@ -9,7 +9,7 @@ class NamespaceUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" title: Required[str] """A human-readable string name for a Namespace.""" diff --git a/src/cloudflare/types/kv/namespaces/__init__.py b/src/cloudflare/types/kv/namespaces/__init__.py index 48f776acf2e..34b5eaa0716 100644 --- a/src/cloudflare/types/kv/namespaces/__init__.py +++ b/src/cloudflare/types/kv/namespaces/__init__.py @@ -7,7 +7,6 @@ from .key_bulk_get_params import KeyBulkGetParams as KeyBulkGetParams from .value_update_params import ValueUpdateParams as ValueUpdateParams from .key_bulk_get_response import KeyBulkGetResponse as KeyBulkGetResponse -from .metadata_get_response import MetadataGetResponse as MetadataGetResponse from .value_delete_response import ValueDeleteResponse as ValueDeleteResponse from .value_update_response import ValueUpdateResponse as ValueUpdateResponse from .key_bulk_delete_params import KeyBulkDeleteParams as KeyBulkDeleteParams diff --git a/src/cloudflare/types/kv/namespaces/key.py b/src/cloudflare/types/kv/namespaces/key.py index 5b48057e954..35cfefbf3f8 100644 --- a/src/cloudflare/types/kv/namespaces/key.py +++ b/src/cloudflare/types/kv/namespaces/key.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Optional +from typing import Optional from ...._models import BaseModel @@ -21,5 +21,4 @@ class Key(BaseModel): will expire. This property is omitted for keys that will not expire. """ - metadata: Optional[Dict[str, object]] = None - """Arbitrary JSON that is associated with a key.""" + metadata: Optional[object] = None diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py index 37cb14a66f5..7aa53a77075 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_delete_params.py @@ -10,6 +10,6 @@ class KeyBulkDeleteParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" body: Required[List[str]] diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py index 39e93931ddd..d533940c000 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_delete_response.py @@ -9,7 +9,7 @@ class KeyBulkDeleteResponse(BaseModel): successful_key_count: Optional[float] = None - """Number of keys successfully updated""" + """Number of keys successfully updated.""" unsuccessful_keys: Optional[List[str]] = None """Name of the keys that failed to be fully updated. They should be retried.""" diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py index aa64e6454fd..d7e0801fa6d 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_get_params.py @@ -12,13 +12,13 @@ class KeyBulkGetParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" keys: Required[List[str]] - """Array of keys to retrieve (maximum 100)""" + """Array of keys to retrieve (maximum of 100).""" type: Literal["text", "json"] - """Whether to parse JSON values in the response""" + """Whether to parse JSON values in the response.""" with_metadata: Annotated[bool, PropertyInfo(alias="withMetadata")] - """Whether to include metadata in the response""" + """Whether to include metadata in the response.""" diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py index f4b93663728..f4901591f7e 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_get_response.py @@ -15,26 +15,24 @@ class WorkersKVBulkGetResult(BaseModel): values: Optional[Dict[str, Union[str, float, bool, Dict[str, object]]]] = None - """Requested keys are paired with their values in an object""" + """Requested keys are paired with their values in an object.""" class WorkersKVBulkGetResultWithMetadataValues(BaseModel): - metadata: Optional[Dict[str, object]] = None - """The metadata associated with the key""" + metadata: object - value: Union[str, float, bool, Dict[str, object]] - """The value associated with the key""" + value: object expiration: Optional[float] = None """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ class WorkersKVBulkGetResultWithMetadata(BaseModel): values: Optional[Dict[str, Optional[WorkersKVBulkGetResultWithMetadataValues]]] = None - """Requested keys are paired with their values and metadata in an object""" + """Requested keys are paired with their values and metadata in an object.""" KeyBulkGetResponse: TypeAlias = Union[WorkersKVBulkGetResult, WorkersKVBulkGetResultWithMetadata, None] diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py b/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py index 4e03451367a..1786cf98ad1 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Iterable from typing_extensions import Required, TypedDict __all__ = ["KeyBulkUpdateParams", "Body"] @@ -10,40 +10,36 @@ class KeyBulkUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" body: Required[Iterable[Body]] class Body(TypedDict, total=False): - base64: bool - """Whether or not the server should base64 decode the value before storing it. + key: Required[str] + """A key's name. - Useful for writing values that wouldn't otherwise be valid JSON strings, such as - images. + The name may be at most 512 bytes. All printable, non-whitespace characters are + valid. """ - expiration: float + value: Required[str] + """A UTF-8 encoded string to be stored, up to 25 MiB in length.""" + + base64: bool """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Indicates whether or not the server should base64 decode the value before + storing it. Useful for writing values that wouldn't otherwise be valid JSON + strings, such as images. """ - expiration_ttl: float - """The number of seconds for which the key should be visible before it expires. - - At least 60. + expiration: float """ - - key: str - """A key's name. - - The name may be at most 512 bytes. All printable, non-whitespace characters are - valid. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ - metadata: Dict[str, object] - """Arbitrary JSON that is associated with a key.""" + expiration_ttl: float + """Expires the key after a number of seconds. Must be at least 60.""" - value: str - """A UTF-8 encoded string to be stored, up to 25 MiB in length.""" + metadata: object diff --git a/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py b/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py index abe3b5b5794..1a13f4265c0 100644 --- a/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py +++ b/src/cloudflare/types/kv/namespaces/key_bulk_update_response.py @@ -9,7 +9,7 @@ class KeyBulkUpdateResponse(BaseModel): successful_key_count: Optional[float] = None - """Number of keys successfully updated""" + """Number of keys successfully updated.""" unsuccessful_keys: Optional[List[str]] = None """Name of the keys that failed to be fully updated. They should be retried.""" diff --git a/src/cloudflare/types/kv/namespaces/key_list_params.py b/src/cloudflare/types/kv/namespaces/key_list_params.py index 230b7b1986e..804e1ee1c56 100644 --- a/src/cloudflare/types/kv/namespaces/key_list_params.py +++ b/src/cloudflare/types/kv/namespaces/key_list_params.py @@ -9,7 +9,7 @@ class KeyListParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" cursor: str """ @@ -20,14 +20,14 @@ class KeyListParams(TypedDict, total=False): """ limit: float - """The number of keys to return. + """Limits the number of keys returned in the response. The cursor attribute may be used to iterate over the next batch of keys if there are more than the limit. """ prefix: str - """A string prefix used to filter down which keys will be returned. + """Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned. """ diff --git a/src/cloudflare/types/kv/namespaces/metadata_get_response.py b/src/cloudflare/types/kv/namespaces/metadata_get_response.py deleted file mode 100644 index 74bf2b5c93e..00000000000 --- a/src/cloudflare/types/kv/namespaces/metadata_get_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Dict -from typing_extensions import TypeAlias - -__all__ = ["MetadataGetResponse"] - -MetadataGetResponse: TypeAlias = Dict[str, object] diff --git a/src/cloudflare/types/kv/namespaces/value_update_params.py b/src/cloudflare/types/kv/namespaces/value_update_params.py index 67d59ae19aa..97e720132fd 100644 --- a/src/cloudflare/types/kv/namespaces/value_update_params.py +++ b/src/cloudflare/types/kv/namespaces/value_update_params.py @@ -9,25 +9,21 @@ class ValueUpdateParams(TypedDict, total=False): account_id: Required[str] - """Identifier""" + """Identifier.""" namespace_id: Required[str] """Namespace identifier tag.""" - metadata: Required[str] - """Arbitrary JSON to be associated with a key/value pair.""" - value: Required[str] """A byte sequence to be stored, up to 25 MiB in length.""" expiration: float """ - The time, measured in number of seconds since the UNIX epoch, at which the key - should expire. + Expires the key at a certain time, measured in number of seconds since the UNIX + epoch. """ expiration_ttl: float - """The number of seconds for which the key should be visible before it expires. + """Expires the key after a number of seconds. Must be at least 60.""" - At least 60. - """ + metadata: object diff --git a/src/cloudflare/types/logpush/job_create_params.py b/src/cloudflare/types/logpush/job_create_params.py index f886d78e9be..c238e69e264 100644 --- a/src/cloudflare/types/logpush/job_create_params.py +++ b/src/cloudflare/types/logpush/job_create_params.py @@ -77,11 +77,10 @@ class JobCreateParams(TypedDict, total=False): in smaller quantities of larger files. """ - kind: Literal["edge"] + kind: Literal["", "edge"] """ The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). """ logpull_options: Optional[str] diff --git a/src/cloudflare/types/logpush/job_update_params.py b/src/cloudflare/types/logpush/job_update_params.py index d651e2dda90..9fbcba62623 100644 --- a/src/cloudflare/types/logpush/job_update_params.py +++ b/src/cloudflare/types/logpush/job_update_params.py @@ -43,11 +43,10 @@ class JobUpdateParams(TypedDict, total=False): in smaller quantities of larger files. """ - kind: Literal["edge"] + kind: Literal["", "edge"] """ The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). """ logpull_options: Optional[str] diff --git a/src/cloudflare/types/logpush/logpush_job.py b/src/cloudflare/types/logpush/logpush_job.py index e6c5006b0dc..ce7775c00a3 100644 --- a/src/cloudflare/types/logpush/logpush_job.py +++ b/src/cloudflare/types/logpush/logpush_job.py @@ -75,11 +75,10 @@ class LogpushJob(BaseModel): in smaller quantities of larger files. """ - kind: Optional[Literal["edge"]] = None + kind: Optional[Literal["", "edge"]] = None """ The kind parameter (optional) is used to differentiate between Logpush and Edge - Log Delivery jobs. Currently, Edge Log Delivery is only supported for the - `http_requests` dataset. + Log Delivery jobs (when supported by the dataset). """ last_complete: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/dlp/entry_get_response.py b/src/cloudflare/types/zero_trust/dlp/entry_get_response.py index 7fb2662045d..47f7328cf22 100644 --- a/src/cloudflare/types/zero_trust/dlp/entry_get_response.py +++ b/src/cloudflare/types/zero_trust/dlp/entry_get_response.py @@ -14,7 +14,7 @@ "PredefinedEntryConfidence", "IntegrationEntry", "ExactDataEntry", - "DocumentTemplateEntry", + "DocumentFingerprintEntry", "WordListEntry", ] @@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel): updated_at: datetime -class DocumentTemplateEntry(BaseModel): +class DocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -133,5 +133,5 @@ class WordListEntry(BaseModel): EntryGetResponse: TypeAlias = Union[ - CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry + CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry ] diff --git a/src/cloudflare/types/zero_trust/dlp/entry_list_response.py b/src/cloudflare/types/zero_trust/dlp/entry_list_response.py index 1da2b70ca38..bb10fdb09b3 100644 --- a/src/cloudflare/types/zero_trust/dlp/entry_list_response.py +++ b/src/cloudflare/types/zero_trust/dlp/entry_list_response.py @@ -14,7 +14,7 @@ "PredefinedEntryConfidence", "IntegrationEntry", "ExactDataEntry", - "DocumentTemplateEntry", + "DocumentFingerprintEntry", "WordListEntry", ] @@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel): updated_at: datetime -class DocumentTemplateEntry(BaseModel): +class DocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -133,5 +133,5 @@ class WordListEntry(BaseModel): EntryListResponse: TypeAlias = Union[ - CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry + CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry ] diff --git a/src/cloudflare/types/zero_trust/dlp/entry_update_response.py b/src/cloudflare/types/zero_trust/dlp/entry_update_response.py index dcece8b3638..12b5fd242e0 100644 --- a/src/cloudflare/types/zero_trust/dlp/entry_update_response.py +++ b/src/cloudflare/types/zero_trust/dlp/entry_update_response.py @@ -14,7 +14,7 @@ "PredefinedEntryConfidence", "IntegrationEntry", "ExactDataEntry", - "DocumentTemplateEntry", + "DocumentFingerprintEntry", "WordListEntry", ] @@ -100,7 +100,7 @@ class ExactDataEntry(BaseModel): updated_at: datetime -class DocumentTemplateEntry(BaseModel): +class DocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -109,7 +109,7 @@ class DocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -133,5 +133,5 @@ class WordListEntry(BaseModel): EntryUpdateResponse: TypeAlias = Union[ - CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentTemplateEntry, WordListEntry + CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry ] diff --git a/src/cloudflare/types/zero_trust/dlp/profile.py b/src/cloudflare/types/zero_trust/dlp/profile.py index b1042788f99..6afc94992f3 100644 --- a/src/cloudflare/types/zero_trust/dlp/profile.py +++ b/src/cloudflare/types/zero_trust/dlp/profile.py @@ -18,7 +18,7 @@ "CustomProfileEntryPredefinedEntryConfidence", "CustomProfileEntryIntegrationEntry", "CustomProfileEntryExactDataEntry", - "CustomProfileEntryDocumentTemplateEntry", + "CustomProfileEntryDocumentFingerprintEntry", "CustomProfileEntryWordListEntry", "PredefinedProfile", "PredefinedProfileEntry", @@ -27,7 +27,7 @@ "PredefinedProfileEntryPredefinedEntryConfidence", "PredefinedProfileEntryIntegrationEntry", "PredefinedProfileEntryExactDataEntry", - "PredefinedProfileEntryDocumentTemplateEntry", + "PredefinedProfileEntryDocumentFingerprintEntry", "PredefinedProfileEntryWordListEntry", "IntegrationProfile", "IntegrationProfileEntry", @@ -36,7 +36,7 @@ "IntegrationProfileEntryPredefinedEntryConfidence", "IntegrationProfileEntryIntegrationEntry", "IntegrationProfileEntryExactDataEntry", - "IntegrationProfileEntryDocumentTemplateEntry", + "IntegrationProfileEntryDocumentFingerprintEntry", "IntegrationProfileEntryWordListEntry", ] @@ -122,7 +122,7 @@ class CustomProfileEntryExactDataEntry(BaseModel): updated_at: datetime -class CustomProfileEntryDocumentTemplateEntry(BaseModel): +class CustomProfileEntryDocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -131,7 +131,7 @@ class CustomProfileEntryDocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -159,7 +159,7 @@ class CustomProfileEntryWordListEntry(BaseModel): CustomProfileEntryPredefinedEntry, CustomProfileEntryIntegrationEntry, CustomProfileEntryExactDataEntry, - CustomProfileEntryDocumentTemplateEntry, + CustomProfileEntryDocumentFingerprintEntry, CustomProfileEntryWordListEntry, ] @@ -281,7 +281,7 @@ class PredefinedProfileEntryExactDataEntry(BaseModel): updated_at: datetime -class PredefinedProfileEntryDocumentTemplateEntry(BaseModel): +class PredefinedProfileEntryDocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -290,7 +290,7 @@ class PredefinedProfileEntryDocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -318,7 +318,7 @@ class PredefinedProfileEntryWordListEntry(BaseModel): PredefinedProfileEntryPredefinedEntry, PredefinedProfileEntryIntegrationEntry, PredefinedProfileEntryExactDataEntry, - PredefinedProfileEntryDocumentTemplateEntry, + PredefinedProfileEntryDocumentFingerprintEntry, PredefinedProfileEntryWordListEntry, ] @@ -433,7 +433,7 @@ class IntegrationProfileEntryExactDataEntry(BaseModel): updated_at: datetime -class IntegrationProfileEntryDocumentTemplateEntry(BaseModel): +class IntegrationProfileEntryDocumentFingerprintEntry(BaseModel): id: str created_at: datetime @@ -442,7 +442,7 @@ class IntegrationProfileEntryDocumentTemplateEntry(BaseModel): name: str - type: Literal["document_template"] + type: Literal["document_fingerprint"] updated_at: datetime @@ -470,7 +470,7 @@ class IntegrationProfileEntryWordListEntry(BaseModel): IntegrationProfileEntryPredefinedEntry, IntegrationProfileEntryIntegrationEntry, IntegrationProfileEntryExactDataEntry, - IntegrationProfileEntryDocumentTemplateEntry, + IntegrationProfileEntryDocumentFingerprintEntry, IntegrationProfileEntryWordListEntry, ] diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py index 09dfda22c00..139192a7574 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py @@ -18,6 +18,7 @@ "SharedEntryPredefined", "SharedEntryIntegration", "SharedEntryExactData", + "SharedEntryUnionMember4", ] @@ -105,4 +106,14 @@ class SharedEntryExactData(TypedDict, total=False): entry_type: Required[Literal["exact_data"]] -SharedEntry: TypeAlias = Union[SharedEntryCustom, SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData] +class SharedEntryUnionMember4(TypedDict, total=False): + enabled: Required[bool] + + entry_id: Required[str] + + entry_type: Required[Literal["document_fingerprint"]] + + +SharedEntry: TypeAlias = Union[ + SharedEntryCustom, SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData, SharedEntryUnionMember4 +] diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py index 9bfb604a4b2..466eb7569ae 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py @@ -17,6 +17,7 @@ "SharedEntryPredefined", "SharedEntryIntegration", "SharedEntryExactData", + "SharedEntryUnionMember3", ] @@ -97,4 +98,14 @@ class SharedEntryExactData(TypedDict, total=False): entry_type: Required[Literal["exact_data"]] -SharedEntry: TypeAlias = Union[SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData] +class SharedEntryUnionMember3(TypedDict, total=False): + enabled: Required[bool] + + entry_id: Required[str] + + entry_type: Required[Literal["document_fingerprint"]] + + +SharedEntry: TypeAlias = Union[ + SharedEntryPredefined, SharedEntryIntegration, SharedEntryExactData, SharedEntryUnionMember3 +] diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index 3493d5e0603..17c93d1d9b4 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -31,7 +31,6 @@ from .list_list_params import ListListParams as ListListParams from .doh_endpoint_param import DOHEndpointParam as DOHEndpointParam from .dot_endpoint_param import DOTEndpointParam as DOTEndpointParam -from .gateway_item_param import GatewayItemParam as GatewayItemParam from .ipv6_network_param import IPV6NetworkParam as IPV6NetworkParam from .list_create_params import ListCreateParams as ListCreateParams from .list_update_params import ListUpdateParams as ListUpdateParams diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py deleted file mode 100644 index e1f175cf254..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/gateway_item_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["GatewayItemParam"] - - -class GatewayItemParam(TypedDict, total=False): - description: str - """The description of the list item, if present""" - - value: str - """The value of the item in a list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/list_create_params.py b/src/cloudflare/types/zero_trust/gateway/list_create_params.py index c1d48ff069c..08477c82c71 100644 --- a/src/cloudflare/types/zero_trust/gateway/list_create_params.py +++ b/src/cloudflare/types/zero_trust/gateway/list_create_params.py @@ -5,9 +5,7 @@ from typing import Iterable from typing_extensions import Literal, Required, TypedDict -from .gateway_item_param import GatewayItemParam - -__all__ = ["ListCreateParams"] +__all__ = ["ListCreateParams", "Item"] class ListCreateParams(TypedDict, total=False): @@ -22,5 +20,13 @@ class ListCreateParams(TypedDict, total=False): description: str """The description of the list.""" - items: Iterable[GatewayItemParam] - """The items in the list.""" + items: Iterable[Item] + """items to add to the list.""" + + +class Item(TypedDict, total=False): + description: str + """The description of the list item, if present""" + + value: str + """The value of the item in a list.""" diff --git a/src/cloudflare/types/zero_trust/gateway/list_update_params.py b/src/cloudflare/types/zero_trust/gateway/list_update_params.py index d02a3f2a256..b6aed84e8fd 100644 --- a/src/cloudflare/types/zero_trust/gateway/list_update_params.py +++ b/src/cloudflare/types/zero_trust/gateway/list_update_params.py @@ -5,9 +5,7 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .gateway_item_param import GatewayItemParam - -__all__ = ["ListUpdateParams"] +__all__ = ["ListUpdateParams", "Item"] class ListUpdateParams(TypedDict, total=False): @@ -19,5 +17,13 @@ class ListUpdateParams(TypedDict, total=False): description: str """The description of the list.""" - items: Iterable[GatewayItemParam] - """The items in the list.""" + items: Iterable[Item] + """items to add to the list.""" + + +class Item(TypedDict, total=False): + description: str + """The description of the list item, if present""" + + value: str + """The value of the item in a list.""" diff --git a/tests/api_resources/cloudforce_one/test_threat_events.py b/tests/api_resources/cloudforce_one/test_threat_events.py index 3a48d8f5a58..45603530541 100644 --- a/tests/api_resources/cloudforce_one/test_threat_events.py +++ b/tests/api_resources/cloudforce_one/test_threat_events.py @@ -30,8 +30,6 @@ class TestThreatEvents: def test_method_create(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -46,8 +44,6 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -59,6 +55,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, tlp="amber", body_account_id=123456, + attacker="Flying Yeti", + attacker_country="CN", dataset_id="durableObjectName", indicator="domain.com", tags=["malware"], @@ -72,8 +70,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.with_raw_response.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -92,8 +88,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.with_streaming_response.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -115,8 +109,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_account_id` but received ''"): client.cloudforce_one.threat_events.with_raw_response.create( path_account_id="", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -247,8 +239,6 @@ def test_method_bulk_create(self, client: Cloudflare) -> None: account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -268,8 +258,6 @@ def test_raw_response_bulk_create(self, client: Cloudflare) -> None: account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -293,8 +281,6 @@ def test_streaming_response_bulk_create(self, client: Cloudflare) -> None: account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -321,8 +307,6 @@ def test_path_params_bulk_create(self, client: Cloudflare) -> None: account_id="", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -466,8 +450,6 @@ class TestAsyncThreatEvents: async def test_method_create(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -482,8 +464,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -495,6 +475,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, tlp="amber", body_account_id=123456, + attacker="Flying Yeti", + attacker_country="CN", dataset_id="durableObjectName", indicator="domain.com", tags=["malware"], @@ -508,8 +490,6 @@ 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.cloudforce_one.threat_events.with_raw_response.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -528,8 +508,6 @@ 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.cloudforce_one.threat_events.with_streaming_response.create( path_account_id="account_id", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -551,8 +529,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_account_id` but received ''"): await async_client.cloudforce_one.threat_events.with_raw_response.create( path_account_id="", - attacker="Flying Yeti", - attacker_country="CN", category="Domain Resolution", date=parse_datetime("2022-04-01T00:00:00Z"), event="An attacker registered the domain domain.com", @@ -683,8 +659,6 @@ async def test_method_bulk_create(self, async_client: AsyncCloudflare) -> None: account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -704,8 +678,6 @@ async def test_raw_response_bulk_create(self, async_client: AsyncCloudflare) -> account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -729,8 +701,6 @@ async def test_streaming_response_bulk_create(self, async_client: AsyncCloudflar account_id="account_id", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", @@ -757,8 +727,6 @@ async def test_path_params_bulk_create(self, async_client: AsyncCloudflare) -> N account_id="", data=[ { - "attacker": "Flying Yeti", - "attacker_country": "CN", "category": "Domain Resolution", "date": parse_datetime("2022-04-01T00:00:00Z"), "event": "An attacker registered the domain domain.com", diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index ba5252f9de0..32523143380 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -37,6 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", + id={}, file={}, metadata={}, require_signed_urls=True, @@ -303,6 +304,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", + id={}, file={}, metadata={}, require_signed_urls=True, diff --git a/tests/api_resources/kv/namespaces/test_keys.py b/tests/api_resources/kv/namespaces/test_keys.py index 351613f0bfb..aa49754278f 100644 --- a/tests/api_resources/kv/namespaces/test_keys.py +++ b/tests/api_resources/kv/namespaces/test_keys.py @@ -219,7 +219,12 @@ def test_method_bulk_update(self, client: Cloudflare) -> None: key = client.kv.namespaces.keys.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert_matches_type(Optional[KeyBulkUpdateResponse], key, path=["response"]) @@ -230,7 +235,12 @@ def test_raw_response_bulk_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert response.is_closed is True @@ -244,7 +254,12 @@ def test_streaming_response_bulk_update(self, client: Cloudflare) -> None: with client.kv.namespaces.keys.with_streaming_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -261,14 +276,24 @@ def test_path_params_bulk_update(self, client: Cloudflare) -> None: client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) @@ -469,7 +494,12 @@ async def test_method_bulk_update(self, async_client: AsyncCloudflare) -> None: key = await async_client.kv.namespaces.keys.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert_matches_type(Optional[KeyBulkUpdateResponse], key, path=["response"]) @@ -480,7 +510,12 @@ async def test_raw_response_bulk_update(self, async_client: AsyncCloudflare) -> response = await async_client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert response.is_closed is True @@ -494,7 +529,12 @@ async def test_streaming_response_bulk_update(self, async_client: AsyncCloudflar async with async_client.kv.namespaces.keys.with_streaming_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -511,12 +551,22 @@ async def test_path_params_bulk_update(self, async_client: AsyncCloudflare) -> N await async_client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.keys.with_raw_response.bulk_update( namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) diff --git a/tests/api_resources/kv/namespaces/test_metadata.py b/tests/api_resources/kv/namespaces/test_metadata.py index e6e56f6f06a..fff5e4d3e55 100644 --- a/tests/api_resources/kv/namespaces/test_metadata.py +++ b/tests/api_resources/kv/namespaces/test_metadata.py @@ -3,13 +3,12 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.kv.namespaces import MetadataGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +23,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: @@ -37,7 +36,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" metadata = response.parse() - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: @@ -50,7 +49,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" metadata = response.parse() - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) assert cast(Any, response.is_closed) is True @@ -88,7 +87,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @@ -101,7 +100,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" metadata = await response.parse() - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: @@ -114,7 +113,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" metadata = await response.parse() - assert_matches_type(Optional[MetadataGetResponse], metadata, path=["response"]) + assert_matches_type(object, metadata, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/kv/namespaces/test_values.py b/tests/api_resources/kv/namespaces/test_values.py index fbf0e7a0dd5..0b4b943c378 100644 --- a/tests/api_resources/kv/namespaces/test_values.py +++ b/tests/api_resources/kv/namespaces/test_values.py @@ -32,7 +32,6 @@ def test_method_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"]) @@ -44,10 +43,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", expiration=1578435000, expiration_ttl=300, + metadata={"someMetadataKey": "someMetadataValue"}, ) assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"]) @@ -58,7 +57,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -74,7 +72,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) as response: assert not response.is_closed @@ -93,7 +90,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -102,7 +98,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -111,7 +106,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -268,7 +262,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"]) @@ -280,10 +273,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", expiration=1578435000, expiration_ttl=300, + metadata={"someMetadataKey": "someMetadataValue"}, ) assert_matches_type(Optional[ValueUpdateResponse], value, path=["response"]) @@ -294,7 +287,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -310,7 +302,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) as response: assert not response.is_closed @@ -329,7 +320,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -338,7 +328,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) @@ -347,7 +336,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", - metadata='{"someMetadataKey": "someMetadataValue"}', value="Some Value", ) diff --git a/tests/api_resources/kv/test_namespaces.py b/tests/api_resources/kv/test_namespaces.py index df5a97c8a2d..132b87ecd0e 100644 --- a/tests/api_resources/kv/test_namespaces.py +++ b/tests/api_resources/kv/test_namespaces.py @@ -338,7 +338,12 @@ def test_method_bulk_update(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert_matches_type(Optional[NamespaceBulkUpdateResponse], namespace, path=["response"]) @@ -347,7 +352,12 @@ def test_raw_response_bulk_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert response.is_closed is True @@ -360,7 +370,12 @@ def test_streaming_response_bulk_update(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -376,14 +391,24 @@ def test_path_params_bulk_update(self, client: Cloudflare) -> None: client.kv.namespaces.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.bulk_update( namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) @parametrize @@ -752,7 +777,12 @@ async def test_method_bulk_update(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert_matches_type(Optional[NamespaceBulkUpdateResponse], namespace, path=["response"]) @@ -761,7 +791,12 @@ async def test_raw_response_bulk_update(self, async_client: AsyncCloudflare) -> response = await async_client.kv.namespaces.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) assert response.is_closed is True @@ -774,7 +809,12 @@ async def test_streaming_response_bulk_update(self, async_client: AsyncCloudflar async with async_client.kv.namespaces.with_streaming_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -790,14 +830,24 @@ async def test_path_params_bulk_update(self, async_client: AsyncCloudflare) -> N await async_client.kv.namespaces.with_raw_response.bulk_update( namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.bulk_update( namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[ + { + "key": "My-Key", + "value": "Some string", + } + ], ) @parametrize diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index a5c39a87498..9f67942d5ec 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -33,28 +33,28 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="account_id", - dataset="http_requests", + dataset="gateway_dns", enabled=False, filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}', frequency="high", - kind="edge", + kind="", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, name="example.com", output_options={ - "batch_prefix": "batch_prefix", - "batch_suffix": "batch_suffix", - "cve_2021_44228": True, - "field_delimiter": "field_delimiter", - "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], + "batch_prefix": "", + "batch_suffix": "", + "cve_2021_44228": False, + "field_delimiter": ",", + "field_names": ["Datetime", "DstIP", "SrcIP"], "output_type": "ndjson", - "record_delimiter": "record_delimiter", - "record_prefix": "record_prefix", - "record_suffix": "record_suffix", + "record_delimiter": "", + "record_prefix": "{", + "record_suffix": "}\n", "record_template": "record_template", - "sample_rate": 0, + "sample_rate": 1, "timestamp_format": "unixnano", }, ownership_challenge="00000000000000000000", @@ -123,24 +123,24 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: enabled=False, filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}', frequency="high", - kind="edge", + kind="", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, name="example.com", output_options={ - "batch_prefix": "batch_prefix", - "batch_suffix": "batch_suffix", - "cve_2021_44228": True, - "field_delimiter": "field_delimiter", - "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], + "batch_prefix": "", + "batch_suffix": "", + "cve_2021_44228": False, + "field_delimiter": ",", + "field_names": ["Datetime", "DstIP", "SrcIP"], "output_type": "ndjson", - "record_delimiter": "record_delimiter", - "record_prefix": "record_prefix", - "record_suffix": "record_suffix", + "record_delimiter": "", + "record_prefix": "{", + "record_suffix": "}\n", "record_template": "record_template", - "sample_rate": 0, + "sample_rate": 1, "timestamp_format": "unixnano", }, ownership_challenge="00000000000000000000", @@ -386,28 +386,28 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="account_id", - dataset="http_requests", + dataset="gateway_dns", enabled=False, filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}', frequency="high", - kind="edge", + kind="", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, name="example.com", output_options={ - "batch_prefix": "batch_prefix", - "batch_suffix": "batch_suffix", - "cve_2021_44228": True, - "field_delimiter": "field_delimiter", - "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], + "batch_prefix": "", + "batch_suffix": "", + "cve_2021_44228": False, + "field_delimiter": ",", + "field_names": ["Datetime", "DstIP", "SrcIP"], "output_type": "ndjson", - "record_delimiter": "record_delimiter", - "record_prefix": "record_prefix", - "record_suffix": "record_suffix", + "record_delimiter": "", + "record_prefix": "{", + "record_suffix": "}\n", "record_template": "record_template", - "sample_rate": 0, + "sample_rate": 1, "timestamp_format": "unixnano", }, ownership_challenge="00000000000000000000", @@ -476,24 +476,24 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare enabled=False, filter='{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}', frequency="high", - kind="edge", + kind="", logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", max_upload_bytes=5000000, max_upload_interval_seconds=30, max_upload_records=1000, name="example.com", output_options={ - "batch_prefix": "batch_prefix", - "batch_suffix": "batch_suffix", - "cve_2021_44228": True, - "field_delimiter": "field_delimiter", - "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], + "batch_prefix": "", + "batch_suffix": "", + "cve_2021_44228": False, + "field_delimiter": ",", + "field_names": ["Datetime", "DstIP", "SrcIP"], "output_type": "ndjson", - "record_delimiter": "record_delimiter", - "record_prefix": "record_prefix", - "record_suffix": "record_suffix", + "record_delimiter": "", + "record_prefix": "{", + "record_suffix": "}\n", "record_template": "record_template", - "sample_rate": 0, + "sample_rate": 1, "timestamp_format": "unixnano", }, ownership_challenge="00000000000000000000", From 5a71a182c4e2ce7b38f23050668cc6a35f4217c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:48:44 +0000 Subject: [PATCH 009/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a562f0115b2..0918cb5fb13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0d0950b4d6565ebd937ab7f58c20ec77ed448ada47e892675290ed602d1f1e5d.yml -openapi_spec_hash: 3471c05655ab2e06b07d7bab145428fa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-04263c11fcc497830efaecf2e1d4a92964bd7644843b5f844b7732824f7e72f1.yml +openapi_spec_hash: 7218dfe3dcef41955ccebd37926e5ab5 config_hash: cce40d4d65a4d67d5df957a75a15b567 From 6956f9c6e8bafc063f881470472cab2fac685f6a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:51:00 +0000 Subject: [PATCH 010/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0918cb5fb13..312388e1b1e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-04263c11fcc497830efaecf2e1d4a92964bd7644843b5f844b7732824f7e72f1.yml -openapi_spec_hash: 7218dfe3dcef41955ccebd37926e5ab5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ddf8a069f0ab3fba55a3c2ef565df531a87f4b4e644a417c9b893d0a2caa947.yml +openapi_spec_hash: 5ae460a9c8ba32923bd32c29f4fd8aa7 config_hash: cce40d4d65a4d67d5df957a75a15b567 From b922a4222e62aab42fde113002dac1ac69b07377 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 17:08:49 +0000 Subject: [PATCH 011/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 312388e1b1e..9a9c5b222e7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ddf8a069f0ab3fba55a3c2ef565df531a87f4b4e644a417c9b893d0a2caa947.yml -openapi_spec_hash: 5ae460a9c8ba32923bd32c29f4fd8aa7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4fd98a6315cb1b94edd2d2df35e2465c746911b41e1d86f1fba52d3e6d0be815.yml +openapi_spec_hash: 340470e070a8cc8c8f384adb719444d1 config_hash: cce40d4d65a4d67d5df957a75a15b567 From 764b4ea4333e86e8c1c76c7625887c077c435f8a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 17:13:23 +0000 Subject: [PATCH 012/392] feat(api): api update --- .stats.yml | 4 +- .../threat_events/threat_events.py | 4 +- .../threat_event_bulk_create_response.py | 66 +------------------ 3 files changed, 6 insertions(+), 68 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a9c5b222e7..4ecf05ede55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4fd98a6315cb1b94edd2d2df35e2465c746911b41e1d86f1fba52d3e6d0be815.yml -openapi_spec_hash: 340470e070a8cc8c8f384adb719444d1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6032d4dce84efd134480df9d7b9bd707dedead4b87d517a9e3457c188c94f1a3.yml +openapi_spec_hash: 5402c67ce10fff73b2fc27137c2ee436 config_hash: cce40d4d65a4d67d5df957a75a15b567 diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py index be583ad7b49..1de42ea02f3 100644 --- a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py +++ b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py @@ -419,7 +419,7 @@ def bulk_create( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=ThreatEventBulkCreateResponse, + cast_to=float, ) def edit( @@ -816,7 +816,7 @@ async def bulk_create( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=ThreatEventBulkCreateResponse, + cast_to=float, ) async def edit( diff --git a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py index 7d9273c9f24..e246309fd92 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py @@ -1,69 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional from typing_extensions import TypeAlias -from pydantic import Field as FieldInfo +__all__ = ["ThreatEventBulkCreateResponse"] -from ..._models import BaseModel - -__all__ = ["ThreatEventBulkCreateResponse", "ThreatEventBulkCreateResponseItem"] - - -class ThreatEventBulkCreateResponseItem(BaseModel): - id: float - - account_id: float = FieldInfo(alias="accountId") - - attacker: str - - attacker_country: str = FieldInfo(alias="attackerCountry") - - category: str - - category_id: float = FieldInfo(alias="categoryId") - - date: str - - event: str - - indicator: str - - indicator_type: str = FieldInfo(alias="indicatorType") - - indicator_type_id: float = FieldInfo(alias="indicatorTypeId") - - kill_chain: float = FieldInfo(alias="killChain") - - mitre_attack: List[str] = FieldInfo(alias="mitreAttack") - - num_referenced: float = FieldInfo(alias="numReferenced") - - num_references: float = FieldInfo(alias="numReferences") - - raw_id: str = FieldInfo(alias="rawId") - - referenced: List[str] - - referenced_ids: List[float] = FieldInfo(alias="referencedIds") - - references: List[str] - - references_ids: List[float] = FieldInfo(alias="referencesIds") - - tags: List[str] - - target_country: str = FieldInfo(alias="targetCountry") - - target_industry: str = FieldInfo(alias="targetIndustry") - - tlp: str - - uuid: str - - insight: Optional[str] = None - - releasability_id: Optional[str] = FieldInfo(alias="releasabilityId", default=None) - - -ThreatEventBulkCreateResponse: TypeAlias = List[ThreatEventBulkCreateResponseItem] +ThreatEventBulkCreateResponse: TypeAlias = float From ed26a1053c82b3e645c202f01f45e999fa4718e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 17:30:52 +0000 Subject: [PATCH 013/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4ecf05ede55..bf5b298372f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6032d4dce84efd134480df9d7b9bd707dedead4b87d517a9e3457c188c94f1a3.yml -openapi_spec_hash: 5402c67ce10fff73b2fc27137c2ee436 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-349f60941504b93b7ffd8665d7169fffb3b4b44da7ff7925dfb7735c5dc2c064.yml +openapi_spec_hash: c6dd6121ac070b9e20a3e9fe175434c6 config_hash: cce40d4d65a4d67d5df957a75a15b567 From 80d9fefc3aabba6ee9d6addea001a7108b9684cd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:01:59 +0000 Subject: [PATCH 014/392] feat(client): add support for aiohttp --- README.md | 36 ++++++++++++++++ pyproject.toml | 2 + requirements-dev.lock | 27 ++++++++++++ requirements.lock | 27 ++++++++++++ src/cloudflare/__init__.py | 3 +- src/cloudflare/_base_client.py | 22 ++++++++++ .../api_resources/accounts/logs/test_audit.py | 4 +- tests/api_resources/accounts/test_members.py | 4 +- tests/api_resources/accounts/test_roles.py | 4 +- .../accounts/test_subscriptions.py | 4 +- tests/api_resources/accounts/test_tokens.py | 4 +- .../accounts/tokens/test_permission_groups.py | 4 +- .../accounts/tokens/test_value.py | 4 +- tests/api_resources/acm/test_total_tls.py | 4 +- .../addressing/address_maps/test_accounts.py | 4 +- .../addressing/address_maps/test_ips.py | 4 +- .../addressing/address_maps/test_zones.py | 4 +- .../prefixes/test_advertisement_status.py | 4 +- .../addressing/prefixes/test_bgp_prefixes.py | 4 +- .../addressing/prefixes/test_delegations.py | 4 +- .../prefixes/test_service_bindings.py | 4 +- .../regional_hostnames/test_regions.py | 4 +- .../addressing/test_address_maps.py | 4 +- .../addressing/test_loa_documents.py | 4 +- .../api_resources/addressing/test_prefixes.py | 4 +- .../addressing/test_regional_hostnames.py | 4 +- .../api_resources/addressing/test_services.py | 4 +- .../api_resources/ai/finetunes/test_assets.py | 4 +- .../api_resources/ai/finetunes/test_public.py | 4 +- tests/api_resources/ai/models/test_schema.py | 4 +- tests/api_resources/ai/test_authors.py | 4 +- tests/api_resources/ai/test_finetunes.py | 4 +- tests/api_resources/ai/test_models.py | 4 +- tests/api_resources/ai/test_tasks.py | 4 +- .../api_resources/ai_gateway/test_datasets.py | 4 +- .../ai_gateway/test_evaluation_types.py | 4 +- .../ai_gateway/test_evaluations.py | 4 +- tests/api_resources/ai_gateway/test_logs.py | 4 +- tests/api_resources/ai_gateway/test_urls.py | 4 +- .../alerting/destinations/test_eligible.py | 4 +- .../alerting/destinations/test_pagerduty.py | 4 +- .../alerting/destinations/test_webhooks.py | 4 +- .../alerting/test_available_alerts.py | 4 +- tests/api_resources/alerting/test_history.py | 4 +- tests/api_resources/alerting/test_policies.py | 4 +- .../api_gateway/discovery/test_operations.py | 4 +- .../expression_template/test_fallthrough.py | 4 +- .../operations/test_schema_validation.py | 4 +- .../settings/test_schema_validation.py | 4 +- .../api_gateway/test_configurations.py | 4 +- .../api_gateway/test_discovery.py | 4 +- .../api_gateway/test_operations.py | 4 +- .../api_resources/api_gateway/test_schemas.py | 4 +- .../api_gateway/test_user_schemas.py | 4 +- .../api_gateway/user_schemas/test_hosts.py | 4 +- .../user_schemas/test_operations.py | 4 +- .../api_resources/argo/test_smart_routing.py | 4 +- .../api_resources/argo/test_tiered_caching.py | 4 +- tests/api_resources/billing/test_profiles.py | 4 +- .../botnet_feed/configs/test_asn.py | 4 +- tests/api_resources/botnet_feed/test_asn.py | 4 +- .../browser_rendering/test_content.py | 4 +- .../browser_rendering/test_json.py | 4 +- .../browser_rendering/test_links.py | 4 +- .../browser_rendering/test_markdown.py | 4 +- .../browser_rendering/test_pdf.py | 4 +- .../browser_rendering/test_scrape.py | 4 +- .../browser_rendering/test_screenshot.py | 4 +- .../browser_rendering/test_snapshot.py | 4 +- .../api_resources/cache/test_cache_reserve.py | 4 +- .../cache/test_regional_tiered_cache.py | 4 +- .../cache/test_smart_tiered_cache.py | 4 +- tests/api_resources/cache/test_variants.py | 4 +- tests/api_resources/calls/test_sfu.py | 4 +- tests/api_resources/calls/test_turn.py | 4 +- .../test_hostname_associations.py | 4 +- .../cloud_connector/test_rules.py | 4 +- .../cloudforce_one/requests/test_assets.py | 4 +- .../cloudforce_one/requests/test_message.py | 4 +- .../cloudforce_one/requests/test_priority.py | 4 +- .../cloudforce_one/scans/test_config.py | 4 +- .../cloudforce_one/scans/test_results.py | 4 +- .../cloudforce_one/test_requests.py | 4 +- .../cloudforce_one/test_threat_events.py | 4 +- .../threat_events/datasets/test_health.py | 4 +- .../threat_events/test_attackers.py | 4 +- .../threat_events/test_categories.py | 4 +- .../threat_events/test_countries.py | 4 +- .../threat_events/test_crons.py | 4 +- .../threat_events/test_datasets.py | 4 +- .../threat_events/test_event_tags.py | 4 +- .../threat_events/test_indicator_types.py | 4 +- .../threat_events/test_insights.py | 4 +- .../cloudforce_one/threat_events/test_raw.py | 4 +- .../threat_events/test_relate.py | 4 +- .../cloudforce_one/threat_events/test_tags.py | 4 +- .../threat_events/test_target_industries.py | 4 +- .../content_scanning/test_payloads.py | 4 +- .../content_scanning/test_settings.py | 4 +- .../custom_certificates/test_prioritize.py | 4 +- .../certificate_pack/test_certificates.py | 4 +- .../custom_hostnames/test_fallback_origin.py | 4 +- tests/api_resources/d1/test_database.py | 4 +- .../diagnostics/test_traceroutes.py | 4 +- .../dns/analytics/reports/test_bytimes.py | 4 +- .../dns/analytics/test_reports.py | 4 +- .../dns/settings/account/test_views.py | 4 +- .../dns/settings/test_account.py | 4 +- tests/api_resources/dns/settings/test_zone.py | 4 +- tests/api_resources/dns/test_dnssec.py | 4 +- tests/api_resources/dns/test_records.py | 4 +- .../zone_transfers/outgoing/test_status.py | 4 +- .../dns/zone_transfers/test_acls.py | 4 +- .../dns/zone_transfers/test_force_axfr.py | 4 +- .../dns/zone_transfers/test_incoming.py | 4 +- .../dns/zone_transfers/test_outgoing.py | 4 +- .../dns/zone_transfers/test_peers.py | 4 +- .../dns/zone_transfers/test_tsigs.py | 4 +- .../analytics/reports/test_bytimes.py | 4 +- .../dns_firewall/analytics/test_reports.py | 4 +- .../dns_firewall/test_reverse_dns.py | 4 +- .../namespaces/test_objects.py | 4 +- .../durable_objects/test_namespaces.py | 4 +- .../email_routing/rules/test_catch_alls.py | 4 +- .../email_routing/test_addresses.py | 4 +- tests/api_resources/email_routing/test_dns.py | 4 +- .../api_resources/email_routing/test_rules.py | 4 +- .../investigate/test_detections.py | 4 +- .../email_security/investigate/test_move.py | 4 +- .../investigate/test_preview.py | 4 +- .../email_security/investigate/test_raw.py | 4 +- .../investigate/test_reclassify.py | 4 +- .../investigate/test_release.py | 4 +- .../email_security/investigate/test_trace.py | 4 +- .../settings/test_allow_policies.py | 4 +- .../settings/test_block_senders.py | 4 +- .../email_security/settings/test_domains.py | 4 +- .../settings/test_impersonation_registry.py | 4 +- .../settings/test_trusted_domains.py | 4 +- .../email_security/test_investigate.py | 4 +- .../email_security/test_submissions.py | 4 +- .../firewall/test_access_rules.py | 4 +- .../api_resources/firewall/test_lockdowns.py | 4 +- tests/api_resources/firewall/test_rules.py | 4 +- tests/api_resources/firewall/test_ua_rules.py | 4 +- .../firewall/waf/packages/test_groups.py | 4 +- .../firewall/waf/packages/test_rules.py | 4 +- .../firewall/waf/test_overrides.py | 4 +- .../firewall/waf/test_packages.py | 4 +- .../healthchecks/test_previews.py | 4 +- .../hostnames/settings/test_tls.py | 4 +- .../api_resources/hyperdrive/test_configs.py | 4 +- .../iam/test_permission_groups.py | 4 +- .../api_resources/iam/test_resource_groups.py | 4 +- tests/api_resources/iam/test_user_groups.py | 4 +- .../iam/user_groups/test_members.py | 4 +- tests/api_resources/images/test_v1.py | 4 +- tests/api_resources/images/test_v2.py | 4 +- tests/api_resources/images/v1/test_blobs.py | 4 +- tests/api_resources/images/v1/test_keys.py | 4 +- tests/api_resources/images/v1/test_stats.py | 4 +- .../api_resources/images/v1/test_variants.py | 4 +- .../images/v2/test_direct_uploads.py | 4 +- tests/api_resources/intel/asn/test_subnets.py | 4 +- .../attack_surface_report/test_issue_types.py | 4 +- .../attack_surface_report/test_issues.py | 4 +- .../api_resources/intel/domains/test_bulks.py | 4 +- .../intel/indicator_feeds/test_downloads.py | 4 +- .../intel/indicator_feeds/test_permissions.py | 4 +- .../intel/indicator_feeds/test_snapshots.py | 4 +- tests/api_resources/intel/test_asn.py | 4 +- tests/api_resources/intel/test_dns.py | 4 +- .../intel/test_domain_history.py | 4 +- tests/api_resources/intel/test_domains.py | 4 +- .../intel/test_indicator_feeds.py | 4 +- tests/api_resources/intel/test_ip_lists.py | 4 +- tests/api_resources/intel/test_ips.py | 4 +- .../intel/test_miscategorizations.py | 4 +- tests/api_resources/intel/test_sinkholes.py | 4 +- tests/api_resources/intel/test_whois.py | 4 +- .../api_resources/kv/namespaces/test_keys.py | 4 +- .../kv/namespaces/test_metadata.py | 4 +- .../kv/namespaces/test_values.py | 4 +- tests/api_resources/kv/test_namespaces.py | 4 +- .../test_detections.py | 4 +- .../load_balancers/monitors/test_previews.py | 4 +- .../monitors/test_references.py | 4 +- .../load_balancers/pools/test_health.py | 4 +- .../load_balancers/pools/test_references.py | 4 +- .../load_balancers/test_monitors.py | 4 +- .../load_balancers/test_pools.py | 4 +- .../load_balancers/test_previews.py | 4 +- .../load_balancers/test_regions.py | 4 +- .../load_balancers/test_searches.py | 4 +- .../logpush/datasets/test_fields.py | 4 +- .../logpush/datasets/test_jobs.py | 4 +- tests/api_resources/logpush/test_edge.py | 4 +- tests/api_resources/logpush/test_jobs.py | 4 +- tests/api_resources/logpush/test_ownership.py | 4 +- tests/api_resources/logpush/test_validate.py | 4 +- .../logs/control/cmb/test_config.py | 4 +- .../logs/control/test_retention.py | 4 +- .../logs/received/test_fields.py | 4 +- tests/api_resources/logs/test_rayid.py | 4 +- tests/api_resources/logs/test_received.py | 4 +- .../catalog_syncs/test_prebuilt_policies.py | 4 +- .../on_ramps/test_address_spaces.py | 4 +- .../test_catalog_syncs.py | 4 +- .../test_cloud_integrations.py | 4 +- .../magic_cloud_networking/test_on_ramps.py | 4 +- .../magic_cloud_networking/test_resources.py | 4 +- .../configs/test_full.py | 4 +- .../rules/test_advertisements.py | 4 +- .../magic_network_monitoring/test_configs.py | 4 +- .../magic_network_monitoring/test_rules.py | 4 +- .../vpc_flows/test_tokens.py | 4 +- .../connectors/events/test_latest.py | 4 +- .../connectors/snapshots/test_latest.py | 4 +- .../magic_transit/connectors/test_events.py | 4 +- .../connectors/test_snapshots.py | 4 +- .../magic_transit/pcaps/test_download.py | 4 +- .../magic_transit/pcaps/test_ownership.py | 4 +- .../magic_transit/sites/test_acls.py | 4 +- .../magic_transit/sites/test_lans.py | 4 +- .../magic_transit/sites/test_wans.py | 4 +- .../api_resources/magic_transit/test_apps.py | 4 +- .../magic_transit/test_cf_interconnects.py | 4 +- .../magic_transit/test_connectors.py | 4 +- .../magic_transit/test_gre_tunnels.py | 4 +- .../magic_transit/test_ipsec_tunnels.py | 4 +- .../api_resources/magic_transit/test_pcaps.py | 4 +- .../magic_transit/test_routes.py | 4 +- .../api_resources/magic_transit/test_sites.py | 4 +- .../mtls_certificates/test_associations.py | 4 +- .../network_interconnects/test_cnis.py | 4 +- .../test_interconnects.py | 4 +- .../network_interconnects/test_settings.py | 4 +- .../network_interconnects/test_slots.py | 4 +- .../hostnames/test_certificates.py | 4 +- .../origin_tls_client_auth/test_hostnames.py | 4 +- .../origin_tls_client_auth/test_settings.py | 4 +- .../page_shield/test_connections.py | 4 +- .../api_resources/page_shield/test_cookies.py | 4 +- .../page_shield/test_policies.py | 4 +- .../api_resources/page_shield/test_scripts.py | 4 +- .../projects/deployments/history/test_logs.py | 4 +- .../pages/projects/test_deployments.py | 4 +- .../pages/projects/test_domains.py | 4 +- tests/api_resources/pages/test_projects.py | 4 +- tests/api_resources/queues/test_consumers.py | 4 +- tests/api_resources/queues/test_messages.py | 4 +- tests/api_resources/queues/test_purge.py | 4 +- .../r2/buckets/domains/test_custom.py | 4 +- .../r2/buckets/domains/test_managed.py | 4 +- tests/api_resources/r2/buckets/test_cors.py | 4 +- .../r2/buckets/test_event_notifications.py | 4 +- .../r2/buckets/test_lifecycle.py | 4 +- tests/api_resources/r2/buckets/test_locks.py | 4 +- .../api_resources/r2/buckets/test_metrics.py | 4 +- tests/api_resources/r2/buckets/test_sippy.py | 4 +- .../r2/super_slurper/jobs/test_logs.py | 4 +- .../test_connectivity_precheck.py | 4 +- .../r2/super_slurper/test_jobs.py | 4 +- tests/api_resources/r2/test_buckets.py | 4 +- .../r2/test_temporary_credentials.py | 4 +- .../radar/ai/bots/test_summary.py | 4 +- .../radar/ai/inference/test_summary.py | 4 +- .../timeseries_groups/test_summary.py | 4 +- .../radar/ai/test_timeseries_groups.py | 4 +- .../radar/ai/test_to_markdown.py | 4 +- .../radar/annotations/test_outages.py | 4 +- .../api_resources/radar/as112/test_summary.py | 4 +- .../radar/as112/test_timeseries_groups.py | 4 +- tests/api_resources/radar/as112/test_top.py | 4 +- .../radar/attacks/layer3/test_summary.py | 4 +- .../attacks/layer3/test_timeseries_groups.py | 4 +- .../radar/attacks/layer3/test_top.py | 4 +- .../attacks/layer3/top/test_locations.py | 4 +- .../radar/attacks/layer7/test_summary.py | 4 +- .../attacks/layer7/test_timeseries_groups.py | 4 +- .../radar/attacks/layer7/test_top.py | 4 +- .../radar/attacks/layer7/top/test_ases.py | 4 +- .../attacks/layer7/top/test_locations.py | 4 +- .../radar/attacks/test_layer3.py | 4 +- .../radar/attacks/test_layer7.py | 4 +- .../radar/bgp/hijacks/test_events.py | 4 +- .../radar/bgp/leaks/test_events.py | 4 +- tests/api_resources/radar/bgp/test_ips.py | 4 +- tests/api_resources/radar/bgp/test_routes.py | 4 +- tests/api_resources/radar/bgp/test_top.py | 4 +- .../api_resources/radar/bgp/top/test_ases.py | 4 +- tests/api_resources/radar/dns/test_summary.py | 4 +- .../radar/dns/test_timeseries_groups.py | 4 +- tests/api_resources/radar/dns/test_top.py | 4 +- .../radar/email/routing/test_summary.py | 4 +- .../email/routing/test_timeseries_groups.py | 4 +- .../radar/email/security/test_summary.py | 4 +- .../email/security/test_timeseries_groups.py | 4 +- .../radar/email/security/top/test_tlds.py | 4 +- .../email/security/top/tlds/test_malicious.py | 4 +- .../email/security/top/tlds/test_spam.py | 4 +- .../email/security/top/tlds/test_spoof.py | 4 +- .../api_resources/radar/entities/test_asns.py | 4 +- .../radar/entities/test_locations.py | 4 +- .../radar/http/ases/test_bot_class.py | 4 +- .../radar/http/ases/test_browser_family.py | 4 +- .../radar/http/ases/test_device_type.py | 4 +- .../radar/http/ases/test_http_method.py | 4 +- .../radar/http/ases/test_http_protocol.py | 4 +- .../radar/http/ases/test_ip_version.py | 4 +- .../api_resources/radar/http/ases/test_os.py | 4 +- .../radar/http/ases/test_tls_version.py | 4 +- .../radar/http/locations/test_bot_class.py | 4 +- .../http/locations/test_browser_family.py | 4 +- .../radar/http/locations/test_device_type.py | 4 +- .../radar/http/locations/test_http_method.py | 4 +- .../http/locations/test_http_protocol.py | 4 +- .../radar/http/locations/test_ip_version.py | 4 +- .../radar/http/locations/test_os.py | 4 +- .../radar/http/locations/test_tls_version.py | 4 +- tests/api_resources/radar/http/test_ases.py | 4 +- .../radar/http/test_locations.py | 4 +- .../api_resources/radar/http/test_summary.py | 4 +- .../radar/http/test_timeseries_groups.py | 4 +- tests/api_resources/radar/http/test_top.py | 4 +- .../radar/leaked_credentials/test_summary.py | 4 +- .../test_timeseries_groups.py | 4 +- .../api_resources/radar/netflows/test_top.py | 4 +- .../radar/quality/speed/test_top.py | 4 +- tests/api_resources/radar/quality/test_iqi.py | 4 +- .../api_resources/radar/quality/test_speed.py | 4 +- .../radar/ranking/test_domain.py | 4 +- .../radar/ranking/test_internet_services.py | 4 +- .../radar/robots_txt/test_top.py | 4 +- .../radar/robots_txt/top/test_user_agents.py | 4 +- tests/api_resources/radar/test_annotations.py | 4 +- tests/api_resources/radar/test_as112.py | 4 +- tests/api_resources/radar/test_bgp.py | 4 +- tests/api_resources/radar/test_datasets.py | 4 +- tests/api_resources/radar/test_dns.py | 4 +- tests/api_resources/radar/test_entities.py | 4 +- tests/api_resources/radar/test_http.py | 4 +- tests/api_resources/radar/test_netflows.py | 4 +- tests/api_resources/radar/test_ranking.py | 4 +- tests/api_resources/radar/test_search.py | 4 +- .../radar/test_tcp_resets_timeouts.py | 4 +- .../radar/test_traffic_anomalies.py | 4 +- .../radar/traffic_anomalies/test_locations.py | 4 +- .../radar/verified_bots/test_top.py | 4 +- tests/api_resources/registrar/test_domains.py | 4 +- .../request_tracers/test_traces.py | 4 +- .../resource_sharing/test_recipients.py | 4 +- .../resource_sharing/test_resources.py | 4 +- .../rules/lists/test_bulk_operations.py | 4 +- tests/api_resources/rules/lists/test_items.py | 4 +- tests/api_resources/rules/test_lists.py | 4 +- .../rulesets/phases/test_versions.py | 4 +- tests/api_resources/rulesets/test_phases.py | 4 +- tests/api_resources/rulesets/test_rules.py | 4 +- tests/api_resources/rulesets/test_versions.py | 4 +- tests/api_resources/rum/test_rules.py | 4 +- tests/api_resources/rum/test_site_info.py | 4 +- .../settings/test_operations.py | 4 +- .../schema_validation/test_schemas.py | 4 +- .../schema_validation/test_settings.py | 4 +- .../secrets_store/stores/test_secrets.py | 4 +- .../api_resources/secrets_store/test_quota.py | 4 +- .../secrets_store/test_stores.py | 4 +- .../security_center/insights/test_class_.py | 4 +- .../security_center/insights/test_severity.py | 4 +- .../security_center/insights/test_type.py | 4 +- .../security_center/test_insights.py | 4 +- tests/api_resources/snippets/test_content.py | 4 +- tests/api_resources/snippets/test_rules.py | 4 +- .../analytics/aggregates/test_currents.py | 4 +- .../spectrum/analytics/events/test_bytimes.py | 4 +- .../analytics/events/test_summaries.py | 4 +- tests/api_resources/spectrum/test_apps.py | 4 +- tests/api_resources/speed/pages/test_tests.py | 4 +- .../speed/test_availabilities.py | 4 +- tests/api_resources/speed/test_pages.py | 4 +- tests/api_resources/speed/test_schedule.py | 4 +- .../ssl/certificate_packs/test_quota.py | 4 +- tests/api_resources/ssl/test_analyze.py | 4 +- .../ssl/test_certificate_packs.py | 4 +- .../api_resources/ssl/test_recommendations.py | 4 +- tests/api_resources/ssl/test_verification.py | 4 +- .../ssl/universal/test_settings.py | 4 +- .../stream/captions/language/test_vtt.py | 4 +- .../stream/captions/test_language.py | 4 +- .../stream/live_inputs/test_outputs.py | 4 +- .../api_resources/stream/test_audio_tracks.py | 4 +- tests/api_resources/stream/test_captions.py | 4 +- tests/api_resources/stream/test_clip.py | 4 +- tests/api_resources/stream/test_copy.py | 4 +- .../stream/test_direct_upload.py | 4 +- tests/api_resources/stream/test_downloads.py | 4 +- tests/api_resources/stream/test_embed.py | 4 +- tests/api_resources/stream/test_keys.py | 4 +- .../api_resources/stream/test_live_inputs.py | 4 +- tests/api_resources/stream/test_token.py | 4 +- tests/api_resources/stream/test_videos.py | 4 +- tests/api_resources/stream/test_watermarks.py | 4 +- tests/api_resources/stream/test_webhooks.py | 4 +- tests/api_resources/test_abuse_reports.py | 4 +- tests/api_resources/test_accounts.py | 4 +- tests/api_resources/test_ai.py | 4 +- tests/api_resources/test_ai_gateway.py | 4 +- tests/api_resources/test_audit_logs.py | 4 +- tests/api_resources/test_bot_management.py | 4 +- tests/api_resources/test_brand_protection.py | 4 +- tests/api_resources/test_cache.py | 4 +- .../api_resources/test_client_certificates.py | 4 +- tests/api_resources/test_content_scanning.py | 4 +- .../api_resources/test_custom_certificates.py | 4 +- tests/api_resources/test_custom_hostnames.py | 4 +- .../api_resources/test_custom_nameservers.py | 4 +- tests/api_resources/test_custom_pages.py | 4 +- tests/api_resources/test_dcv_delegation.py | 4 +- tests/api_resources/test_dns_firewall.py | 4 +- tests/api_resources/test_email_routing.py | 4 +- tests/api_resources/test_filters.py | 4 +- tests/api_resources/test_healthchecks.py | 4 +- tests/api_resources/test_ips.py | 4 +- .../test_keyless_certificates.py | 4 +- .../test_leaked_credential_checks.py | 4 +- tests/api_resources/test_load_balancers.py | 4 +- .../api_resources/test_managed_transforms.py | 4 +- tests/api_resources/test_memberships.py | 4 +- tests/api_resources/test_mtls_certificates.py | 4 +- .../test_origin_ca_certificates.py | 4 +- .../test_origin_post_quantum_encryption.py | 4 +- .../test_origin_tls_client_auth.py | 4 +- tests/api_resources/test_page_rules.py | 4 +- tests/api_resources/test_page_shield.py | 4 +- tests/api_resources/test_pipelines.py | 4 +- tests/api_resources/test_queues.py | 4 +- tests/api_resources/test_rate_limits.py | 4 +- tests/api_resources/test_resource_sharing.py | 4 +- tests/api_resources/test_rulesets.py | 4 +- tests/api_resources/test_security_txt.py | 4 +- tests/api_resources/test_snippets.py | 4 +- tests/api_resources/test_stream.py | 4 +- tests/api_resources/test_url_normalization.py | 4 +- tests/api_resources/test_user.py | 4 +- tests/api_resources/test_waiting_rooms.py | 4 +- tests/api_resources/test_workflows.py | 4 +- tests/api_resources/test_zaraz.py | 4 +- tests/api_resources/test_zones.py | 4 +- tests/api_resources/turnstile/test_widgets.py | 4 +- .../url_scanner/test_responses.py | 4 +- tests/api_resources/url_scanner/test_scans.py | 4 +- .../user/billing/test_history.py | 4 +- .../user/billing/test_profile.py | 4 +- tests/api_resources/user/test_audit_logs.py | 4 +- tests/api_resources/user/test_invites.py | 4 +- .../api_resources/user/test_organizations.py | 4 +- .../api_resources/user/test_subscriptions.py | 4 +- tests/api_resources/user/test_tokens.py | 4 +- .../user/tokens/test_permission_groups.py | 4 +- tests/api_resources/user/tokens/test_value.py | 4 +- .../vectorize/indexes/test_metadata_index.py | 4 +- tests/api_resources/vectorize/test_indexes.py | 4 +- .../waiting_rooms/events/test_details.py | 4 +- .../waiting_rooms/test_events.py | 4 +- .../api_resources/waiting_rooms/test_page.py | 4 +- .../api_resources/waiting_rooms/test_rules.py | 4 +- .../waiting_rooms/test_settings.py | 4 +- .../waiting_rooms/test_statuses.py | 4 +- .../content_lists/test_entries.py | 4 +- .../test_content_lists.py | 4 +- tests/api_resources/web3/test_hostnames.py | 4 +- .../workers/assets/test_upload.py | 4 +- .../workers/observability/test_telemetry.py | 4 +- .../workers/scripts/assets/test_upload.py | 4 +- .../workers/scripts/test_content.py | 4 +- .../workers/scripts/test_deployments.py | 4 +- .../workers/scripts/test_schedules.py | 4 +- .../test_script_and_version_settings.py | 4 +- .../workers/scripts/test_secrets.py | 4 +- .../workers/scripts/test_settings.py | 4 +- .../workers/scripts/test_subdomain.py | 4 +- .../workers/scripts/test_tail.py | 4 +- .../workers/scripts/test_versions.py | 4 +- .../workers/test_account_settings.py | 4 +- tests/api_resources/workers/test_domains.py | 4 +- tests/api_resources/workers/test_routes.py | 4 +- tests/api_resources/workers/test_scripts.py | 4 +- .../api_resources/workers/test_subdomains.py | 4 +- .../namespaces/scripts/test_asset_upload.py | 4 +- .../namespaces/scripts/test_bindings.py | 4 +- .../namespaces/scripts/test_content.py | 4 +- .../namespaces/scripts/test_secrets.py | 4 +- .../namespaces/scripts/test_settings.py | 4 +- .../dispatch/namespaces/scripts/test_tags.py | 4 +- .../dispatch/namespaces/test_scripts.py | 4 +- .../dispatch/test_namespaces.py | 4 +- .../workflows/instances/test_events.py | 4 +- .../workflows/instances/test_status.py | 4 +- .../api_resources/workflows/test_instances.py | 4 +- .../api_resources/workflows/test_versions.py | 4 +- .../zaraz/history/test_configs.py | 4 +- tests/api_resources/zaraz/test_config.py | 4 +- tests/api_resources/zaraz/test_default.py | 4 +- tests/api_resources/zaraz/test_export.py | 4 +- tests/api_resources/zaraz/test_history.py | 4 +- tests/api_resources/zaraz/test_publish.py | 4 +- tests/api_resources/zaraz/test_workflow.py | 4 +- .../applications/policy_tests/test_users.py | 4 +- .../access/applications/test_cas.py | 4 +- .../access/applications/test_policies.py | 4 +- .../access/applications/test_policy_tests.py | 4 +- .../access/applications/test_settings.py | 4 +- .../applications/test_user_policy_checks.py | 4 +- .../access/certificates/test_settings.py | 4 +- .../access/infrastructure/test_targets.py | 4 +- .../access/logs/scim/test_updates.py | 4 +- .../access/logs/test_access_requests.py | 4 +- .../zero_trust/access/test_applications.py | 4 +- .../zero_trust/access/test_bookmarks.py | 4 +- .../zero_trust/access/test_certificates.py | 4 +- .../zero_trust/access/test_custom_pages.py | 4 +- .../zero_trust/access/test_gateway_ca.py | 4 +- .../zero_trust/access/test_groups.py | 4 +- .../zero_trust/access/test_keys.py | 4 +- .../zero_trust/access/test_policies.py | 4 +- .../zero_trust/access/test_service_tokens.py | 4 +- .../zero_trust/access/test_tags.py | 4 +- .../zero_trust/access/test_users.py | 4 +- .../access/users/test_active_sessions.py | 4 +- .../access/users/test_failed_logins.py | 4 +- .../access/users/test_last_seen_identity.py | 4 +- .../devices/policies/custom/test_excludes.py | 4 +- .../policies/custom/test_fallback_domains.py | 4 +- .../devices/policies/custom/test_includes.py | 4 +- .../policies/default/test_certificates.py | 4 +- .../devices/policies/default/test_excludes.py | 4 +- .../policies/default/test_fallback_domains.py | 4 +- .../devices/policies/default/test_includes.py | 4 +- .../devices/policies/test_custom.py | 4 +- .../devices/policies/test_default.py | 4 +- .../devices/posture/test_integrations.py | 4 +- .../resilience/test_global_warp_override.py | 4 +- .../zero_trust/devices/test_devices_.py | 4 +- .../zero_trust/devices/test_dex_tests.py | 4 +- .../zero_trust/devices/test_fleet_status.py | 4 +- .../zero_trust/devices/test_networks.py | 4 +- .../zero_trust/devices/test_override_codes.py | 4 +- .../zero_trust/devices/test_posture.py | 4 +- .../zero_trust/devices/test_registrations.py | 4 +- .../zero_trust/devices/test_revoke.py | 4 +- .../zero_trust/devices/test_settings.py | 4 +- .../zero_trust/devices/test_unrevoke.py | 4 +- .../zero_trust/dex/commands/test_devices.py | 4 +- .../zero_trust/dex/commands/test_downloads.py | 4 +- .../zero_trust/dex/commands/test_quota.py | 4 +- .../dex/fleet_status/test_devices.py | 4 +- .../dex/http_tests/test_percentiles.py | 4 +- .../zero_trust/dex/test_colos.py | 4 +- .../zero_trust/dex/test_commands.py | 4 +- .../zero_trust/dex/test_fleet_status.py | 4 +- .../zero_trust/dex/test_http_tests.py | 4 +- .../zero_trust/dex/test_tests.py | 4 +- .../zero_trust/dex/test_traceroute_tests.py | 4 +- .../zero_trust/dex/test_warp_change_events.py | 4 +- .../dex/tests/test_unique_devices.py | 4 +- .../test_network_path.py | 4 +- .../zero_trust/dlp/datasets/test_upload.py | 4 +- .../zero_trust/dlp/datasets/test_versions.py | 4 +- .../dlp/datasets/versions/test_entries.py | 4 +- .../dlp/email/test_account_mapping.py | 4 +- .../zero_trust/dlp/email/test_rules.py | 4 +- .../zero_trust/dlp/profiles/test_custom.py | 4 +- .../dlp/profiles/test_predefined.py | 4 +- .../zero_trust/dlp/test_datasets.py | 4 +- .../zero_trust/dlp/test_entries.py | 4 +- .../zero_trust/dlp/test_limits.py | 4 +- .../zero_trust/dlp/test_patterns.py | 4 +- .../zero_trust/dlp/test_payload_logs.py | 4 +- .../zero_trust/dlp/test_profiles.py | 4 +- .../configurations/test_custom_certificate.py | 4 +- .../zero_trust/gateway/lists/test_items.py | 4 +- .../zero_trust/gateway/test_app_types.py | 4 +- .../gateway/test_audit_ssh_settings.py | 4 +- .../zero_trust/gateway/test_categories.py | 4 +- .../zero_trust/gateway/test_certificates.py | 4 +- .../zero_trust/gateway/test_configurations.py | 4 +- .../zero_trust/gateway/test_lists.py | 4 +- .../zero_trust/gateway/test_locations.py | 4 +- .../zero_trust/gateway/test_logging.py | 4 +- .../gateway/test_proxy_endpoints.py | 4 +- .../zero_trust/gateway/test_rules.py | 4 +- .../identity_providers/scim/test_groups.py | 4 +- .../identity_providers/scim/test_users.py | 4 +- .../zero_trust/networks/routes/test_ips.py | 4 +- .../networks/routes/test_networks.py | 4 +- .../subnets/test_cloudflare_source.py | 4 +- .../zero_trust/networks/test_routes.py | 4 +- .../zero_trust/networks/test_subnets.py | 4 +- .../networks/test_virtual_networks.py | 4 +- .../zero_trust/organizations/test_doh.py | 4 +- .../integrations/test_references.py | 4 +- .../risk_scoring/test_behaviours.py | 4 +- .../risk_scoring/test_integrations.py | 4 +- .../zero_trust/risk_scoring/test_summary.py | 4 +- .../zero_trust/test_connectivity_settings.py | 4 +- .../api_resources/zero_trust/test_devices.py | 4 +- .../api_resources/zero_trust/test_gateway.py | 4 +- .../zero_trust/test_identity_providers.py | 4 +- .../zero_trust/test_organizations.py | 4 +- .../zero_trust/test_risk_scoring.py | 4 +- tests/api_resources/zero_trust/test_seats.py | 4 +- .../api_resources/zero_trust/test_tunnels.py | 4 +- .../cloudflared/test_configurations.py | 4 +- .../tunnels/cloudflared/test_connections.py | 4 +- .../tunnels/cloudflared/test_connectors.py | 4 +- .../tunnels/cloudflared/test_management.py | 4 +- .../tunnels/cloudflared/test_token.py | 4 +- .../zero_trust/tunnels/test_cloudflared.py | 4 +- .../zero_trust/tunnels/test_warp_connector.py | 4 +- .../tunnels/warp_connector/test_token.py | 4 +- .../zones/test_activation_check.py | 4 +- .../zones/test_custom_nameservers.py | 4 +- tests/api_resources/zones/test_holds.py | 4 +- tests/api_resources/zones/test_plans.py | 4 +- tests/api_resources/zones/test_rate_plans.py | 4 +- tests/api_resources/zones/test_settings.py | 4 +- .../api_resources/zones/test_subscriptions.py | 4 +- tests/conftest.py | 43 ++++++++++++++++--- 629 files changed, 2020 insertions(+), 628 deletions(-) diff --git a/README.md b/README.md index e416014c625..821cf8d0340 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,42 @@ asyncio.run(main()) Functionality between the synchronous and asynchronous clients is otherwise identical. +### With aiohttp + +By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend. + +You can enable this by installing `aiohttp`: + +```sh +# install from PyPI +pip install cloudflare[aiohttp] +``` + +Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: + +```python +import os +import asyncio +from cloudflare import DefaultAioHttpClient +from cloudflare import AsyncCloudflare + + +async def main() -> None: + async with AsyncCloudflare( + api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted + http_client=DefaultAioHttpClient(), + ) as client: + zone = await client.zones.create( + account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, + name="example.com", + type="full", + ) + print(zone.id) + + +asyncio.run(main()) +``` + ## Using types Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like: diff --git a/pyproject.toml b/pyproject.toml index b1f6854f5f6..3806b408b06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,8 @@ classifiers = [ Homepage = "https://github.com/cloudflare/cloudflare-python" Repository = "https://github.com/cloudflare/cloudflare-python" +[project.optional-dependencies] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index d30c3e08170..0ce6f78d53b 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -10,6 +10,13 @@ # universal: false -e file:. +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.8 + # via cloudflare + # via httpx-aiohttp +aiosignal==1.3.2 + # via aiohttp annotated-types==0.6.0 # via pydantic anyio==4.4.0 @@ -17,6 +24,10 @@ anyio==4.4.0 # via httpx argcomplete==3.1.2 # via nox +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp certifi==2023.7.22 # via httpcore # via httpx @@ -34,16 +45,23 @@ execnet==2.1.1 # via pytest-xdist filelock==3.12.4 # via virtualenv +frozenlist==1.6.2 + # via aiohttp + # via aiosignal h11==0.14.0 # via httpcore httpcore==1.0.2 # via httpx httpx==0.28.1 # via cloudflare + # via httpx-aiohttp # via respx +httpx-aiohttp==0.1.6 + # via cloudflare idna==3.4 # via anyio # via httpx + # via yarl importlib-metadata==7.0.0 iniconfig==2.0.0 # via pytest @@ -51,6 +69,9 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py +multidict==6.4.4 + # via aiohttp + # via yarl mypy==1.14.1 mypy-extensions==1.0.0 # via mypy @@ -65,6 +86,9 @@ platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 # via pytest +propcache==0.3.1 + # via aiohttp + # via yarl pydantic==2.10.3 # via cloudflare pydantic-core==2.27.1 @@ -98,11 +122,14 @@ tomli==2.0.2 typing-extensions==4.12.2 # via anyio # via cloudflare + # via multidict # via mypy # via pydantic # via pydantic-core # via pyright virtualenv==20.24.5 # via nox +yarl==1.20.0 + # via aiohttp zipp==3.17.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index 4752e59fd63..510fa9d9dc2 100644 --- a/requirements.lock +++ b/requirements.lock @@ -10,11 +10,22 @@ # universal: false -e file:. +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.8 + # via cloudflare + # via httpx-aiohttp +aiosignal==1.3.2 + # via aiohttp annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via cloudflare # via httpx +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp certifi==2023.7.22 # via httpcore # via httpx @@ -22,15 +33,28 @@ distro==1.8.0 # via cloudflare exceptiongroup==1.2.2 # via anyio +frozenlist==1.6.2 + # via aiohttp + # via aiosignal h11==0.14.0 # via httpcore httpcore==1.0.2 # via httpx httpx==0.28.1 # via cloudflare + # via httpx-aiohttp +httpx-aiohttp==0.1.6 + # via cloudflare idna==3.4 # via anyio # via httpx + # via yarl +multidict==6.4.4 + # via aiohttp + # via yarl +propcache==0.3.1 + # via aiohttp + # via yarl pydantic==2.10.3 # via cloudflare pydantic-core==2.27.1 @@ -41,5 +65,8 @@ sniffio==1.3.0 typing-extensions==4.12.2 # via anyio # via cloudflare + # via multidict # via pydantic # via pydantic-core +yarl==1.20.0 + # via aiohttp diff --git a/src/cloudflare/__init__.py b/src/cloudflare/__init__.py index 9ce8e45d0c0..9d76c218a03 100644 --- a/src/cloudflare/__init__.py +++ b/src/cloudflare/__init__.py @@ -36,7 +36,7 @@ UnprocessableEntityError, APIResponseValidationError, ) -from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient from ._utils._logs import setup_logging as _setup_logging __all__ = [ @@ -78,6 +78,7 @@ "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient", + "DefaultAioHttpClient", ] if not _t.TYPE_CHECKING: diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index d6d981cb568..206b0b459d1 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -1331,6 +1331,24 @@ def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) +try: + import httpx_aiohttp +except ImportError: + + class _DefaultAioHttpClient(httpx.AsyncClient): + def __init__(self, **_kwargs: Any) -> None: + raise RuntimeError("To use the aiohttp client you must have installed the package with the `aiohttp` extra") +else: + + class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore + def __init__(self, **kwargs: Any) -> None: + kwargs.setdefault("timeout", DEFAULT_TIMEOUT) + kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS) + kwargs.setdefault("follow_redirects", True) + + super().__init__(**kwargs) + + if TYPE_CHECKING: DefaultAsyncHttpxClient = httpx.AsyncClient """An alias to `httpx.AsyncClient` that provides the same defaults that this SDK @@ -1339,8 +1357,12 @@ def __init__(self, **kwargs: Any) -> None: This is useful because overriding the `http_client` with your own instance of `httpx.AsyncClient` will result in httpx's defaults being used, not ours. """ + + DefaultAioHttpClient = httpx.AsyncClient + """An alias to `httpx.AsyncClient` that changes the default HTTP transport to `aiohttp`.""" else: DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient + DefaultAioHttpClient = _DefaultAioHttpClient class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient): diff --git a/tests/api_resources/accounts/logs/test_audit.py b/tests/api_resources/accounts/logs/test_audit.py index 492d0ca3521..3cb3c774a1d 100644 --- a/tests/api_resources/accounts/logs/test_audit.py +++ b/tests/api_resources/accounts/logs/test_audit.py @@ -105,7 +105,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAudit: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO:investigate broken test") @parametrize diff --git a/tests/api_resources/accounts/test_members.py b/tests/api_resources/accounts/test_members.py index f35d0e13841..7a280726d61 100644 --- a/tests/api_resources/accounts/test_members.py +++ b/tests/api_resources/accounts/test_members.py @@ -508,7 +508,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMembers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="HTTP 422 error from prism") @parametrize diff --git a/tests/api_resources/accounts/test_roles.py b/tests/api_resources/accounts/test_roles.py index 6a97d8c4b31..b6f6aa04a0d 100644 --- a/tests/api_resources/accounts/test_roles.py +++ b/tests/api_resources/accounts/test_roles.py @@ -115,7 +115,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/accounts/test_subscriptions.py b/tests/api_resources/accounts/test_subscriptions.py index b09e6c11610..1ef48e9a3c3 100644 --- a/tests/api_resources/accounts/test_subscriptions.py +++ b/tests/api_resources/accounts/test_subscriptions.py @@ -232,7 +232,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index 6b17512734d..68eb6073946 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -536,7 +536,9 @@ def test_path_params_verify(self, client: Cloudflare) -> None: class TestAsyncTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/accounts/tokens/test_permission_groups.py b/tests/api_resources/accounts/tokens/test_permission_groups.py index bd764c44569..e8398ef2527 100644 --- a/tests/api_resources/accounts/tokens/test_permission_groups.py +++ b/tests/api_resources/accounts/tokens/test_permission_groups.py @@ -104,7 +104,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPermissionGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/accounts/tokens/test_value.py b/tests/api_resources/accounts/tokens/test_value.py index 00a709c212b..c04ad23d1c6 100644 --- a/tests/api_resources/accounts/tokens/test_value.py +++ b/tests/api_resources/accounts/tokens/test_value.py @@ -75,7 +75,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncValue: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/acm/test_total_tls.py b/tests/api_resources/acm/test_total_tls.py index cf7af173e5f..f627910b593 100644 --- a/tests/api_resources/acm/test_total_tls.py +++ b/tests/api_resources/acm/test_total_tls.py @@ -111,7 +111,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTotalTLS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/address_maps/test_accounts.py b/tests/api_resources/addressing/address_maps/test_accounts.py index 3bb5dc17626..8a8a2efbacc 100644 --- a/tests/api_resources/addressing/address_maps/test_accounts.py +++ b/tests/api_resources/addressing/address_maps/test_accounts.py @@ -120,7 +120,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncAccounts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/address_maps/test_ips.py b/tests/api_resources/addressing/address_maps/test_ips.py index 63221153f3a..ee94225fd61 100644 --- a/tests/api_resources/addressing/address_maps/test_ips.py +++ b/tests/api_resources/addressing/address_maps/test_ips.py @@ -145,7 +145,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/address_maps/test_zones.py b/tests/api_resources/addressing/address_maps/test_zones.py index f0fe5d2d2bb..978b3f76428 100644 --- a/tests/api_resources/addressing/address_maps/test_zones.py +++ b/tests/api_resources/addressing/address_maps/test_zones.py @@ -145,7 +145,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncZones: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/prefixes/test_advertisement_status.py b/tests/api_resources/addressing/prefixes/test_advertisement_status.py index 23ecde2d395..4bc11f6f6b1 100644 --- a/tests/api_resources/addressing/prefixes/test_advertisement_status.py +++ b/tests/api_resources/addressing/prefixes/test_advertisement_status.py @@ -135,7 +135,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAdvertisementStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py index c66ff1c56f0..f28e4f15ae9 100644 --- a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py +++ b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py @@ -257,7 +257,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBGPPrefixes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/prefixes/test_delegations.py b/tests/api_resources/addressing/prefixes/test_delegations.py index 83ec07279cc..a819531b501 100644 --- a/tests/api_resources/addressing/prefixes/test_delegations.py +++ b/tests/api_resources/addressing/prefixes/test_delegations.py @@ -186,7 +186,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncDelegations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/prefixes/test_service_bindings.py b/tests/api_resources/addressing/prefixes/test_service_bindings.py index 98156802f9c..45a766105ab 100644 --- a/tests/api_resources/addressing/prefixes/test_service_bindings.py +++ b/tests/api_resources/addressing/prefixes/test_service_bindings.py @@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncServiceBindings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/regional_hostnames/test_regions.py b/tests/api_resources/addressing/regional_hostnames/test_regions.py index 5d23799e1bf..e06d39e8cf3 100644 --- a/tests/api_resources/addressing/regional_hostnames/test_regions.py +++ b/tests/api_resources/addressing/regional_hostnames/test_regions.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncRegions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/test_address_maps.py b/tests/api_resources/addressing/test_address_maps.py index ed645091db9..c9a93e4d048 100644 --- a/tests/api_resources/addressing/test_address_maps.py +++ b/tests/api_resources/addressing/test_address_maps.py @@ -272,7 +272,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAddressMaps: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/test_loa_documents.py b/tests/api_resources/addressing/test_loa_documents.py index 6cfbe04f072..91a32806d0c 100644 --- a/tests/api_resources/addressing/test_loa_documents.py +++ b/tests/api_resources/addressing/test_loa_documents.py @@ -151,7 +151,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLOADocuments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/addressing/test_prefixes.py b/tests/api_resources/addressing/test_prefixes.py index 955b4eaa157..6cfbeaba785 100644 --- a/tests/api_resources/addressing/test_prefixes.py +++ b/tests/api_resources/addressing/test_prefixes.py @@ -257,7 +257,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPrefixes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/test_regional_hostnames.py b/tests/api_resources/addressing/test_regional_hostnames.py index 1db9c1e02ea..db65a605ffc 100644 --- a/tests/api_resources/addressing/test_regional_hostnames.py +++ b/tests/api_resources/addressing/test_regional_hostnames.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRegionalHostnames: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/addressing/test_services.py b/tests/api_resources/addressing/test_services.py index 8d51e635ff9..35ad7f029ae 100644 --- a/tests/api_resources/addressing/test_services.py +++ b/tests/api_resources/addressing/test_services.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncServices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/finetunes/test_assets.py b/tests/api_resources/ai/finetunes/test_assets.py index 1a692800031..015f0a5c02d 100644 --- a/tests/api_resources/ai/finetunes/test_assets.py +++ b/tests/api_resources/ai/finetunes/test_assets.py @@ -77,7 +77,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncAssets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/finetunes/test_public.py b/tests/api_resources/ai/finetunes/test_public.py index cc5f2b658c4..8c4e13933ce 100644 --- a/tests/api_resources/ai/finetunes/test_public.py +++ b/tests/api_resources/ai/finetunes/test_public.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncPublic: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/models/test_schema.py b/tests/api_resources/ai/models/test_schema.py index c2592b98979..ff54c76b027 100644 --- a/tests/api_resources/ai/models/test_schema.py +++ b/tests/api_resources/ai/models/test_schema.py @@ -60,7 +60,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchema: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/test_authors.py b/tests/api_resources/ai/test_authors.py index 16cdb1d7750..4997cb94973 100644 --- a/tests/api_resources/ai/test_authors.py +++ b/tests/api_resources/ai/test_authors.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAuthors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/test_finetunes.py b/tests/api_resources/ai/test_finetunes.py index e01ec841666..74e1b6f8fa2 100644 --- a/tests/api_resources/ai/test_finetunes.py +++ b/tests/api_resources/ai/test_finetunes.py @@ -114,7 +114,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncFinetunes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/test_models.py b/tests/api_resources/ai/test_models.py index 56897b9a250..6905cbb257c 100644 --- a/tests/api_resources/ai/test_models.py +++ b/tests/api_resources/ai/test_models.py @@ -71,7 +71,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncModels: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai/test_tasks.py b/tests/api_resources/ai/test_tasks.py index 4383e0af353..b0a6dea5ef5 100644 --- a/tests/api_resources/ai/test_tasks.py +++ b/tests/api_resources/ai/test_tasks.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTasks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_datasets.py b/tests/api_resources/ai_gateway/test_datasets.py index dc7ab2a74c5..88b9820ab6a 100644 --- a/tests/api_resources/ai_gateway/test_datasets.py +++ b/tests/api_resources/ai_gateway/test_datasets.py @@ -414,7 +414,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDatasets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_evaluation_types.py b/tests/api_resources/ai_gateway/test_evaluation_types.py index d03554b8df8..64b7cca833a 100644 --- a/tests/api_resources/ai_gateway/test_evaluation_types.py +++ b/tests/api_resources/ai_gateway/test_evaluation_types.py @@ -71,7 +71,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncEvaluationTypes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_evaluations.py b/tests/api_resources/ai_gateway/test_evaluations.py index 444549e3cef..0ae12b69d6b 100644 --- a/tests/api_resources/ai_gateway/test_evaluations.py +++ b/tests/api_resources/ai_gateway/test_evaluations.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEvaluations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py index 4be76ce1282..734f4a528d9 100644 --- a/tests/api_resources/ai_gateway/test_logs.py +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -433,7 +433,9 @@ def test_path_params_response(self, client: Cloudflare) -> None: class TestAsyncLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ai_gateway/test_urls.py b/tests/api_resources/ai_gateway/test_urls.py index 3fa5620cbdd..5dc57869a81 100644 --- a/tests/api_resources/ai_gateway/test_urls.py +++ b/tests/api_resources/ai_gateway/test_urls.py @@ -78,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncURLs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/alerting/destinations/test_eligible.py b/tests/api_resources/alerting/destinations/test_eligible.py index ee7c9caff3e..84d19adcb16 100644 --- a/tests/api_resources/alerting/destinations/test_eligible.py +++ b/tests/api_resources/alerting/destinations/test_eligible.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEligible: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/alerting/destinations/test_pagerduty.py b/tests/api_resources/alerting/destinations/test_pagerduty.py index 2201b9943e0..0df4266e854 100644 --- a/tests/api_resources/alerting/destinations/test_pagerduty.py +++ b/tests/api_resources/alerting/destinations/test_pagerduty.py @@ -211,7 +211,9 @@ def test_path_params_link(self, client: Cloudflare) -> None: class TestAsyncPagerduty: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip( reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4285" diff --git a/tests/api_resources/alerting/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py index ea816e0bdbf..af2fefa83c1 100644 --- a/tests/api_resources/alerting/destinations/test_webhooks.py +++ b/tests/api_resources/alerting/destinations/test_webhooks.py @@ -326,7 +326,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWebhooks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip( reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4291" diff --git a/tests/api_resources/alerting/test_available_alerts.py b/tests/api_resources/alerting/test_available_alerts.py index 253ff803cdf..0836a669443 100644 --- a/tests/api_resources/alerting/test_available_alerts.py +++ b/tests/api_resources/alerting/test_available_alerts.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAvailableAlerts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/alerting/test_history.py b/tests/api_resources/alerting/test_history.py index 43ef79ac5c3..912513472c3 100644 --- a/tests/api_resources/alerting/test_history.py +++ b/tests/api_resources/alerting/test_history.py @@ -70,7 +70,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncHistory: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py index adad9227350..9ed3edd4cf6 100644 --- a/tests/api_resources/alerting/test_policies.py +++ b/tests/api_resources/alerting/test_policies.py @@ -426,7 +426,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip( reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9327225061/job/25676826349?pr=482#step:5:4274" diff --git a/tests/api_resources/api_gateway/discovery/test_operations.py b/tests/api_resources/api_gateway/discovery/test_operations.py index a696f2b3018..48149bb3a16 100644 --- a/tests/api_resources/api_gateway/discovery/test_operations.py +++ b/tests/api_resources/api_gateway/discovery/test_operations.py @@ -190,7 +190,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/expression_template/test_fallthrough.py b/tests/api_resources/api_gateway/expression_template/test_fallthrough.py index 5dfac36140d..5db06ad8f6e 100644 --- a/tests/api_resources/api_gateway/expression_template/test_fallthrough.py +++ b/tests/api_resources/api_gateway/expression_template/test_fallthrough.py @@ -61,7 +61,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncFallthrough: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/operations/test_schema_validation.py b/tests/api_resources/api_gateway/operations/test_schema_validation.py index 21c19d6c184..2f06a4d9a44 100644 --- a/tests/api_resources/api_gateway/operations/test_schema_validation.py +++ b/tests/api_resources/api_gateway/operations/test_schema_validation.py @@ -182,7 +182,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchemaValidation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/settings/test_schema_validation.py b/tests/api_resources/api_gateway/settings/test_schema_validation.py index 2441b86a24c..deb95100ec4 100644 --- a/tests/api_resources/api_gateway/settings/test_schema_validation.py +++ b/tests/api_resources/api_gateway/settings/test_schema_validation.py @@ -157,7 +157,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchemaValidation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_configurations.py b/tests/api_resources/api_gateway/test_configurations.py index 13bdbc85420..0dcffd886a9 100644 --- a/tests/api_resources/api_gateway/test_configurations.py +++ b/tests/api_resources/api_gateway/test_configurations.py @@ -130,7 +130,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigurations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_discovery.py b/tests/api_resources/api_gateway/test_discovery.py index f41ab529266..94be7e36cd8 100644 --- a/tests/api_resources/api_gateway/test_discovery.py +++ b/tests/api_resources/api_gateway/test_discovery.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDiscovery: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_operations.py b/tests/api_resources/api_gateway/test_operations.py index 37151f2ed30..aab5d1b4997 100644 --- a/tests/api_resources/api_gateway/test_operations.py +++ b/tests/api_resources/api_gateway/test_operations.py @@ -339,7 +339,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_schemas.py b/tests/api_resources/api_gateway/test_schemas.py index 5c2542b4cb5..df03ab73a6a 100644 --- a/tests/api_resources/api_gateway/test_schemas.py +++ b/tests/api_resources/api_gateway/test_schemas.py @@ -66,7 +66,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSchemas: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/test_user_schemas.py b/tests/api_resources/api_gateway/test_user_schemas.py index 9ebdf9e6b15..c81163c3318 100644 --- a/tests/api_resources/api_gateway/test_user_schemas.py +++ b/tests/api_resources/api_gateway/test_user_schemas.py @@ -292,7 +292,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncUserSchemas: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/user_schemas/test_hosts.py b/tests/api_resources/api_gateway/user_schemas/test_hosts.py index 6b9b80c5228..ec06d6f17ea 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_hosts.py +++ b/tests/api_resources/api_gateway/user_schemas/test_hosts.py @@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncHosts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/api_gateway/user_schemas/test_operations.py b/tests/api_resources/api_gateway/user_schemas/test_operations.py index 64234507893..6aa3e821042 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_operations.py +++ b/tests/api_resources/api_gateway/user_schemas/test_operations.py @@ -83,7 +83,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/argo/test_smart_routing.py b/tests/api_resources/argo/test_smart_routing.py index 8622689044d..b568bb4fbb1 100644 --- a/tests/api_resources/argo/test_smart_routing.py +++ b/tests/api_resources/argo/test_smart_routing.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSmartRouting: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/argo/test_tiered_caching.py b/tests/api_resources/argo/test_tiered_caching.py index d91060caa7b..9055eebb8b8 100644 --- a/tests/api_resources/argo/test_tiered_caching.py +++ b/tests/api_resources/argo/test_tiered_caching.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTieredCaching: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/billing/test_profiles.py b/tests/api_resources/billing/test_profiles.py index b30605d06b8..faf0afcb458 100644 --- a/tests/api_resources/billing/test_profiles.py +++ b/tests/api_resources/billing/test_profiles.py @@ -64,7 +64,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProfiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/botnet_feed/configs/test_asn.py b/tests/api_resources/botnet_feed/configs/test_asn.py index 98199e322e8..7a026bc4696 100755 --- a/tests/api_resources/botnet_feed/configs/test_asn.py +++ b/tests/api_resources/botnet_feed/configs/test_asn.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncASN: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/botnet_feed/test_asn.py b/tests/api_resources/botnet_feed/test_asn.py index 14b998cdfab..89f402069b3 100755 --- a/tests/api_resources/botnet_feed/test_asn.py +++ b/tests/api_resources/botnet_feed/test_asn.py @@ -113,7 +113,9 @@ def test_path_params_full_report(self, client: Cloudflare) -> None: class TestAsyncASN: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_day_report(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_content.py b/tests/api_resources/browser_rendering/test_content.py index 92582a45829..e713bd7dd95 100644 --- a/tests/api_resources/browser_rendering/test_content.py +++ b/tests/api_resources/browser_rendering/test_content.py @@ -133,7 +133,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncContent: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_json.py b/tests/api_resources/browser_rendering/test_json.py index d65aa816256..b019c0a2098 100644 --- a/tests/api_resources/browser_rendering/test_json.py +++ b/tests/api_resources/browser_rendering/test_json.py @@ -139,7 +139,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncJson: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_links.py b/tests/api_resources/browser_rendering/test_links.py index 954d14a7ec2..d3aaa1672cb 100644 --- a/tests/api_resources/browser_rendering/test_links.py +++ b/tests/api_resources/browser_rendering/test_links.py @@ -135,7 +135,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncLinks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_markdown.py b/tests/api_resources/browser_rendering/test_markdown.py index a00e86a19d3..24845a74bfc 100644 --- a/tests/api_resources/browser_rendering/test_markdown.py +++ b/tests/api_resources/browser_rendering/test_markdown.py @@ -133,7 +133,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncMarkdown: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_pdf.py b/tests/api_resources/browser_rendering/test_pdf.py index cb09073d496..511b92e71f1 100644 --- a/tests/api_resources/browser_rendering/test_pdf.py +++ b/tests/api_resources/browser_rendering/test_pdf.py @@ -165,7 +165,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncPDF: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize @pytest.mark.respx(base_url=base_url) diff --git a/tests/api_resources/browser_rendering/test_scrape.py b/tests/api_resources/browser_rendering/test_scrape.py index 4dd89c8e1ac..ef8925884e4 100644 --- a/tests/api_resources/browser_rendering/test_scrape.py +++ b/tests/api_resources/browser_rendering/test_scrape.py @@ -139,7 +139,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncScrape: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_screenshot.py b/tests/api_resources/browser_rendering/test_screenshot.py index d44ec38de09..c106782ee00 100644 --- a/tests/api_resources/browser_rendering/test_screenshot.py +++ b/tests/api_resources/browser_rendering/test_screenshot.py @@ -153,7 +153,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncScreenshot: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/browser_rendering/test_snapshot.py b/tests/api_resources/browser_rendering/test_snapshot.py index c72f57f5ef9..bcf5ec2b521 100644 --- a/tests/api_resources/browser_rendering/test_snapshot.py +++ b/tests/api_resources/browser_rendering/test_snapshot.py @@ -150,7 +150,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncSnapshot: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cache/test_cache_reserve.py b/tests/api_resources/cache/test_cache_reserve.py index 1d125319b6f..abbb074d4e9 100644 --- a/tests/api_resources/cache/test_cache_reserve.py +++ b/tests/api_resources/cache/test_cache_reserve.py @@ -184,7 +184,9 @@ def test_path_params_status(self, client: Cloudflare) -> None: class TestAsyncCacheReserve: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_clear(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cache/test_regional_tiered_cache.py b/tests/api_resources/cache/test_regional_tiered_cache.py index 98deff2adf5..2b78a788e2e 100644 --- a/tests/api_resources/cache/test_regional_tiered_cache.py +++ b/tests/api_resources/cache/test_regional_tiered_cache.py @@ -102,7 +102,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRegionalTieredCache: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cache/test_smart_tiered_cache.py b/tests/api_resources/cache/test_smart_tiered_cache.py index 4502fff107d..3457741e5fe 100644 --- a/tests/api_resources/cache/test_smart_tiered_cache.py +++ b/tests/api_resources/cache/test_smart_tiered_cache.py @@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSmartTieredCache: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cache/test_variants.py b/tests/api_resources/cache/test_variants.py index 9cb7356c449..5ddaebb439f 100644 --- a/tests/api_resources/cache/test_variants.py +++ b/tests/api_resources/cache/test_variants.py @@ -166,7 +166,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVariants: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/calls/test_sfu.py b/tests/api_resources/calls/test_sfu.py index 624095f5bb3..5a4bc4ca177 100644 --- a/tests/api_resources/calls/test_sfu.py +++ b/tests/api_resources/calls/test_sfu.py @@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSFU: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/calls/test_turn.py b/tests/api_resources/calls/test_turn.py index 58454ab1bdf..34e3ca6e167 100644 --- a/tests/api_resources/calls/test_turn.py +++ b/tests/api_resources/calls/test_turn.py @@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTURN: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/certificate_authorities/test_hostname_associations.py b/tests/api_resources/certificate_authorities/test_hostname_associations.py index b8429f7df84..7f4088bae55 100644 --- a/tests/api_resources/certificate_authorities/test_hostname_associations.py +++ b/tests/api_resources/certificate_authorities/test_hostname_associations.py @@ -115,7 +115,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnameAssociations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloud_connector/test_rules.py b/tests/api_resources/cloud_connector/test_rules.py index 255f82ba344..d80f63bdf9f 100644 --- a/tests/api_resources/cloud_connector/test_rules.py +++ b/tests/api_resources/cloud_connector/test_rules.py @@ -113,7 +113,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/requests/test_assets.py b/tests/api_resources/cloudforce_one/requests/test_assets.py index e25f0eb419d..e2d5c2f8fae 100644 --- a/tests/api_resources/cloudforce_one/requests/test_assets.py +++ b/tests/api_resources/cloudforce_one/requests/test_assets.py @@ -273,7 +273,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAssets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/requests/test_message.py b/tests/api_resources/cloudforce_one/requests/test_message.py index c4d7049a561..36273480abe 100644 --- a/tests/api_resources/cloudforce_one/requests/test_message.py +++ b/tests/api_resources/cloudforce_one/requests/test_message.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMessage: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/requests/test_priority.py b/tests/api_resources/cloudforce_one/requests/test_priority.py index 9a915c85dc4..66bd879a97e 100644 --- a/tests/api_resources/cloudforce_one/requests/test_priority.py +++ b/tests/api_resources/cloudforce_one/requests/test_priority.py @@ -279,7 +279,9 @@ def test_path_params_quota(self, client: Cloudflare) -> None: class TestAsyncPriority: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/scans/test_config.py b/tests/api_resources/cloudforce_one/scans/test_config.py index 532ae366d26..86680ee87c9 100644 --- a/tests/api_resources/cloudforce_one/scans/test_config.py +++ b/tests/api_resources/cloudforce_one/scans/test_config.py @@ -221,7 +221,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncConfig: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/scans/test_results.py b/tests/api_resources/cloudforce_one/scans/test_results.py index 0ac885288f3..8f385538a2c 100644 --- a/tests/api_resources/cloudforce_one/scans/test_results.py +++ b/tests/api_resources/cloudforce_one/scans/test_results.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResults: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/test_requests.py b/tests/api_resources/cloudforce_one/test_requests.py index cf8f3df2da9..e4da0a26eed 100644 --- a/tests/api_resources/cloudforce_one/test_requests.py +++ b/tests/api_resources/cloudforce_one/test_requests.py @@ -412,7 +412,9 @@ def test_path_params_types(self, client: Cloudflare) -> None: class TestAsyncRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/test_threat_events.py b/tests/api_resources/cloudforce_one/test_threat_events.py index 45603530541..d8b54907ec4 100644 --- a/tests/api_resources/cloudforce_one/test_threat_events.py +++ b/tests/api_resources/cloudforce_one/test_threat_events.py @@ -443,7 +443,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncThreatEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py b/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py index 4351d3e7fe2..f95e9fa4950 100644 --- a/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py +++ b/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHealth: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/cloudforce_one/threat_events/test_attackers.py b/tests/api_resources/cloudforce_one/threat_events/test_attackers.py index 2b780d97b65..9c37a9ff13f 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_attackers.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_attackers.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAttackers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_categories.py b/tests/api_resources/cloudforce_one/threat_events/test_categories.py index 983168b5bdf..f94a5dbd909 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_categories.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_categories.py @@ -298,7 +298,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCategories: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_countries.py b/tests/api_resources/cloudforce_one/threat_events/test_countries.py index 948f95a73a0..706c0925c45 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_countries.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_countries.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncCountries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_crons.py b/tests/api_resources/cloudforce_one/threat_events/test_crons.py index 7ba6a371d53..9bacfe1395e 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_crons.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_crons.py @@ -103,7 +103,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncCrons: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_datasets.py b/tests/api_resources/cloudforce_one/threat_events/test_datasets.py index 06e97ba80c1..f1ae4d436cd 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_datasets.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_datasets.py @@ -295,7 +295,9 @@ def test_path_params_raw(self, client: Cloudflare) -> None: class TestAsyncDatasets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py b/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py index 6c5a0829c6f..0ea6e662e1a 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py @@ -131,7 +131,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncEventTags: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py b/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py index 27f277dfd80..85c45bc3763 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncIndicatorTypes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_insights.py b/tests/api_resources/cloudforce_one/threat_events/test_insights.py index 2e8442fa611..a3c3cbd8184 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_insights.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_insights.py @@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInsights: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_raw.py b/tests/api_resources/cloudforce_one/threat_events/test_raw.py index b854f2753fa..b56d85ba3b8 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_raw.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_raw.py @@ -160,7 +160,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRaw: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_relate.py b/tests/api_resources/cloudforce_one/threat_events/test_relate.py index 42bf9925c6d..f9a8447e117 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_relate.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_relate.py @@ -71,7 +71,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncRelate: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_tags.py b/tests/api_resources/cloudforce_one/threat_events/test_tags.py index 9fd56ab430b..bf505654fe1 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_tags.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_tags.py @@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTags: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py b/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py index ffdc0a02b83..e08db1e9305 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTargetIndustries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize diff --git a/tests/api_resources/content_scanning/test_payloads.py b/tests/api_resources/content_scanning/test_payloads.py index 3c3be9c5537..3c24ad530e0 100644 --- a/tests/api_resources/content_scanning/test_payloads.py +++ b/tests/api_resources/content_scanning/test_payloads.py @@ -152,7 +152,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncPayloads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/content_scanning/test_settings.py b/tests/api_resources/content_scanning/test_settings.py index f8f169b2766..61236f71476 100644 --- a/tests/api_resources/content_scanning/test_settings.py +++ b/tests/api_resources/content_scanning/test_settings.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/custom_certificates/test_prioritize.py b/tests/api_resources/custom_certificates/test_prioritize.py index dec90b6f83c..1ee27704925 100644 --- a/tests/api_resources/custom_certificates/test_prioritize.py +++ b/tests/api_resources/custom_certificates/test_prioritize.py @@ -62,7 +62,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncPrioritize: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py b/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py index bbe43fce774..9ceb3582c3f 100644 --- a/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py +++ b/tests/api_resources/custom_hostnames/certificate_pack/test_certificates.py @@ -184,7 +184,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/custom_hostnames/test_fallback_origin.py b/tests/api_resources/custom_hostnames/test_fallback_origin.py index 06e7260f852..4e0e1a70a62 100644 --- a/tests/api_resources/custom_hostnames/test_fallback_origin.py +++ b/tests/api_resources/custom_hostnames/test_fallback_origin.py @@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFallbackOrigin: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/d1/test_database.py b/tests/api_resources/d1/test_database.py index f97b3c45e5d..288b342469c 100644 --- a/tests/api_resources/d1/test_database.py +++ b/tests/api_resources/d1/test_database.py @@ -705,7 +705,9 @@ def test_path_params_raw(self, client: Cloudflare) -> None: class TestAsyncDatabase: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/diagnostics/test_traceroutes.py b/tests/api_resources/diagnostics/test_traceroutes.py index d71849dd539..9ad32223c09 100644 --- a/tests/api_resources/diagnostics/test_traceroutes.py +++ b/tests/api_resources/diagnostics/test_traceroutes.py @@ -78,7 +78,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTraceroutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/analytics/reports/test_bytimes.py b/tests/api_resources/dns/analytics/reports/test_bytimes.py index 73408198645..419f0d4670f 100644 --- a/tests/api_resources/dns/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns/analytics/reports/test_bytimes.py @@ -73,7 +73,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/analytics/test_reports.py b/tests/api_resources/dns/analytics/test_reports.py index 89dae97959c..d3c918a2868 100644 --- a/tests/api_resources/dns/analytics/test_reports.py +++ b/tests/api_resources/dns/analytics/test_reports.py @@ -72,7 +72,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/settings/account/test_views.py b/tests/api_resources/dns/settings/account/test_views.py index 59ea8910398..0d76207ae4f 100644 --- a/tests/api_resources/dns/settings/account/test_views.py +++ b/tests/api_resources/dns/settings/account/test_views.py @@ -284,7 +284,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncViews: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/settings/test_account.py b/tests/api_resources/dns/settings/test_account.py index fed6b4a9444..b449a943640 100644 --- a/tests/api_resources/dns/settings/test_account.py +++ b/tests/api_resources/dns/settings/test_account.py @@ -130,7 +130,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccount: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="HTTP 422 from prism") @parametrize diff --git a/tests/api_resources/dns/settings/test_zone.py b/tests/api_resources/dns/settings/test_zone.py index b67c99535e4..432b4c9fb62 100644 --- a/tests/api_resources/dns/settings/test_zone.py +++ b/tests/api_resources/dns/settings/test_zone.py @@ -131,7 +131,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncZone: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="HTTP 422 from prism") @parametrize diff --git a/tests/api_resources/dns/test_dnssec.py b/tests/api_resources/dns/test_dnssec.py index 3e174c314d6..e37b7a54f70 100644 --- a/tests/api_resources/dns/test_dnssec.py +++ b/tests/api_resources/dns/test_dnssec.py @@ -144,7 +144,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNSSEC: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 55297baceb2..e91b3631255 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -5850,7 +5850,9 @@ def test_path_params_scan(self, client: Cloudflare) -> None: class TestAsyncRecords: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/dns/zone_transfers/outgoing/test_status.py b/tests/api_resources/dns/zone_transfers/outgoing/test_status.py index 1c00b9b98c3..ac11f1743d2 100644 --- a/tests/api_resources/dns/zone_transfers/outgoing/test_status.py +++ b/tests/api_resources/dns/zone_transfers/outgoing/test_status.py @@ -56,7 +56,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/zone_transfers/test_acls.py b/tests/api_resources/dns/zone_transfers/test_acls.py index 1d786773233..17a8ce6984f 100644 --- a/tests/api_resources/dns/zone_transfers/test_acls.py +++ b/tests/api_resources/dns/zone_transfers/test_acls.py @@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncACLs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/dns/zone_transfers/test_force_axfr.py b/tests/api_resources/dns/zone_transfers/test_force_axfr.py index 3451f908b0c..1041d8749e6 100644 --- a/tests/api_resources/dns/zone_transfers/test_force_axfr.py +++ b/tests/api_resources/dns/zone_transfers/test_force_axfr.py @@ -60,7 +60,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncForceAXFR: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/zone_transfers/test_incoming.py b/tests/api_resources/dns/zone_transfers/test_incoming.py index ad925e0d893..c9f7894ced1 100644 --- a/tests/api_resources/dns/zone_transfers/test_incoming.py +++ b/tests/api_resources/dns/zone_transfers/test_incoming.py @@ -200,7 +200,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIncoming: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/zone_transfers/test_outgoing.py b/tests/api_resources/dns/zone_transfers/test_outgoing.py index 5ae0b28a13d..15137462121 100644 --- a/tests/api_resources/dns/zone_transfers/test_outgoing.py +++ b/tests/api_resources/dns/zone_transfers/test_outgoing.py @@ -318,7 +318,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOutgoing: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns/zone_transfers/test_peers.py b/tests/api_resources/dns/zone_transfers/test_peers.py index f81fec733d6..39e2a5e3254 100644 --- a/tests/api_resources/dns/zone_transfers/test_peers.py +++ b/tests/api_resources/dns/zone_transfers/test_peers.py @@ -266,7 +266,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPeers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/dns/zone_transfers/test_tsigs.py b/tests/api_resources/dns/zone_transfers/test_tsigs.py index d3e541d2518..93277f99e97 100644 --- a/tests/api_resources/dns/zone_transfers/test_tsigs.py +++ b/tests/api_resources/dns/zone_transfers/test_tsigs.py @@ -267,7 +267,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTSIGs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py b/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py index c40bb24466f..c80b22034cd 100644 --- a/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns_firewall/analytics/reports/test_bytimes.py @@ -84,7 +84,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns_firewall/analytics/test_reports.py b/tests/api_resources/dns_firewall/analytics/test_reports.py index cc06eb81017..38fe3e6fec2 100644 --- a/tests/api_resources/dns_firewall/analytics/test_reports.py +++ b/tests/api_resources/dns_firewall/analytics/test_reports.py @@ -83,7 +83,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/dns_firewall/test_reverse_dns.py b/tests/api_resources/dns_firewall/test_reverse_dns.py index 8ddeaf9f7b0..ba9cca0909a 100644 --- a/tests/api_resources/dns_firewall/test_reverse_dns.py +++ b/tests/api_resources/dns_firewall/test_reverse_dns.py @@ -124,7 +124,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReverseDNS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/durable_objects/namespaces/test_objects.py b/tests/api_resources/durable_objects/namespaces/test_objects.py index 9e703603fcc..b073fb6fdbc 100644 --- a/tests/api_resources/durable_objects/namespaces/test_objects.py +++ b/tests/api_resources/durable_objects/namespaces/test_objects.py @@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncObjects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/durable_objects/test_namespaces.py b/tests/api_resources/durable_objects/test_namespaces.py index db836e379cd..630473d6b31 100644 --- a/tests/api_resources/durable_objects/test_namespaces.py +++ b/tests/api_resources/durable_objects/test_namespaces.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncNamespaces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_routing/rules/test_catch_alls.py b/tests/api_resources/email_routing/rules/test_catch_alls.py index 04d1d15c98f..3f6d0df00de 100644 --- a/tests/api_resources/email_routing/rules/test_catch_alls.py +++ b/tests/api_resources/email_routing/rules/test_catch_alls.py @@ -119,7 +119,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCatchAlls: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_routing/test_addresses.py b/tests/api_resources/email_routing/test_addresses.py index 1530cf79f90..2299afe4b1c 100644 --- a/tests/api_resources/email_routing/test_addresses.py +++ b/tests/api_resources/email_routing/test_addresses.py @@ -211,7 +211,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAddresses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_routing/test_dns.py b/tests/api_resources/email_routing/test_dns.py index e5c819d83c6..3bfbc5c7270 100644 --- a/tests/api_resources/email_routing/test_dns.py +++ b/tests/api_resources/email_routing/test_dns.py @@ -196,7 +196,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_routing/test_rules.py b/tests/api_resources/email_routing/test_rules.py index 19652d53d62..33b96b74828 100644 --- a/tests/api_resources/email_routing/test_rules.py +++ b/tests/api_resources/email_routing/test_rules.py @@ -315,7 +315,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_detections.py b/tests/api_resources/email_security/investigate/test_detections.py index 0efb7939121..b9a5059538d 100644 --- a/tests/api_resources/email_security/investigate/test_detections.py +++ b/tests/api_resources/email_security/investigate/test_detections.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDetections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_move.py b/tests/api_resources/email_security/investigate/test_move.py index 27096f30850..6a00103c4fa 100644 --- a/tests/api_resources/email_security/investigate/test_move.py +++ b/tests/api_resources/email_security/investigate/test_move.py @@ -122,7 +122,9 @@ def test_path_params_bulk(self, client: Cloudflare) -> None: class TestAsyncMove: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_preview.py b/tests/api_resources/email_security/investigate/test_preview.py index 90c38b7e703..18e710732bb 100644 --- a/tests/api_resources/email_security/investigate/test_preview.py +++ b/tests/api_resources/email_security/investigate/test_preview.py @@ -109,7 +109,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPreview: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_raw.py b/tests/api_resources/email_security/investigate/test_raw.py index d7e214dc7fd..204fbb63f6b 100644 --- a/tests/api_resources/email_security/investigate/test_raw.py +++ b/tests/api_resources/email_security/investigate/test_raw.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRaw: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_reclassify.py b/tests/api_resources/email_security/investigate/test_reclassify.py index 8fce2184e02..c7f2fa32108 100644 --- a/tests/api_resources/email_security/investigate/test_reclassify.py +++ b/tests/api_resources/email_security/investigate/test_reclassify.py @@ -81,7 +81,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncReclassify: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_release.py b/tests/api_resources/email_security/investigate/test_release.py index 2b437e713c9..44430b8c827 100644 --- a/tests/api_resources/email_security/investigate/test_release.py +++ b/tests/api_resources/email_security/investigate/test_release.py @@ -62,7 +62,9 @@ def test_path_params_bulk(self, client: Cloudflare) -> None: class TestAsyncRelease: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bulk(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/investigate/test_trace.py b/tests/api_resources/email_security/investigate/test_trace.py index c01f3515dc4..f3ad42bcaea 100644 --- a/tests/api_resources/email_security/investigate/test_trace.py +++ b/tests/api_resources/email_security/investigate/test_trace.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTrace: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_allow_policies.py b/tests/api_resources/email_security/settings/test_allow_policies.py index dd2afd7b539..3a15809cae5 100644 --- a/tests/api_resources/email_security/settings/test_allow_policies.py +++ b/tests/api_resources/email_security/settings/test_allow_policies.py @@ -310,7 +310,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAllowPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_block_senders.py b/tests/api_resources/email_security/settings/test_block_senders.py index e6bb0a56223..b511da8331a 100644 --- a/tests/api_resources/email_security/settings/test_block_senders.py +++ b/tests/api_resources/email_security/settings/test_block_senders.py @@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBlockSenders: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_domains.py b/tests/api_resources/email_security/settings/test_domains.py index ef51bd8c036..7a475619f7b 100644 --- a/tests/api_resources/email_security/settings/test_domains.py +++ b/tests/api_resources/email_security/settings/test_domains.py @@ -265,7 +265,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_impersonation_registry.py b/tests/api_resources/email_security/settings/test_impersonation_registry.py index 166def7dd1e..0d484d1724d 100644 --- a/tests/api_resources/email_security/settings/test_impersonation_registry.py +++ b/tests/api_resources/email_security/settings/test_impersonation_registry.py @@ -272,7 +272,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncImpersonationRegistry: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/settings/test_trusted_domains.py b/tests/api_resources/email_security/settings/test_trusted_domains.py index 33d602bb1a4..3829968416e 100644 --- a/tests/api_resources/email_security/settings/test_trusted_domains.py +++ b/tests/api_resources/email_security/settings/test_trusted_domains.py @@ -362,7 +362,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTrustedDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate HTTP 422 errors on test suite") @parametrize diff --git a/tests/api_resources/email_security/test_investigate.py b/tests/api_resources/email_security/test_investigate.py index f0a6ec41d9b..59882722fad 100644 --- a/tests/api_resources/email_security/test_investigate.py +++ b/tests/api_resources/email_security/test_investigate.py @@ -129,7 +129,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInvestigate: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/email_security/test_submissions.py b/tests/api_resources/email_security/test_submissions.py index c626455eab3..36209780b72 100644 --- a/tests/api_resources/email_security/test_submissions.py +++ b/tests/api_resources/email_security/test_submissions.py @@ -76,7 +76,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSubmissions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/firewall/test_access_rules.py b/tests/api_resources/firewall/test_access_rules.py index 2be8b9f05f8..a44b3cddb69 100644 --- a/tests/api_resources/firewall/test_access_rules.py +++ b/tests/api_resources/firewall/test_access_rules.py @@ -382,7 +382,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccessRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/test_lockdowns.py b/tests/api_resources/firewall/test_lockdowns.py index a304575e3a2..eb9320ca771 100644 --- a/tests/api_resources/firewall/test_lockdowns.py +++ b/tests/api_resources/firewall/test_lockdowns.py @@ -306,7 +306,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLockdowns: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/test_rules.py b/tests/api_resources/firewall/test_rules.py index cba8ae1268b..311ee64e156 100644 --- a/tests/api_resources/firewall/test_rules.py +++ b/tests/api_resources/firewall/test_rules.py @@ -565,7 +565,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/test_ua_rules.py b/tests/api_resources/firewall/test_ua_rules.py index 7a968549f5d..5282aad763c 100644 --- a/tests/api_resources/firewall/test_ua_rules.py +++ b/tests/api_resources/firewall/test_ua_rules.py @@ -311,7 +311,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncUARules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/waf/packages/test_groups.py b/tests/api_resources/firewall/waf/packages/test_groups.py index 9e79fed3de5..3bdf259db3a 100644 --- a/tests/api_resources/firewall/waf/packages/test_groups.py +++ b/tests/api_resources/firewall/waf/packages/test_groups.py @@ -239,7 +239,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/firewall/waf/packages/test_rules.py b/tests/api_resources/firewall/waf/packages/test_rules.py index 097f991f703..97927be6a8d 100644 --- a/tests/api_resources/firewall/waf/packages/test_rules.py +++ b/tests/api_resources/firewall/waf/packages/test_rules.py @@ -240,7 +240,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/firewall/waf/test_overrides.py b/tests/api_resources/firewall/waf/test_overrides.py index 20c829e4c6f..81f3f471190 100644 --- a/tests/api_resources/firewall/waf/test_overrides.py +++ b/tests/api_resources/firewall/waf/test_overrides.py @@ -334,7 +334,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOverrides: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/firewall/waf/test_packages.py b/tests/api_resources/firewall/waf/test_packages.py index 63ba5f49982..c79d6229958 100644 --- a/tests/api_resources/firewall/waf/test_packages.py +++ b/tests/api_resources/firewall/waf/test_packages.py @@ -138,7 +138,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPackages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/healthchecks/test_previews.py b/tests/api_resources/healthchecks/test_previews.py index 8377cb4f89d..a58c84df9b8 100644 --- a/tests/api_resources/healthchecks/test_previews.py +++ b/tests/api_resources/healthchecks/test_previews.py @@ -199,7 +199,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPreviews: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/hostnames/settings/test_tls.py b/tests/api_resources/hostnames/settings/test_tls.py index 434d65687c6..09b8b27b4f8 100644 --- a/tests/api_resources/hostnames/settings/test_tls.py +++ b/tests/api_resources/hostnames/settings/test_tls.py @@ -177,7 +177,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTLS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index ae88048ece8..e38d4344dff 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -449,7 +449,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/iam/test_permission_groups.py b/tests/api_resources/iam/test_permission_groups.py index 8d4a01aba8b..415565c7243 100644 --- a/tests/api_resources/iam/test_permission_groups.py +++ b/tests/api_resources/iam/test_permission_groups.py @@ -120,7 +120,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPermissionGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/iam/test_resource_groups.py b/tests/api_resources/iam/test_resource_groups.py index b334eec946e..1cd159e9a69 100644 --- a/tests/api_resources/iam/test_resource_groups.py +++ b/tests/api_resources/iam/test_resource_groups.py @@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResourceGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/iam/test_user_groups.py b/tests/api_resources/iam/test_user_groups.py index 869b1b5a1ae..f3fd0402f8a 100644 --- a/tests/api_resources/iam/test_user_groups.py +++ b/tests/api_resources/iam/test_user_groups.py @@ -323,7 +323,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncUserGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/iam/user_groups/test_members.py b/tests/api_resources/iam/user_groups/test_members.py index b5b8cf68485..603db00d3d0 100644 --- a/tests/api_resources/iam/user_groups/test_members.py +++ b/tests/api_resources/iam/user_groups/test_members.py @@ -249,7 +249,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncMembers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index 32523143380..98eeb7db720 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -289,7 +289,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncV1: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/images/test_v2.py b/tests/api_resources/images/test_v2.py index d668ca234a8..fb62181f81d 100644 --- a/tests/api_resources/images/test_v2.py +++ b/tests/api_resources/images/test_v2.py @@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncV2: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v1/test_blobs.py b/tests/api_resources/images/v1/test_blobs.py index 2d3a89dbc0b..316785c842d 100644 --- a/tests/api_resources/images/v1/test_blobs.py +++ b/tests/api_resources/images/v1/test_blobs.py @@ -91,7 +91,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBlobs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize @pytest.mark.respx(base_url=base_url) diff --git a/tests/api_resources/images/v1/test_keys.py b/tests/api_resources/images/v1/test_keys.py index ef6122e1816..edad6ebcb43 100644 --- a/tests/api_resources/images/v1/test_keys.py +++ b/tests/api_resources/images/v1/test_keys.py @@ -153,7 +153,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncKeys: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v1/test_stats.py b/tests/api_resources/images/v1/test_stats.py index ba44e332bc2..0c355f2fd23 100644 --- a/tests/api_resources/images/v1/test_stats.py +++ b/tests/api_resources/images/v1/test_stats.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStats: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v1/test_variants.py b/tests/api_resources/images/v1/test_variants.py index 0b88368b362..05d13a9d6c7 100644 --- a/tests/api_resources/images/v1/test_variants.py +++ b/tests/api_resources/images/v1/test_variants.py @@ -333,7 +333,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVariants: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/images/v2/test_direct_uploads.py b/tests/api_resources/images/v2/test_direct_uploads.py index 88a6299905f..fb031cd38e4 100644 --- a/tests/api_resources/images/v2/test_direct_uploads.py +++ b/tests/api_resources/images/v2/test_direct_uploads.py @@ -74,7 +74,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncDirectUploads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/intel/asn/test_subnets.py b/tests/api_resources/intel/asn/test_subnets.py index 116eb6f482b..f6b27a86ca8 100644 --- a/tests/api_resources/intel/asn/test_subnets.py +++ b/tests/api_resources/intel/asn/test_subnets.py @@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubnets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/attack_surface_report/test_issue_types.py b/tests/api_resources/intel/attack_surface_report/test_issue_types.py index b51bdf0886d..01b9bf416fb 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issue_types.py +++ b/tests/api_resources/intel/attack_surface_report/test_issue_types.py @@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIssueTypes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py index 23f555d5eab..985ca4c1d6c 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issues.py +++ b/tests/api_resources/intel/attack_surface_report/test_issues.py @@ -346,7 +346,9 @@ def test_path_params_type(self, client: Cloudflare) -> None: class TestAsyncIssues: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/domains/test_bulks.py b/tests/api_resources/intel/domains/test_bulks.py index 8255f15b2c4..8a1c0480f60 100644 --- a/tests/api_resources/intel/domains/test_bulks.py +++ b/tests/api_resources/intel/domains/test_bulks.py @@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBulks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/indicator_feeds/test_downloads.py b/tests/api_resources/intel/indicator_feeds/test_downloads.py index 98d6659f931..5c04a02c060 100644 --- a/tests/api_resources/intel/indicator_feeds/test_downloads.py +++ b/tests/api_resources/intel/indicator_feeds/test_downloads.py @@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownloads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/indicator_feeds/test_permissions.py b/tests/api_resources/intel/indicator_feeds/test_permissions.py index 3b06e3c0d14..4b5ec188fd9 100644 --- a/tests/api_resources/intel/indicator_feeds/test_permissions.py +++ b/tests/api_resources/intel/indicator_feeds/test_permissions.py @@ -155,7 +155,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncPermissions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/indicator_feeds/test_snapshots.py b/tests/api_resources/intel/indicator_feeds/test_snapshots.py index 5b7f91a523b..ed91b7eb9ea 100644 --- a/tests/api_resources/intel/indicator_feeds/test_snapshots.py +++ b/tests/api_resources/intel/indicator_feeds/test_snapshots.py @@ -75,7 +75,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncSnapshots: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/intel/test_asn.py b/tests/api_resources/intel/test_asn.py index 1b9016472fe..16911e7242a 100644 --- a/tests/api_resources/intel/test_asn.py +++ b/tests/api_resources/intel/test_asn.py @@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncASN: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_dns.py b/tests/api_resources/intel/test_dns.py index dc6785b5f83..a0e513e9464 100644 --- a/tests/api_resources/intel/test_dns.py +++ b/tests/api_resources/intel/test_dns.py @@ -73,7 +73,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncDNS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_domain_history.py b/tests/api_resources/intel/test_domain_history.py index 75926dc919d..e958709d7ca 100644 --- a/tests/api_resources/intel/test_domain_history.py +++ b/tests/api_resources/intel/test_domain_history.py @@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomainHistory: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_domains.py b/tests/api_resources/intel/test_domains.py index 9a897bf7904..1915f55b790 100644 --- a/tests/api_resources/intel/test_domains.py +++ b/tests/api_resources/intel/test_domains.py @@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_indicator_feeds.py b/tests/api_resources/intel/test_indicator_feeds.py index 6d8258dcf45..c3d7ce21af7 100644 --- a/tests/api_resources/intel/test_indicator_feeds.py +++ b/tests/api_resources/intel/test_indicator_feeds.py @@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIndicatorFeeds: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_ip_lists.py b/tests/api_resources/intel/test_ip_lists.py index 01befdba45c..85a09ac9e4f 100644 --- a/tests/api_resources/intel/test_ip_lists.py +++ b/tests/api_resources/intel/test_ip_lists.py @@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPLists: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_ips.py b/tests/api_resources/intel/test_ips.py index 4f39c996906..8ebd90426c0 100644 --- a/tests/api_resources/intel/test_ips.py +++ b/tests/api_resources/intel/test_ips.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_miscategorizations.py b/tests/api_resources/intel/test_miscategorizations.py index 5fa3ec58751..549b9fa76eb 100644 --- a/tests/api_resources/intel/test_miscategorizations.py +++ b/tests/api_resources/intel/test_miscategorizations.py @@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncMiscategorizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_sinkholes.py b/tests/api_resources/intel/test_sinkholes.py index 5e9b3dda069..ff8bbde79c8 100644 --- a/tests/api_resources/intel/test_sinkholes.py +++ b/tests/api_resources/intel/test_sinkholes.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSinkholes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/intel/test_whois.py b/tests/api_resources/intel/test_whois.py index 97c8efbf7a2..2bd6d6f9801 100644 --- a/tests/api_resources/intel/test_whois.py +++ b/tests/api_resources/intel/test_whois.py @@ -65,7 +65,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWhois: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/kv/namespaces/test_keys.py b/tests/api_resources/kv/namespaces/test_keys.py index aa49754278f..578cd37251e 100644 --- a/tests/api_resources/kv/namespaces/test_keys.py +++ b/tests/api_resources/kv/namespaces/test_keys.py @@ -298,7 +298,9 @@ def test_path_params_bulk_update(self, client: Cloudflare) -> None: class TestAsyncKeys: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/kv/namespaces/test_metadata.py b/tests/api_resources/kv/namespaces/test_metadata.py index fff5e4d3e55..a53c0f4cee9 100644 --- a/tests/api_resources/kv/namespaces/test_metadata.py +++ b/tests/api_resources/kv/namespaces/test_metadata.py @@ -78,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMetadata: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/kv/namespaces/test_values.py b/tests/api_resources/kv/namespaces/test_values.py index 0b4b943c378..0f4bf679af3 100644 --- a/tests/api_resources/kv/namespaces/test_values.py +++ b/tests/api_resources/kv/namespaces/test_values.py @@ -253,7 +253,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncValues: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/kv/test_namespaces.py b/tests/api_resources/kv/test_namespaces.py index 132b87ecd0e..42dd154ab91 100644 --- a/tests/api_resources/kv/test_namespaces.py +++ b/tests/api_resources/kv/test_namespaces.py @@ -461,7 +461,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNamespaces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/leaked_credential_checks/test_detections.py b/tests/api_resources/leaked_credential_checks/test_detections.py index c74c2b245cc..63fccbbb2c4 100644 --- a/tests/api_resources/leaked_credential_checks/test_detections.py +++ b/tests/api_resources/leaked_credential_checks/test_detections.py @@ -215,7 +215,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncDetections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/monitors/test_previews.py b/tests/api_resources/load_balancers/monitors/test_previews.py index 18c3eaee3ee..25aba3a816a 100644 --- a/tests/api_resources/load_balancers/monitors/test_previews.py +++ b/tests/api_resources/load_balancers/monitors/test_previews.py @@ -94,7 +94,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncPreviews: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/monitors/test_references.py b/tests/api_resources/load_balancers/monitors/test_references.py index ba9680e3bc1..11f3553bf4b 100644 --- a/tests/api_resources/load_balancers/monitors/test_references.py +++ b/tests/api_resources/load_balancers/monitors/test_references.py @@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReferences: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/pools/test_health.py b/tests/api_resources/load_balancers/pools/test_health.py index 19c16cd8d44..132196347d6 100644 --- a/tests/api_resources/load_balancers/pools/test_health.py +++ b/tests/api_resources/load_balancers/pools/test_health.py @@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHealth: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/pools/test_references.py b/tests/api_resources/load_balancers/pools/test_references.py index 117c8a62c26..33509c209d5 100644 --- a/tests/api_resources/load_balancers/pools/test_references.py +++ b/tests/api_resources/load_balancers/pools/test_references.py @@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReferences: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_monitors.py b/tests/api_resources/load_balancers/test_monitors.py index a52ea29fbff..8f6468e4245 100644 --- a/tests/api_resources/load_balancers/test_monitors.py +++ b/tests/api_resources/load_balancers/test_monitors.py @@ -371,7 +371,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMonitors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_pools.py b/tests/api_resources/load_balancers/test_pools.py index 0b014d136c1..8b31995802d 100644 --- a/tests/api_resources/load_balancers/test_pools.py +++ b/tests/api_resources/load_balancers/test_pools.py @@ -496,7 +496,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPools: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_previews.py b/tests/api_resources/load_balancers/test_previews.py index 281f21e0600..12b9ed13602 100644 --- a/tests/api_resources/load_balancers/test_previews.py +++ b/tests/api_resources/load_balancers/test_previews.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPreviews: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_regions.py b/tests/api_resources/load_balancers/test_regions.py index 6e689dc253b..eb825e082cd 100644 --- a/tests/api_resources/load_balancers/test_regions.py +++ b/tests/api_resources/load_balancers/test_regions.py @@ -109,7 +109,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRegions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/load_balancers/test_searches.py b/tests/api_resources/load_balancers/test_searches.py index bcd3e6d6397..7b6ed9ddf7c 100644 --- a/tests/api_resources/load_balancers/test_searches.py +++ b/tests/api_resources/load_balancers/test_searches.py @@ -74,7 +74,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSearches: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/datasets/test_fields.py b/tests/api_resources/logpush/datasets/test_fields.py index 728edcd12c2..f9e929d6f7f 100644 --- a/tests/api_resources/logpush/datasets/test_fields.py +++ b/tests/api_resources/logpush/datasets/test_fields.py @@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFields: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/datasets/test_jobs.py b/tests/api_resources/logpush/datasets/test_jobs.py index 8392e96d1b8..54f7c233e8f 100644 --- a/tests/api_resources/logpush/datasets/test_jobs.py +++ b/tests/api_resources/logpush/datasets/test_jobs.py @@ -81,7 +81,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncJobs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/test_edge.py b/tests/api_resources/logpush/test_edge.py index c110064ecf9..49a554ba2f0 100644 --- a/tests/api_resources/logpush/test_edge.py +++ b/tests/api_resources/logpush/test_edge.py @@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEdge: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index 9f67942d5ec..862caad9f98 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -369,7 +369,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncJobs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/test_ownership.py b/tests/api_resources/logpush/test_ownership.py index 4ad4830713f..18096fdc424 100644 --- a/tests/api_resources/logpush/test_ownership.py +++ b/tests/api_resources/logpush/test_ownership.py @@ -150,7 +150,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None: class TestAsyncOwnership: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logpush/test_validate.py b/tests/api_resources/logpush/test_validate.py index 1912c05f201..8ecf8701fc8 100644 --- a/tests/api_resources/logpush/test_validate.py +++ b/tests/api_resources/logpush/test_validate.py @@ -206,7 +206,9 @@ def test_path_params_origin(self, client: Cloudflare) -> None: class TestAsyncValidate: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/logs/control/cmb/test_config.py b/tests/api_resources/logs/control/cmb/test_config.py index e58378c937e..e745ff9be6b 100644 --- a/tests/api_resources/logs/control/cmb/test_config.py +++ b/tests/api_resources/logs/control/cmb/test_config.py @@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfig: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logs/control/test_retention.py b/tests/api_resources/logs/control/test_retention.py index 1f321941bb8..8177450dcf5 100644 --- a/tests/api_resources/logs/control/test_retention.py +++ b/tests/api_resources/logs/control/test_retention.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRetention: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logs/received/test_fields.py b/tests/api_resources/logs/received/test_fields.py index 8705e75e0e9..473a5baf341 100644 --- a/tests/api_resources/logs/received/test_fields.py +++ b/tests/api_resources/logs/received/test_fields.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFields: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logs/test_rayid.py b/tests/api_resources/logs/test_rayid.py index b891b658a90..bcd572c49c1 100644 --- a/tests/api_resources/logs/test_rayid.py +++ b/tests/api_resources/logs/test_rayid.py @@ -77,7 +77,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRayID: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/logs/test_received.py b/tests/api_resources/logs/test_received.py index 088eb9ad2fa..f8c8795c20c 100644 --- a/tests/api_resources/logs/test_received.py +++ b/tests/api_resources/logs/test_received.py @@ -74,7 +74,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReceived: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py b/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py index e1be4de8e18..9159a726003 100644 --- a/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py +++ b/tests/api_resources/magic_cloud_networking/catalog_syncs/test_prebuilt_policies.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncPrebuiltPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py b/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py index 42e21b1d632..4813fc1dc17 100644 --- a/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py +++ b/tests/api_resources/magic_cloud_networking/on_ramps/test_address_spaces.py @@ -145,7 +145,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncAddressSpaces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py b/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py index 350a49f7a71..71e9deec8ed 100644 --- a/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py +++ b/tests/api_resources/magic_cloud_networking/test_catalog_syncs.py @@ -401,7 +401,9 @@ def test_path_params_refresh(self, client: Cloudflare) -> None: class TestAsyncCatalogSyncs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py b/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py index deef57f6415..d03faca3b56 100644 --- a/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py +++ b/tests/api_resources/magic_cloud_networking/test_cloud_integrations.py @@ -510,7 +510,9 @@ def test_path_params_initial_setup(self, client: Cloudflare) -> None: class TestAsyncCloudIntegrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/test_on_ramps.py b/tests/api_resources/magic_cloud_networking/test_on_ramps.py index b47c6990c3a..4706a5bcde6 100644 --- a/tests/api_resources/magic_cloud_networking/test_on_ramps.py +++ b/tests/api_resources/magic_cloud_networking/test_on_ramps.py @@ -576,7 +576,9 @@ def test_path_params_plan(self, client: Cloudflare) -> None: class TestAsyncOnRamps: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_cloud_networking/test_resources.py b/tests/api_resources/magic_cloud_networking/test_resources.py index d591ba5c7f0..8275125681e 100644 --- a/tests/api_resources/magic_cloud_networking/test_resources.py +++ b/tests/api_resources/magic_cloud_networking/test_resources.py @@ -267,7 +267,9 @@ def test_path_params_policy_preview(self, client: Cloudflare) -> None: class TestAsyncResources: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/configs/test_full.py b/tests/api_resources/magic_network_monitoring/configs/test_full.py index fa2d1efd518..9233a8c1c40 100644 --- a/tests/api_resources/magic_network_monitoring/configs/test_full.py +++ b/tests/api_resources/magic_network_monitoring/configs/test_full.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFull: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py index 46761c021c6..c9415da5b36 100644 --- a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py +++ b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py @@ -72,7 +72,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncAdvertisements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/test_configs.py b/tests/api_resources/magic_network_monitoring/test_configs.py index 5cd11d231e0..aa21987216c 100644 --- a/tests/api_resources/magic_network_monitoring/test_configs.py +++ b/tests/api_resources/magic_network_monitoring/test_configs.py @@ -278,7 +278,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py index 1f5cbdf0ea3..862586ea078 100644 --- a/tests/api_resources/magic_network_monitoring/test_rules.py +++ b/tests/api_resources/magic_network_monitoring/test_rules.py @@ -342,7 +342,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py b/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py index 01a029b3b62..3d876e6c8bf 100644 --- a/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py +++ b/tests/api_resources/magic_network_monitoring/vpc_flows/test_tokens.py @@ -56,7 +56,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/connectors/events/test_latest.py b/tests/api_resources/magic_transit/connectors/events/test_latest.py index fb297d3841a..04679973ea3 100644 --- a/tests/api_resources/magic_transit/connectors/events/test_latest.py +++ b/tests/api_resources/magic_transit/connectors/events/test_latest.py @@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncLatest: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py b/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py index 2a812ac20c2..639138ca157 100644 --- a/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py +++ b/tests/api_resources/magic_transit/connectors/snapshots/test_latest.py @@ -67,7 +67,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncLatest: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/connectors/test_events.py b/tests/api_resources/magic_transit/connectors/test_events.py index 65d54d4764d..500f22e5d76 100644 --- a/tests/api_resources/magic_transit/connectors/test_events.py +++ b/tests/api_resources/magic_transit/connectors/test_events.py @@ -147,7 +147,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/connectors/test_snapshots.py b/tests/api_resources/magic_transit/connectors/test_snapshots.py index 46a4ffa8148..f820c3d86f3 100644 --- a/tests/api_resources/magic_transit/connectors/test_snapshots.py +++ b/tests/api_resources/magic_transit/connectors/test_snapshots.py @@ -142,7 +142,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSnapshots: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/pcaps/test_download.py b/tests/api_resources/magic_transit/pcaps/test_download.py index 5ab97be2429..de43411bbd3 100644 --- a/tests/api_resources/magic_transit/pcaps/test_download.py +++ b/tests/api_resources/magic_transit/pcaps/test_download.py @@ -91,7 +91,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize @pytest.mark.respx(base_url=base_url) diff --git a/tests/api_resources/magic_transit/pcaps/test_ownership.py b/tests/api_resources/magic_transit/pcaps/test_ownership.py index 7a7d3ea89ec..dcc99b592ff 100644 --- a/tests/api_resources/magic_transit/pcaps/test_ownership.py +++ b/tests/api_resources/magic_transit/pcaps/test_ownership.py @@ -194,7 +194,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None: class TestAsyncOwnership: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/sites/test_acls.py b/tests/api_resources/magic_transit/sites/test_acls.py index d6c31f71bc6..1e98e853d29 100644 --- a/tests/api_resources/magic_transit/sites/test_acls.py +++ b/tests/api_resources/magic_transit/sites/test_acls.py @@ -456,7 +456,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncACLs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/sites/test_lans.py b/tests/api_resources/magic_transit/sites/test_lans.py index 2fc412afa6e..8eeced417a8 100644 --- a/tests/api_resources/magic_transit/sites/test_lans.py +++ b/tests/api_resources/magic_transit/sites/test_lans.py @@ -471,7 +471,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLANs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/sites/test_wans.py b/tests/api_resources/magic_transit/sites/test_wans.py index b8e91efc2dc..98217a3396c 100644 --- a/tests/api_resources/magic_transit/sites/test_wans.py +++ b/tests/api_resources/magic_transit/sites/test_wans.py @@ -416,7 +416,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWANs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/test_apps.py b/tests/api_resources/magic_transit/test_apps.py index 185b0f31251..bfa9adeceb6 100644 --- a/tests/api_resources/magic_transit/test_apps.py +++ b/tests/api_resources/magic_transit/test_apps.py @@ -346,7 +346,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncApps: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip( reason="prism errors - https://github.com/cloudflare/cloudflare-python/actions/runs/9360388260/job/25765690361?pr=482#step:5:7212" diff --git a/tests/api_resources/magic_transit/test_cf_interconnects.py b/tests/api_resources/magic_transit/test_cf_interconnects.py index 91c10afd3aa..87f22b8bf4a 100644 --- a/tests/api_resources/magic_transit/test_cf_interconnects.py +++ b/tests/api_resources/magic_transit/test_cf_interconnects.py @@ -255,7 +255,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCfInterconnects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/magic_transit/test_connectors.py b/tests/api_resources/magic_transit/test_connectors.py index 75506734f5e..c1db3d02862 100644 --- a/tests/api_resources/magic_transit/test_connectors.py +++ b/tests/api_resources/magic_transit/test_connectors.py @@ -233,7 +233,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnectors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/test_gre_tunnels.py b/tests/api_resources/magic_transit/test_gre_tunnels.py index 03eee2584f0..f69ed6bbd92 100644 --- a/tests/api_resources/magic_transit/test_gre_tunnels.py +++ b/tests/api_resources/magic_transit/test_gre_tunnels.py @@ -419,7 +419,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGRETunnels: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/magic_transit/test_ipsec_tunnels.py b/tests/api_resources/magic_transit/test_ipsec_tunnels.py index 96121a2b033..d6a61d6b300 100644 --- a/tests/api_resources/magic_transit/test_ipsec_tunnels.py +++ b/tests/api_resources/magic_transit/test_ipsec_tunnels.py @@ -459,7 +459,9 @@ def test_path_params_psk_generate(self, client: Cloudflare) -> None: class TestAsyncIPSECTunnels: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/test_pcaps.py b/tests/api_resources/magic_transit/test_pcaps.py index 6c7d57154cc..17a6cb661d4 100644 --- a/tests/api_resources/magic_transit/test_pcaps.py +++ b/tests/api_resources/magic_transit/test_pcaps.py @@ -311,7 +311,9 @@ def test_path_params_stop(self, client: Cloudflare) -> None: class TestAsyncPCAPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/magic_transit/test_routes.py b/tests/api_resources/magic_transit/test_routes.py index 81af5a39088..9524a986da2 100644 --- a/tests/api_resources/magic_transit/test_routes.py +++ b/tests/api_resources/magic_transit/test_routes.py @@ -420,7 +420,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/magic_transit/test_sites.py b/tests/api_resources/magic_transit/test_sites.py index 406ca9f52a9..27c50c24f7f 100644 --- a/tests/api_resources/magic_transit/test_sites.py +++ b/tests/api_resources/magic_transit/test_sites.py @@ -359,7 +359,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSites: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/mtls_certificates/test_associations.py b/tests/api_resources/mtls_certificates/test_associations.py index 6f11e303c01..ce2192b2694 100644 --- a/tests/api_resources/mtls_certificates/test_associations.py +++ b/tests/api_resources/mtls_certificates/test_associations.py @@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAssociations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/network_interconnects/test_cnis.py b/tests/api_resources/network_interconnects/test_cnis.py index a5ae1785ded..a2d7d5044f1 100644 --- a/tests/api_resources/network_interconnects/test_cnis.py +++ b/tests/api_resources/network_interconnects/test_cnis.py @@ -375,7 +375,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCNIs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/network_interconnects/test_interconnects.py b/tests/api_resources/network_interconnects/test_interconnects.py index 79d4f5ec681..ff267d7864b 100644 --- a/tests/api_resources/network_interconnects/test_interconnects.py +++ b/tests/api_resources/network_interconnects/test_interconnects.py @@ -380,7 +380,9 @@ def test_path_params_status(self, client: Cloudflare) -> None: class TestAsyncInterconnects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/network_interconnects/test_settings.py b/tests/api_resources/network_interconnects/test_settings.py index d5151d269f7..144eb7b2f92 100644 --- a/tests/api_resources/network_interconnects/test_settings.py +++ b/tests/api_resources/network_interconnects/test_settings.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/network_interconnects/test_slots.py b/tests/api_resources/network_interconnects/test_slots.py index 6e7b507d51c..b57afef6ce5 100644 --- a/tests/api_resources/network_interconnects/test_slots.py +++ b/tests/api_resources/network_interconnects/test_slots.py @@ -118,7 +118,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSlots: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py index 0e2ef562a10..7e804a45b46 100644 --- a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py +++ b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py @@ -205,7 +205,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/origin_tls_client_auth/test_hostnames.py b/tests/api_resources/origin_tls_client_auth/test_hostnames.py index 37839d99139..caded780ceb 100644 --- a/tests/api_resources/origin_tls_client_auth/test_hostnames.py +++ b/tests/api_resources/origin_tls_client_auth/test_hostnames.py @@ -113,7 +113,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnames: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/origin_tls_client_auth/test_settings.py b/tests/api_resources/origin_tls_client_auth/test_settings.py index fc30faf30eb..03cf5a4bc0e 100644 --- a/tests/api_resources/origin_tls_client_auth/test_settings.py +++ b/tests/api_resources/origin_tls_client_auth/test_settings.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/page_shield/test_connections.py b/tests/api_resources/page_shield/test_connections.py index 1af65b2ef8f..ea61c20c164 100644 --- a/tests/api_resources/page_shield/test_connections.py +++ b/tests/api_resources/page_shield/test_connections.py @@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/page_shield/test_cookies.py b/tests/api_resources/page_shield/test_cookies.py index d3008ff641a..4c3ee43d562 100644 --- a/tests/api_resources/page_shield/test_cookies.py +++ b/tests/api_resources/page_shield/test_cookies.py @@ -127,7 +127,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCookies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/page_shield/test_policies.py b/tests/api_resources/page_shield/test_policies.py index 375863ad9b6..a62663f6b51 100644 --- a/tests/api_resources/page_shield/test_policies.py +++ b/tests/api_resources/page_shield/test_policies.py @@ -278,7 +278,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/page_shield/test_scripts.py b/tests/api_resources/page_shield/test_scripts.py index f8a9077bccf..af2706f5f45 100644 --- a/tests/api_resources/page_shield/test_scripts.py +++ b/tests/api_resources/page_shield/test_scripts.py @@ -126,7 +126,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/pages/projects/deployments/history/test_logs.py b/tests/api_resources/pages/projects/deployments/history/test_logs.py index db7215a143b..54642c4a269 100644 --- a/tests/api_resources/pages/projects/deployments/history/test_logs.py +++ b/tests/api_resources/pages/projects/deployments/history/test_logs.py @@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py index 7c9203aa0c3..5d4451d14e8 100644 --- a/tests/api_resources/pages/projects/test_deployments.py +++ b/tests/api_resources/pages/projects/test_deployments.py @@ -391,7 +391,9 @@ def test_path_params_rollback(self, client: Cloudflare) -> None: class TestAsyncDeployments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/pages/projects/test_domains.py b/tests/api_resources/pages/projects/test_domains.py index 24f58204f4a..3725b40f8b8 100644 --- a/tests/api_resources/pages/projects/test_domains.py +++ b/tests/api_resources/pages/projects/test_domains.py @@ -316,7 +316,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py index f4e1ef5989d..f6f4158b237 100644 --- a/tests/api_resources/pages/test_projects.py +++ b/tests/api_resources/pages/test_projects.py @@ -495,7 +495,9 @@ def test_path_params_purge_build_cache(self, client: Cloudflare) -> None: class TestAsyncProjects: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/queues/test_consumers.py b/tests/api_resources/queues/test_consumers.py index 088cbc4a814..b047b208198 100644 --- a/tests/api_resources/queues/test_consumers.py +++ b/tests/api_resources/queues/test_consumers.py @@ -414,7 +414,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConsumers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/queues/test_messages.py b/tests/api_resources/queues/test_messages.py index 48a8880f39a..f53b6239ae1 100644 --- a/tests/api_resources/queues/test_messages.py +++ b/tests/api_resources/queues/test_messages.py @@ -331,7 +331,9 @@ def test_path_params_push_overload_2(self, client: Cloudflare) -> None: class TestAsyncMessages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ack(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/queues/test_purge.py b/tests/api_resources/queues/test_purge.py index f246fe06841..3148148bfb7 100644 --- a/tests/api_resources/queues/test_purge.py +++ b/tests/api_resources/queues/test_purge.py @@ -124,7 +124,9 @@ def test_path_params_status(self, client: Cloudflare) -> None: class TestAsyncPurge: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_start(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/r2/buckets/domains/test_custom.py b/tests/api_resources/r2/buckets/domains/test_custom.py index c93c6691c11..b9b36f64a20 100644 --- a/tests/api_resources/r2/buckets/domains/test_custom.py +++ b/tests/api_resources/r2/buckets/domains/test_custom.py @@ -395,7 +395,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustom: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/buckets/domains/test_managed.py b/tests/api_resources/r2/buckets/domains/test_managed.py index 2d574c1b72a..416c742d2ed 100644 --- a/tests/api_resources/r2/buckets/domains/test_managed.py +++ b/tests/api_resources/r2/buckets/domains/test_managed.py @@ -149,7 +149,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncManaged: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/buckets/test_cors.py b/tests/api_resources/r2/buckets/test_cors.py index 4c978af07d5..0864698edc4 100644 --- a/tests/api_resources/r2/buckets/test_cors.py +++ b/tests/api_resources/r2/buckets/test_cors.py @@ -217,7 +217,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCORS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/buckets/test_event_notifications.py b/tests/api_resources/r2/buckets/test_event_notifications.py index e3df821f3f2..07495b047e0 100644 --- a/tests/api_resources/r2/buckets/test_event_notifications.py +++ b/tests/api_resources/r2/buckets/test_event_notifications.py @@ -317,7 +317,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEventNotifications: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/r2/buckets/test_lifecycle.py b/tests/api_resources/r2/buckets/test_lifecycle.py index f377344330f..d366fb30c4b 100644 --- a/tests/api_resources/r2/buckets/test_lifecycle.py +++ b/tests/api_resources/r2/buckets/test_lifecycle.py @@ -171,7 +171,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLifecycle: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/buckets/test_locks.py b/tests/api_resources/r2/buckets/test_locks.py index 5921965821f..2debc63606e 100644 --- a/tests/api_resources/r2/buckets/test_locks.py +++ b/tests/api_resources/r2/buckets/test_locks.py @@ -154,7 +154,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLocks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/r2/buckets/test_metrics.py b/tests/api_resources/r2/buckets/test_metrics.py index fde55e0bb0e..974564e0fc8 100644 --- a/tests/api_resources/r2/buckets/test_metrics.py +++ b/tests/api_resources/r2/buckets/test_metrics.py @@ -61,7 +61,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncMetrics: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/r2/buckets/test_sippy.py b/tests/api_resources/r2/buckets/test_sippy.py index 6e67aca418d..b7b43b3b788 100644 --- a/tests/api_resources/r2/buckets/test_sippy.py +++ b/tests/api_resources/r2/buckets/test_sippy.py @@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSippy: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/super_slurper/jobs/test_logs.py b/tests/api_resources/r2/super_slurper/jobs/test_logs.py index c1766d0953d..847b27f546d 100644 --- a/tests/api_resources/r2/super_slurper/jobs/test_logs.py +++ b/tests/api_resources/r2/super_slurper/jobs/test_logs.py @@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py b/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py index c3f1403cc88..6583f5a6cee 100644 --- a/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py +++ b/tests/api_resources/r2/super_slurper/test_connectivity_precheck.py @@ -229,7 +229,9 @@ def test_path_params_target(self, client: Cloudflare) -> None: class TestAsyncConnectivityPrecheck: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_source_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/r2/super_slurper/test_jobs.py b/tests/api_resources/r2/super_slurper/test_jobs.py index 4f7f9107ee8..e5976ec5fc2 100644 --- a/tests/api_resources/r2/super_slurper/test_jobs.py +++ b/tests/api_resources/r2/super_slurper/test_jobs.py @@ -414,7 +414,9 @@ def test_path_params_resume(self, client: Cloudflare) -> None: class TestAsyncJobs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/r2/test_buckets.py b/tests/api_resources/r2/test_buckets.py index b9c2dfdc7b3..733506878c5 100644 --- a/tests/api_resources/r2/test_buckets.py +++ b/tests/api_resources/r2/test_buckets.py @@ -326,7 +326,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBuckets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/r2/test_temporary_credentials.py b/tests/api_resources/r2/test_temporary_credentials.py index aa2d0981d16..71d2caa82f8 100644 --- a/tests/api_resources/r2/test_temporary_credentials.py +++ b/tests/api_resources/r2/test_temporary_credentials.py @@ -91,7 +91,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTemporaryCredentials: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/radar/ai/bots/test_summary.py b/tests/api_resources/radar/ai/bots/test_summary.py index 90e08cd591d..902d2d89a9e 100644 --- a/tests/api_resources/radar/ai/bots/test_summary.py +++ b/tests/api_resources/radar/ai/bots/test_summary.py @@ -60,7 +60,9 @@ def test_streaming_response_user_agent(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_user_agent(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ai/inference/test_summary.py b/tests/api_resources/radar/ai/inference/test_summary.py index 353a568f366..39dadb81d00 100644 --- a/tests/api_resources/radar/ai/inference/test_summary.py +++ b/tests/api_resources/radar/ai/inference/test_summary.py @@ -97,7 +97,9 @@ def test_streaming_response_task(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_model(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py b/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py index 1a3c0affb15..844a159826c 100644 --- a/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py +++ b/tests/api_resources/radar/ai/inference/timeseries_groups/test_summary.py @@ -99,7 +99,9 @@ def test_streaming_response_task(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_model(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ai/test_timeseries_groups.py b/tests/api_resources/radar/ai/test_timeseries_groups.py index 59c16b41561..8f0749ca7c5 100644 --- a/tests/api_resources/radar/ai/test_timeseries_groups.py +++ b/tests/api_resources/radar/ai/test_timeseries_groups.py @@ -61,7 +61,9 @@ def test_streaming_response_user_agent(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_user_agent(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ai/test_to_markdown.py b/tests/api_resources/radar/ai/test_to_markdown.py index 6dd6f07410a..c968cbca64d 100644 --- a/tests/api_resources/radar/ai/test_to_markdown.py +++ b/tests/api_resources/radar/ai/test_to_markdown.py @@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncToMarkdown: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used") @parametrize diff --git a/tests/api_resources/radar/annotations/test_outages.py b/tests/api_resources/radar/annotations/test_outages.py index f249d7e3c89..c1cdb759a86 100644 --- a/tests/api_resources/radar/annotations/test_outages.py +++ b/tests/api_resources/radar/annotations/test_outages.py @@ -98,7 +98,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncOutages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/as112/test_summary.py b/tests/api_resources/radar/as112/test_summary.py index 3d71c52ebae..6557815c13b 100644 --- a/tests/api_resources/radar/as112/test_summary.py +++ b/tests/api_resources/radar/as112/test_summary.py @@ -272,7 +272,9 @@ def test_streaming_response_response_codes(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/as112/test_timeseries_groups.py b/tests/api_resources/radar/as112/test_timeseries_groups.py index c428285efdf..563610398f4 100644 --- a/tests/api_resources/radar/as112/test_timeseries_groups.py +++ b/tests/api_resources/radar/as112/test_timeseries_groups.py @@ -278,7 +278,9 @@ def test_streaming_response_response_codes(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/as112/test_top.py b/tests/api_resources/radar/as112/test_top.py index 9d7f4f2d626..a99a57baac1 100644 --- a/tests/api_resources/radar/as112/test_top.py +++ b/tests/api_resources/radar/as112/test_top.py @@ -202,7 +202,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer3/test_summary.py b/tests/api_resources/radar/attacks/layer3/test_summary.py index a488256e75c..7dea5d0b754 100644 --- a/tests/api_resources/radar/attacks/layer3/test_summary.py +++ b/tests/api_resources/radar/attacks/layer3/test_summary.py @@ -316,7 +316,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bitrate(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py index a6dfc1a6d56..96416cc6c73 100644 --- a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py @@ -330,7 +330,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bitrate(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer3/test_top.py b/tests/api_resources/radar/attacks/layer3/test_top.py index a2ba4039c5b..f2d259447fa 100644 --- a/tests/api_resources/radar/attacks/layer3/test_top.py +++ b/tests/api_resources/radar/attacks/layer3/test_top.py @@ -165,7 +165,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_attacks(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer3/top/test_locations.py b/tests/api_resources/radar/attacks/layer3/top/test_locations.py index fc0424a2a6b..8c84eb28cc7 100644 --- a/tests/api_resources/radar/attacks/layer3/top/test_locations.py +++ b/tests/api_resources/radar/attacks/layer3/top/test_locations.py @@ -105,7 +105,9 @@ def test_streaming_response_target(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/test_summary.py b/tests/api_resources/radar/attacks/layer7/test_summary.py index ee33af513ca..e7fb747af1b 100644 --- a/tests/api_resources/radar/attacks/layer7/test_summary.py +++ b/tests/api_resources/radar/attacks/layer7/test_summary.py @@ -330,7 +330,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_http_method(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py index 7192af1ea24..4f306059ea1 100644 --- a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py @@ -344,7 +344,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_http_method(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/test_top.py b/tests/api_resources/radar/attacks/layer7/test_top.py index 0b9bdd624b2..8d94572dd0d 100644 --- a/tests/api_resources/radar/attacks/layer7/test_top.py +++ b/tests/api_resources/radar/attacks/layer7/test_top.py @@ -171,7 +171,9 @@ def test_streaming_response_vertical(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_attacks(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/top/test_ases.py b/tests/api_resources/radar/attacks/layer7/top/test_ases.py index 355e8d958f3..d5fc7fad28a 100644 --- a/tests/api_resources/radar/attacks/layer7/top/test_ases.py +++ b/tests/api_resources/radar/attacks/layer7/top/test_ases.py @@ -63,7 +63,9 @@ def test_streaming_response_origin(self, client: Cloudflare) -> None: class TestAsyncAses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/layer7/top/test_locations.py b/tests/api_resources/radar/attacks/layer7/top/test_locations.py index e316dabe10d..0beda3534c5 100644 --- a/tests/api_resources/radar/attacks/layer7/top/test_locations.py +++ b/tests/api_resources/radar/attacks/layer7/top/test_locations.py @@ -105,7 +105,9 @@ def test_streaming_response_target(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_origin(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/test_layer3.py b/tests/api_resources/radar/attacks/test_layer3.py index 0d2c720472e..182fc628ecc 100644 --- a/tests/api_resources/radar/attacks/test_layer3.py +++ b/tests/api_resources/radar/attacks/test_layer3.py @@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncLayer3: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/attacks/test_layer7.py b/tests/api_resources/radar/attacks/test_layer7.py index 7a43a414b3f..66db2e280df 100644 --- a/tests/api_resources/radar/attacks/test_layer7.py +++ b/tests/api_resources/radar/attacks/test_layer7.py @@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncLayer7: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/hijacks/test_events.py b/tests/api_resources/radar/bgp/hijacks/test_events.py index 52439d479ae..eb17a28d7a5 100644 --- a/tests/api_resources/radar/bgp/hijacks/test_events.py +++ b/tests/api_resources/radar/bgp/hijacks/test_events.py @@ -68,7 +68,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/leaks/test_events.py b/tests/api_resources/radar/bgp/leaks/test_events.py index d3e22882b2a..470dc98987b 100644 --- a/tests/api_resources/radar/bgp/leaks/test_events.py +++ b/tests/api_resources/radar/bgp/leaks/test_events.py @@ -64,7 +64,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/test_ips.py b/tests/api_resources/radar/bgp/test_ips.py index 27272ae08e2..8a852f8528c 100644 --- a/tests/api_resources/radar/bgp/test_ips.py +++ b/tests/api_resources/radar/bgp/test_ips.py @@ -60,7 +60,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/test_routes.py b/tests/api_resources/radar/bgp/test_routes.py index 34ee276782a..aa7b276d153 100644 --- a/tests/api_resources/radar/bgp/test_routes.py +++ b/tests/api_resources/radar/bgp/test_routes.py @@ -199,7 +199,9 @@ def test_streaming_response_stats(self, client: Cloudflare) -> None: class TestAsyncRoutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/test_top.py b/tests/api_resources/radar/bgp/test_top.py index afd90a9fc0d..1880ce7d0a2 100644 --- a/tests/api_resources/radar/bgp/test_top.py +++ b/tests/api_resources/radar/bgp/test_top.py @@ -59,7 +59,9 @@ def test_streaming_response_prefixes(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_prefixes(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/bgp/top/test_ases.py b/tests/api_resources/radar/bgp/top/test_ases.py index 261cfd82941..2bc97e0df99 100644 --- a/tests/api_resources/radar/bgp/top/test_ases.py +++ b/tests/api_resources/radar/bgp/top/test_ases.py @@ -94,7 +94,9 @@ def test_streaming_response_prefixes(self, client: Cloudflare) -> None: class TestAsyncAses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/dns/test_summary.py b/tests/api_resources/radar/dns/test_summary.py index 33f17227c95..38000e34bec 100644 --- a/tests/api_resources/radar/dns/test_summary.py +++ b/tests/api_resources/radar/dns/test_summary.py @@ -470,7 +470,9 @@ def test_streaming_response_response_ttl(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_cache_hit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/dns/test_timeseries_groups.py b/tests/api_resources/radar/dns/test_timeseries_groups.py index 4e8475c2340..56cf538cbae 100644 --- a/tests/api_resources/radar/dns/test_timeseries_groups.py +++ b/tests/api_resources/radar/dns/test_timeseries_groups.py @@ -480,7 +480,9 @@ def test_streaming_response_response_ttl(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_cache_hit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/dns/test_top.py b/tests/api_resources/radar/dns/test_top.py index 6d6eb3b42b4..91998856274 100644 --- a/tests/api_resources/radar/dns/test_top.py +++ b/tests/api_resources/radar/dns/test_top.py @@ -102,7 +102,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/routing/test_summary.py b/tests/api_resources/radar/email/routing/test_summary.py index 64bbf2de1d2..5d8a9f81409 100644 --- a/tests/api_resources/radar/email/routing/test_summary.py +++ b/tests/api_resources/radar/email/routing/test_summary.py @@ -273,7 +273,9 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/routing/test_timeseries_groups.py b/tests/api_resources/radar/email/routing/test_timeseries_groups.py index 338ae22cd84..e2f211a97df 100644 --- a/tests/api_resources/radar/email/routing/test_timeseries_groups.py +++ b/tests/api_resources/radar/email/routing/test_timeseries_groups.py @@ -279,7 +279,9 @@ def test_streaming_response_spf(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/test_summary.py b/tests/api_resources/radar/email/security/test_summary.py index 51820e1bd4e..05d733875f4 100644 --- a/tests/api_resources/radar/email/security/test_summary.py +++ b/tests/api_resources/radar/email/security/test_summary.py @@ -394,7 +394,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/test_timeseries_groups.py b/tests/api_resources/radar/email/security/test_timeseries_groups.py index 59dfb88fc3a..c7ea6db44ee 100644 --- a/tests/api_resources/radar/email/security/test_timeseries_groups.py +++ b/tests/api_resources/radar/email/security/test_timeseries_groups.py @@ -403,7 +403,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_arc(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/top/test_tlds.py b/tests/api_resources/radar/email/security/top/test_tlds.py index 0633c38550e..b4a4c9d5e51 100644 --- a/tests/api_resources/radar/email/security/top/test_tlds.py +++ b/tests/api_resources/radar/email/security/top/test_tlds.py @@ -63,7 +63,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTlds: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py index 79ca8b49bbe..93e3b437867 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py @@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncMalicious: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spam.py b/tests/api_resources/radar/email/security/top/tlds/test_spam.py index 2e561af84f9..8a7d5759e5b 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spam.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spam.py @@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSpam: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py index c06d638af23..67e3482f7e9 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py @@ -70,7 +70,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSpoof: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/entities/test_asns.py b/tests/api_resources/radar/entities/test_asns.py index 25c5d7f322b..ad48799698b 100644 --- a/tests/api_resources/radar/entities/test_asns.py +++ b/tests/api_resources/radar/entities/test_asns.py @@ -179,7 +179,9 @@ def test_streaming_response_rel(self, client: Cloudflare) -> None: class TestAsyncASNs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/entities/test_locations.py b/tests/api_resources/radar/entities/test_locations.py index b7fedeea1e4..0e3102f36c1 100644 --- a/tests/api_resources/radar/entities/test_locations.py +++ b/tests/api_resources/radar/entities/test_locations.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_bot_class.py b/tests/api_resources/radar/http/ases/test_bot_class.py index 98df2ef1124..61f93190dc4 100644 --- a/tests/api_resources/radar/http/ases/test_bot_class.py +++ b/tests/api_resources/radar/http/ases/test_bot_class.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBotClass: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_browser_family.py b/tests/api_resources/radar/http/ases/test_browser_family.py index ec95ad11eb3..51f7c3821c5 100644 --- a/tests/api_resources/radar/http/ases/test_browser_family.py +++ b/tests/api_resources/radar/http/ases/test_browser_family.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBrowserFamily: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_device_type.py b/tests/api_resources/radar/http/ases/test_device_type.py index 16f5159f28e..93ea5f0ac2a 100644 --- a/tests/api_resources/radar/http/ases/test_device_type.py +++ b/tests/api_resources/radar/http/ases/test_device_type.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncDeviceType: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_http_method.py b/tests/api_resources/radar/http/ases/test_http_method.py index e78240f48d0..c463291a9c6 100644 --- a/tests/api_resources/radar/http/ases/test_http_method.py +++ b/tests/api_resources/radar/http/ases/test_http_method.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPMethod: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_http_protocol.py b/tests/api_resources/radar/http/ases/test_http_protocol.py index ed93997533f..7b20e3f6fd5 100644 --- a/tests/api_resources/radar/http/ases/test_http_protocol.py +++ b/tests/api_resources/radar/http/ases/test_http_protocol.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPProtocol: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_ip_version.py b/tests/api_resources/radar/http/ases/test_ip_version.py index 6852e542ea2..51d29528bcf 100644 --- a/tests/api_resources/radar/http/ases/test_ip_version.py +++ b/tests/api_resources/radar/http/ases/test_ip_version.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncIPVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_os.py b/tests/api_resources/radar/http/ases/test_os.py index 6504480d77e..7bdb87ae5e9 100644 --- a/tests/api_resources/radar/http/ases/test_os.py +++ b/tests/api_resources/radar/http/ases/test_os.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncOS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/ases/test_tls_version.py b/tests/api_resources/radar/http/ases/test_tls_version.py index bbd6d24f88d..6e70af951a4 100644 --- a/tests/api_resources/radar/http/ases/test_tls_version.py +++ b/tests/api_resources/radar/http/ases/test_tls_version.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTLSVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_bot_class.py b/tests/api_resources/radar/http/locations/test_bot_class.py index 6dc83153fd2..b798c51d092 100644 --- a/tests/api_resources/radar/http/locations/test_bot_class.py +++ b/tests/api_resources/radar/http/locations/test_bot_class.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBotClass: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_browser_family.py b/tests/api_resources/radar/http/locations/test_browser_family.py index 4f1d0335857..77dc9030920 100644 --- a/tests/api_resources/radar/http/locations/test_browser_family.py +++ b/tests/api_resources/radar/http/locations/test_browser_family.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncBrowserFamily: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_device_type.py b/tests/api_resources/radar/http/locations/test_device_type.py index 7d5e60d4bb5..f3716bf62a5 100644 --- a/tests/api_resources/radar/http/locations/test_device_type.py +++ b/tests/api_resources/radar/http/locations/test_device_type.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncDeviceType: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_http_method.py b/tests/api_resources/radar/http/locations/test_http_method.py index f38a1e462c2..f50613db2db 100644 --- a/tests/api_resources/radar/http/locations/test_http_method.py +++ b/tests/api_resources/radar/http/locations/test_http_method.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPMethod: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_http_protocol.py b/tests/api_resources/radar/http/locations/test_http_protocol.py index b72c48d133f..f0c76f621a8 100644 --- a/tests/api_resources/radar/http/locations/test_http_protocol.py +++ b/tests/api_resources/radar/http/locations/test_http_protocol.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncHTTPProtocol: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_ip_version.py b/tests/api_resources/radar/http/locations/test_ip_version.py index cccb9672906..07cd41a1e61 100644 --- a/tests/api_resources/radar/http/locations/test_ip_version.py +++ b/tests/api_resources/radar/http/locations/test_ip_version.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncIPVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_os.py b/tests/api_resources/radar/http/locations/test_os.py index adda371838c..11e69bfc1d4 100644 --- a/tests/api_resources/radar/http/locations/test_os.py +++ b/tests/api_resources/radar/http/locations/test_os.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncOS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/locations/test_tls_version.py b/tests/api_resources/radar/http/locations/test_tls_version.py index d44cf7872ee..3bcfe4bc5f8 100644 --- a/tests/api_resources/radar/http/locations/test_tls_version.py +++ b/tests/api_resources/radar/http/locations/test_tls_version.py @@ -74,7 +74,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTLSVersion: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_ases.py b/tests/api_resources/radar/http/test_ases.py index 9413713558b..ca39e93f26c 100644 --- a/tests/api_resources/radar/http/test_ases.py +++ b/tests/api_resources/radar/http/test_ases.py @@ -68,7 +68,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncAses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_locations.py b/tests/api_resources/radar/http/test_locations.py index a4bd04bb8cd..7b5c37939b5 100644 --- a/tests/api_resources/radar/http/test_locations.py +++ b/tests/api_resources/radar/http/test_locations.py @@ -68,7 +68,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_summary.py b/tests/api_resources/radar/http/test_summary.py index 5340efc6361..ecc5266ebd0 100644 --- a/tests/api_resources/radar/http/test_summary.py +++ b/tests/api_resources/radar/http/test_summary.py @@ -398,7 +398,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_timeseries_groups.py b/tests/api_resources/radar/http/test_timeseries_groups.py index a6c02e58a2a..0fe58aff435 100644 --- a/tests/api_resources/radar/http/test_timeseries_groups.py +++ b/tests/api_resources/radar/http/test_timeseries_groups.py @@ -505,7 +505,9 @@ def test_streaming_response_tls_version(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/http/test_top.py b/tests/api_resources/radar/http/test_top.py index ebfce964cf3..573ebe4d676 100644 --- a/tests/api_resources/radar/http/test_top.py +++ b/tests/api_resources/radar/http/test_top.py @@ -118,7 +118,9 @@ def test_streaming_response_browser_family(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_browser(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/leaked_credentials/test_summary.py b/tests/api_resources/radar/leaked_credentials/test_summary.py index 7e877b54281..243ea3d92cb 100644 --- a/tests/api_resources/radar/leaked_credentials/test_summary.py +++ b/tests/api_resources/radar/leaked_credentials/test_summary.py @@ -97,7 +97,9 @@ def test_streaming_response_compromised(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py b/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py index a9027283c8e..723333f641e 100644 --- a/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py +++ b/tests/api_resources/radar/leaked_credentials/test_timeseries_groups.py @@ -99,7 +99,9 @@ def test_streaming_response_compromised(self, client: Cloudflare) -> None: class TestAsyncTimeseriesGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bot_class(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/netflows/test_top.py b/tests/api_resources/radar/netflows/test_top.py index 9dc8315bdcb..c4256286fe9 100644 --- a/tests/api_resources/radar/netflows/test_top.py +++ b/tests/api_resources/radar/netflows/test_top.py @@ -100,7 +100,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/quality/speed/test_top.py b/tests/api_resources/radar/quality/speed/test_top.py index 5e8c6d353f7..32f88ff2f33 100644 --- a/tests/api_resources/radar/quality/speed/test_top.py +++ b/tests/api_resources/radar/quality/speed/test_top.py @@ -103,7 +103,9 @@ def test_streaming_response_locations(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_ases(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/quality/test_iqi.py b/tests/api_resources/radar/quality/test_iqi.py index 40084c8bff3..3d337273df4 100644 --- a/tests/api_resources/radar/quality/test_iqi.py +++ b/tests/api_resources/radar/quality/test_iqi.py @@ -117,7 +117,9 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: class TestAsyncIQI: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/quality/test_speed.py b/tests/api_resources/radar/quality/test_speed.py index 235910fd4e7..73ae0a7e430 100644 --- a/tests/api_resources/radar/quality/test_speed.py +++ b/tests/api_resources/radar/quality/test_speed.py @@ -99,7 +99,9 @@ def test_streaming_response_summary(self, client: Cloudflare) -> None: class TestAsyncSpeed: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_histogram(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ranking/test_domain.py b/tests/api_resources/radar/ranking/test_domain.py index 553229c8e89..79accf46b76 100644 --- a/tests/api_resources/radar/ranking/test_domain.py +++ b/tests/api_resources/radar/ranking/test_domain.py @@ -71,7 +71,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomain: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/ranking/test_internet_services.py b/tests/api_resources/radar/ranking/test_internet_services.py index 77fbb715bb4..4e510fcecf8 100644 --- a/tests/api_resources/radar/ranking/test_internet_services.py +++ b/tests/api_resources/radar/ranking/test_internet_services.py @@ -133,7 +133,9 @@ def test_streaming_response_top(self, client: Cloudflare) -> None: class TestAsyncInternetServices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_categories(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/robots_txt/test_top.py b/tests/api_resources/radar/robots_txt/test_top.py index e0cc7628659..5d14405e273 100644 --- a/tests/api_resources/radar/robots_txt/test_top.py +++ b/tests/api_resources/radar/robots_txt/test_top.py @@ -56,7 +56,9 @@ def test_streaming_response_domain_categories(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_domain_categories(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/robots_txt/top/test_user_agents.py b/tests/api_resources/radar/robots_txt/top/test_user_agents.py index ac2435dba6d..989bf17da17 100644 --- a/tests/api_resources/radar/robots_txt/top/test_user_agents.py +++ b/tests/api_resources/radar/robots_txt/top/test_user_agents.py @@ -58,7 +58,9 @@ def test_streaming_response_directive(self, client: Cloudflare) -> None: class TestAsyncUserAgents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_directive(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_annotations.py b/tests/api_resources/radar/test_annotations.py index 03a7ee5c795..84f528b38ba 100644 --- a/tests/api_resources/radar/test_annotations.py +++ b/tests/api_resources/radar/test_annotations.py @@ -59,7 +59,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncAnnotations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_as112.py b/tests/api_resources/radar/test_as112.py index 98525d4fe89..6b01e5d588f 100644 --- a/tests/api_resources/radar/test_as112.py +++ b/tests/api_resources/radar/test_as112.py @@ -62,7 +62,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncAS112: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_bgp.py b/tests/api_resources/radar/test_bgp.py index 4888918b441..62a7dc325f8 100644 --- a/tests/api_resources/radar/test_bgp.py +++ b/tests/api_resources/radar/test_bgp.py @@ -60,7 +60,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncBGP: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_datasets.py b/tests/api_resources/radar/test_datasets.py index e9e8d057314..fbb7e5b4b7a 100644 --- a/tests/api_resources/radar/test_datasets.py +++ b/tests/api_resources/radar/test_datasets.py @@ -136,7 +136,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDatasets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_dns.py b/tests/api_resources/radar/test_dns.py index 0f507565f30..2bbcc22b504 100644 --- a/tests/api_resources/radar/test_dns.py +++ b/tests/api_resources/radar/test_dns.py @@ -65,7 +65,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncDNS: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_entities.py b/tests/api_resources/radar/test_entities.py index a9a5a170bf0..9c3d1f16731 100644 --- a/tests/api_resources/radar/test_entities.py +++ b/tests/api_resources/radar/test_entities.py @@ -58,7 +58,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncEntities: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_http.py b/tests/api_resources/radar/test_http.py index 7187de25759..6f6730baacc 100644 --- a/tests/api_resources/radar/test_http.py +++ b/tests/api_resources/radar/test_http.py @@ -69,7 +69,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncHTTP: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_netflows.py b/tests/api_resources/radar/test_netflows.py index 66ccf93f556..73d50ce90ad 100644 --- a/tests/api_resources/radar/test_netflows.py +++ b/tests/api_resources/radar/test_netflows.py @@ -104,7 +104,9 @@ def test_streaming_response_timeseries(self, client: Cloudflare) -> None: class TestAsyncNetflows: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_ranking.py b/tests/api_resources/radar/test_ranking.py index 9ea16b2ce33..727d90a1879 100644 --- a/tests/api_resources/radar/test_ranking.py +++ b/tests/api_resources/radar/test_ranking.py @@ -102,7 +102,9 @@ def test_streaming_response_top(self, client: Cloudflare) -> None: class TestAsyncRanking: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_search.py b/tests/api_resources/radar/test_search.py index a0d51854976..2e313ae7af0 100644 --- a/tests/api_resources/radar/test_search.py +++ b/tests/api_resources/radar/test_search.py @@ -62,7 +62,9 @@ def test_streaming_response_global(self, client: Cloudflare) -> None: class TestAsyncSearch: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_global(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_tcp_resets_timeouts.py b/tests/api_resources/radar/test_tcp_resets_timeouts.py index ad009f54168..3ea655e3b91 100644 --- a/tests/api_resources/radar/test_tcp_resets_timeouts.py +++ b/tests/api_resources/radar/test_tcp_resets_timeouts.py @@ -102,7 +102,9 @@ def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: class TestAsyncTCPResetsTimeouts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_summary(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/test_traffic_anomalies.py b/tests/api_resources/radar/test_traffic_anomalies.py index 7e92c76fe39..34ff87eb8bb 100644 --- a/tests/api_resources/radar/test_traffic_anomalies.py +++ b/tests/api_resources/radar/test_traffic_anomalies.py @@ -60,7 +60,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncTrafficAnomalies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/traffic_anomalies/test_locations.py b/tests/api_resources/radar/traffic_anomalies/test_locations.py index 005738ac3e2..cb56dcdd238 100644 --- a/tests/api_resources/radar/traffic_anomalies/test_locations.py +++ b/tests/api_resources/radar/traffic_anomalies/test_locations.py @@ -57,7 +57,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/radar/verified_bots/test_top.py b/tests/api_resources/radar/verified_bots/test_top.py index 888fe79936c..3178128724a 100644 --- a/tests/api_resources/radar/verified_bots/test_top.py +++ b/tests/api_resources/radar/verified_bots/test_top.py @@ -103,7 +103,9 @@ def test_streaming_response_categories(self, client: Cloudflare) -> None: class TestAsyncTop: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_bots(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/registrar/test_domains.py b/tests/api_resources/registrar/test_domains.py index ebd7b48b403..672117b33bb 100644 --- a/tests/api_resources/registrar/test_domains.py +++ b/tests/api_resources/registrar/test_domains.py @@ -165,7 +165,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/request_tracers/test_traces.py b/tests/api_resources/request_tracers/test_traces.py index 92147ae93ba..73c32b2424d 100644 --- a/tests/api_resources/request_tracers/test_traces.py +++ b/tests/api_resources/request_tracers/test_traces.py @@ -106,7 +106,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncTraces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/resource_sharing/test_recipients.py b/tests/api_resources/resource_sharing/test_recipients.py index 4da13a844a5..48922ac03ca 100644 --- a/tests/api_resources/resource_sharing/test_recipients.py +++ b/tests/api_resources/resource_sharing/test_recipients.py @@ -261,7 +261,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRecipients: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/resource_sharing/test_resources.py b/tests/api_resources/resource_sharing/test_resources.py index 967e5dcbfca..36adaec0d62 100644 --- a/tests/api_resources/resource_sharing/test_resources.py +++ b/tests/api_resources/resource_sharing/test_resources.py @@ -340,7 +340,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResources: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/rules/lists/test_bulk_operations.py b/tests/api_resources/rules/lists/test_bulk_operations.py index da64194e2e9..da56522a4bf 100644 --- a/tests/api_resources/rules/lists/test_bulk_operations.py +++ b/tests/api_resources/rules/lists/test_bulk_operations.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBulkOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py index 91e4dc0c2f5..ba87c4bcda4 100644 --- a/tests/api_resources/rules/lists/test_items.py +++ b/tests/api_resources/rules/lists/test_items.py @@ -298,7 +298,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncItems: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/rules/test_lists.py b/tests/api_resources/rules/test_lists.py index c08bd6dac16..ac12105216b 100644 --- a/tests/api_resources/rules/test_lists.py +++ b/tests/api_resources/rules/test_lists.py @@ -286,7 +286,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLists: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py index 6b0858b12c5..002f11ccc12 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -155,7 +155,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rulesets/test_phases.py b/tests/api_resources/rulesets/test_phases.py index 4a4de40bd3e..612a2ecec3f 100644 --- a/tests/api_resources/rulesets/test_phases.py +++ b/tests/api_resources/rulesets/test_phases.py @@ -175,7 +175,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPhases: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index d37e672d13d..3c990cb972c 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -3918,7 +3918,9 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py index 620e4992e4d..21b8ef98db7 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -249,7 +249,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/rum/test_rules.py b/tests/api_resources/rum/test_rules.py index 5ab034386be..6f8dce9a875 100644 --- a/tests/api_resources/rum/test_rules.py +++ b/tests/api_resources/rum/test_rules.py @@ -331,7 +331,9 @@ def test_path_params_bulk_create(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/rum/test_site_info.py b/tests/api_resources/rum/test_site_info.py index 0762f7dfd57..279dc7b73dd 100644 --- a/tests/api_resources/rum/test_site_info.py +++ b/tests/api_resources/rum/test_site_info.py @@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSiteInfo: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/schema_validation/settings/test_operations.py b/tests/api_resources/schema_validation/settings/test_operations.py index f6852ed6e79..6e05e58155a 100644 --- a/tests/api_resources/schema_validation/settings/test_operations.py +++ b/tests/api_resources/schema_validation/settings/test_operations.py @@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOperations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/schema_validation/test_schemas.py b/tests/api_resources/schema_validation/test_schemas.py index 14b2e9dcc9b..057c751492b 100644 --- a/tests/api_resources/schema_validation/test_schemas.py +++ b/tests/api_resources/schema_validation/test_schemas.py @@ -291,7 +291,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchemas: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/schema_validation/test_settings.py b/tests/api_resources/schema_validation/test_settings.py index 103f160ac31..68752e94f3d 100644 --- a/tests/api_resources/schema_validation/test_settings.py +++ b/tests/api_resources/schema_validation/test_settings.py @@ -159,7 +159,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/secrets_store/stores/test_secrets.py b/tests/api_resources/secrets_store/stores/test_secrets.py index 21904623076..44f47d80bb5 100644 --- a/tests/api_resources/secrets_store/stores/test_secrets.py +++ b/tests/api_resources/secrets_store/stores/test_secrets.py @@ -488,7 +488,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecrets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/secrets_store/test_quota.py b/tests/api_resources/secrets_store/test_quota.py index 90e87c12a44..d74f03ae049 100644 --- a/tests/api_resources/secrets_store/test_quota.py +++ b/tests/api_resources/secrets_store/test_quota.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQuota: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/secrets_store/test_stores.py b/tests/api_resources/secrets_store/test_stores.py index 96211f2286b..68fb500fd5e 100644 --- a/tests/api_resources/secrets_store/test_stores.py +++ b/tests/api_resources/secrets_store/test_stores.py @@ -163,7 +163,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncStores: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/security_center/insights/test_class_.py b/tests/api_resources/security_center/insights/test_class_.py index 3ec1f252d86..0609b2be126 100644 --- a/tests/api_resources/security_center/insights/test_class_.py +++ b/tests/api_resources/security_center/insights/test_class_.py @@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncClass: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize diff --git a/tests/api_resources/security_center/insights/test_severity.py b/tests/api_resources/security_center/insights/test_severity.py index ddc6e8dd62b..589dd72a083 100644 --- a/tests/api_resources/security_center/insights/test_severity.py +++ b/tests/api_resources/security_center/insights/test_severity.py @@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSeverity: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize diff --git a/tests/api_resources/security_center/insights/test_type.py b/tests/api_resources/security_center/insights/test_type.py index a2c3da3604c..e9ae172ed08 100644 --- a/tests/api_resources/security_center/insights/test_type.py +++ b/tests/api_resources/security_center/insights/test_type.py @@ -85,7 +85,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncType: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize diff --git a/tests/api_resources/security_center/test_insights.py b/tests/api_resources/security_center/test_insights.py index c4776444b97..4c92fe945f9 100644 --- a/tests/api_resources/security_center/test_insights.py +++ b/tests/api_resources/security_center/test_insights.py @@ -159,7 +159,9 @@ def test_path_params_dismiss(self, client: Cloudflare) -> None: class TestAsyncInsights: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize diff --git a/tests/api_resources/snippets/test_content.py b/tests/api_resources/snippets/test_content.py index 371c111994b..163b3683f2b 100644 --- a/tests/api_resources/snippets/test_content.py +++ b/tests/api_resources/snippets/test_content.py @@ -95,7 +95,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContent: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="throwing HTTP 415") @parametrize diff --git a/tests/api_resources/snippets/test_rules.py b/tests/api_resources/snippets/test_rules.py index 53816f2070b..46a3e6bb37f 100644 --- a/tests/api_resources/snippets/test_rules.py +++ b/tests/api_resources/snippets/test_rules.py @@ -149,7 +149,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py index 8d60f728d26..e5734e2287b 100644 --- a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py +++ b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCurrents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/spectrum/analytics/events/test_bytimes.py b/tests/api_resources/spectrum/analytics/events/test_bytimes.py index bf5b7ef66b8..0699c930575 100644 --- a/tests/api_resources/spectrum/analytics/events/test_bytimes.py +++ b/tests/api_resources/spectrum/analytics/events/test_bytimes.py @@ -76,7 +76,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBytimes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/spectrum/analytics/events/test_summaries.py b/tests/api_resources/spectrum/analytics/events/test_summaries.py index ee8b78cd589..bf892c8df62 100644 --- a/tests/api_resources/spectrum/analytics/events/test_summaries.py +++ b/tests/api_resources/spectrum/analytics/events/test_summaries.py @@ -71,7 +71,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSummaries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/spectrum/test_apps.py b/tests/api_resources/spectrum/test_apps.py index 1ed83c2f50f..27bdcdfcc59 100644 --- a/tests/api_resources/spectrum/test_apps.py +++ b/tests/api_resources/spectrum/test_apps.py @@ -524,7 +524,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncApps: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/speed/pages/test_tests.py b/tests/api_resources/speed/pages/test_tests.py index a97a4b14f52..148d3b0c93d 100644 --- a/tests/api_resources/speed/pages/test_tests.py +++ b/tests/api_resources/speed/pages/test_tests.py @@ -256,7 +256,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/speed/test_availabilities.py b/tests/api_resources/speed/test_availabilities.py index 59d87a22852..8f2e328affd 100644 --- a/tests/api_resources/speed/test_availabilities.py +++ b/tests/api_resources/speed/test_availabilities.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAvailabilities: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/speed/test_pages.py b/tests/api_resources/speed/test_pages.py index 611a73ec015..a14bcb31c8b 100644 --- a/tests/api_resources/speed/test_pages.py +++ b/tests/api_resources/speed/test_pages.py @@ -151,7 +151,9 @@ def test_path_params_trend(self, client: Cloudflare) -> None: class TestAsyncPages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/speed/test_schedule.py b/tests/api_resources/speed/test_schedule.py index e3e05e0ed53..96eab910c45 100644 --- a/tests/api_resources/speed/test_schedule.py +++ b/tests/api_resources/speed/test_schedule.py @@ -194,7 +194,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchedule: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/certificate_packs/test_quota.py b/tests/api_resources/ssl/certificate_packs/test_quota.py index 0181a4d9e7d..2c665c9237e 100644 --- a/tests/api_resources/ssl/certificate_packs/test_quota.py +++ b/tests/api_resources/ssl/certificate_packs/test_quota.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQuota: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/test_analyze.py b/tests/api_resources/ssl/test_analyze.py index 3a1e6c43744..cd0a9100b67 100644 --- a/tests/api_resources/ssl/test_analyze.py +++ b/tests/api_resources/ssl/test_analyze.py @@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncAnalyze: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/test_certificate_packs.py b/tests/api_resources/ssl/test_certificate_packs.py index 6c118f8d63c..0ea985fb443 100644 --- a/tests/api_resources/ssl/test_certificate_packs.py +++ b/tests/api_resources/ssl/test_certificate_packs.py @@ -294,7 +294,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificatePacks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/test_recommendations.py b/tests/api_resources/ssl/test_recommendations.py index 49520ba3738..3f6abca8c59 100644 --- a/tests/api_resources/ssl/test_recommendations.py +++ b/tests/api_resources/ssl/test_recommendations.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRecommendations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/test_verification.py b/tests/api_resources/ssl/test_verification.py index 4d6460a428d..73b42e44599 100644 --- a/tests/api_resources/ssl/test_verification.py +++ b/tests/api_resources/ssl/test_verification.py @@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVerification: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/ssl/universal/test_settings.py b/tests/api_resources/ssl/universal/test_settings.py index a6040dd1411..425b2528f38 100644 --- a/tests/api_resources/ssl/universal/test_settings.py +++ b/tests/api_resources/ssl/universal/test_settings.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/captions/language/test_vtt.py b/tests/api_resources/stream/captions/language/test_vtt.py index c3e6421643b..e70b277d2e2 100644 --- a/tests/api_resources/stream/captions/language/test_vtt.py +++ b/tests/api_resources/stream/captions/language/test_vtt.py @@ -78,7 +78,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVtt: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/captions/test_language.py b/tests/api_resources/stream/captions/test_language.py index 0fe61c3cb38..133fafb0f57 100644 --- a/tests/api_resources/stream/captions/test_language.py +++ b/tests/api_resources/stream/captions/test_language.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLanguage: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/live_inputs/test_outputs.py b/tests/api_resources/stream/live_inputs/test_outputs.py index d1041731a3f..e4aeed86843 100644 --- a/tests/api_resources/stream/live_inputs/test_outputs.py +++ b/tests/api_resources/stream/live_inputs/test_outputs.py @@ -263,7 +263,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncOutputs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_audio_tracks.py b/tests/api_resources/stream/test_audio_tracks.py index bf7462cf829..243129a8296 100644 --- a/tests/api_resources/stream/test_audio_tracks.py +++ b/tests/api_resources/stream/test_audio_tracks.py @@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAudioTracks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_captions.py b/tests/api_resources/stream/test_captions.py index 89847fcdd1a..e39009815b6 100644 --- a/tests/api_resources/stream/test_captions.py +++ b/tests/api_resources/stream/test_captions.py @@ -68,7 +68,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCaptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_clip.py b/tests/api_resources/stream/test_clip.py index c0806600820..7c6b2a2bf25 100644 --- a/tests/api_resources/stream/test_clip.py +++ b/tests/api_resources/stream/test_clip.py @@ -85,7 +85,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncClip: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_copy.py b/tests/api_resources/stream/test_copy.py index c2d65c32f2e..da77578d882 100644 --- a/tests/api_resources/stream/test_copy.py +++ b/tests/api_resources/stream/test_copy.py @@ -78,7 +78,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncCopy: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_direct_upload.py b/tests/api_resources/stream/test_direct_upload.py index 54f9c3d0070..70474f551cb 100644 --- a/tests/api_resources/stream/test_direct_upload.py +++ b/tests/api_resources/stream/test_direct_upload.py @@ -79,7 +79,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncDirectUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_downloads.py b/tests/api_resources/stream/test_downloads.py index 59fdefe0eb2..242d4f3c211 100644 --- a/tests/api_resources/stream/test_downloads.py +++ b/tests/api_resources/stream/test_downloads.py @@ -167,7 +167,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownloads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_embed.py b/tests/api_resources/stream/test_embed.py index 1019efe5e4c..4158863edde 100644 --- a/tests/api_resources/stream/test_embed.py +++ b/tests/api_resources/stream/test_embed.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEmbed: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_keys.py b/tests/api_resources/stream/test_keys.py index fba7bbc8253..31b38c8f769 100644 --- a/tests/api_resources/stream/test_keys.py +++ b/tests/api_resources/stream/test_keys.py @@ -148,7 +148,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncKeys: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_live_inputs.py b/tests/api_resources/stream/test_live_inputs.py index a41165cf355..8c637eb3141 100644 --- a/tests/api_resources/stream/test_live_inputs.py +++ b/tests/api_resources/stream/test_live_inputs.py @@ -285,7 +285,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLiveInputs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_token.py b/tests/api_resources/stream/test_token.py index b3e356b61f6..1ecc4892b56 100644 --- a/tests/api_resources/stream/test_token.py +++ b/tests/api_resources/stream/test_token.py @@ -100,7 +100,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncToken: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_videos.py b/tests/api_resources/stream/test_videos.py index c0ee01a60ff..9708f4488bf 100644 --- a/tests/api_resources/stream/test_videos.py +++ b/tests/api_resources/stream/test_videos.py @@ -65,7 +65,9 @@ def test_path_params_storage_usage(self, client: Cloudflare) -> None: class TestAsyncVideos: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_storage_usage(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/stream/test_watermarks.py b/tests/api_resources/stream/test_watermarks.py index a70f96b1280..0cafcf5d0c5 100644 --- a/tests/api_resources/stream/test_watermarks.py +++ b/tests/api_resources/stream/test_watermarks.py @@ -214,7 +214,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWatermarks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/stream/test_webhooks.py b/tests/api_resources/stream/test_webhooks.py index 565e3777ea8..63a685256d4 100644 --- a/tests/api_resources/stream/test_webhooks.py +++ b/tests/api_resources/stream/test_webhooks.py @@ -136,7 +136,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWebhooks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_abuse_reports.py b/tests/api_resources/test_abuse_reports.py index a2309a11c6f..f88cf806d63 100644 --- a/tests/api_resources/test_abuse_reports.py +++ b/tests/api_resources/test_abuse_reports.py @@ -858,7 +858,9 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: class TestAsyncAbuseReports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 345d30376fa..df241383c9e 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -236,7 +236,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccounts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_ai.py b/tests/api_resources/test_ai.py index 3e168ba5d75..1861c05cc28 100644 --- a/tests/api_resources/test_ai.py +++ b/tests/api_resources/test_ai.py @@ -1027,7 +1027,9 @@ def test_path_params_run_overload_14(self, client: Cloudflare) -> None: class TestAsyncAI: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py index be57afddcff..909b68d8164 100644 --- a/tests/api_resources/test_ai_gateway.py +++ b/tests/api_resources/test_ai_gateway.py @@ -352,7 +352,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAIGateway: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_audit_logs.py b/tests/api_resources/test_audit_logs.py index 5c550224d90..b992b177c3f 100644 --- a/tests/api_resources/test_audit_logs.py +++ b/tests/api_resources/test_audit_logs.py @@ -80,7 +80,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAuditLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_bot_management.py b/tests/api_resources/test_bot_management.py index 45478cc0021..526820026a7 100644 --- a/tests/api_resources/test_bot_management.py +++ b/tests/api_resources/test_bot_management.py @@ -264,7 +264,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBotManagement: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py index 9dfcb8502d9..56f9d7792ca 100644 --- a/tests/api_resources/test_brand_protection.py +++ b/tests/api_resources/test_brand_protection.py @@ -115,7 +115,9 @@ def test_path_params_url_info(self, client: Cloudflare) -> None: class TestAsyncBrandProtection: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_submit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_cache.py b/tests/api_resources/test_cache.py index 7af5c5be461..e95bbc2dd3c 100644 --- a/tests/api_resources/test_cache.py +++ b/tests/api_resources/test_cache.py @@ -312,7 +312,9 @@ def test_path_params_purge_overload_6(self, client: Cloudflare) -> None: class TestAsyncCache: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_purge_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_client_certificates.py b/tests/api_resources/test_client_certificates.py index 254ed8c24c4..45cab4c2feb 100644 --- a/tests/api_resources/test_client_certificates.py +++ b/tests/api_resources/test_client_certificates.py @@ -262,7 +262,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncClientCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_content_scanning.py b/tests/api_resources/test_content_scanning.py index a66910245a8..c01e309d925 100644 --- a/tests/api_resources/test_content_scanning.py +++ b/tests/api_resources/test_content_scanning.py @@ -94,7 +94,9 @@ def test_path_params_enable(self, client: Cloudflare) -> None: class TestAsyncContentScanning: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_disable(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_custom_certificates.py b/tests/api_resources/test_custom_certificates.py index 8f054553aad..e7b672d2ede 100644 --- a/tests/api_resources/test_custom_certificates.py +++ b/tests/api_resources/test_custom_certificates.py @@ -288,7 +288,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_custom_hostnames.py b/tests/api_resources/test_custom_hostnames.py index a18761dde17..10f5a4a1398 100644 --- a/tests/api_resources/test_custom_hostnames.py +++ b/tests/api_resources/test_custom_hostnames.py @@ -336,7 +336,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomHostnames: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_custom_nameservers.py b/tests/api_resources/test_custom_nameservers.py index 942468fa896..6a9a06f4d4d 100644 --- a/tests/api_resources/test_custom_nameservers.py +++ b/tests/api_resources/test_custom_nameservers.py @@ -160,7 +160,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomNameservers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_custom_pages.py b/tests/api_resources/test_custom_pages.py index 28b7765c9eb..c9818d0eb30 100644 --- a/tests/api_resources/test_custom_pages.py +++ b/tests/api_resources/test_custom_pages.py @@ -223,7 +223,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomPages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize diff --git a/tests/api_resources/test_dcv_delegation.py b/tests/api_resources/test_dcv_delegation.py index 0f04ca1a893..1660709969b 100644 --- a/tests/api_resources/test_dcv_delegation.py +++ b/tests/api_resources/test_dcv_delegation.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDCVDelegation: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_dns_firewall.py b/tests/api_resources/test_dns_firewall.py index c97f5b3c417..a1843a42bbe 100644 --- a/tests/api_resources/test_dns_firewall.py +++ b/tests/api_resources/test_dns_firewall.py @@ -314,7 +314,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDNSFirewall: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_email_routing.py b/tests/api_resources/test_email_routing.py index e39bb1e1c5e..9ee958eb5ce 100644 --- a/tests/api_resources/test_email_routing.py +++ b/tests/api_resources/test_email_routing.py @@ -153,7 +153,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEmailRouting: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_disable(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_filters.py b/tests/api_resources/test_filters.py index 1f0aaa1080f..bf12c195874 100644 --- a/tests/api_resources/test_filters.py +++ b/tests/api_resources/test_filters.py @@ -390,7 +390,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFilters: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_healthchecks.py b/tests/api_resources/test_healthchecks.py index c242ab594ac..e8ceb8eda69 100644 --- a/tests/api_resources/test_healthchecks.py +++ b/tests/api_resources/test_healthchecks.py @@ -435,7 +435,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHealthchecks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_ips.py b/tests/api_resources/test_ips.py index e013f501f77..449885157ba 100644 --- a/tests/api_resources/test_ips.py +++ b/tests/api_resources/test_ips.py @@ -51,7 +51,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_keyless_certificates.py b/tests/api_resources/test_keyless_certificates.py index 0dae2518fe2..ea17c20d1b1 100644 --- a/tests/api_resources/test_keyless_certificates.py +++ b/tests/api_resources/test_keyless_certificates.py @@ -293,7 +293,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncKeylessCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_leaked_credential_checks.py b/tests/api_resources/test_leaked_credential_checks.py index 6d29dde2917..6f82f5dbb3d 100644 --- a/tests/api_resources/test_leaked_credential_checks.py +++ b/tests/api_resources/test_leaked_credential_checks.py @@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLeakedCredentialChecks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_load_balancers.py b/tests/api_resources/test_load_balancers.py index 5b206b46d25..12774db01b0 100644 --- a/tests/api_resources/test_load_balancers.py +++ b/tests/api_resources/test_load_balancers.py @@ -699,7 +699,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLoadBalancers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_managed_transforms.py b/tests/api_resources/test_managed_transforms.py index f00cf76c8b0..d2e91bfbb4f 100644 --- a/tests/api_resources/test_managed_transforms.py +++ b/tests/api_resources/test_managed_transforms.py @@ -196,7 +196,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncManagedTransforms: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize diff --git a/tests/api_resources/test_memberships.py b/tests/api_resources/test_memberships.py index 7d30c588011..19fe2ee97a7 100644 --- a/tests/api_resources/test_memberships.py +++ b/tests/api_resources/test_memberships.py @@ -181,7 +181,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMemberships: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_mtls_certificates.py b/tests/api_resources/test_mtls_certificates.py index 666b1c3c621..e5ad0553d13 100644 --- a/tests/api_resources/test_mtls_certificates.py +++ b/tests/api_resources/test_mtls_certificates.py @@ -214,7 +214,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncMTLSCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_origin_ca_certificates.py b/tests/api_resources/test_origin_ca_certificates.py index ddd89222e1e..23f97dc3e59 100644 --- a/tests/api_resources/test_origin_ca_certificates.py +++ b/tests/api_resources/test_origin_ca_certificates.py @@ -194,7 +194,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginCACertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize diff --git a/tests/api_resources/test_origin_post_quantum_encryption.py b/tests/api_resources/test_origin_post_quantum_encryption.py index 5be62d7556c..9160b032a64 100644 --- a/tests/api_resources/test_origin_post_quantum_encryption.py +++ b/tests/api_resources/test_origin_post_quantum_encryption.py @@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginPostQuantumEncryption: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_origin_tls_client_auth.py b/tests/api_resources/test_origin_tls_client_auth.py index fc28c9cbee6..89b2f4c1fbc 100644 --- a/tests/api_resources/test_origin_tls_client_auth.py +++ b/tests/api_resources/test_origin_tls_client_auth.py @@ -207,7 +207,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOriginTLSClientAuth: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_page_rules.py b/tests/api_resources/test_page_rules.py index bfe632db4aa..a98e9338e9d 100644 --- a/tests/api_resources/test_page_rules.py +++ b/tests/api_resources/test_page_rules.py @@ -404,7 +404,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPageRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="generated params are incorrect") @parametrize diff --git a/tests/api_resources/test_page_shield.py b/tests/api_resources/test_page_shield.py index 2511ba986b2..a1c807dc965 100644 --- a/tests/api_resources/test_page_shield.py +++ b/tests/api_resources/test_page_shield.py @@ -105,7 +105,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPageShield: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_pipelines.py b/tests/api_resources/test_pipelines.py index 97d66e53b81..6ca73da466f 100644 --- a/tests/api_resources/test_pipelines.py +++ b/tests/api_resources/test_pipelines.py @@ -438,7 +438,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPipelines: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_queues.py b/tests/api_resources/test_queues.py index fb1930d4074..e337e5aae5c 100644 --- a/tests/api_resources/test_queues.py +++ b/tests/api_resources/test_queues.py @@ -323,7 +323,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQueues: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_rate_limits.py b/tests/api_resources/test_rate_limits.py index 13cbbdfeca6..85a6de47b2f 100644 --- a/tests/api_resources/test_rate_limits.py +++ b/tests/api_resources/test_rate_limits.py @@ -396,7 +396,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRateLimits: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_resource_sharing.py b/tests/api_resources/test_resource_sharing.py index 04448a2d72f..45692b97cbf 100644 --- a/tests/api_resources/test_resource_sharing.py +++ b/tests/api_resources/test_resource_sharing.py @@ -307,7 +307,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResourceSharing: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py index 1d16aef9e20..f6589f3c67d 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -425,7 +425,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRulesets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_security_txt.py b/tests/api_resources/test_security_txt.py index 58f8e8306f3..0da5f1a9f06 100644 --- a/tests/api_resources/test_security_txt.py +++ b/tests/api_resources/test_security_txt.py @@ -158,7 +158,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecurityTXT: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_snippets.py b/tests/api_resources/test_snippets.py index 25af699eda9..e0ca184d00e 100644 --- a/tests/api_resources/test_snippets.py +++ b/tests/api_resources/test_snippets.py @@ -217,7 +217,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSnippets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="throwing HTTP 415") @parametrize diff --git a/tests/api_resources/test_stream.py b/tests/api_resources/test_stream.py index db91a27d509..9dc95d5e834 100644 --- a/tests/api_resources/test_stream.py +++ b/tests/api_resources/test_stream.py @@ -302,7 +302,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStream: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/test_url_normalization.py b/tests/api_resources/test_url_normalization.py index 961a3f7b78d..7dfd2d41316 100644 --- a/tests/api_resources/test_url_normalization.py +++ b/tests/api_resources/test_url_normalization.py @@ -156,7 +156,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncURLNormalization: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize diff --git a/tests/api_resources/test_user.py b/tests/api_resources/test_user.py index d214ccb7353..b6ccd151f8b 100644 --- a/tests/api_resources/test_user.py +++ b/tests/api_resources/test_user.py @@ -80,7 +80,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncUser: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_waiting_rooms.py b/tests/api_resources/test_waiting_rooms.py index 763cf81e989..ed4243ca17b 100644 --- a/tests/api_resources/test_waiting_rooms.py +++ b/tests/api_resources/test_waiting_rooms.py @@ -486,7 +486,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWaitingRooms: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_workflows.py b/tests/api_resources/test_workflows.py index 30163e14d9c..bcc84aa9081 100644 --- a/tests/api_resources/test_workflows.py +++ b/tests/api_resources/test_workflows.py @@ -227,7 +227,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWorkflows: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_zaraz.py b/tests/api_resources/test_zaraz.py index 5b9e0b3829c..00bdec56c63 100644 --- a/tests/api_resources/test_zaraz.py +++ b/tests/api_resources/test_zaraz.py @@ -61,7 +61,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncZaraz: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/test_zones.py b/tests/api_resources/test_zones.py index b4f8bf827d8..0ee90986d59 100644 --- a/tests/api_resources/test_zones.py +++ b/tests/api_resources/test_zones.py @@ -236,7 +236,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncZones: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/turnstile/test_widgets.py b/tests/api_resources/turnstile/test_widgets.py index 931be7a095f..cfdb1450c39 100644 --- a/tests/api_resources/turnstile/test_widgets.py +++ b/tests/api_resources/turnstile/test_widgets.py @@ -373,7 +373,9 @@ def test_path_params_rotate_secret(self, client: Cloudflare) -> None: class TestAsyncWidgets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/url_scanner/test_responses.py b/tests/api_resources/url_scanner/test_responses.py index 1690ba966df..f059cb256eb 100644 --- a/tests/api_resources/url_scanner/test_responses.py +++ b/tests/api_resources/url_scanner/test_responses.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncResponses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/url_scanner/test_scans.py b/tests/api_resources/url_scanner/test_scans.py index a2d0680507a..bcb27351ece 100644 --- a/tests/api_resources/url_scanner/test_scans.py +++ b/tests/api_resources/url_scanner/test_scans.py @@ -421,7 +421,9 @@ def test_path_params_screenshot(self, client: Cloudflare) -> None: class TestAsyncScans: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/billing/test_history.py b/tests/api_resources/user/billing/test_history.py index 067df084104..b5a06e26a57 100644 --- a/tests/api_resources/user/billing/test_history.py +++ b/tests/api_resources/user/billing/test_history.py @@ -66,7 +66,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncHistory: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/billing/test_profile.py b/tests/api_resources/user/billing/test_profile.py index 06eed719a6b..4a974aed1f0 100644 --- a/tests/api_resources/user/billing/test_profile.py +++ b/tests/api_resources/user/billing/test_profile.py @@ -50,7 +50,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncProfile: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_audit_logs.py b/tests/api_resources/user/test_audit_logs.py index 5ce89e4e73b..f678b7539a2 100644 --- a/tests/api_resources/user/test_audit_logs.py +++ b/tests/api_resources/user/test_audit_logs.py @@ -66,7 +66,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncAuditLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_invites.py b/tests/api_resources/user/test_invites.py index d2bfd631da8..e2c1217a92d 100644 --- a/tests/api_resources/user/test_invites.py +++ b/tests/api_resources/user/test_invites.py @@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInvites: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_organizations.py b/tests/api_resources/user/test_organizations.py index 724aac1a95c..da23d43f15d 100644 --- a/tests/api_resources/user/test_organizations.py +++ b/tests/api_resources/user/test_organizations.py @@ -152,7 +152,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOrganizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_subscriptions.py b/tests/api_resources/user/test_subscriptions.py index f2483fa8d75..ab0298d51a7 100644 --- a/tests/api_resources/user/test_subscriptions.py +++ b/tests/api_resources/user/test_subscriptions.py @@ -139,7 +139,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index af745a5815d..4d8e1d4a3b3 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -435,7 +435,9 @@ def test_streaming_response_verify(self, client: Cloudflare) -> None: class TestAsyncTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/user/tokens/test_permission_groups.py b/tests/api_resources/user/tokens/test_permission_groups.py index 2ce293ee632..185dbfb8771 100644 --- a/tests/api_resources/user/tokens/test_permission_groups.py +++ b/tests/api_resources/user/tokens/test_permission_groups.py @@ -48,7 +48,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncPermissionGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/user/tokens/test_value.py b/tests/api_resources/user/tokens/test_value.py index 1256130d6bf..459bf43aabf 100644 --- a/tests/api_resources/user/tokens/test_value.py +++ b/tests/api_resources/user/tokens/test_value.py @@ -64,7 +64,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncValue: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/vectorize/indexes/test_metadata_index.py b/tests/api_resources/vectorize/indexes/test_metadata_index.py index 2c91354788d..2dbf39b034d 100644 --- a/tests/api_resources/vectorize/indexes/test_metadata_index.py +++ b/tests/api_resources/vectorize/indexes/test_metadata_index.py @@ -182,7 +182,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncMetadataIndex: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/vectorize/test_indexes.py b/tests/api_resources/vectorize/test_indexes.py index 1a27050902d..fd2e3b78fcf 100644 --- a/tests/api_resources/vectorize/test_indexes.py +++ b/tests/api_resources/vectorize/test_indexes.py @@ -600,7 +600,9 @@ def test_path_params_upsert(self, client: Cloudflare) -> None: class TestAsyncIndexes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/events/test_details.py b/tests/api_resources/waiting_rooms/events/test_details.py index c164f78f6b8..efd4a6b83a1 100644 --- a/tests/api_resources/waiting_rooms/events/test_details.py +++ b/tests/api_resources/waiting_rooms/events/test_details.py @@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDetails: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_events.py b/tests/api_resources/waiting_rooms/test_events.py index a626488d2e3..b7615210e18 100644 --- a/tests/api_resources/waiting_rooms/test_events.py +++ b/tests/api_resources/waiting_rooms/test_events.py @@ -491,7 +491,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_page.py b/tests/api_resources/waiting_rooms/test_page.py index 881d9a3a906..e7f87c79d0d 100644 --- a/tests/api_resources/waiting_rooms/test_page.py +++ b/tests/api_resources/waiting_rooms/test_page.py @@ -61,7 +61,9 @@ def test_path_params_preview(self, client: Cloudflare) -> None: class TestAsyncPage: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_preview(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_rules.py b/tests/api_resources/waiting_rooms/test_rules.py index 535dbf679a3..7861f9bfe4a 100644 --- a/tests/api_resources/waiting_rooms/test_rules.py +++ b/tests/api_resources/waiting_rooms/test_rules.py @@ -374,7 +374,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_settings.py b/tests/api_resources/waiting_rooms/test_settings.py index 823c9e02011..787b1c36e75 100644 --- a/tests/api_resources/waiting_rooms/test_settings.py +++ b/tests/api_resources/waiting_rooms/test_settings.py @@ -153,7 +153,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/waiting_rooms/test_statuses.py b/tests/api_resources/waiting_rooms/test_statuses.py index 5ca8f12dbec..3c06812d4e3 100644 --- a/tests/api_resources/waiting_rooms/test_statuses.py +++ b/tests/api_resources/waiting_rooms/test_statuses.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncStatuses: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py index b46488974a4..6c2e96fbf7f 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py @@ -352,7 +352,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEntries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py index 26cdee2b5a6..e83927a314f 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py @@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContentLists: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/web3/test_hostnames.py b/tests/api_resources/web3/test_hostnames.py index cb60bbc8e75..a53bf0c2b0d 100644 --- a/tests/api_resources/web3/test_hostnames.py +++ b/tests/api_resources/web3/test_hostnames.py @@ -269,7 +269,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHostnames: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/assets/test_upload.py b/tests/api_resources/workers/assets/test_upload.py index 4ba17c7640a..1e058d78ce4 100644 --- a/tests/api_resources/workers/assets/test_upload.py +++ b/tests/api_resources/workers/assets/test_upload.py @@ -65,7 +65,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/observability/test_telemetry.py b/tests/api_resources/workers/observability/test_telemetry.py index ba1b1bc90fc..bef7afd0eb6 100644 --- a/tests/api_resources/workers/observability/test_telemetry.py +++ b/tests/api_resources/workers/observability/test_telemetry.py @@ -311,7 +311,9 @@ def test_path_params_values(self, client: Cloudflare) -> None: class TestAsyncTelemetry: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_keys(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/assets/test_upload.py b/tests/api_resources/workers/scripts/assets/test_upload.py index b1d00e18e6b..049f3460f79 100644 --- a/tests/api_resources/workers/scripts/assets/test_upload.py +++ b/tests/api_resources/workers/scripts/assets/test_upload.py @@ -97,7 +97,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py index 844fa02c9fc..3831e686f57 100644 --- a/tests/api_resources/workers/scripts/test_content.py +++ b/tests/api_resources/workers/scripts/test_content.py @@ -165,7 +165,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContent: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers/scripts/test_deployments.py b/tests/api_resources/workers/scripts/test_deployments.py index 45203082efa..e6b2a2e42f7 100644 --- a/tests/api_resources/workers/scripts/test_deployments.py +++ b/tests/api_resources/workers/scripts/test_deployments.py @@ -170,7 +170,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDeployments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_schedules.py b/tests/api_resources/workers/scripts/test_schedules.py index 3b9532ec015..49788ae1352 100644 --- a/tests/api_resources/workers/scripts/test_schedules.py +++ b/tests/api_resources/workers/scripts/test_schedules.py @@ -120,7 +120,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSchedules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_script_and_version_settings.py b/tests/api_resources/workers/scripts/test_script_and_version_settings.py index 42dc810c516..9849d452657 100644 --- a/tests/api_resources/workers/scripts/test_script_and_version_settings.py +++ b/tests/api_resources/workers/scripts/test_script_and_version_settings.py @@ -178,7 +178,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScriptAndVersionSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_secrets.py b/tests/api_resources/workers/scripts/test_secrets.py index eb1ce97513b..eaf7a5eabad 100644 --- a/tests/api_resources/workers/scripts/test_secrets.py +++ b/tests/api_resources/workers/scripts/test_secrets.py @@ -343,7 +343,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecrets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_settings.py b/tests/api_resources/workers/scripts/test_settings.py index cb624108311..9a07538ecc1 100644 --- a/tests/api_resources/workers/scripts/test_settings.py +++ b/tests/api_resources/workers/scripts/test_settings.py @@ -140,7 +140,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_subdomain.py b/tests/api_resources/workers/scripts/test_subdomain.py index afcaa274663..f2ada9e6d5a 100644 --- a/tests/api_resources/workers/scripts/test_subdomain.py +++ b/tests/api_resources/workers/scripts/test_subdomain.py @@ -182,7 +182,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubdomain: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_tail.py b/tests/api_resources/workers/scripts/test_tail.py index 7dc3b85f88c..4041a0a60d6 100644 --- a/tests/api_resources/workers/scripts/test_tail.py +++ b/tests/api_resources/workers/scripts/test_tail.py @@ -180,7 +180,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTail: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/scripts/test_versions.py b/tests/api_resources/workers/scripts/test_versions.py index 95df44b4788..38bae61b036 100644 --- a/tests/api_resources/workers/scripts/test_versions.py +++ b/tests/api_resources/workers/scripts/test_versions.py @@ -227,7 +227,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers/test_account_settings.py b/tests/api_resources/workers/test_account_settings.py index 5f96e020275..c158d4a0729 100644 --- a/tests/api_resources/workers/test_account_settings.py +++ b/tests/api_resources/workers/test_account_settings.py @@ -107,7 +107,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccountSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/test_domains.py b/tests/api_resources/workers/test_domains.py index 1bbc559f8f8..324bb802af1 100644 --- a/tests/api_resources/workers/test_domains.py +++ b/tests/api_resources/workers/test_domains.py @@ -220,7 +220,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/test_routes.py b/tests/api_resources/workers/test_routes.py index 19547a324f0..594e8309ae9 100644 --- a/tests/api_resources/workers/test_routes.py +++ b/tests/api_resources/workers/test_routes.py @@ -274,7 +274,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index fc0e0bad871..fb6608c8f83 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -297,7 +297,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers/test_subdomains.py b/tests/api_resources/workers/test_subdomains.py index 96da816768c..ab015c6a3e8 100644 --- a/tests/api_resources/workers/test_subdomains.py +++ b/tests/api_resources/workers/test_subdomains.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubdomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py index df897cae3b7..1b4b109eb1d 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_asset_upload.py @@ -117,7 +117,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncAssetUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py index be685ad0e29..8bac33bc665 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py @@ -80,7 +80,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBindings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py index dcdd9ad6275..6dc0401bada 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py @@ -191,7 +191,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncContent: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py index bf53cc33b74..ed3745b014c 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py @@ -416,7 +416,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSecrets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py index cdb0c20388c..77ae0124e66 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py @@ -208,7 +208,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py index 3723f23e5a4..deeb2779dcb 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py @@ -223,7 +223,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncTags: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index 3f82e720e66..1da778e981a 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -297,7 +297,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncScripts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py index df9749cb2e5..a885e5f370a 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py +++ b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py @@ -204,7 +204,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNamespaces: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workflows/instances/test_events.py b/tests/api_resources/workflows/instances/test_events.py index 8857d0356fd..fa638445ffc 100644 --- a/tests/api_resources/workflows/instances/test_events.py +++ b/tests/api_resources/workflows/instances/test_events.py @@ -103,7 +103,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workflows/instances/test_status.py b/tests/api_resources/workflows/instances/test_status.py index bf69221dc66..5b7e8ff5db9 100644 --- a/tests/api_resources/workflows/instances/test_status.py +++ b/tests/api_resources/workflows/instances/test_status.py @@ -85,7 +85,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workflows/test_instances.py b/tests/api_resources/workflows/test_instances.py index b13a0879f29..00dcaf09d72 100644 --- a/tests/api_resources/workflows/test_instances.py +++ b/tests/api_resources/workflows/test_instances.py @@ -267,7 +267,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInstances: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/workflows/test_versions.py b/tests/api_resources/workflows/test_versions.py index 46b2c9f5466..ecdc89ad65b 100644 --- a/tests/api_resources/workflows/test_versions.py +++ b/tests/api_resources/workflows/test_versions.py @@ -138,7 +138,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/history/test_configs.py b/tests/api_resources/zaraz/history/test_configs.py index 64707d5d443..bf2943babcd 100644 --- a/tests/api_resources/zaraz/history/test_configs.py +++ b/tests/api_resources/zaraz/history/test_configs.py @@ -61,7 +61,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_config.py b/tests/api_resources/zaraz/test_config.py index 15a39c60cac..73473ea9fa5 100644 --- a/tests/api_resources/zaraz/test_config.py +++ b/tests/api_resources/zaraz/test_config.py @@ -399,7 +399,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfig: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_default.py b/tests/api_resources/zaraz/test_default.py index b0a77bb4a0b..0ecaa604f69 100644 --- a/tests/api_resources/zaraz/test_default.py +++ b/tests/api_resources/zaraz/test_default.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDefault: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_export.py b/tests/api_resources/zaraz/test_export.py index 73ea5604505..9f0ca72f17a 100644 --- a/tests/api_resources/zaraz/test_export.py +++ b/tests/api_resources/zaraz/test_export.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncExport: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_history.py b/tests/api_resources/zaraz/test_history.py index 7690f5c9b68..e67d1fa7fa3 100644 --- a/tests/api_resources/zaraz/test_history.py +++ b/tests/api_resources/zaraz/test_history.py @@ -111,7 +111,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncHistory: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_publish.py b/tests/api_resources/zaraz/test_publish.py index 0ff472b0f22..893341b58bc 100644 --- a/tests/api_resources/zaraz/test_publish.py +++ b/tests/api_resources/zaraz/test_publish.py @@ -64,7 +64,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncPublish: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zaraz/test_workflow.py b/tests/api_resources/zaraz/test_workflow.py index 52930af6397..10aed6902f3 100644 --- a/tests/api_resources/zaraz/test_workflow.py +++ b/tests/api_resources/zaraz/test_workflow.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWorkflow: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py b/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py index 0489de97d1d..4043950764e 100755 --- a/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py +++ b/tests/api_resources/zero_trust/access/applications/policy_tests/test_users.py @@ -79,7 +79,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUsers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/applications/test_cas.py b/tests/api_resources/zero_trust/access/applications/test_cas.py index 5ec4f55234f..96b822700df 100644 --- a/tests/api_resources/zero_trust/access/applications/test_cas.py +++ b/tests/api_resources/zero_trust/access/applications/test_cas.py @@ -276,7 +276,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCAs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py index edb59c1c638..747a489d1be 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -439,7 +439,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/applications/test_policy_tests.py b/tests/api_resources/zero_trust/access/applications/test_policy_tests.py index 561ff4e4dbe..d4517ef3e31 100755 --- a/tests/api_resources/zero_trust/access/applications/test_policy_tests.py +++ b/tests/api_resources/zero_trust/access/applications/test_policy_tests.py @@ -141,7 +141,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicyTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/applications/test_settings.py b/tests/api_resources/zero_trust/access/applications/test_settings.py index b9f96bdcbfd..a1bc19b917e 100644 --- a/tests/api_resources/zero_trust/access/applications/test_settings.py +++ b/tests/api_resources/zero_trust/access/applications/test_settings.py @@ -160,7 +160,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py index daafd6559ea..668f6fc35b0 100644 --- a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py +++ b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py @@ -86,7 +86,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUserPolicyChecks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/certificates/test_settings.py b/tests/api_resources/zero_trust/access/certificates/test_settings.py index bb371f1b93d..65b683707ca 100644 --- a/tests/api_resources/zero_trust/access/certificates/test_settings.py +++ b/tests/api_resources/zero_trust/access/certificates/test_settings.py @@ -172,7 +172,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/infrastructure/test_targets.py b/tests/api_resources/zero_trust/access/infrastructure/test_targets.py index 3eebb5554ba..74205d6a65b 100644 --- a/tests/api_resources/zero_trust/access/infrastructure/test_targets.py +++ b/tests/api_resources/zero_trust/access/infrastructure/test_targets.py @@ -478,7 +478,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTargets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/logs/scim/test_updates.py b/tests/api_resources/zero_trust/access/logs/scim/test_updates.py index 776071ab042..958488c0d33 100644 --- a/tests/api_resources/zero_trust/access/logs/scim/test_updates.py +++ b/tests/api_resources/zero_trust/access/logs/scim/test_updates.py @@ -82,7 +82,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUpdates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/logs/test_access_requests.py b/tests/api_resources/zero_trust/access/logs/test_access_requests.py index 3eafad4f1a6..a083df20054 100644 --- a/tests/api_resources/zero_trust/access/logs/test_access_requests.py +++ b/tests/api_resources/zero_trust/access/logs/test_access_requests.py @@ -69,7 +69,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAccessRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 3accaf5a932..32545b7e0f6 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -3156,7 +3156,9 @@ def test_path_params_revoke_tokens(self, client: Cloudflare) -> None: class TestAsyncApplications: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py index c181fbba11f..b824fd1024a 100644 --- a/tests/api_resources/zero_trust/access/test_bookmarks.py +++ b/tests/api_resources/zero_trust/access/test_bookmarks.py @@ -290,7 +290,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBookmarks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py index 8bd7249ed22..bfa0e89b3b5 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -355,7 +355,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py index b21a942f7b8..7693e217603 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.py @@ -294,7 +294,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomPages: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_gateway_ca.py b/tests/api_resources/zero_trust/access/test_gateway_ca.py index 723be698029..80604ae6620 100644 --- a/tests/api_resources/zero_trust/access/test_gateway_ca.py +++ b/tests/api_resources/zero_trust/access/test_gateway_ca.py @@ -144,7 +144,9 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncGatewayCA: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py index f83be911c0f..fe592c5eb4f 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -371,7 +371,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/test_keys.py b/tests/api_resources/zero_trust/access/test_keys.py index f0b87f16c0f..b2a7ea7fb3b 100644 --- a/tests/api_resources/zero_trust/access/test_keys.py +++ b/tests/api_resources/zero_trust/access/test_keys.py @@ -137,7 +137,9 @@ def test_path_params_rotate(self, client: Cloudflare) -> None: class TestAsyncKeys: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_policies.py b/tests/api_resources/zero_trust/access/test_policies.py index 5102dd04664..9f15939ac35 100644 --- a/tests/api_resources/zero_trust/access/test_policies.py +++ b/tests/api_resources/zero_trust/access/test_policies.py @@ -332,7 +332,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPolicies: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py index f6980f81209..ad2553a44c6 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -442,7 +442,9 @@ def test_path_params_rotate(self, client: Cloudflare) -> None: class TestAsyncServiceTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py index 26cebba1a61..9c5aa48bc98 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.py @@ -253,7 +253,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncTags: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/test_users.py b/tests/api_resources/zero_trust/access/test_users.py index ae92054aec0..f87073d2ed5 100644 --- a/tests/api_resources/zero_trust/access/test_users.py +++ b/tests/api_resources/zero_trust/access/test_users.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUsers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/users/test_active_sessions.py b/tests/api_resources/zero_trust/access/users/test_active_sessions.py index e0f1db9ea66..d9c41b65972 100644 --- a/tests/api_resources/zero_trust/access/users/test_active_sessions.py +++ b/tests/api_resources/zero_trust/access/users/test_active_sessions.py @@ -128,7 +128,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncActiveSessions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/users/test_failed_logins.py b/tests/api_resources/zero_trust/access/users/test_failed_logins.py index 697dbe9181f..293eddfd0e4 100644 --- a/tests/api_resources/zero_trust/access/users/test_failed_logins.py +++ b/tests/api_resources/zero_trust/access/users/test_failed_logins.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncFailedLogins: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py index 9b7d2644d33..5505fe5588a 100644 --- a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py +++ b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLastSeenIdentity: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py index 3f6f640d871..54c1b30db1a 100644 --- a/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py +++ b/tests/api_resources/zero_trust/devices/policies/custom/test_excludes.py @@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncExcludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py index f9396cb4b7a..c5a9ef3e156 100644 --- a/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py +++ b/tests/api_resources/zero_trust/devices/policies/custom/test_fallback_domains.py @@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFallbackDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py b/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py index 5a978a24fa8..51596f1cd73 100644 --- a/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py +++ b/tests/api_resources/zero_trust/devices/policies/custom/test_includes.py @@ -121,7 +121,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIncludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py b/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py index 58b38f6c67e..62ddac10409 100644 --- a/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py +++ b/tests/api_resources/zero_trust/devices/policies/default/test_certificates.py @@ -99,7 +99,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py index d32898c6e0e..51781aace5e 100644 --- a/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py +++ b/tests/api_resources/zero_trust/devices/policies/default/test_excludes.py @@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncExcludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py index 13e16b48292..7d81d4d2265 100644 --- a/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py +++ b/tests/api_resources/zero_trust/devices/policies/default/test_fallback_domains.py @@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFallbackDomains: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/default/test_includes.py b/tests/api_resources/zero_trust/devices/policies/default/test_includes.py index eaed69ed067..89c4aebae8d 100644 --- a/tests/api_resources/zero_trust/devices/policies/default/test_includes.py +++ b/tests/api_resources/zero_trust/devices/policies/default/test_includes.py @@ -100,7 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIncludes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/policies/test_custom.py b/tests/api_resources/zero_trust/devices/policies/test_custom.py index 29d15b73f25..324311c25b8 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_custom.py +++ b/tests/api_resources/zero_trust/devices/policies/test_custom.py @@ -351,7 +351,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustom: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/devices/policies/test_default.py b/tests/api_resources/zero_trust/devices/policies/test_default.py index aeb1539e130..4e6dce31427 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_default.py +++ b/tests/api_resources/zero_trust/devices/policies/test_default.py @@ -132,7 +132,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDefault: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/posture/test_integrations.py b/tests/api_resources/zero_trust/devices/posture/test_integrations.py index 35efacf4282..02edc0b9b20 100644 --- a/tests/api_resources/zero_trust/devices/posture/test_integrations.py +++ b/tests/api_resources/zero_trust/devices/posture/test_integrations.py @@ -312,7 +312,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIntegrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py b/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py index 6f3727f6460..f5d2c2974e5 100644 --- a/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py +++ b/tests/api_resources/zero_trust/devices/resilience/test_global_warp_override.py @@ -111,7 +111,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncGlobalWARPOverride: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_devices_.py b/tests/api_resources/zero_trust/devices/test_devices_.py index 94c98cd4bb4..95440abceec 100644 --- a/tests/api_resources/zero_trust/devices/test_devices_.py +++ b/tests/api_resources/zero_trust/devices/test_devices_.py @@ -237,7 +237,9 @@ def test_path_params_revoke(self, client: Cloudflare) -> None: class TestAsyncDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used") @parametrize diff --git a/tests/api_resources/zero_trust/devices/test_dex_tests.py b/tests/api_resources/zero_trust/devices/test_dex_tests.py index 7198475bd23..1bf2479ebe4 100644 --- a/tests/api_resources/zero_trust/devices/test_dex_tests.py +++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py @@ -331,7 +331,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDEXTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_fleet_status.py b/tests/api_resources/zero_trust/devices/test_fleet_status.py index 308864477e0..fa6ed7dbd72 100644 --- a/tests/api_resources/zero_trust/devices/test_fleet_status.py +++ b/tests/api_resources/zero_trust/devices/test_fleet_status.py @@ -83,7 +83,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncFleetStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_networks.py b/tests/api_resources/zero_trust/devices/test_networks.py index f09f4ba1555..09e1164f0be 100644 --- a/tests/api_resources/zero_trust/devices/test_networks.py +++ b/tests/api_resources/zero_trust/devices/test_networks.py @@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNetworks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_override_codes.py b/tests/api_resources/zero_trust/devices/test_override_codes.py index d3d41b67877..64cedbbaac8 100644 --- a/tests/api_resources/zero_trust/devices/test_override_codes.py +++ b/tests/api_resources/zero_trust/devices/test_override_codes.py @@ -131,7 +131,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncOverrideCodes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used") @parametrize diff --git a/tests/api_resources/zero_trust/devices/test_posture.py b/tests/api_resources/zero_trust/devices/test_posture.py index 7df5498d5e8..36505a237d1 100644 --- a/tests/api_resources/zero_trust/devices/test_posture.py +++ b/tests/api_resources/zero_trust/devices/test_posture.py @@ -302,7 +302,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPosture: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_registrations.py b/tests/api_resources/zero_trust/devices/test_registrations.py index 544dcf13b36..9a3b5e4cda7 100644 --- a/tests/api_resources/zero_trust/devices/test_registrations.py +++ b/tests/api_resources/zero_trust/devices/test_registrations.py @@ -327,7 +327,9 @@ def test_path_params_unrevoke(self, client: Cloudflare) -> None: class TestAsyncRegistrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate prism error for invalid security scheme used") @parametrize diff --git a/tests/api_resources/zero_trust/devices/test_revoke.py b/tests/api_resources/zero_trust/devices/test_revoke.py index df8b21c996e..285d2cebc88 100644 --- a/tests/api_resources/zero_trust/devices/test_revoke.py +++ b/tests/api_resources/zero_trust/devices/test_revoke.py @@ -68,7 +68,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncRevoke: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_settings.py b/tests/api_resources/zero_trust/devices/test_settings.py index 194a95ad61f..f4518b03567 100644 --- a/tests/api_resources/zero_trust/devices/test_settings.py +++ b/tests/api_resources/zero_trust/devices/test_settings.py @@ -195,7 +195,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/devices/test_unrevoke.py b/tests/api_resources/zero_trust/devices/test_unrevoke.py index 4155a91a1c4..c48cd42d16c 100644 --- a/tests/api_resources/zero_trust/devices/test_unrevoke.py +++ b/tests/api_resources/zero_trust/devices/test_unrevoke.py @@ -68,7 +68,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncUnrevoke: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/commands/test_devices.py b/tests/api_resources/zero_trust/dex/commands/test_devices.py index be6707c9e2a..d364b9938d9 100644 --- a/tests/api_resources/zero_trust/dex/commands/test_devices.py +++ b/tests/api_resources/zero_trust/dex/commands/test_devices.py @@ -76,7 +76,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/commands/test_downloads.py b/tests/api_resources/zero_trust/dex/commands/test_downloads.py index 66711dbdd5a..d91195e566a 100644 --- a/tests/api_resources/zero_trust/dex/commands/test_downloads.py +++ b/tests/api_resources/zero_trust/dex/commands/test_downloads.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDownloads: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize @pytest.mark.respx(base_url=base_url) diff --git a/tests/api_resources/zero_trust/dex/commands/test_quota.py b/tests/api_resources/zero_trust/dex/commands/test_quota.py index 5291e9d3113..c3114be6849 100644 --- a/tests/api_resources/zero_trust/dex/commands/test_quota.py +++ b/tests/api_resources/zero_trust/dex/commands/test_quota.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncQuota: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py index c542c152c1b..c77565e0f06 100644 --- a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py +++ b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py @@ -98,7 +98,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py index 98fd5fd8ad4..6a6125e8a30 100644 --- a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py +++ b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py @@ -89,7 +89,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPercentiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_colos.py b/tests/api_resources/zero_trust/dex/test_colos.py index 8e4d0db4399..cb35c388539 100644 --- a/tests/api_resources/zero_trust/dex/test_colos.py +++ b/tests/api_resources/zero_trust/dex/test_colos.py @@ -75,7 +75,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncColos: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_commands.py b/tests/api_resources/zero_trust/dex/test_commands.py index 9692c4fde6c..0397c5dd48d 100644 --- a/tests/api_resources/zero_trust/dex/test_commands.py +++ b/tests/api_resources/zero_trust/dex/test_commands.py @@ -151,7 +151,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncCommands: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_fleet_status.py b/tests/api_resources/zero_trust/dex/test_fleet_status.py index db1676eacde..0c858737366 100644 --- a/tests/api_resources/zero_trust/dex/test_fleet_status.py +++ b/tests/api_resources/zero_trust/dex/test_fleet_status.py @@ -120,7 +120,9 @@ def test_path_params_over_time(self, client: Cloudflare) -> None: class TestAsyncFleetStatus: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_live(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_http_tests.py b/tests/api_resources/zero_trust/dex/test_http_tests.py index 21329525b50..47ab64b6035 100644 --- a/tests/api_resources/zero_trust/dex/test_http_tests.py +++ b/tests/api_resources/zero_trust/dex/test_http_tests.py @@ -95,7 +95,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHTTPTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_tests.py b/tests/api_resources/zero_trust/dex/test_tests.py index 3c5a325a62c..cee5ea6d397 100644 --- a/tests/api_resources/zero_trust/dex/test_tests.py +++ b/tests/api_resources/zero_trust/dex/test_tests.py @@ -70,7 +70,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py index e9c90169344..65eafd20ede 100644 --- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py +++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py @@ -237,7 +237,9 @@ def test_path_params_percentiles(self, client: Cloudflare) -> None: class TestAsyncTracerouteTests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/test_warp_change_events.py b/tests/api_resources/zero_trust/dex/test_warp_change_events.py index 402089c3dc2..fa9309617f8 100644 --- a/tests/api_resources/zero_trust/dex/test_warp_change_events.py +++ b/tests/api_resources/zero_trust/dex/test_warp_change_events.py @@ -89,7 +89,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWARPChangeEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py index 04439705540..6a91c7b68c4 100644 --- a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py +++ b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py @@ -66,7 +66,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUniqueDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py index cde7d16b706..ca7f869da0b 100644 --- a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py +++ b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncNetworkPath: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py index 15c42ee5123..020210b6ecd 100644 --- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py @@ -130,7 +130,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncUpload: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_versions.py b/tests/api_resources/zero_trust/dlp/datasets/test_versions.py index cb9b3c2c46c..6fa1f18a4ea 100755 --- a/tests/api_resources/zero_trust/dlp/datasets/test_versions.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_versions.py @@ -82,7 +82,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncVersions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py b/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py index 086fcceba69..6b705981752 100755 --- a/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py +++ b/tests/api_resources/zero_trust/dlp/datasets/versions/test_entries.py @@ -95,7 +95,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncEntries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py b/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py index 8c0e9f1aaad..a257b620e2a 100644 --- a/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py +++ b/tests/api_resources/zero_trust/dlp/email/test_account_mapping.py @@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncAccountMapping: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/dlp/email/test_rules.py b/tests/api_resources/zero_trust/dlp/email/test_rules.py index e09032dad07..199e40dfe70 100644 --- a/tests/api_resources/zero_trust/dlp/email/test_rules.py +++ b/tests/api_resources/zero_trust/dlp/email/test_rules.py @@ -422,7 +422,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py index b2c3d4b3c8c..3cbbf67e3c4 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py @@ -308,7 +308,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustom: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py index 3b8f9b5b28d..ac97b878563 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py @@ -137,7 +137,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPredefined: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_datasets.py b/tests/api_resources/zero_trust/dlp/test_datasets.py index bba64c26030..6c5abd035ac 100644 --- a/tests/api_resources/zero_trust/dlp/test_datasets.py +++ b/tests/api_resources/zero_trust/dlp/test_datasets.py @@ -267,7 +267,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDatasets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_entries.py b/tests/api_resources/zero_trust/dlp/test_entries.py index d0a651e7f92..ab3097d2258 100644 --- a/tests/api_resources/zero_trust/dlp/test_entries.py +++ b/tests/api_resources/zero_trust/dlp/test_entries.py @@ -446,7 +446,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncEntries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_limits.py b/tests/api_resources/zero_trust/dlp/test_limits.py index ca7e470cfd6..1b728920c2c 100755 --- a/tests/api_resources/zero_trust/dlp/test_limits.py +++ b/tests/api_resources/zero_trust/dlp/test_limits.py @@ -57,7 +57,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncLimits: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_patterns.py b/tests/api_resources/zero_trust/dlp/test_patterns.py index f9bd0319a32..92f8176ec56 100644 --- a/tests/api_resources/zero_trust/dlp/test_patterns.py +++ b/tests/api_resources/zero_trust/dlp/test_patterns.py @@ -70,7 +70,9 @@ def test_path_params_validate(self, client: Cloudflare) -> None: class TestAsyncPatterns: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_validate(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_payload_logs.py b/tests/api_resources/zero_trust/dlp/test_payload_logs.py index 2d9c15c0be9..b868687bae1 100644 --- a/tests/api_resources/zero_trust/dlp/test_payload_logs.py +++ b/tests/api_resources/zero_trust/dlp/test_payload_logs.py @@ -103,7 +103,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPayloadLogs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/dlp/test_profiles.py b/tests/api_resources/zero_trust/dlp/test_profiles.py index 186567d9299..33177649778 100644 --- a/tests/api_resources/zero_trust/dlp/test_profiles.py +++ b/tests/api_resources/zero_trust/dlp/test_profiles.py @@ -114,7 +114,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProfiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py b/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py index b5a8ec58cd0..37b130fd4c0 100644 --- a/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py +++ b/tests/api_resources/zero_trust/gateway/configurations/test_custom_certificate.py @@ -64,7 +64,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomCertificate: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/lists/test_items.py b/tests/api_resources/zero_trust/gateway/lists/test_items.py index 9fcc52d42a2..5b17241871f 100644 --- a/tests/api_resources/zero_trust/gateway/lists/test_items.py +++ b/tests/api_resources/zero_trust/gateway/lists/test_items.py @@ -68,7 +68,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncItems: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_app_types.py b/tests/api_resources/zero_trust/gateway/test_app_types.py index 166d36defcd..f39d2bdec9c 100644 --- a/tests/api_resources/zero_trust/gateway/test_app_types.py +++ b/tests/api_resources/zero_trust/gateway/test_app_types.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncAppTypes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py index 55ce02105b1..453b20dae93 100644 --- a/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py +++ b/tests/api_resources/zero_trust/gateway/test_audit_ssh_settings.py @@ -137,7 +137,9 @@ def test_path_params_rotate_seed(self, client: Cloudflare) -> None: class TestAsyncAuditSSHSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_categories.py b/tests/api_resources/zero_trust/gateway/test_categories.py index 42d6ae3b4db..f03cd27897c 100644 --- a/tests/api_resources/zero_trust/gateway/test_categories.py +++ b/tests/api_resources/zero_trust/gateway/test_categories.py @@ -58,7 +58,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncCategories: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_certificates.py b/tests/api_resources/zero_trust/gateway/test_certificates.py index 5cbd3f90415..86e44845741 100644 --- a/tests/api_resources/zero_trust/gateway/test_certificates.py +++ b/tests/api_resources/zero_trust/gateway/test_certificates.py @@ -313,7 +313,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCertificates: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index 9368b1e530d..a9125bee543 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -247,7 +247,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigurations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index 4c81584d3e3..b9e375ba154 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -359,7 +359,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLists: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_locations.py b/tests/api_resources/zero_trust/gateway/test_locations.py index 0a629a61f6e..b53c7d4be82 100644 --- a/tests/api_resources/zero_trust/gateway/test_locations.py +++ b/tests/api_resources/zero_trust/gateway/test_locations.py @@ -306,7 +306,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLocations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_logging.py b/tests/api_resources/zero_trust/gateway/test_logging.py index 7c780cb3d9f..b2965923156 100644 --- a/tests/api_resources/zero_trust/gateway/test_logging.py +++ b/tests/api_resources/zero_trust/gateway/test_logging.py @@ -117,7 +117,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncLogging: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py index 4e8f3d0db64..defe1467d67 100644 --- a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py +++ b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py @@ -258,7 +258,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncProxyEndpoints: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index c5c5073136e..f8d10747e1f 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -534,7 +534,9 @@ def test_path_params_reset_expiration(self, client: Cloudflare) -> None: class TestAsyncRules: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py b/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py index 36c7768d104..d02e38c40b4 100644 --- a/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py +++ b/tests/api_resources/zero_trust/identity_providers/scim/test_groups.py @@ -79,7 +79,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/identity_providers/scim/test_users.py b/tests/api_resources/zero_trust/identity_providers/scim/test_users.py index 8c2ccc6de8c..3bfcf13c4f5 100644 --- a/tests/api_resources/zero_trust/identity_providers/scim/test_users.py +++ b/tests/api_resources/zero_trust/identity_providers/scim/test_users.py @@ -81,7 +81,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncUsers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/routes/test_ips.py b/tests/api_resources/zero_trust/networks/routes/test_ips.py index f171b36a709..57b3495217c 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_ips.py +++ b/tests/api_resources/zero_trust/networks/routes/test_ips.py @@ -77,7 +77,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIPs: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/routes/test_networks.py b/tests/api_resources/zero_trust/networks/routes/test_networks.py index ce1e6053a32..465079d2ace 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_networks.py +++ b/tests/api_resources/zero_trust/networks/routes/test_networks.py @@ -217,7 +217,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncNetworks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py b/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py index 367f7785d4b..27a5af44aad 100644 --- a/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py +++ b/tests/api_resources/zero_trust/networks/subnets/test_cloudflare_source.py @@ -72,7 +72,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: class TestAsyncCloudflareSource: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/test_routes.py b/tests/api_resources/zero_trust/networks/test_routes.py index 88876d04d01..8c2f63e0532 100644 --- a/tests/api_resources/zero_trust/networks/test_routes.py +++ b/tests/api_resources/zero_trust/networks/test_routes.py @@ -292,7 +292,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRoutes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/test_subnets.py b/tests/api_resources/zero_trust/networks/test_subnets.py index 8e7f03de8e2..e8d64025ff2 100644 --- a/tests/api_resources/zero_trust/networks/test_subnets.py +++ b/tests/api_resources/zero_trust/networks/test_subnets.py @@ -76,7 +76,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncSubnets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/networks/test_virtual_networks.py b/tests/api_resources/zero_trust/networks/test_virtual_networks.py index b846dfe89ed..554ac67960b 100644 --- a/tests/api_resources/zero_trust/networks/test_virtual_networks.py +++ b/tests/api_resources/zero_trust/networks/test_virtual_networks.py @@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncVirtualNetworks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/organizations/test_doh.py b/tests/api_resources/zero_trust/organizations/test_doh.py index 58ac94ae30a..49e33e57776 100644 --- a/tests/api_resources/zero_trust/organizations/test_doh.py +++ b/tests/api_resources/zero_trust/organizations/test_doh.py @@ -104,7 +104,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDOH: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py index 3e0087721b2..84ee250e1d7 100644 --- a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py +++ b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py @@ -67,7 +67,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncReferences: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py index 1e3527df1cc..3c6ca23a906 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py @@ -122,7 +122,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncBehaviours: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py index 5ec6ae4e5ba..0584e0e27df 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py @@ -288,7 +288,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIntegrations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/risk_scoring/test_summary.py b/tests/api_resources/zero_trust/risk_scoring/test_summary.py index acf625187e5..b4ca1529021 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_summary.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_summary.py @@ -57,7 +57,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSummary: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_connectivity_settings.py b/tests/api_resources/zero_trust/test_connectivity_settings.py index 310f4319091..15836a2f91c 100644 --- a/tests/api_resources/zero_trust/test_connectivity_settings.py +++ b/tests/api_resources/zero_trust/test_connectivity_settings.py @@ -107,7 +107,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnectivitySettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_devices.py b/tests/api_resources/zero_trust/test_devices.py index b6548ab51ef..fa02515657c 100644 --- a/tests/api_resources/zero_trust/test_devices.py +++ b/tests/api_resources/zero_trust/test_devices.py @@ -118,7 +118,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncDevices: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_gateway.py b/tests/api_resources/zero_trust/test_gateway.py index 4f68a4f6c2c..c796464f9e9 100644 --- a/tests/api_resources/zero_trust/test_gateway.py +++ b/tests/api_resources/zero_trust/test_gateway.py @@ -95,7 +95,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncGateway: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index fc69af496c7..f2e7458d904 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -2798,7 +2798,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncIdentityProviders: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py index e900ad0d293..67c7718fd65 100644 --- a/tests/api_resources/zero_trust/test_organizations.py +++ b/tests/api_resources/zero_trust/test_organizations.py @@ -298,7 +298,9 @@ def test_path_params_revoke_users(self, client: Cloudflare) -> None: class TestAsyncOrganizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/test_risk_scoring.py b/tests/api_resources/zero_trust/test_risk_scoring.py index 18653b789e8..9a8252864e0 100644 --- a/tests/api_resources/zero_trust/test_risk_scoring.py +++ b/tests/api_resources/zero_trust/test_risk_scoring.py @@ -115,7 +115,9 @@ def test_path_params_reset(self, client: Cloudflare) -> None: class TestAsyncRiskScoring: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/test_seats.py b/tests/api_resources/zero_trust/test_seats.py index b424abaee04..afd583e5546 100644 --- a/tests/api_resources/zero_trust/test_seats.py +++ b/tests/api_resources/zero_trust/test_seats.py @@ -90,7 +90,9 @@ def test_path_params_edit(self, client: Cloudflare) -> None: class TestAsyncSeats: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize diff --git a/tests/api_resources/zero_trust/test_tunnels.py b/tests/api_resources/zero_trust/test_tunnels.py index b723b2b3327..eedc25523bc 100644 --- a/tests/api_resources/zero_trust/test_tunnels.py +++ b/tests/api_resources/zero_trust/test_tunnels.py @@ -78,7 +78,9 @@ def test_path_params_list(self, client: Cloudflare) -> None: class TestAsyncTunnels: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py index 2aa511ecfd1..0ccbba7e0ed 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_configurations.py @@ -175,7 +175,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConfigurations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py index 359c067b8af..76559a92398 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connections.py @@ -125,7 +125,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py index a18b48bb4d3..2b3d6203843 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_connectors.py @@ -79,7 +79,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncConnectors: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py index 366d43ed8eb..60cc2e6707e 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_management.py @@ -71,7 +71,9 @@ def test_path_params_create(self, client: Cloudflare) -> None: class TestAsyncManagement: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py b/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py index bcd08c85974..afc44019f79 100644 --- a/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py +++ b/tests/api_resources/zero_trust/tunnels/cloudflared/test_token.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncToken: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/test_cloudflared.py b/tests/api_resources/zero_trust/tunnels/test_cloudflared.py index 95c3ae6b27d..28740d8ed81 100644 --- a/tests/api_resources/zero_trust/tunnels/test_cloudflared.py +++ b/tests/api_resources/zero_trust/tunnels/test_cloudflared.py @@ -289,7 +289,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCloudflared: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/test_warp_connector.py b/tests/api_resources/zero_trust/tunnels/test_warp_connector.py index 593001744cc..dee06560f20 100644 --- a/tests/api_resources/zero_trust/tunnels/test_warp_connector.py +++ b/tests/api_resources/zero_trust/tunnels/test_warp_connector.py @@ -279,7 +279,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncWARPConnector: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py b/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py index 998afc6848e..2a2d98cc44d 100644 --- a/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py +++ b/tests/api_resources/zero_trust/tunnels/warp_connector/test_token.py @@ -66,7 +66,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncToken: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_activation_check.py b/tests/api_resources/zones/test_activation_check.py index a78a1d1567b..267737f406d 100644 --- a/tests/api_resources/zones/test_activation_check.py +++ b/tests/api_resources/zones/test_activation_check.py @@ -57,7 +57,9 @@ def test_path_params_trigger(self, client: Cloudflare) -> None: class TestAsyncActivationCheck: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_trigger(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_custom_nameservers.py b/tests/api_resources/zones/test_custom_nameservers.py index e3c7d509f44..48ba893c07a 100644 --- a/tests/api_resources/zones/test_custom_nameservers.py +++ b/tests/api_resources/zones/test_custom_nameservers.py @@ -124,7 +124,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomNameservers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_holds.py b/tests/api_resources/zones/test_holds.py index b34e5066342..70446eb4e59 100644 --- a/tests/api_resources/zones/test_holds.py +++ b/tests/api_resources/zones/test_holds.py @@ -196,7 +196,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncHolds: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_plans.py b/tests/api_resources/zones/test_plans.py index 4cd474090ce..216f4430f91 100644 --- a/tests/api_resources/zones/test_plans.py +++ b/tests/api_resources/zones/test_plans.py @@ -106,7 +106,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncPlans: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_rate_plans.py b/tests/api_resources/zones/test_rate_plans.py index 656e6512dd1..d80b1b53cf1 100644 --- a/tests/api_resources/zones/test_rate_plans.py +++ b/tests/api_resources/zones/test_rate_plans.py @@ -58,7 +58,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRatePlans: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py index e09e254556c..63985d634a6 100644 --- a/tests/api_resources/zones/test_settings.py +++ b/tests/api_resources/zones/test_settings.py @@ -184,7 +184,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/zones/test_subscriptions.py b/tests/api_resources/zones/test_subscriptions.py index f99e737ef56..00bd212c993 100644 --- a/tests/api_resources/zones/test_subscriptions.py +++ b/tests/api_resources/zones/test_subscriptions.py @@ -167,7 +167,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncSubscriptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/conftest.py b/tests/conftest.py index 9ec5ce03747..4e9cf86222e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,10 +6,12 @@ import logging from typing import TYPE_CHECKING, Iterator, AsyncIterator +import httpx import pytest from pytest_asyncio import is_async_test -from cloudflare import Cloudflare, AsyncCloudflare +from cloudflare import Cloudflare, AsyncCloudflare, DefaultAioHttpClient +from cloudflare._utils import is_dict if TYPE_CHECKING: from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage] @@ -27,6 +29,19 @@ def pytest_collection_modifyitems(items: list[pytest.Function]) -> None: for async_test in pytest_asyncio_tests: async_test.add_marker(session_scope_marker, append=False) + # We skip tests that use both the aiohttp client and respx_mock as respx_mock + # doesn't support custom transports. + for item in items: + if "async_client" not in item.fixturenames or "respx_mock" not in item.fixturenames: + continue + + if not hasattr(item, "callspec"): + continue + + async_client_param = item.callspec.params.get("async_client") + if is_dict(async_client_param) and async_client_param.get("http_client") == "aiohttp": + item.add_marker(pytest.mark.skip(reason="aiohttp client is not compatible with respx_mock")) + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -48,11 +63,29 @@ def client(request: FixtureRequest) -> Iterator[Cloudflare]: @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncCloudflare]: - strict = getattr(request, "param", True) - if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") + param = getattr(request, "param", True) + + # defaults + strict = True + http_client: None | httpx.AsyncClient = None + + if isinstance(param, bool): + strict = param + elif is_dict(param): + strict = param.get("strict", True) + assert isinstance(strict, bool) + + http_client_type = param.get("http_client", "httpx") + if http_client_type == "aiohttp": + http_client = DefaultAioHttpClient() + else: + raise TypeError(f"Unexpected fixture parameter type {type(param)}, expected bool or dict") async with AsyncCloudflare( - base_url=base_url, api_key=api_key, api_email=api_email, _strict_response_validation=strict + base_url=base_url, + api_key=api_key, + api_email=api_email, + _strict_response_validation=strict, + http_client=http_client, ) as client: yield client From 98e317432e2b58fdfd3621c8912326e47a6d2262 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:09:49 +0000 Subject: [PATCH 015/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bf5b298372f..7b6dc6a7f61 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-349f60941504b93b7ffd8665d7169fffb3b4b44da7ff7925dfb7735c5dc2c064.yml -openapi_spec_hash: c6dd6121ac070b9e20a3e9fe175434c6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c1d9e5c4ba43a9049e1470e1b08ef7039d3eabe34f483a5eaabf4ff18d4e9974.yml +openapi_spec_hash: a5650fa7fa230af9867db1efaa6ade3b config_hash: cce40d4d65a4d67d5df957a75a15b567 From 966fa64a54ab66fdaf6ca993f7b4f8f1a297d82a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:12:35 +0000 Subject: [PATCH 016/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7b6dc6a7f61..be64b07fb19 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c1d9e5c4ba43a9049e1470e1b08ef7039d3eabe34f483a5eaabf4ff18d4e9974.yml -openapi_spec_hash: a5650fa7fa230af9867db1efaa6ade3b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ebb15d2c237bfc6b85dc9443a7b50b363ccae5996a8ed658528c3d8edd3b3eea.yml +openapi_spec_hash: c92360261861594d9b9a99bfe870f571 config_hash: cce40d4d65a4d67d5df957a75a15b567 From d7e2d59d8bbf985aa9b53486064e6527c267a201 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:14:12 +0000 Subject: [PATCH 017/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index be64b07fb19..ccbca3b43f7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ebb15d2c237bfc6b85dc9443a7b50b363ccae5996a8ed658528c3d8edd3b3eea.yml -openapi_spec_hash: c92360261861594d9b9a99bfe870f571 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3081a2cc870d2021dbfac8fd8fa12de842daf18f852fbdd2e4218785bf8d06b6.yml +openapi_spec_hash: 9d4068cf32af06f75e3f72f49a80ff2a config_hash: cce40d4d65a4d67d5df957a75a15b567 From cfc9b045893ee9d25540c4cba320378bff92f6c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:17:46 +0000 Subject: [PATCH 018/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ccbca3b43f7..67901f50688 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3081a2cc870d2021dbfac8fd8fa12de842daf18f852fbdd2e4218785bf8d06b6.yml -openapi_spec_hash: 9d4068cf32af06f75e3f72f49a80ff2a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-16ab34528faa2ae52543b8422c2af1097c408494fd15597e492718901146c408.yml +openapi_spec_hash: a73031467be36e0c74bfd258802966e6 config_hash: cce40d4d65a4d67d5df957a75a15b567 From c1802ddb1d1c6b5d0925efe5b3664d6d91a1ed92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:21:06 +0000 Subject: [PATCH 019/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 67901f50688..a6b961ac612 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-16ab34528faa2ae52543b8422c2af1097c408494fd15597e492718901146c408.yml -openapi_spec_hash: a73031467be36e0c74bfd258802966e6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d3a34e6f93d89c344c9a77f60acd970d00e8cec662b990e05b2aaf8f10e6f4a9.yml +openapi_spec_hash: 8dd5131f7f4919729146b3dbe976e9de config_hash: cce40d4d65a4d67d5df957a75a15b567 From 5c7e9a9c2a3c489b68ef72d88fb4e8c0d3c86ed5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 21:04:18 +0000 Subject: [PATCH 020/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a6b961ac612..2992dab8529 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d3a34e6f93d89c344c9a77f60acd970d00e8cec662b990e05b2aaf8f10e6f4a9.yml -openapi_spec_hash: 8dd5131f7f4919729146b3dbe976e9de +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8564470fd064b69c2db15ff823829f02578aad21d16eddfbfe1a52759eef23d.yml +openapi_spec_hash: f50ea7ed3619bc31079686f8ab45b67a config_hash: cce40d4d65a4d67d5df957a75a15b567 From d7e224c62b6a7b35a7efbb89104395ced20efa06 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 21:06:39 +0000 Subject: [PATCH 021/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2992dab8529..894ef42a9df 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b8564470fd064b69c2db15ff823829f02578aad21d16eddfbfe1a52759eef23d.yml -openapi_spec_hash: f50ea7ed3619bc31079686f8ab45b67a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a05d9d914eec9cd3e9b8819cfc85742b4a0cd61505d6be3f8f0f933c0941bd3d.yml +openapi_spec_hash: ed2f5331f775198f55a81f2b5ca9e50c config_hash: cce40d4d65a4d67d5df957a75a15b567 From 8daec2281091e811b540c4c21551e24c2b79ac34 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 21:21:10 +0000 Subject: [PATCH 022/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 894ef42a9df..a8d869cf542 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a05d9d914eec9cd3e9b8819cfc85742b4a0cd61505d6be3f8f0f933c0941bd3d.yml -openapi_spec_hash: ed2f5331f775198f55a81f2b5ca9e50c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7beb5e4317fc79ba9452e7fc46fece8b5129c2dc98a310275d3f26cb4a840ac2.yml +openapi_spec_hash: 6e856a8f7607fd225670a4c5815ce59b config_hash: cce40d4d65a4d67d5df957a75a15b567 From fb41e739b429dc7ad9071637b072c0c642d31a0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 21:23:33 +0000 Subject: [PATCH 023/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a8d869cf542..9cf504f8baf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7beb5e4317fc79ba9452e7fc46fece8b5129c2dc98a310275d3f26cb4a840ac2.yml -openapi_spec_hash: 6e856a8f7607fd225670a4c5815ce59b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ebec5aea767b1c60bdbe9006599da48f89cb979704ab0a129f11faea537f97e.yml +openapi_spec_hash: 0e3f4d68a4497afd17f1a427c8059c3e config_hash: cce40d4d65a4d67d5df957a75a15b567 From b82033c96be2acbf3dc032c744351a68e375d550 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 21:48:31 +0000 Subject: [PATCH 024/392] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9cf504f8baf..38c6d04fe1c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8ebec5aea767b1c60bdbe9006599da48f89cb979704ab0a129f11faea537f97e.yml -openapi_spec_hash: 0e3f4d68a4497afd17f1a427c8059c3e -config_hash: cce40d4d65a4d67d5df957a75a15b567 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a05d9d914eec9cd3e9b8819cfc85742b4a0cd61505d6be3f8f0f933c0941bd3d.yml +openapi_spec_hash: ed2f5331f775198f55a81f2b5ca9e50c +config_hash: 9e096c169b43682069730a4291c62d4a From 666cff34fc1ce01a6e1ed83ede2808821baeed40 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 06:03:25 +0000 Subject: [PATCH 025/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 38c6d04fe1c..44a46cb3252 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a05d9d914eec9cd3e9b8819cfc85742b4a0cd61505d6be3f8f0f933c0941bd3d.yml -openapi_spec_hash: ed2f5331f775198f55a81f2b5ca9e50c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-349f60941504b93b7ffd8665d7169fffb3b4b44da7ff7925dfb7735c5dc2c064.yml +openapi_spec_hash: c6dd6121ac070b9e20a3e9fe175434c6 config_hash: 9e096c169b43682069730a4291c62d4a From 8059b0783dba15376d3f651c97f9f20983015537 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 06:05:32 +0000 Subject: [PATCH 026/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 44a46cb3252..5994e1ddf6a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-349f60941504b93b7ffd8665d7169fffb3b4b44da7ff7925dfb7735c5dc2c064.yml -openapi_spec_hash: c6dd6121ac070b9e20a3e9fe175434c6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d20714c9e237c818ece8952fdb4c8707167bd729bc351535fd5ed3f2045c97dd.yml +openapi_spec_hash: f3dd992fb5b9e9f446badf877a677543 config_hash: 9e096c169b43682069730a4291c62d4a From e0988cf4db7f62642bdf9d077378f4ae4bc32a2d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 06:07:39 +0000 Subject: [PATCH 027/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5994e1ddf6a..0e6b2f5c9a5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d20714c9e237c818ece8952fdb4c8707167bd729bc351535fd5ed3f2045c97dd.yml -openapi_spec_hash: f3dd992fb5b9e9f446badf877a677543 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-14dad5f4c5f9ffd273396e1b5717a4479e308c3f84046ea2ecd431666ff1aac9.yml +openapi_spec_hash: cde80d758d24a8ef13fc45a9e960dfe3 config_hash: 9e096c169b43682069730a4291c62d4a From 97f1a133a5abd4228dcc99c9f9d1cceaeca4ea3d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 06:11:00 +0000 Subject: [PATCH 028/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0e6b2f5c9a5..a4133552800 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-14dad5f4c5f9ffd273396e1b5717a4479e308c3f84046ea2ecd431666ff1aac9.yml -openapi_spec_hash: cde80d758d24a8ef13fc45a9e960dfe3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cacb2bc17495e079bf82c8e57a2985fc9f5b6c6adaa09f13e901add6b7ae8868.yml +openapi_spec_hash: 54762993aa1e76437be8b1155712ad79 config_hash: 9e096c169b43682069730a4291c62d4a From c843ee11002ba2db376e473259dc416a42081932 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 11:29:40 +0000 Subject: [PATCH 029/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a4133552800..8a2536f41b6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cacb2bc17495e079bf82c8e57a2985fc9f5b6c6adaa09f13e901add6b7ae8868.yml -openapi_spec_hash: 54762993aa1e76437be8b1155712ad79 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-67a5e0862d2e4406e310cc08157e2c8f1ea02f62132ecb144295729ff1e00d4b.yml +openapi_spec_hash: 47daba1c1a2478b88715abb5c9d64f52 config_hash: 9e096c169b43682069730a4291c62d4a From b0d7add1d46392d775bf4f58e3ec4aca8d9a6cbc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 11:31:57 +0000 Subject: [PATCH 030/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8a2536f41b6..65565a1dc8d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-67a5e0862d2e4406e310cc08157e2c8f1ea02f62132ecb144295729ff1e00d4b.yml -openapi_spec_hash: 47daba1c1a2478b88715abb5c9d64f52 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3081a2cc870d2021dbfac8fd8fa12de842daf18f852fbdd2e4218785bf8d06b6.yml +openapi_spec_hash: 9d4068cf32af06f75e3f72f49a80ff2a config_hash: 9e096c169b43682069730a4291c62d4a From 261240b1d0ad5340cc0f84f50f03f10fea2f7d6e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 12:58:41 +0000 Subject: [PATCH 031/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 65565a1dc8d..3862b17885c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3081a2cc870d2021dbfac8fd8fa12de842daf18f852fbdd2e4218785bf8d06b6.yml -openapi_spec_hash: 9d4068cf32af06f75e3f72f49a80ff2a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dbdd79e3320279d9b30bb56dff3ad67624292fcbdef0a8c3ece0627aec85a8aa.yml +openapi_spec_hash: f60aa52659ef55ace5e0986dd87e8adb config_hash: 9e096c169b43682069730a4291c62d4a From 5e1c247d0c9f532cc8ecc9f64d6b909ea74f266c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 13:08:19 +0000 Subject: [PATCH 032/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3862b17885c..be90fd64161 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dbdd79e3320279d9b30bb56dff3ad67624292fcbdef0a8c3ece0627aec85a8aa.yml -openapi_spec_hash: f60aa52659ef55ace5e0986dd87e8adb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b405a8731383039c519ebfaf6fcdec33a714502a5a11f1f8036206fd55e9e735.yml +openapi_spec_hash: 0488b58100e434defaeee50c66a512d0 config_hash: 9e096c169b43682069730a4291c62d4a From 5044c0516ed3eda930e9ebc1e2612387bd66caa4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:02:35 +0000 Subject: [PATCH 033/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index be90fd64161..d4755a50acf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b405a8731383039c519ebfaf6fcdec33a714502a5a11f1f8036206fd55e9e735.yml -openapi_spec_hash: 0488b58100e434defaeee50c66a512d0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3344d61337767cb7a666535ee455787a19a9220441fdc6fb46de9d2d4d2e9494.yml +openapi_spec_hash: 0074630178000445ee720d7f2a4a06da config_hash: 9e096c169b43682069730a4291c62d4a From 7a46f7164b32faf386e6dfd5c0fc841cbd7ca898 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:32:25 +0000 Subject: [PATCH 034/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d4755a50acf..c62fffe93c3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3344d61337767cb7a666535ee455787a19a9220441fdc6fb46de9d2d4d2e9494.yml -openapi_spec_hash: 0074630178000445ee720d7f2a4a06da +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cde4e76444147a1a610c21bfecfaa04d7f29ef55a2665e45c7869dc7aa7e8a2.yml +openapi_spec_hash: ca14ff449d8cd3aff742013eec1f515e config_hash: 9e096c169b43682069730a4291c62d4a From a6cb63b8d88361e07b87119fe5a405e7629d94ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:35:15 +0000 Subject: [PATCH 035/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c62fffe93c3..a7b178cd37b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cde4e76444147a1a610c21bfecfaa04d7f29ef55a2665e45c7869dc7aa7e8a2.yml -openapi_spec_hash: ca14ff449d8cd3aff742013eec1f515e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-25e9f1be186d00c5b9bcc8338b7e727a00124238d67a9b6dc59e4847365ef2bc.yml +openapi_spec_hash: 13c5b5e48838765119323276c64028e4 config_hash: 9e096c169b43682069730a4291c62d4a From 03c28400cc7d184d0c4d626adf9833677eee8f7f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:04:08 +0000 Subject: [PATCH 036/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a7b178cd37b..de0ae68ea5e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-25e9f1be186d00c5b9bcc8338b7e727a00124238d67a9b6dc59e4847365ef2bc.yml -openapi_spec_hash: 13c5b5e48838765119323276c64028e4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9b7869ddf0ce114bedf6eca7a921dbea2655c1b6a5ad7aa3e490cbc26594cb77.yml +openapi_spec_hash: 87fa679f43184486ff0554e647b26916 config_hash: 9e096c169b43682069730a4291c62d4a From 34b39b4183d84a6a51ab01dfddebd3e486340e26 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:23:21 +0000 Subject: [PATCH 037/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index de0ae68ea5e..683995293c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9b7869ddf0ce114bedf6eca7a921dbea2655c1b6a5ad7aa3e490cbc26594cb77.yml -openapi_spec_hash: 87fa679f43184486ff0554e647b26916 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-671e840d7cdd52e06a947b36adfcef68b8e688a74c6fad5c00fef52f1ea6e7f3.yml +openapi_spec_hash: 76074df96067f56c88813d8158a3e75a config_hash: 9e096c169b43682069730a4291c62d4a From e4337fe19ef3ccd4e63780db257c0b84d1be2cb9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:28:33 +0000 Subject: [PATCH 038/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 683995293c1..16130209aac 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-671e840d7cdd52e06a947b36adfcef68b8e688a74c6fad5c00fef52f1ea6e7f3.yml -openapi_spec_hash: 76074df96067f56c88813d8158a3e75a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c1d9e5c4ba43a9049e1470e1b08ef7039d3eabe34f483a5eaabf4ff18d4e9974.yml +openapi_spec_hash: a5650fa7fa230af9867db1efaa6ade3b config_hash: 9e096c169b43682069730a4291c62d4a From fbe47f4e31578038736ccfb94e820849919b3ace Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:30:50 +0000 Subject: [PATCH 039/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 16130209aac..1b24b164ceb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c1d9e5c4ba43a9049e1470e1b08ef7039d3eabe34f483a5eaabf4ff18d4e9974.yml -openapi_spec_hash: a5650fa7fa230af9867db1efaa6ade3b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9cc47834e1666985a5ae1341c67ce570509422cd075fe5467edd8c00dc53213f.yml +openapi_spec_hash: 509872b62ebe2182855c3102f5286ba9 config_hash: 9e096c169b43682069730a4291c62d4a From 9af4c62d143d2e239309f15f0d0cb7b19535d00b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:34:20 +0000 Subject: [PATCH 040/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1b24b164ceb..7be96449399 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9cc47834e1666985a5ae1341c67ce570509422cd075fe5467edd8c00dc53213f.yml -openapi_spec_hash: 509872b62ebe2182855c3102f5286ba9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-92e5e5651b9ee691d24c7a775170ec27917e4de06613ad6fc6d82329f150675c.yml +openapi_spec_hash: 07a5f2fc1656cd858474997daa8c8f96 config_hash: 9e096c169b43682069730a4291c62d4a From 7ea30384abad2d54f7c223854fd95db99f4c2b29 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:40:42 +0000 Subject: [PATCH 041/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7be96449399..eb3edc5d4e8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-92e5e5651b9ee691d24c7a775170ec27917e4de06613ad6fc6d82329f150675c.yml -openapi_spec_hash: 07a5f2fc1656cd858474997daa8c8f96 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ff1269522794871718450224a9111474658e16d065a037f60d4f44b12a12c70.yml +openapi_spec_hash: 98c67bff0005024b7c7d68261b4bed6f config_hash: 9e096c169b43682069730a4291c62d4a From 5dd2397610dfbd9ec7c37337c92bb79ea969fd92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 16:42:17 +0000 Subject: [PATCH 042/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index eb3edc5d4e8..4ddf0921361 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ff1269522794871718450224a9111474658e16d065a037f60d4f44b12a12c70.yml -openapi_spec_hash: 98c67bff0005024b7c7d68261b4bed6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-70934da901922eb862da3aba05b17b42a13ca65fa88a89b7e0c4faa7326391ea.yml +openapi_spec_hash: 096257d75e7d5fefef56d88ee413eb23 config_hash: 9e096c169b43682069730a4291c62d4a From 986f70f023b23d7b0cfdf7de28eb4dfdd17d41c5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 16:59:31 +0000 Subject: [PATCH 043/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4ddf0921361..cec1e3a50f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-70934da901922eb862da3aba05b17b42a13ca65fa88a89b7e0c4faa7326391ea.yml -openapi_spec_hash: 096257d75e7d5fefef56d88ee413eb23 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-adc0ed694f51384aff0ba5b6c04741694904404ffa5547663afa13b1d230e6dd.yml +openapi_spec_hash: 5bb4adaa614e8fcc772ed7180970e02a config_hash: 9e096c169b43682069730a4291c62d4a From 17b75a7495471d1206d674d657b6726e50cd2508 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:29:16 +0000 Subject: [PATCH 044/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cec1e3a50f1..a8e111e30f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-adc0ed694f51384aff0ba5b6c04741694904404ffa5547663afa13b1d230e6dd.yml -openapi_spec_hash: 5bb4adaa614e8fcc772ed7180970e02a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-75a92b1f25d63f81fd723193358b7356ed796a5cfdc0d6259a7b03571b808782.yml +openapi_spec_hash: b2de0a8c1ed6cf256a9c3f541f955f37 config_hash: 9e096c169b43682069730a4291c62d4a From 848c4465fe38d78e135ef7f45e48a4a95742a4ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:31:51 +0000 Subject: [PATCH 045/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a8e111e30f1..7fd97a2eb95 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-75a92b1f25d63f81fd723193358b7356ed796a5cfdc0d6259a7b03571b808782.yml -openapi_spec_hash: b2de0a8c1ed6cf256a9c3f541f955f37 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa0337b305b3d79b209eefc114b2cbe293bdf128c75104b1d89887872e761d43.yml +openapi_spec_hash: 5a8202afb0d1d2050fcba0d5779d5169 config_hash: 9e096c169b43682069730a4291c62d4a From da1f9e3bbd7dc395c67c223f709ac247659026e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 18:32:07 +0000 Subject: [PATCH 046/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7fd97a2eb95..ee87af45967 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa0337b305b3d79b209eefc114b2cbe293bdf128c75104b1d89887872e761d43.yml -openapi_spec_hash: 5a8202afb0d1d2050fcba0d5779d5169 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-903f6d63acbda9607e4791deb7427a3a8c7142ff19cedc5cfe75c4e6a345048c.yml +openapi_spec_hash: e4143e845d5c5b8016afeb1928cc6f71 config_hash: 9e096c169b43682069730a4291c62d4a From 70b65e55b9d1b41c13d04ccffe5a4eddce581c0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 18:34:27 +0000 Subject: [PATCH 047/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ee87af45967..8db87ea464e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-903f6d63acbda9607e4791deb7427a3a8c7142ff19cedc5cfe75c4e6a345048c.yml -openapi_spec_hash: e4143e845d5c5b8016afeb1928cc6f71 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57bc4e0d69b397012a04aaa76e4672c0c0ae3c6f38c9420a15ec0bddd4227846.yml +openapi_spec_hash: 93646b50bd878bc31823b293d87b47f1 config_hash: 9e096c169b43682069730a4291c62d4a From 55ac51e8b9877a368b90a7765518119f7b780084 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 18:37:01 +0000 Subject: [PATCH 048/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8db87ea464e..332001739a4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57bc4e0d69b397012a04aaa76e4672c0c0ae3c6f38c9420a15ec0bddd4227846.yml -openapi_spec_hash: 93646b50bd878bc31823b293d87b47f1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd55c0224e409315fee1e7aa43e5a2e4892df4e18d82ab13e355ba0363e3f256.yml +openapi_spec_hash: abac34e9bbe3e584e73c6cf77b714bc5 config_hash: 9e096c169b43682069730a4291c62d4a From dbbb02d2077911a1eac2069ac1e82b54e2ae5b1b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 18:50:00 +0000 Subject: [PATCH 049/392] chore(tests): skip some failing tests on the latest python versions --- tests/test_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_client.py b/tests/test_client.py index 76002040c33..672c968e18f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -204,6 +204,7 @@ def test_copy_signature(self) -> None: copy_param = copy_signature.parameters.get(name) assert copy_param is not None, f"copy() signature is missing the {name} param" + @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") def test_copy_build_request(self) -> None: options = FinalRequestOptions(method="get", url="/foo") @@ -1185,6 +1186,7 @@ def test_copy_signature(self) -> None: copy_param = copy_signature.parameters.get(name) assert copy_param is not None, f"copy() signature is missing the {name} param" + @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") def test_copy_build_request(self) -> None: options = FinalRequestOptions(method="get", url="/foo") From bd5ff9262436ee77fbbabecfba9be8afb74c5986 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 19:15:41 +0000 Subject: [PATCH 050/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 332001739a4..e622797a133 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd55c0224e409315fee1e7aa43e5a2e4892df4e18d82ab13e355ba0363e3f256.yml -openapi_spec_hash: abac34e9bbe3e584e73c6cf77b714bc5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f6b7acb72d565d6f5794184bf4688258692715a20ed3aa70b28bb1bc570aa94.yml +openapi_spec_hash: 4c9d388c0b5ffa9d80ecdda14726a66f config_hash: 9e096c169b43682069730a4291c62d4a From ea2f75f3f614c66cad60d9a6c70455567e7d6b47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 19:18:40 +0000 Subject: [PATCH 051/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e622797a133..f713dbdeea1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f6b7acb72d565d6f5794184bf4688258692715a20ed3aa70b28bb1bc570aa94.yml -openapi_spec_hash: 4c9d388c0b5ffa9d80ecdda14726a66f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56947bd2c6b1f4bf5f07ab0769508349faf77717a87391b1a2051f35d2bf0f8a.yml +openapi_spec_hash: 48b43ff43bc536686dbafb54cebab06d config_hash: 9e096c169b43682069730a4291c62d4a From 42024d80d42fbe3ad6009e4cb9715501175b558c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 19:20:58 +0000 Subject: [PATCH 052/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f713dbdeea1..11111124e7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56947bd2c6b1f4bf5f07ab0769508349faf77717a87391b1a2051f35d2bf0f8a.yml -openapi_spec_hash: 48b43ff43bc536686dbafb54cebab06d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-84cdb42deaeb2cd022b8c1ef2bee405c477ae6c6e5fcbba48a8e1c4620cac5f8.yml +openapi_spec_hash: cf0a147de17fe592d20c05eba116cc87 config_hash: 9e096c169b43682069730a4291c62d4a From 91b2a2296c8c9584db5d3b1165196869185c9587 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 20:04:14 +0000 Subject: [PATCH 053/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 11111124e7e..318f25e910a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-84cdb42deaeb2cd022b8c1ef2bee405c477ae6c6e5fcbba48a8e1c4620cac5f8.yml -openapi_spec_hash: cf0a147de17fe592d20c05eba116cc87 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d3de6af5d824821ab36a7648910ac22729e4dac3ea1673ef92335c73ba3dc4af.yml +openapi_spec_hash: 14ced5a7ced400ccd1628e3890189b0c config_hash: 9e096c169b43682069730a4291c62d4a From 4fa1f0c8c6fcb5c895f761c45ef12d2c263ce03d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 20:07:49 +0000 Subject: [PATCH 054/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 318f25e910a..4ddf0921361 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d3de6af5d824821ab36a7648910ac22729e4dac3ea1673ef92335c73ba3dc4af.yml -openapi_spec_hash: 14ced5a7ced400ccd1628e3890189b0c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-70934da901922eb862da3aba05b17b42a13ca65fa88a89b7e0c4faa7326391ea.yml +openapi_spec_hash: 096257d75e7d5fefef56d88ee413eb23 config_hash: 9e096c169b43682069730a4291c62d4a From 32f2cbe4f2dc435273f4d6a3e9fb13a5152961c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 20:12:06 +0000 Subject: [PATCH 055/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4ddf0921361..68d620f902f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-70934da901922eb862da3aba05b17b42a13ca65fa88a89b7e0c4faa7326391ea.yml -openapi_spec_hash: 096257d75e7d5fefef56d88ee413eb23 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c99d34533c8cdde024271eeff63042f5978c930937de5e80257eac7d4ef3921.yml +openapi_spec_hash: f2291b7d2c763855a8a43c60c220dce1 config_hash: 9e096c169b43682069730a4291c62d4a From e6f498428ae7ab3b4639b918fd6102efbe2bb1dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 21:18:30 +0000 Subject: [PATCH 056/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 68d620f902f..f24c7ec8380 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c99d34533c8cdde024271eeff63042f5978c930937de5e80257eac7d4ef3921.yml -openapi_spec_hash: f2291b7d2c763855a8a43c60c220dce1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d6e8b85dc53b760548a67deef36714a2b22efcef27bda10255faf638629b9309.yml +openapi_spec_hash: ddf39a8be15f726b54505c5257add3c7 config_hash: 9e096c169b43682069730a4291c62d4a From b77ac30f10d65a1ebecbf2b9ed732e58aa6dc07a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 21:20:48 +0000 Subject: [PATCH 057/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f24c7ec8380..265f5295a44 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d6e8b85dc53b760548a67deef36714a2b22efcef27bda10255faf638629b9309.yml -openapi_spec_hash: ddf39a8be15f726b54505c5257add3c7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bec04dbc197f2b185830494be1b742d18b970817908ae2b09a1fc2dcbea1cafa.yml +openapi_spec_hash: 96ae4d868754cdb37936275c63a21c70 config_hash: 9e096c169b43682069730a4291c62d4a From 3743d115c0bb94b6940a4803e8dfb695541084f3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 23:12:55 +0000 Subject: [PATCH 058/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 265f5295a44..cec1e3a50f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bec04dbc197f2b185830494be1b742d18b970817908ae2b09a1fc2dcbea1cafa.yml -openapi_spec_hash: 96ae4d868754cdb37936275c63a21c70 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-adc0ed694f51384aff0ba5b6c04741694904404ffa5547663afa13b1d230e6dd.yml +openapi_spec_hash: 5bb4adaa614e8fcc772ed7180970e02a config_hash: 9e096c169b43682069730a4291c62d4a From a8296bed25cf9ed3a5d5137ee82570b26d48ab66 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 23:15:02 +0000 Subject: [PATCH 059/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cec1e3a50f1..aeceaa78651 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-adc0ed694f51384aff0ba5b6c04741694904404ffa5547663afa13b1d230e6dd.yml -openapi_spec_hash: 5bb4adaa614e8fcc772ed7180970e02a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c29b1d214b6a4e76e2ced67db66c4790d4e087506ad9cb94893bfc799d4e46c.yml +openapi_spec_hash: 6dfa5d19b8e15737b8b54db21fff9c57 config_hash: 9e096c169b43682069730a4291c62d4a From 752214a92fd8af7aab0835f97994d5d762d3e9a2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 00:13:44 +0000 Subject: [PATCH 060/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index aeceaa78651..7745ea7b58b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c29b1d214b6a4e76e2ced67db66c4790d4e087506ad9cb94893bfc799d4e46c.yml -openapi_spec_hash: 6dfa5d19b8e15737b8b54db21fff9c57 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6ce9e39e60d3c345a61172a18384864abbdb7451cb1dba283f50598889d49a3c.yml +openapi_spec_hash: 7c7bfd44f65a34e81d5c446247f0a9bf config_hash: 9e096c169b43682069730a4291c62d4a From 79324cb61fb04c0423284f16d17e5bdaf03772a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 00:15:59 +0000 Subject: [PATCH 061/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7745ea7b58b..d7c97d71aa4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6ce9e39e60d3c345a61172a18384864abbdb7451cb1dba283f50598889d49a3c.yml -openapi_spec_hash: 7c7bfd44f65a34e81d5c446247f0a9bf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-73c9cb18e9d579ddfa8a6f0350c406b16d080f9754e0a9f47b335a36687b0cb8.yml +openapi_spec_hash: 6cbd9d58b303124692ff3b7c80cefc50 config_hash: 9e096c169b43682069730a4291c62d4a From 138db78218d9da5bfc2722cd108ecadda6f76848 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 06:08:54 +0000 Subject: [PATCH 062/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d7c97d71aa4..4ddf0921361 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-73c9cb18e9d579ddfa8a6f0350c406b16d080f9754e0a9f47b335a36687b0cb8.yml -openapi_spec_hash: 6cbd9d58b303124692ff3b7c80cefc50 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-70934da901922eb862da3aba05b17b42a13ca65fa88a89b7e0c4faa7326391ea.yml +openapi_spec_hash: 096257d75e7d5fefef56d88ee413eb23 config_hash: 9e096c169b43682069730a4291c62d4a From bc47aad628e38f808c98051ca4ed5ce97217228e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 06:11:22 +0000 Subject: [PATCH 063/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4ddf0921361..7faa31a622d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-70934da901922eb862da3aba05b17b42a13ca65fa88a89b7e0c4faa7326391ea.yml -openapi_spec_hash: 096257d75e7d5fefef56d88ee413eb23 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db2f9d242d107deab5e4d69d606bd54ebd003e54e94156f136ca1324df334c7f.yml +openapi_spec_hash: bdf1d4cf0ae9861c64a4c4b22e551924 config_hash: 9e096c169b43682069730a4291c62d4a From a3a9ea6f95761d5bcbbbdfd914a03fa808dc5e3f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 09:33:37 +0000 Subject: [PATCH 064/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7faa31a622d..b030dd3e6da 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db2f9d242d107deab5e4d69d606bd54ebd003e54e94156f136ca1324df334c7f.yml -openapi_spec_hash: bdf1d4cf0ae9861c64a4c4b22e551924 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-da85a5e0c248a58ff0d95db4bc77e6be504fb63f8b8dcb4e65c9453f1f767152.yml +openapi_spec_hash: a6b2a5b6bf529bf25b8f80857c2911b2 config_hash: 9e096c169b43682069730a4291c62d4a From 82742219e92b515cbf4944a1db77f8bcec1ff1a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 12:29:25 +0000 Subject: [PATCH 065/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b030dd3e6da..48fd2f3e263 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-da85a5e0c248a58ff0d95db4bc77e6be504fb63f8b8dcb4e65c9453f1f767152.yml -openapi_spec_hash: a6b2a5b6bf529bf25b8f80857c2911b2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4d71d3db7336587e78774cdb927c53c8646be019bbb032201ff198b4fd9ea707.yml +openapi_spec_hash: 44c405a3d4cda9f2bd55686bef79f3e2 config_hash: 9e096c169b43682069730a4291c62d4a From 9b1a0da727007f998cf5961d7297038887a793c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:38:42 +0000 Subject: [PATCH 066/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 48fd2f3e263..cb39a576f97 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4d71d3db7336587e78774cdb927c53c8646be019bbb032201ff198b4fd9ea707.yml -openapi_spec_hash: 44c405a3d4cda9f2bd55686bef79f3e2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a359f271891b014c73c3d4d342f22abfbeb36bd8eb66dbdcb951fa02c91b9a04.yml +openapi_spec_hash: 6c9b7d296ddc8265a5f7894f15207dcd config_hash: 9e096c169b43682069730a4291c62d4a From 5e53e668ddb9fe5809a5796c3762847de8422cbb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:49:20 +0000 Subject: [PATCH 067/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cb39a576f97..78952bf779f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a359f271891b014c73c3d4d342f22abfbeb36bd8eb66dbdcb951fa02c91b9a04.yml -openapi_spec_hash: 6c9b7d296ddc8265a5f7894f15207dcd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e341e6b99986a582a6f62a91df3c195578789a1449725c1992e7baab9968b7cd.yml +openapi_spec_hash: 18e1d9b29fed67b1c2eefc4033727028 config_hash: 9e096c169b43682069730a4291c62d4a From 8619b77b0af91d6fd95a00991a3d3e146f0df5bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:54:22 +0000 Subject: [PATCH 068/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 78952bf779f..c3768fb1676 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e341e6b99986a582a6f62a91df3c195578789a1449725c1992e7baab9968b7cd.yml -openapi_spec_hash: 18e1d9b29fed67b1c2eefc4033727028 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-38118aeb8d98024487e7ed131f71513d92cc2755d1fa142e0595a8f16da253f7.yml +openapi_spec_hash: ac59cca36c7c1984186692bead828e03 config_hash: 9e096c169b43682069730a4291c62d4a From 2bf9737af8db398d3e00c9ddb3f67d0c9527491f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:31:07 +0000 Subject: [PATCH 069/392] feat(api): api update --- .stats.yml | 4 ++-- .../gateway/gateway_configuration_settings.py | 12 +----------- .../gateway/gateway_configuration_settings_param.py | 13 ++----------- .../zero_trust/gateway/test_configurations.py | 4 ---- 4 files changed, 5 insertions(+), 28 deletions(-) diff --git a/.stats.yml b/.stats.yml index c3768fb1676..975ab24fac2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-38118aeb8d98024487e7ed131f71513d92cc2755d1fa142e0595a8f16da253f7.yml -openapi_spec_hash: ac59cca36c7c1984186692bead828e03 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d66cccbb6e68a04a563b4b97948a510c4575857b8ca14bd89490ad4a67dfcf98.yml +openapi_spec_hash: 64ed30f8af381273583738989e6019bc config_hash: 9e096c169b43682069730a4291c62d4a diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py index 33632f6afc7..147a995e673 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py @@ -3,8 +3,6 @@ from typing import Optional from typing_extensions import Literal -from pydantic import Field as FieldInfo - from ...._models import BaseModel from .tls_settings import TLSSettings from .fips_settings import FipsSettings @@ -17,12 +15,7 @@ from .browser_isolation_settings import BrowserIsolationSettings from .custom_certificate_settings import CustomCertificateSettings -__all__ = ["GatewayConfigurationSettings", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"] - - -class AppControlSettings(BaseModel): - enabled: Optional[bool] = None - """Enable App Control""" +__all__ = ["GatewayConfigurationSettings", "Certificate", "HostSelector", "Sandbox"] class Certificate(BaseModel): @@ -54,9 +47,6 @@ class GatewayConfigurationSettings(BaseModel): antivirus: Optional[AntiVirusSettings] = None """Anti-virus settings.""" - app_control_settings: Optional[AppControlSettings] = FieldInfo(alias="app-control-settings", default=None) - """Setting to enable App Control""" - block_page: Optional[BlockPageSettings] = None """Block page layout settings.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py index b3d391ed319..3e9c6571c5a 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py @@ -3,9 +3,8 @@ from __future__ import annotations from typing import Optional -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Literal, Required, TypedDict -from ...._utils import PropertyInfo from .tls_settings_param import TLSSettingsParam from .fips_settings_param import FipsSettingsParam from .protocol_detection_param import ProtocolDetectionParam @@ -17,12 +16,7 @@ from .browser_isolation_settings_param import BrowserIsolationSettingsParam from .custom_certificate_settings_param import CustomCertificateSettingsParam -__all__ = ["GatewayConfigurationSettingsParam", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"] - - -class AppControlSettings(TypedDict, total=False): - enabled: bool - """Enable App Control""" +__all__ = ["GatewayConfigurationSettingsParam", "Certificate", "HostSelector", "Sandbox"] class Certificate(TypedDict, total=False): @@ -54,9 +48,6 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False): antivirus: Optional[AntiVirusSettingsParam] """Anti-virus settings.""" - app_control_settings: Annotated[Optional[AppControlSettings], PropertyInfo(alias="app-control-settings")] - """Setting to enable App Control""" - block_page: Optional[BlockPageSettingsParam] """Block page layout settings.""" diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index a9125bee543..0989237e3b7 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -45,7 +45,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "support_url": "support_url", }, }, - "app_control_settings": {"enabled": False}, "block_page": { "background_color": "background_color", "enabled": True, @@ -138,7 +137,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "support_url": "support_url", }, }, - "app_control_settings": {"enabled": False}, "block_page": { "background_color": "background_color", "enabled": True, @@ -275,7 +273,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "support_url": "support_url", }, }, - "app_control_settings": {"enabled": False}, "block_page": { "background_color": "background_color", "enabled": True, @@ -368,7 +365,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "support_url": "support_url", }, }, - "app_control_settings": {"enabled": False}, "block_page": { "background_color": "background_color", "enabled": True, From b69ea15d68e8c44710572d834c5a363102a9a2ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:33:26 +0000 Subject: [PATCH 070/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 975ab24fac2..c7ccb4a5e52 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d66cccbb6e68a04a563b4b97948a510c4575857b8ca14bd89490ad4a67dfcf98.yml -openapi_spec_hash: 64ed30f8af381273583738989e6019bc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-01e4580b68e733092b0f1d47da05225ee0e66993968786fe047bab4715605ee5.yml +openapi_spec_hash: 6290eb2355f5e7033eeb6aa4f2708aef config_hash: 9e096c169b43682069730a4291c62d4a From 35bd023906234ace4bade2ac870267b58f532322 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 17:16:01 +0000 Subject: [PATCH 071/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c7ccb4a5e52..bd5d46e2f1b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-01e4580b68e733092b0f1d47da05225ee0e66993968786fe047bab4715605ee5.yml -openapi_spec_hash: 6290eb2355f5e7033eeb6aa4f2708aef +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b45da271fede9a1b0d86e7214a1929d4c58185a7ba4a13b81dbc810ae28bc946.yml +openapi_spec_hash: 12c96c5a3be55ca50041304e4fa879cb config_hash: 9e096c169b43682069730a4291c62d4a From d78e2ac9e6f05d25eca0d1cf1e65031c3fd914e1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:03:19 +0000 Subject: [PATCH 072/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bd5d46e2f1b..809a27c92af 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b45da271fede9a1b0d86e7214a1929d4c58185a7ba4a13b81dbc810ae28bc946.yml openapi_spec_hash: 12c96c5a3be55ca50041304e4fa879cb -config_hash: 9e096c169b43682069730a4291c62d4a +config_hash: 3638b66b63ea825ab6a770e729104836 From ba49769e7117a3d318bcd04487ed547a388f8c8e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:06:06 +0000 Subject: [PATCH 073/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 809a27c92af..6423dc9abd0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b45da271fede9a1b0d86e7214a1929d4c58185a7ba4a13b81dbc810ae28bc946.yml -openapi_spec_hash: 12c96c5a3be55ca50041304e4fa879cb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-92ecd398f18b65eff60080117a9e72a330dc59e34f31f63f7e860130be19dd37.yml +openapi_spec_hash: 79c5a29b646a18da296d1a15fa1c35e6 config_hash: 3638b66b63ea825ab6a770e729104836 From 29baf9df0861d423200decae28ab7b79647bbe7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:09:52 +0000 Subject: [PATCH 074/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6423dc9abd0..c6d72e4cdf4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-92ecd398f18b65eff60080117a9e72a330dc59e34f31f63f7e860130be19dd37.yml -openapi_spec_hash: 79c5a29b646a18da296d1a15fa1c35e6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080494be93b05a9ea5b7909a3fc8d312557479a2768fca5c655b5ddc61b16ee.yml +openapi_spec_hash: 94c0a35e53a85e422689d55816be30b4 config_hash: 3638b66b63ea825ab6a770e729104836 From 835ee91a4b0cc7e60ccbef67dc49f6f871efe3b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:14:35 +0000 Subject: [PATCH 075/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6d72e4cdf4..25dba73b59d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080494be93b05a9ea5b7909a3fc8d312557479a2768fca5c655b5ddc61b16ee.yml -openapi_spec_hash: 94c0a35e53a85e422689d55816be30b4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c667925e3595b576306158090003d728469b395646462047d2f28c2632fe5371.yml +openapi_spec_hash: d4753462069b3cd387f2e15049140387 config_hash: 3638b66b63ea825ab6a770e729104836 From fd9a98d4f94798cdda97cf1ce50c29ac020bc10a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:28:06 +0000 Subject: [PATCH 076/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 25dba73b59d..c6d72e4cdf4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c667925e3595b576306158090003d728469b395646462047d2f28c2632fe5371.yml -openapi_spec_hash: d4753462069b3cd387f2e15049140387 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080494be93b05a9ea5b7909a3fc8d312557479a2768fca5c655b5ddc61b16ee.yml +openapi_spec_hash: 94c0a35e53a85e422689d55816be30b4 config_hash: 3638b66b63ea825ab6a770e729104836 From b299ce24e4a9df3c24178851b9b774af2dd108e3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:30:18 +0000 Subject: [PATCH 077/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6d72e4cdf4..b50cc4186cd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080494be93b05a9ea5b7909a3fc8d312557479a2768fca5c655b5ddc61b16ee.yml -openapi_spec_hash: 94c0a35e53a85e422689d55816be30b4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ced28b0ffe2aa275d2e1e7ccfc010a25e8c5484ab61bfa5fcd395dcbec7e352b.yml +openapi_spec_hash: 1d705e23ba7bd7ad4243800b0adfc7df config_hash: 3638b66b63ea825ab6a770e729104836 From 601cb978b6a51892cb5954f61f5e2328ac616bfa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:32:41 +0000 Subject: [PATCH 078/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b50cc4186cd..6819f6c60b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ced28b0ffe2aa275d2e1e7ccfc010a25e8c5484ab61bfa5fcd395dcbec7e352b.yml -openapi_spec_hash: 1d705e23ba7bd7ad4243800b0adfc7df +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6adef39d4e3b845daad61a5a30a5d200af25304ced651c2f93eb5b1b75d523f0.yml +openapi_spec_hash: a917d7a20e48e89936a371612d589f5e config_hash: 3638b66b63ea825ab6a770e729104836 From 639265a5a472b628101f825f042fc834014a705f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 21:27:56 +0000 Subject: [PATCH 079/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6819f6c60b3..582db8d6e22 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6adef39d4e3b845daad61a5a30a5d200af25304ced651c2f93eb5b1b75d523f0.yml -openapi_spec_hash: a917d7a20e48e89936a371612d589f5e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae4bf24b1b318c1c3ffec8cb29de7efb19993fe579e3614d7a35597ad9254e4b.yml +openapi_spec_hash: dd7adf375f6eaacd9f9629a587b06725 config_hash: 3638b66b63ea825ab6a770e729104836 From 2db13725eee719e74f8e4c1b9d07b46517ac8ca5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 21:30:09 +0000 Subject: [PATCH 080/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 582db8d6e22..5da4b00270c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae4bf24b1b318c1c3ffec8cb29de7efb19993fe579e3614d7a35597ad9254e4b.yml -openapi_spec_hash: dd7adf375f6eaacd9f9629a587b06725 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d2cf625552bb02e129bccd3e3d2920e4c9224ab3a1cd5c8f011a06be268fa9ef.yml +openapi_spec_hash: b402fe5a97a55834eed6d948370d590f config_hash: 3638b66b63ea825ab6a770e729104836 From 3a5e37a3e6e0cc23b07732bfcbac74fbff21933b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 23:24:33 +0000 Subject: [PATCH 081/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5da4b00270c..ddfc641f501 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d2cf625552bb02e129bccd3e3d2920e4c9224ab3a1cd5c8f011a06be268fa9ef.yml -openapi_spec_hash: b402fe5a97a55834eed6d948370d590f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6ccff587761cbff8646c095027b068a240aa08d9fa2a982c2dc9dbc124e629e6.yml +openapi_spec_hash: baecd2a5b389b2e94744455c7e3ed543 config_hash: 3638b66b63ea825ab6a770e729104836 From a8d5fa19cd97e3e3eb1b696ef56e34ff99c0c43a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 23:26:54 +0000 Subject: [PATCH 082/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ddfc641f501..d5151cc2d6c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6ccff587761cbff8646c095027b068a240aa08d9fa2a982c2dc9dbc124e629e6.yml -openapi_spec_hash: baecd2a5b389b2e94744455c7e3ed543 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a4fb0e05ae35f1acaa110d8b3bf80850118b8175857500b4f9435cbf422359a.yml +openapi_spec_hash: a24522aeb0353456fb342db4e8cc613f config_hash: 3638b66b63ea825ab6a770e729104836 From a916b7e9694d827c278401c3222596dca2d244b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 06:11:47 +0000 Subject: [PATCH 083/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d5151cc2d6c..c6d72e4cdf4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a4fb0e05ae35f1acaa110d8b3bf80850118b8175857500b4f9435cbf422359a.yml -openapi_spec_hash: a24522aeb0353456fb342db4e8cc613f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080494be93b05a9ea5b7909a3fc8d312557479a2768fca5c655b5ddc61b16ee.yml +openapi_spec_hash: 94c0a35e53a85e422689d55816be30b4 config_hash: 3638b66b63ea825ab6a770e729104836 From 94cdb6585bc1a3979ee44ae81149068dee6029ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 06:13:58 +0000 Subject: [PATCH 084/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6d72e4cdf4..f321168757e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080494be93b05a9ea5b7909a3fc8d312557479a2768fca5c655b5ddc61b16ee.yml -openapi_spec_hash: 94c0a35e53a85e422689d55816be30b4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a201a0b95ef9694a68b539c154e2f8af9403e69c2a76a96c23da678a5cf63c53.yml +openapi_spec_hash: c16687b3d3c29c614112df5cd8c6e925 config_hash: 3638b66b63ea825ab6a770e729104836 From 695cb14ae8b9e0269a726604cbccb35646cc440e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 09:08:00 +0000 Subject: [PATCH 085/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f321168757e..ad7b15cb80e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a201a0b95ef9694a68b539c154e2f8af9403e69c2a76a96c23da678a5cf63c53.yml -openapi_spec_hash: c16687b3d3c29c614112df5cd8c6e925 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8a7ce4f68df26a83bd19468c74188753cf389273d4101dc59d116c6fca64838.yml +openapi_spec_hash: 6b7f2df36a4d80206a47eb4b07d71dae config_hash: 3638b66b63ea825ab6a770e729104836 From 4d31720a5f8fc0c46021778f23b09cbc69478df8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 09:10:19 +0000 Subject: [PATCH 086/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ad7b15cb80e..b2f1d874837 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8a7ce4f68df26a83bd19468c74188753cf389273d4101dc59d116c6fca64838.yml -openapi_spec_hash: 6b7f2df36a4d80206a47eb4b07d71dae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3bc6b65d629a866d64b39350a583179299328b8fe73eb212fc7fd4c67fbc83c3.yml +openapi_spec_hash: 6275054e9962f29189cb31f9fe6369ca config_hash: 3638b66b63ea825ab6a770e729104836 From 4a6b563a3b9f557a767a6fb6246cccad2cdb0aa7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 11:27:17 +0000 Subject: [PATCH 087/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b2f1d874837..756f3746549 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3bc6b65d629a866d64b39350a583179299328b8fe73eb212fc7fd4c67fbc83c3.yml -openapi_spec_hash: 6275054e9962f29189cb31f9fe6369ca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9dc17a506c1df867a77569a5cffa0e6e9eb2941d4f1f7c88b64bb01fad1e33b2.yml +openapi_spec_hash: 4bd3256c9da0d34eaa03ae6ab22cba99 config_hash: 3638b66b63ea825ab6a770e729104836 From 002726f52c571ede35e4d586bfe05cd17d1fb13f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 11:29:38 +0000 Subject: [PATCH 088/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 756f3746549..4e7a1ee49aa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9dc17a506c1df867a77569a5cffa0e6e9eb2941d4f1f7c88b64bb01fad1e33b2.yml -openapi_spec_hash: 4bd3256c9da0d34eaa03ae6ab22cba99 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a22046d4a9b5e5e9b36331de4dea5ba429451df690271adfadc375b5090cb8eb.yml +openapi_spec_hash: faae6fa6426ea9f96c4e9d2aaba4e2fa config_hash: 3638b66b63ea825ab6a770e729104836 From 204472a14de7697bf8e1d2a5afe6f28f9d9b8e4d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 11:44:47 +0000 Subject: [PATCH 089/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4e7a1ee49aa..c6d72e4cdf4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a22046d4a9b5e5e9b36331de4dea5ba429451df690271adfadc375b5090cb8eb.yml -openapi_spec_hash: faae6fa6426ea9f96c4e9d2aaba4e2fa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080494be93b05a9ea5b7909a3fc8d312557479a2768fca5c655b5ddc61b16ee.yml +openapi_spec_hash: 94c0a35e53a85e422689d55816be30b4 config_hash: 3638b66b63ea825ab6a770e729104836 From 8894476efeb0b8ccee54bc4fe5cc946425bb00c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:00:30 +0000 Subject: [PATCH 090/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6d72e4cdf4..f3c02f4c520 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080494be93b05a9ea5b7909a3fc8d312557479a2768fca5c655b5ddc61b16ee.yml -openapi_spec_hash: 94c0a35e53a85e422689d55816be30b4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1409db7dd8a8b59d833af4f09b7353c565a205b840e6ff4e694702cf5686d8d2.yml +openapi_spec_hash: 4d5df642952f0e402551b5066ce30b41 config_hash: 3638b66b63ea825ab6a770e729104836 From 4a5401e71bad4956c677d91dd17da53283e17bf4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:13:22 +0000 Subject: [PATCH 091/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f3c02f4c520..bd8da6ea872 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1409db7dd8a8b59d833af4f09b7353c565a205b840e6ff4e694702cf5686d8d2.yml -openapi_spec_hash: 4d5df642952f0e402551b5066ce30b41 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6d04193013f3bca4f9030482ae5dcdac989bf669a5eb16ca7704962e68ed429.yml +openapi_spec_hash: 13d91ceaf866ae973047a549b0f96908 config_hash: 3638b66b63ea825ab6a770e729104836 From d4a0f2b0fca5371629338a996c81b2a5c60f2e91 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 14:59:17 +0000 Subject: [PATCH 092/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bd8da6ea872..028652ecb64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6d04193013f3bca4f9030482ae5dcdac989bf669a5eb16ca7704962e68ed429.yml -openapi_spec_hash: 13d91ceaf866ae973047a549b0f96908 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91c68e11008e79ba229f5fa091964709bf55870b4ee9f24d7205dca88eaf15f4.yml +openapi_spec_hash: cef77eba54a04db771bd48c221b1ec10 config_hash: 3638b66b63ea825ab6a770e729104836 From 211ddfcf9176cf778d6de310817ee01194f6844e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:22:09 +0000 Subject: [PATCH 093/392] feat(api): api update --- .stats.yml | 4 ++-- .../types/cloudforce_one/threat_event_create_response.py | 2 -- .../types/cloudforce_one/threat_event_edit_response.py | 2 -- .../types/cloudforce_one/threat_event_get_response.py | 2 -- .../types/cloudforce_one/threat_event_list_response.py | 2 -- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 028652ecb64..390288af570 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91c68e11008e79ba229f5fa091964709bf55870b4ee9f24d7205dca88eaf15f4.yml -openapi_spec_hash: cef77eba54a04db771bd48c221b1ec10 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68f3cc9a7565e1f19d566051cf708a3b6d96a589d640d03f9c11ec8f0b1faa5e.yml +openapi_spec_hash: 0c0a591ea8213f5556dee68ac0651b90 config_hash: 3638b66b63ea825ab6a770e729104836 diff --git a/src/cloudflare/types/cloudforce_one/threat_event_create_response.py b/src/cloudflare/types/cloudforce_one/threat_event_create_response.py index 4295255b079..4481584c481 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_create_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_create_response.py @@ -20,8 +20,6 @@ class ThreatEventCreateResponse(BaseModel): category: str - category_id: float = FieldInfo(alias="categoryId") - date: str event: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py b/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py index d231b5a963b..aea29555fc7 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_edit_response.py @@ -20,8 +20,6 @@ class ThreatEventEditResponse(BaseModel): category: str - category_id: float = FieldInfo(alias="categoryId") - date: str event: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_get_response.py b/src/cloudflare/types/cloudforce_one/threat_event_get_response.py index 93a44b230ec..7f78c9ea9e6 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_get_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_get_response.py @@ -20,8 +20,6 @@ class ThreatEventGetResponse(BaseModel): category: str - category_id: float = FieldInfo(alias="categoryId") - date: str event: str diff --git a/src/cloudflare/types/cloudforce_one/threat_event_list_response.py b/src/cloudflare/types/cloudforce_one/threat_event_list_response.py index 4c7c2b691ad..111bbd14aae 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_list_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_list_response.py @@ -21,8 +21,6 @@ class ThreatEventListResponseItem(BaseModel): category: str - category_id: float = FieldInfo(alias="categoryId") - date: str event: str From 23fcd79088e96b67266546ce696c2d88d6cd2b70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:24:37 +0000 Subject: [PATCH 094/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 390288af570..cdcb1da6214 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-68f3cc9a7565e1f19d566051cf708a3b6d96a589d640d03f9c11ec8f0b1faa5e.yml -openapi_spec_hash: 0c0a591ea8213f5556dee68ac0651b90 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e0150846da617451f0dc5aff338e0c20215dcf2507dc1a3c889e1d5d5bda317b.yml +openapi_spec_hash: 28d0894d131291bf2370d2940f595b23 config_hash: 3638b66b63ea825ab6a770e729104836 From cca2c326bcdbd0924a3c32b03f3d9ab5623ebe63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:30:59 +0000 Subject: [PATCH 095/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cdcb1da6214..c898aa5fe6a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e0150846da617451f0dc5aff338e0c20215dcf2507dc1a3c889e1d5d5bda317b.yml -openapi_spec_hash: 28d0894d131291bf2370d2940f595b23 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6f415778aca76189fe9ddebb99060c936ecbb2e7143f0f50693a52b78b31198.yml +openapi_spec_hash: 10d7307213405688d8b011de684401cb config_hash: 3638b66b63ea825ab6a770e729104836 From a437f581e56a08f87c9509dcd150c295931ee245 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:33:21 +0000 Subject: [PATCH 096/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c898aa5fe6a..04fb2358be1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6f415778aca76189fe9ddebb99060c936ecbb2e7143f0f50693a52b78b31198.yml -openapi_spec_hash: 10d7307213405688d8b011de684401cb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7eecc1e5a75fcd319c74067c2db0220e829e1ee4a0596a8712c27cac22735c40.yml +openapi_spec_hash: 6a42b6ec6570beb963776d32bfe1bf2c config_hash: 3638b66b63ea825ab6a770e729104836 From 40f82c07b99ce68024104124bcc54d84c41e2cc8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:53:10 +0000 Subject: [PATCH 097/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 04fb2358be1..98e7eaeb461 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7eecc1e5a75fcd319c74067c2db0220e829e1ee4a0596a8712c27cac22735c40.yml -openapi_spec_hash: 6a42b6ec6570beb963776d32bfe1bf2c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00c1dcccfd2527174e7982f568d3efb2d6d7d53e072da0d6b2c0b21c418996d6.yml +openapi_spec_hash: 5096c78955104c32ab5971d5dee33a61 config_hash: 3638b66b63ea825ab6a770e729104836 From e5e4e7273f7f49eedd8f75fba7d88f6d58e85b63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:55:26 +0000 Subject: [PATCH 098/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 98e7eaeb461..c8895550c94 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00c1dcccfd2527174e7982f568d3efb2d6d7d53e072da0d6b2c0b21c418996d6.yml -openapi_spec_hash: 5096c78955104c32ab5971d5dee33a61 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba39266e525fd940251fb354f87a29849939d87a2bdff9568b3bf0185b1a91a9.yml +openapi_spec_hash: 7373bb7ea141c1a9c5ea4932d760d1f4 config_hash: 3638b66b63ea825ab6a770e729104836 From 93b79ebf6390cac8ae44cdac5c9365f0b4476098 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:16:27 +0000 Subject: [PATCH 099/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c8895550c94..6e195152d7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba39266e525fd940251fb354f87a29849939d87a2bdff9568b3bf0185b1a91a9.yml -openapi_spec_hash: 7373bb7ea141c1a9c5ea4932d760d1f4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8fcab185d7535e99f17098c2b6408f56da36353ee06be9e9632e800c7f0b0651.yml +openapi_spec_hash: ec02a9aae2abfc09df63c8cabd292d14 config_hash: 3638b66b63ea825ab6a770e729104836 From 540dac322efec10dd9275d0b778541ab065350cf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:18:54 +0000 Subject: [PATCH 100/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6e195152d7b..1207823b411 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8fcab185d7535e99f17098c2b6408f56da36353ee06be9e9632e800c7f0b0651.yml -openapi_spec_hash: ec02a9aae2abfc09df63c8cabd292d14 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-23528d4e5b2612372f502a17fddc73d6838fbe33b4858addce96b5ce30734344.yml +openapi_spec_hash: b537036f40b8b22df4279e5011a0c908 config_hash: 3638b66b63ea825ab6a770e729104836 From 7a5bc7f427629db69797882f9ec902ed8168b55e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:21:28 +0000 Subject: [PATCH 101/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1207823b411..deb34bf1a3e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-23528d4e5b2612372f502a17fddc73d6838fbe33b4858addce96b5ce30734344.yml -openapi_spec_hash: b537036f40b8b22df4279e5011a0c908 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bba1601d2e3e02c77025a0ee3811a75e70432c9cc8a938679555e412dfaa031f.yml +openapi_spec_hash: 255519aded8ac6fe5b0105bfae2e9bdd config_hash: 3638b66b63ea825ab6a770e729104836 From 685df2c324506c73d42df147cd1c28a97ecb0cb4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:04:48 +0000 Subject: [PATCH 102/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index deb34bf1a3e..7e2c56777cb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bba1601d2e3e02c77025a0ee3811a75e70432c9cc8a938679555e412dfaa031f.yml -openapi_spec_hash: 255519aded8ac6fe5b0105bfae2e9bdd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5ccac92d493bcce2b0fca1a3ec459695ec3252e37d63ef66f2db34397bb0db1a.yml +openapi_spec_hash: f2eae47824fee247ab66e833b02674d7 config_hash: 3638b66b63ea825ab6a770e729104836 From 4a75ab8bf8690dc9b7f3c682eb20f3713c4207cd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:07:14 +0000 Subject: [PATCH 103/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7e2c56777cb..8ee4900c599 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5ccac92d493bcce2b0fca1a3ec459695ec3252e37d63ef66f2db34397bb0db1a.yml -openapi_spec_hash: f2eae47824fee247ab66e833b02674d7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5c1ed5936a04820b15f8d97ec4be0522dda9da07233a80013ec5dbe109a3b4c.yml +openapi_spec_hash: cf5aaa763029cfad7b24014130e20a7b config_hash: 3638b66b63ea825ab6a770e729104836 From 50a5c7e0abdef4d4064472c3f38c322b5f47cd50 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:09:32 +0000 Subject: [PATCH 104/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8ee4900c599..4602eff85de 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5c1ed5936a04820b15f8d97ec4be0522dda9da07233a80013ec5dbe109a3b4c.yml -openapi_spec_hash: cf5aaa763029cfad7b24014130e20a7b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-81772bedd3ba0f08ca58bc417950a99109f9e117621b0a4b0caac32148337edf.yml +openapi_spec_hash: e08b1f2b42d10b39471a6dcab294c6f7 config_hash: 3638b66b63ea825ab6a770e729104836 From 8d5c34205be96e14a4ce41521a3c7409d075fff4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:57:05 +0000 Subject: [PATCH 105/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4602eff85de..feb6520f905 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-81772bedd3ba0f08ca58bc417950a99109f9e117621b0a4b0caac32148337edf.yml -openapi_spec_hash: e08b1f2b42d10b39471a6dcab294c6f7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e22b1754d3420c20bf1b0114b3dde0ca22512f13321455d089b8250f57472054.yml +openapi_spec_hash: ad117e623b45de231a825003f0ad89c2 config_hash: 3638b66b63ea825ab6a770e729104836 From dab268e72d894a654226f00b4b2801b067278ffe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:59:26 +0000 Subject: [PATCH 106/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index feb6520f905..df073fd3763 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e22b1754d3420c20bf1b0114b3dde0ca22512f13321455d089b8250f57472054.yml -openapi_spec_hash: ad117e623b45de231a825003f0ad89c2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad090764c228f1c55e39edb4b87489c763fde8bf4db1a4888b5032731b188abc.yml +openapi_spec_hash: c6765a3f9cf5c7531ecf7bebebd0e94f config_hash: 3638b66b63ea825ab6a770e729104836 From 0eb468df443036166c0640d3b24d672fd930e20f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 18:02:32 +0000 Subject: [PATCH 107/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index df073fd3763..6d5c36376c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad090764c228f1c55e39edb4b87489c763fde8bf4db1a4888b5032731b188abc.yml -openapi_spec_hash: c6765a3f9cf5c7531ecf7bebebd0e94f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f3e42a1e6e513f6760a7cf166fb11d894b92cdc0a58a69c981bb892c99878351.yml +openapi_spec_hash: 8a6697b2a09832f2eb1bdd14a8b79c4a config_hash: 3638b66b63ea825ab6a770e729104836 From c880ed21f2d9125d08a84035321462a0c62b0afe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 19:32:47 +0000 Subject: [PATCH 108/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6d5c36376c7..261d53683af 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f3e42a1e6e513f6760a7cf166fb11d894b92cdc0a58a69c981bb892c99878351.yml -openapi_spec_hash: 8a6697b2a09832f2eb1bdd14a8b79c4a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1085f96a3f10071c41ec9bf9d00c11d76e323ad4b129a5fc5ec2315e04d57749.yml +openapi_spec_hash: 84600b9fc2cc720fb4c024d3d1602fa2 config_hash: 3638b66b63ea825ab6a770e729104836 From 63c4b80e212542aa71393806854fd8e4b2f97b65 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 19:35:23 +0000 Subject: [PATCH 109/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 261d53683af..38cd55e5121 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1085f96a3f10071c41ec9bf9d00c11d76e323ad4b129a5fc5ec2315e04d57749.yml -openapi_spec_hash: 84600b9fc2cc720fb4c024d3d1602fa2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-773d6234a9a735fe7ab749fffa2c6132201c00256b4a8a67ecdd9339f61fbdce.yml +openapi_spec_hash: c4c0fab1ccfb42fa7d23d4fc02739c6c config_hash: 3638b66b63ea825ab6a770e729104836 From f5209e5d59252be0741432fedf4894d2c80185eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 20:00:59 +0000 Subject: [PATCH 110/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 38cd55e5121..971ad9f6fdc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-773d6234a9a735fe7ab749fffa2c6132201c00256b4a8a67ecdd9339f61fbdce.yml -openapi_spec_hash: c4c0fab1ccfb42fa7d23d4fc02739c6c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-968b3292c77c608128673a72b76439289ce1a7331ebea75e488b0813ef87d405.yml +openapi_spec_hash: 524557493cb69cafbc7d15c5f08ce762 config_hash: 3638b66b63ea825ab6a770e729104836 From 9dfc3d6639cfaaeae7344466f0d088a6106b7b93 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:28:08 +0000 Subject: [PATCH 111/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 971ad9f6fdc..0725166bec7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-968b3292c77c608128673a72b76439289ce1a7331ebea75e488b0813ef87d405.yml -openapi_spec_hash: 524557493cb69cafbc7d15c5f08ce762 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0bbcf30a5f0f4adab9137040e0fec4258b210de9640f1e3b5cf32aa59fa6d8c1.yml +openapi_spec_hash: 4e70a20442a89618cdae7208f72634ef config_hash: 3638b66b63ea825ab6a770e729104836 From cb30380080f2d88778aa38515db9198484fabf25 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:50:58 +0000 Subject: [PATCH 112/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0725166bec7..b62e614dc4a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0bbcf30a5f0f4adab9137040e0fec4258b210de9640f1e3b5cf32aa59fa6d8c1.yml -openapi_spec_hash: 4e70a20442a89618cdae7208f72634ef +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ab136e7bc1eb52ec981aec86fcc57175d1512517813b2bb1b1ad5347e8a79df5.yml +openapi_spec_hash: 6ccd9306e6f3799dcae56dc4b8b07d7b config_hash: 3638b66b63ea825ab6a770e729104836 From 9853cfc80fae9f26fc76a4b4e0548c9642c71120 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:54:13 +0000 Subject: [PATCH 113/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b62e614dc4a..eed1cf159c2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ab136e7bc1eb52ec981aec86fcc57175d1512517813b2bb1b1ad5347e8a79df5.yml -openapi_spec_hash: 6ccd9306e6f3799dcae56dc4b8b07d7b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6588112f47f25ab1b947342bfc30854370192f46f61d728fe5f408f44ac733b3.yml +openapi_spec_hash: 2bc739c52d568d16d5f0768898336d54 config_hash: 3638b66b63ea825ab6a770e729104836 From fdf7bfdb362e782a64598a61034c6b73bb37be12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 23:41:13 +0000 Subject: [PATCH 114/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index eed1cf159c2..6df68906669 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6588112f47f25ab1b947342bfc30854370192f46f61d728fe5f408f44ac733b3.yml -openapi_spec_hash: 2bc739c52d568d16d5f0768898336d54 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19706cee8d6617008bcf5e8adb41233f05ebd19ba8c6934f36234c9dbbff2611.yml +openapi_spec_hash: 2d14cc640d64fbde306a1f2841419068 config_hash: 3638b66b63ea825ab6a770e729104836 From ec3e4ecc3c177d32d01522f8695667328dec6cc3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 23:43:31 +0000 Subject: [PATCH 115/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6df68906669..deb34bf1a3e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19706cee8d6617008bcf5e8adb41233f05ebd19ba8c6934f36234c9dbbff2611.yml -openapi_spec_hash: 2d14cc640d64fbde306a1f2841419068 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bba1601d2e3e02c77025a0ee3811a75e70432c9cc8a938679555e412dfaa031f.yml +openapi_spec_hash: 255519aded8ac6fe5b0105bfae2e9bdd config_hash: 3638b66b63ea825ab6a770e729104836 From 9003e002d55c9df86be2bb7274447167872bfbff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 06:11:26 +0000 Subject: [PATCH 116/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index deb34bf1a3e..c898aa5fe6a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bba1601d2e3e02c77025a0ee3811a75e70432c9cc8a938679555e412dfaa031f.yml -openapi_spec_hash: 255519aded8ac6fe5b0105bfae2e9bdd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6f415778aca76189fe9ddebb99060c936ecbb2e7143f0f50693a52b78b31198.yml +openapi_spec_hash: 10d7307213405688d8b011de684401cb config_hash: 3638b66b63ea825ab6a770e729104836 From 7d514d3eba028a0ad6ecba5b530f64c96d4180f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 09:23:36 +0000 Subject: [PATCH 117/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c898aa5fe6a..08f43caa488 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6f415778aca76189fe9ddebb99060c936ecbb2e7143f0f50693a52b78b31198.yml -openapi_spec_hash: 10d7307213405688d8b011de684401cb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b96027a3d3b3bd4347cbcddd48aceb66e7346aafe482665b572f974c74cae5f1.yml +openapi_spec_hash: f9883dd03232f6a9f1ce3401b45c75e1 config_hash: 3638b66b63ea825ab6a770e729104836 From 3b7e1538981a650ab5930e15941169231a02b33a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 10:57:37 +0000 Subject: [PATCH 118/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 08f43caa488..591a88fb866 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b96027a3d3b3bd4347cbcddd48aceb66e7346aafe482665b572f974c74cae5f1.yml -openapi_spec_hash: f9883dd03232f6a9f1ce3401b45c75e1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-caf8a61380400df01211533e1394edf01cf3651df960a470f37c8e37ea33d1f8.yml +openapi_spec_hash: 09ed9ea8e5027a48cacb6860cc063139 config_hash: 3638b66b63ea825ab6a770e729104836 From 2f03faec7c59c4dcea6503b6a4a322a62ced1b05 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 11:31:49 +0000 Subject: [PATCH 119/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 591a88fb866..118e45a7a7a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-caf8a61380400df01211533e1394edf01cf3651df960a470f37c8e37ea33d1f8.yml -openapi_spec_hash: 09ed9ea8e5027a48cacb6860cc063139 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b02ff7d1baf39c23c51ecf64bb3544b2bc7a0239082cfb46ad02ecb3fe6b67d6.yml +openapi_spec_hash: 5bf79360e380ac890e19f54ce4e867d3 config_hash: 3638b66b63ea825ab6a770e729104836 From f2f1f4b095115b85755b96a7b1f26a1efab390d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 13:54:25 +0000 Subject: [PATCH 120/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 118e45a7a7a..591a88fb866 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b02ff7d1baf39c23c51ecf64bb3544b2bc7a0239082cfb46ad02ecb3fe6b67d6.yml -openapi_spec_hash: 5bf79360e380ac890e19f54ce4e867d3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-caf8a61380400df01211533e1394edf01cf3651df960a470f37c8e37ea33d1f8.yml +openapi_spec_hash: 09ed9ea8e5027a48cacb6860cc063139 config_hash: 3638b66b63ea825ab6a770e729104836 From c8116e8630d95b882ffb9d246ed4e4821f5fa0f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:04:22 +0000 Subject: [PATCH 121/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 591a88fb866..3200273e612 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-caf8a61380400df01211533e1394edf01cf3651df960a470f37c8e37ea33d1f8.yml -openapi_spec_hash: 09ed9ea8e5027a48cacb6860cc063139 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6405db96ceaa7abf59d3737af41512a43f3e2e7ed038b726a9b9fca18bf43493.yml +openapi_spec_hash: 7b01c7ea60425c73047c6eb81c6408f8 config_hash: 3638b66b63ea825ab6a770e729104836 From 736bc3f6a1009bdb69e3505c0f9116235914e4fb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:11:12 +0000 Subject: [PATCH 122/392] =?UTF-8?q?fix(ci):=20release-doctor=20=E2=80=94?= =?UTF-8?q?=20report=20correct=20token=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/check-release-environment | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/check-release-environment b/bin/check-release-environment index b659e91535b..b845b0f4c96 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -3,7 +3,7 @@ errors=() if [ -z "${PYPI_TOKEN}" ]; then - errors+=("The CLOUDFLARE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") + errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") fi lenErrors=${#errors[@]} From c0e9b0c530a1b41db40534ccd1ab404b58f13ecc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:55:20 +0000 Subject: [PATCH 123/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3200273e612..6088f4086d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6405db96ceaa7abf59d3737af41512a43f3e2e7ed038b726a9b9fca18bf43493.yml -openapi_spec_hash: 7b01c7ea60425c73047c6eb81c6408f8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-418855f534fdfe512ad1e453934d584f39eaf768596dd6a7598c59ae73ec780e.yml +openapi_spec_hash: 0afd338757e229fd3c9dcea6dbac3a61 config_hash: 3638b66b63ea825ab6a770e729104836 From 4b1c8b1792cf3417af22bb6642c2d2af18d5ef51 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 15:28:09 +0000 Subject: [PATCH 124/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6088f4086d8..f25cfce153a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-418855f534fdfe512ad1e453934d584f39eaf768596dd6a7598c59ae73ec780e.yml -openapi_spec_hash: 0afd338757e229fd3c9dcea6dbac3a61 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-33ed7cc297131e694d7e3ceb037444eac0995df93b78a637f89188173ff1ec1c.yml +openapi_spec_hash: 489a4310a7f30ea33ed0e01035e9a09d config_hash: 3638b66b63ea825ab6a770e729104836 From 9fe28c5de10069cd603da8618441d314b899f033 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 16:53:32 +0000 Subject: [PATCH 125/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f25cfce153a..f71596c4ac7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-33ed7cc297131e694d7e3ceb037444eac0995df93b78a637f89188173ff1ec1c.yml -openapi_spec_hash: 489a4310a7f30ea33ed0e01035e9a09d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-943369a9e71cbb5e59c9a531ee6374d695cd5ec1f97b2082b03a8ccde4b3babf.yml +openapi_spec_hash: 72d90fb9a6b464d927d229b296b49c99 config_hash: 3638b66b63ea825ab6a770e729104836 From de00cdeb9d46f128c08919915c26836e9a27dd36 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 16:55:50 +0000 Subject: [PATCH 126/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f71596c4ac7..fbfd1f41ce8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-943369a9e71cbb5e59c9a531ee6374d695cd5ec1f97b2082b03a8ccde4b3babf.yml -openapi_spec_hash: 72d90fb9a6b464d927d229b296b49c99 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f83e2d9e9a6eb973bb45a45b071c2f6fc7ed7f4fdb9d44178ee8dfd91f67c3f2.yml +openapi_spec_hash: cce9f8726591c6d5f3942ca74651b079 config_hash: 3638b66b63ea825ab6a770e729104836 From a364dc7b861b30006b6cd9ea1eec18cf43991e64 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 16:58:10 +0000 Subject: [PATCH 127/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbfd1f41ce8..f9a6fb98eab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f83e2d9e9a6eb973bb45a45b071c2f6fc7ed7f4fdb9d44178ee8dfd91f67c3f2.yml -openapi_spec_hash: cce9f8726591c6d5f3942ca74651b079 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ed5977b427357609d4c885f8e49f20cd40709ee5201b8d7596965e78ab13408c.yml +openapi_spec_hash: 1881158343449820a2e5a0fd97726c29 config_hash: 3638b66b63ea825ab6a770e729104836 From 0d32330959b6fc939966027b060d61594d5f0291 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 17:15:07 +0000 Subject: [PATCH 128/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f9a6fb98eab..cd69d8d92c4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ed5977b427357609d4c885f8e49f20cd40709ee5201b8d7596965e78ab13408c.yml -openapi_spec_hash: 1881158343449820a2e5a0fd97726c29 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fec12b67a9b920095500a586ad5fdc3d5085e89cb26da79d719b43fc263f4705.yml +openapi_spec_hash: 7f4c139ae43541e7c636a9282c003996 config_hash: 3638b66b63ea825ab6a770e729104836 From 23499df3b54944c84a552a0e20ce09b075e4bc44 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 17:28:23 +0000 Subject: [PATCH 129/392] feat(api): api update --- .stats.yml | 4 +- .../resources/accounts/tokens/tokens.py | 16 +-- .../resources/user/tokens/tokens.py | 16 +-- .../types/accounts/token_update_params.py | 6 +- src/cloudflare/types/shared/token_policy.py | 4 +- .../types/shared_params/token_policy.py | 4 +- .../types/user/token_update_params.py | 6 +- tests/api_resources/accounts/test_tokens.py | 124 ++++-------------- tests/api_resources/user/test_tokens.py | 102 +++----------- 9 files changed, 72 insertions(+), 210 deletions(-) diff --git a/.stats.yml b/.stats.yml index cd69d8d92c4..936417e9015 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fec12b67a9b920095500a586ad5fdc3d5085e89cb26da79d719b43fc263f4705.yml -openapi_spec_hash: 7f4c139ae43541e7c636a9282c003996 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3067c2bb6c9724d234be04ae30fd7d84fb04b2ad9fc9808a7e8a60837b300e7e.yml +openapi_spec_hash: 122a9851a2d05c751f47ff5ec875fbb4 config_hash: 3638b66b63ea825ab6a770e729104836 diff --git a/src/cloudflare/resources/accounts/tokens/tokens.py b/src/cloudflare/resources/accounts/tokens/tokens.py index 4f50160a6df..d2f34383499 100644 --- a/src/cloudflare/resources/accounts/tokens/tokens.py +++ b/src/cloudflare/resources/accounts/tokens/tokens.py @@ -145,10 +145,10 @@ def update( account_id: str, name: str, policies: Iterable[TokenPolicy], - status: Literal["active", "disabled", "expired"], condition: token_update_params.Condition | NotGiven = NOT_GIVEN, expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN, not_before: Union[str, datetime] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "expired"] | 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, @@ -168,13 +168,13 @@ def update( policies: List of access policies assigned to the token. - status: Status of the token. - expires_on: The expiration time on or after which the JWT MUST NOT be accepted for processing. not_before: The time before which the token MUST NOT be accepted for processing. + status: Status of the token. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -193,10 +193,10 @@ def update( { "name": name, "policies": policies, - "status": status, "condition": condition, "expires_on": expires_on, "not_before": not_before, + "status": status, }, token_update_params.TokenUpdateParams, ), @@ -492,10 +492,10 @@ async def update( account_id: str, name: str, policies: Iterable[TokenPolicy], - status: Literal["active", "disabled", "expired"], condition: token_update_params.Condition | NotGiven = NOT_GIVEN, expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN, not_before: Union[str, datetime] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "expired"] | 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, @@ -515,13 +515,13 @@ async def update( policies: List of access policies assigned to the token. - status: Status of the token. - expires_on: The expiration time on or after which the JWT MUST NOT be accepted for processing. not_before: The time before which the token MUST NOT be accepted for processing. + status: Status of the token. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -540,10 +540,10 @@ async def update( { "name": name, "policies": policies, - "status": status, "condition": condition, "expires_on": expires_on, "not_before": not_before, + "status": status, }, token_update_params.TokenUpdateParams, ), diff --git a/src/cloudflare/resources/user/tokens/tokens.py b/src/cloudflare/resources/user/tokens/tokens.py index a3a10f41216..aeeb5b0c05d 100644 --- a/src/cloudflare/resources/user/tokens/tokens.py +++ b/src/cloudflare/resources/user/tokens/tokens.py @@ -139,10 +139,10 @@ def update( *, name: str, policies: Iterable[TokenPolicy], - status: Literal["active", "disabled", "expired"], condition: token_update_params.Condition | NotGiven = NOT_GIVEN, expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN, not_before: Union[str, datetime] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "expired"] | 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, @@ -160,13 +160,13 @@ def update( policies: List of access policies assigned to the token. - status: Status of the token. - expires_on: The expiration time on or after which the JWT MUST NOT be accepted for processing. not_before: The time before which the token MUST NOT be accepted for processing. + status: Status of the token. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -183,10 +183,10 @@ def update( { "name": name, "policies": policies, - "status": status, "condition": condition, "expires_on": expires_on, "not_before": not_before, + "status": status, }, token_update_params.TokenUpdateParams, ), @@ -445,10 +445,10 @@ async def update( *, name: str, policies: Iterable[TokenPolicy], - status: Literal["active", "disabled", "expired"], condition: token_update_params.Condition | NotGiven = NOT_GIVEN, expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN, not_before: Union[str, datetime] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "expired"] | 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, @@ -466,13 +466,13 @@ async def update( policies: List of access policies assigned to the token. - status: Status of the token. - expires_on: The expiration time on or after which the JWT MUST NOT be accepted for processing. not_before: The time before which the token MUST NOT be accepted for processing. + status: Status of the token. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -489,10 +489,10 @@ async def update( { "name": name, "policies": policies, - "status": status, "condition": condition, "expires_on": expires_on, "not_before": not_before, + "status": status, }, token_update_params.TokenUpdateParams, ), diff --git a/src/cloudflare/types/accounts/token_update_params.py b/src/cloudflare/types/accounts/token_update_params.py index fe7ed0cf440..cb32132b32d 100644 --- a/src/cloudflare/types/accounts/token_update_params.py +++ b/src/cloudflare/types/accounts/token_update_params.py @@ -23,9 +23,6 @@ class TokenUpdateParams(TypedDict, total=False): policies: Required[Iterable[TokenPolicy]] """List of access policies assigned to the token.""" - status: Required[Literal["active", "disabled", "expired"]] - """Status of the token.""" - condition: Condition expires_on: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -37,6 +34,9 @@ class TokenUpdateParams(TypedDict, total=False): not_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """The time before which the token MUST NOT be accepted for processing.""" + status: Literal["active", "disabled", "expired"] + """Status of the token.""" + _ConditionRequestIPReservedKeywords = TypedDict( "_ConditionRequestIPReservedKeywords", diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index 778cb891f5d..6674df67455 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List, Union, Optional from typing_extensions import Literal from ..._models import BaseModel @@ -35,5 +35,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Dict[str, str] + resources: Dict[str, Union[str, Dict[str, str]]] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index e2a11eec39a..d1f663c2d40 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Dict, Union, Iterable from typing_extensions import Literal, Required, TypedDict __all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] @@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Dict[str, str]] + resources: Required[Dict[str, Union[str, Dict[str, str]]]] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/user/token_update_params.py b/src/cloudflare/types/user/token_update_params.py index 6df123fcec8..3f0f4df84b3 100644 --- a/src/cloudflare/types/user/token_update_params.py +++ b/src/cloudflare/types/user/token_update_params.py @@ -20,9 +20,6 @@ class TokenUpdateParams(TypedDict, total=False): policies: Required[Iterable[TokenPolicy]] """List of access policies assigned to the token.""" - status: Required[Literal["active", "disabled", "expired"]] - """Status of the token.""" - condition: Condition expires_on: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -34,6 +31,9 @@ class TokenUpdateParams(TypedDict, total=False): not_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """The time before which the token MUST NOT be accepted for processing.""" + status: Literal["active", "disabled", "expired"] + """Status of the token.""" + _ConditionRequestIPReservedKeywords = TypedDict( "_ConditionRequestIPReservedKeywords", diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index 68eb6073946..a936ded5e33 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -37,10 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -71,10 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -101,10 +95,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -127,10 +118,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -156,10 +144,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -178,13 +163,9 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -214,13 +195,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", condition={ "request_ip": { "in": ["123.123.123.0/24", "2606:4700::/32"], @@ -229,6 +206,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, expires_on=parse_datetime("2020-01-01T00:00:00Z"), not_before=parse_datetime("2018-07-01T05:20:00Z"), + status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -246,13 +224,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert response.is_closed is True @@ -274,13 +248,9 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -305,13 +275,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"): @@ -326,13 +292,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -553,10 +515,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -587,10 +546,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -617,10 +573,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -643,10 +596,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -672,10 +622,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -694,13 +641,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -730,13 +673,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", condition={ "request_ip": { "in": ["123.123.123.0/24", "2606:4700::/32"], @@ -745,6 +684,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, expires_on=parse_datetime("2020-01-01T00:00:00Z"), not_before=parse_datetime("2018-07-01T05:20:00Z"), + status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -762,13 +702,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert response.is_closed is True @@ -790,13 +726,9 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -821,13 +753,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"): @@ -842,13 +770,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) @pytest.mark.skip(reason="TODO: investigate broken test") diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index 4d8e1d4a3b3..bcba28f9023 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -36,10 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -69,10 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -98,10 +92,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -123,10 +114,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -151,13 +139,9 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -186,13 +170,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", condition={ "request_ip": { "in": ["123.123.123.0/24", "2606:4700::/32"], @@ -201,6 +181,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, expires_on=parse_datetime("2020-01-01T00:00:00Z"), not_before=parse_datetime("2018-07-01T05:20:00Z"), + status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -217,13 +198,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert response.is_closed is True @@ -244,13 +221,9 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -274,13 +247,9 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -451,10 +420,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -484,10 +450,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -513,10 +476,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) @@ -538,10 +498,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -566,13 +523,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -601,13 +554,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", condition={ "request_ip": { "in": ["123.123.123.0/24", "2606:4700::/32"], @@ -616,6 +565,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, expires_on=parse_datetime("2020-01-01T00:00:00Z"), not_before=parse_datetime("2018-07-01T05:20:00Z"), + status="active", ) assert_matches_type(Optional[Token], token, path=["response"]) @@ -632,13 +582,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) assert response.is_closed is True @@ -659,13 +605,9 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -689,13 +631,9 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "com.cloudflare.api.account.zone.22b1de5f1c0e4b3ea97bb1e963b06a43": "*", - "com.cloudflare.api.account.zone.eb78d65290b24279ba6f44721b3ea3c4": "*", - }, + "resources": {"foo": "string"}, } ], - status="active", ) @pytest.mark.skip(reason="TODO: investigate broken test") From 0662d7d85698922b1aa2b0a7edb779ba8f261617 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 18:45:24 +0000 Subject: [PATCH 130/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 936417e9015..ef7cf1a2dec 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3067c2bb6c9724d234be04ae30fd7d84fb04b2ad9fc9808a7e8a60837b300e7e.yml openapi_spec_hash: 122a9851a2d05c751f47ff5ec875fbb4 -config_hash: 3638b66b63ea825ab6a770e729104836 +config_hash: 284c4178d08f75d8c8b29f275948a8fd From 7972e6f0be873b19a2dedf3d86a2a1442fbc8172 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 06:10:32 +0000 Subject: [PATCH 131/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ef7cf1a2dec..8990325b48d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3067c2bb6c9724d234be04ae30fd7d84fb04b2ad9fc9808a7e8a60837b300e7e.yml -openapi_spec_hash: 122a9851a2d05c751f47ff5ec875fbb4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-357249a6950c7512598745513daaa0dbf653513c57dd9604f5e6d8b7e6ded2c4.yml +openapi_spec_hash: 3ab1a48771883dabf9cb61dbb58bbdb3 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 18a6fdeab07b6753252135f21304dcfc2fa1faf2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 07:08:40 +0000 Subject: [PATCH 132/392] feat(api): api update --- .stats.yml | 4 ++-- .../email_security/settings/domains.py | 14 ++++++------- .../settings/trusted_domains.py | 20 +++++++++---------- .../settings/domain_edit_params.py | 8 ++++---- .../settings/trusted_domain_edit_params.py | 11 +++++----- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8990325b48d..3f5769c1d8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-357249a6950c7512598745513daaa0dbf653513c57dd9604f5e6d8b7e6ded2c4.yml -openapi_spec_hash: 3ab1a48771883dabf9cb61dbb58bbdb3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-06c0722289c612a94a6c1e228ea4ada586b3942b04cb02b9a55d98adef5e9558.yml +openapi_spec_hash: f6f0cf5e8a41260e0d1ddf20a71a9c75 config_hash: 284c4178d08f75d8c8b29f275948a8fd diff --git a/src/cloudflare/resources/email_security/settings/domains.py b/src/cloudflare/resources/email_security/settings/domains.py index 2166d0607cd..a8596bc205f 100644 --- a/src/cloudflare/resources/email_security/settings/domains.py +++ b/src/cloudflare/resources/email_security/settings/domains.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, Optional, cast +from typing import List, Type, cast from typing_extensions import Literal import httpx @@ -214,7 +214,7 @@ def edit( account_id: str, ip_restrictions: List[str], allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] | NotGiven = NOT_GIVEN, - domain: Optional[str] | NotGiven = NOT_GIVEN, + domain: str | NotGiven = NOT_GIVEN, drop_dispositions: List[ Literal[ "MALICIOUS", @@ -231,8 +231,8 @@ def edit( ] | NotGiven = NOT_GIVEN, folder: Literal["AllItems", "Inbox"] | NotGiven = NOT_GIVEN, - integration_id: Optional[str] | NotGiven = NOT_GIVEN, - lookback_hops: Optional[int] | NotGiven = NOT_GIVEN, + integration_id: str | NotGiven = NOT_GIVEN, + lookback_hops: int | NotGiven = NOT_GIVEN, require_tls_inbound: bool | NotGiven = NOT_GIVEN, require_tls_outbound: bool | NotGiven = NOT_GIVEN, transport: str | NotGiven = NOT_GIVEN, @@ -515,7 +515,7 @@ async def edit( account_id: str, ip_restrictions: List[str], allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] | NotGiven = NOT_GIVEN, - domain: Optional[str] | NotGiven = NOT_GIVEN, + domain: str | NotGiven = NOT_GIVEN, drop_dispositions: List[ Literal[ "MALICIOUS", @@ -532,8 +532,8 @@ async def edit( ] | NotGiven = NOT_GIVEN, folder: Literal["AllItems", "Inbox"] | NotGiven = NOT_GIVEN, - integration_id: Optional[str] | NotGiven = NOT_GIVEN, - lookback_hops: Optional[int] | NotGiven = NOT_GIVEN, + integration_id: str | NotGiven = NOT_GIVEN, + lookback_hops: int | NotGiven = NOT_GIVEN, require_tls_inbound: bool | NotGiven = NOT_GIVEN, require_tls_outbound: bool | NotGiven = NOT_GIVEN, transport: str | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/email_security/settings/trusted_domains.py b/src/cloudflare/resources/email_security/settings/trusted_domains.py index 1f318a5ba1b..7300201b8ac 100644 --- a/src/cloudflare/resources/email_security/settings/trusted_domains.py +++ b/src/cloudflare/resources/email_security/settings/trusted_domains.py @@ -287,11 +287,11 @@ def edit( trusted_domain_id: int, *, account_id: str, - comments: Optional[str] | NotGiven = NOT_GIVEN, - is_recent: Optional[bool] | NotGiven = NOT_GIVEN, - is_regex: Optional[bool] | NotGiven = NOT_GIVEN, - is_similarity: Optional[bool] | NotGiven = NOT_GIVEN, - pattern: Optional[str] | NotGiven = NOT_GIVEN, + comments: str | NotGiven = NOT_GIVEN, + is_recent: bool | NotGiven = NOT_GIVEN, + is_regex: bool | NotGiven = NOT_GIVEN, + is_similarity: bool | NotGiven = NOT_GIVEN, + pattern: 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, @@ -641,11 +641,11 @@ async def edit( trusted_domain_id: int, *, account_id: str, - comments: Optional[str] | NotGiven = NOT_GIVEN, - is_recent: Optional[bool] | NotGiven = NOT_GIVEN, - is_regex: Optional[bool] | NotGiven = NOT_GIVEN, - is_similarity: Optional[bool] | NotGiven = NOT_GIVEN, - pattern: Optional[str] | NotGiven = NOT_GIVEN, + comments: str | NotGiven = NOT_GIVEN, + is_recent: bool | NotGiven = NOT_GIVEN, + is_regex: bool | NotGiven = NOT_GIVEN, + is_similarity: bool | NotGiven = NOT_GIVEN, + pattern: 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, diff --git a/src/cloudflare/types/email_security/settings/domain_edit_params.py b/src/cloudflare/types/email_security/settings/domain_edit_params.py index 594a3d7d98c..c0799ec62ed 100644 --- a/src/cloudflare/types/email_security/settings/domain_edit_params.py +++ b/src/cloudflare/types/email_security/settings/domain_edit_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Optional +from typing import List from typing_extensions import Literal, Required, TypedDict __all__ = ["DomainEditParams"] @@ -16,7 +16,7 @@ class DomainEditParams(TypedDict, total=False): allowed_delivery_modes: List[Literal["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]] - domain: Optional[str] + domain: str drop_dispositions: List[ Literal[ @@ -35,9 +35,9 @@ class DomainEditParams(TypedDict, total=False): folder: Literal["AllItems", "Inbox"] - integration_id: Optional[str] + integration_id: str - lookback_hops: Optional[int] + lookback_hops: int require_tls_inbound: bool diff --git a/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py b/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py index 0dcdda7c0ef..90d1acfc7c0 100644 --- a/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py +++ b/src/cloudflare/types/email_security/settings/trusted_domain_edit_params.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import Optional from typing_extensions import Required, TypedDict __all__ = ["TrustedDomainEditParams"] @@ -12,20 +11,20 @@ class TrustedDomainEditParams(TypedDict, total=False): account_id: Required[str] """Account Identifier""" - comments: Optional[str] + comments: str - is_recent: Optional[bool] + is_recent: bool """ Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. """ - is_regex: Optional[bool] + is_regex: bool - is_similarity: Optional[bool] + is_similarity: bool """ Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. """ - pattern: Optional[str] + pattern: str From e63b1a9f3dbcecb7ba4c0dd9b733844415971fef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 10:03:03 +0000 Subject: [PATCH 133/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3f5769c1d8e..de433e06a4f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-06c0722289c612a94a6c1e228ea4ada586b3942b04cb02b9a55d98adef5e9558.yml -openapi_spec_hash: f6f0cf5e8a41260e0d1ddf20a71a9c75 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-18e27d0e054a8b6d5fb94b14e2c26aa969ce8a99a0cb39eb84fed7c862df532e.yml +openapi_spec_hash: 2565070122de00041f70a5a52e5d1856 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 5ea2ece32111e379d6ded2a711abf67084d501d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 12:08:49 +0000 Subject: [PATCH 134/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index de433e06a4f..6c6260f34e8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-18e27d0e054a8b6d5fb94b14e2c26aa969ce8a99a0cb39eb84fed7c862df532e.yml -openapi_spec_hash: 2565070122de00041f70a5a52e5d1856 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca3bcaa555572b3cd1f4370f69217537efb9e9cfa35d5430ed112057b4b8a1c5.yml +openapi_spec_hash: e6861902fdee4e44c8272b29e0ecfa0c config_hash: 284c4178d08f75d8c8b29f275948a8fd From 91a68b29de1a123631f326a1d705176b78c694f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:38:32 +0000 Subject: [PATCH 135/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6c6260f34e8..2ce93123950 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca3bcaa555572b3cd1f4370f69217537efb9e9cfa35d5430ed112057b4b8a1c5.yml -openapi_spec_hash: e6861902fdee4e44c8272b29e0ecfa0c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3e1f0cf28b20bf72f09a9c0ff506a4f9c7e10f3f302fa27d1ac18de85ae99d88.yml +openapi_spec_hash: 6f715a68579915106a75426cd0b1668c config_hash: 284c4178d08f75d8c8b29f275948a8fd From ced1c92804faf80cc3a127a7fe31bf704778169c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:03:25 +0000 Subject: [PATCH 136/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2ce93123950..0fafaeb6ede 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3e1f0cf28b20bf72f09a9c0ff506a4f9c7e10f3f302fa27d1ac18de85ae99d88.yml -openapi_spec_hash: 6f715a68579915106a75426cd0b1668c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909bf66edca8e60c9b79a637e887eafcd0ee0785a0f5dcb1156f75025474b681.yml +openapi_spec_hash: 982d254124046b4e74e16b3fff909898 config_hash: 284c4178d08f75d8c8b29f275948a8fd From a371c833bcbcf0ef57f6690e7c5a4385d71ab1ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:40:12 +0000 Subject: [PATCH 137/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0fafaeb6ede..21162738b74 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-909bf66edca8e60c9b79a637e887eafcd0ee0785a0f5dcb1156f75025474b681.yml -openapi_spec_hash: 982d254124046b4e74e16b3fff909898 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-42feba8865b4c8119bbfa35807f74e59de13be02ed81c9f887daab07a5689157.yml +openapi_spec_hash: d8c2c8e871477da1ced8b2f49c335942 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 5162f212a176254b6892bd62c2c4278720b73a0a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 15:03:07 +0000 Subject: [PATCH 138/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 21162738b74..f2a5b02826d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-42feba8865b4c8119bbfa35807f74e59de13be02ed81c9f887daab07a5689157.yml -openapi_spec_hash: d8c2c8e871477da1ced8b2f49c335942 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91d602be53cd2ea23d0f3d72cc4dc22506cd40ce64397e52929897260f1d5855.yml +openapi_spec_hash: a743c1e82045b35f9d3806284bd0d55b config_hash: 284c4178d08f75d8c8b29f275948a8fd From 156da36c41ae0bd99256f90bad1a9e93f46a4044 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 15:26:19 +0000 Subject: [PATCH 139/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f2a5b02826d..2b0271f0e52 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91d602be53cd2ea23d0f3d72cc4dc22506cd40ce64397e52929897260f1d5855.yml -openapi_spec_hash: a743c1e82045b35f9d3806284bd0d55b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5049bd1a864a468070ff3fe28f1d37086c6c8eb168a7ccab25e385ec83957626.yml +openapi_spec_hash: 775c5a2942feeedc08f5b31df965f6fb config_hash: 284c4178d08f75d8c8b29f275948a8fd From a73d1bc951a16745dfa52bd5938754da29e35750 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 15:28:31 +0000 Subject: [PATCH 140/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2b0271f0e52..4be3b6cadc2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5049bd1a864a468070ff3fe28f1d37086c6c8eb168a7ccab25e385ec83957626.yml -openapi_spec_hash: 775c5a2942feeedc08f5b31df965f6fb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fba48484f21ed01e9c21aa59976a96304de202726dff7f4e47887a8d8b429653.yml +openapi_spec_hash: 0be829777ee3470dc79b574e7fe39748 config_hash: 284c4178d08f75d8c8b29f275948a8fd From b0218429ccae9b55b110ff134c0f05dfeae848ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 15:30:58 +0000 Subject: [PATCH 141/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4be3b6cadc2..2b0271f0e52 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fba48484f21ed01e9c21aa59976a96304de202726dff7f4e47887a8d8b429653.yml -openapi_spec_hash: 0be829777ee3470dc79b574e7fe39748 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5049bd1a864a468070ff3fe28f1d37086c6c8eb168a7ccab25e385ec83957626.yml +openapi_spec_hash: 775c5a2942feeedc08f5b31df965f6fb config_hash: 284c4178d08f75d8c8b29f275948a8fd From 620f99baa159cb73eab91215f96cb1b6da79c054 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 16:17:04 +0000 Subject: [PATCH 142/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2b0271f0e52..4be3b6cadc2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5049bd1a864a468070ff3fe28f1d37086c6c8eb168a7ccab25e385ec83957626.yml -openapi_spec_hash: 775c5a2942feeedc08f5b31df965f6fb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fba48484f21ed01e9c21aa59976a96304de202726dff7f4e47887a8d8b429653.yml +openapi_spec_hash: 0be829777ee3470dc79b574e7fe39748 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 4db27f655b4d142c0a3a7563da0b06a68cf82f22 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 16:29:30 +0000 Subject: [PATCH 143/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4be3b6cadc2..96094337de1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fba48484f21ed01e9c21aa59976a96304de202726dff7f4e47887a8d8b429653.yml -openapi_spec_hash: 0be829777ee3470dc79b574e7fe39748 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae6ffcbcc0856b0712d948732796e69c83954b184b053cd143d3ca2e4b1ce0da.yml +openapi_spec_hash: cce02f17f85e5baa523a036fe2a044cd config_hash: 284c4178d08f75d8c8b29f275948a8fd From fc20862274dcf03e7e90a90b37a5b812f3c63235 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:23:34 +0000 Subject: [PATCH 144/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/types/shared/token_policy.py | 4 +- .../types/shared_params/token_policy.py | 4 +- tests/api_resources/accounts/test_tokens.py | 44 +++++++++---------- tests/api_resources/user/test_tokens.py | 36 +++++++-------- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 96094337de1..0b571dfa575 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae6ffcbcc0856b0712d948732796e69c83954b184b053cd143d3ca2e4b1ce0da.yml -openapi_spec_hash: cce02f17f85e5baa523a036fe2a044cd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-79b67999c1748cd1df9ce78542f18e9b09c8c4cd3aafe5f194633754c74efda3.yml +openapi_spec_hash: a9a2aa58b9449dd64c6a291cbe9981cc config_hash: 284c4178d08f75d8c8b29f275948a8fd diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index 6674df67455..3a42b91896d 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Optional from typing_extensions import Literal from ..._models import BaseModel @@ -35,5 +35,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Dict[str, Union[str, Dict[str, str]]] + resources: Dict[str, Dict[str, str]] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index d1f663c2d40..5008129b536 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Union, Iterable +from typing import Dict, Iterable from typing_extensions import Literal, Required, TypedDict __all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] @@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Dict[str, Union[str, Dict[str, str]]]] + resources: Required[Dict[str, Dict[str, str]]] """A list of resource names that the policy applies to.""" diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index a936ded5e33..f4d22a11007 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -68,7 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], condition={ @@ -95,7 +95,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -118,7 +118,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) as response: @@ -144,7 +144,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -163,7 +163,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -195,7 +195,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], condition={ @@ -224,7 +224,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -248,7 +248,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) as response: @@ -275,7 +275,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -292,7 +292,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -515,7 +515,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -546,7 +546,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], condition={ @@ -573,7 +573,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -596,7 +596,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) as response: @@ -622,7 +622,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -641,7 +641,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -673,7 +673,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], condition={ @@ -702,7 +702,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -726,7 +726,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) as response: @@ -753,7 +753,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -770,7 +770,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index bcba28f9023..b42483ff5ea 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -66,7 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], condition={ @@ -92,7 +92,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -114,7 +114,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) as response: @@ -139,7 +139,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -170,7 +170,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], condition={ @@ -198,7 +198,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -221,7 +221,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) as response: @@ -247,7 +247,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -420,7 +420,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -450,7 +450,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], condition={ @@ -476,7 +476,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -498,7 +498,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) as response: @@ -523,7 +523,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -554,7 +554,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], condition={ @@ -582,7 +582,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) @@ -605,7 +605,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) as response: @@ -631,7 +631,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {"foo": {"foo": "string"}}, } ], ) From 8c1950e33f9c3abaa2d4119c2aeeca94266db8d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:42:55 +0000 Subject: [PATCH 145/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0b571dfa575..d460faf10a9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-79b67999c1748cd1df9ce78542f18e9b09c8c4cd3aafe5f194633754c74efda3.yml -openapi_spec_hash: a9a2aa58b9449dd64c6a291cbe9981cc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e4a8036717db701e2c4150e4c79e945610651d92dd1025534829b24bb94c8b93.yml +openapi_spec_hash: 802d5904b4c6850754129234f78c81e5 config_hash: 284c4178d08f75d8c8b29f275948a8fd From be65ec73ac85aa7553537d874aec1e7dee5e399b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 19:03:45 +0000 Subject: [PATCH 146/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d460faf10a9..5457fc3f35a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e4a8036717db701e2c4150e4c79e945610651d92dd1025534829b24bb94c8b93.yml -openapi_spec_hash: 802d5904b4c6850754129234f78c81e5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7a9600a1ebc7905731c050ea7471c0034df7633cb2726aab226df3141e9f2037.yml +openapi_spec_hash: 1596f2cf8e092c9775505296958c41e4 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 037d783769080218f5ff7d2da2efb89bf6dec5d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 19:23:02 +0000 Subject: [PATCH 147/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5457fc3f35a..7e0cef02c8d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7a9600a1ebc7905731c050ea7471c0034df7633cb2726aab226df3141e9f2037.yml -openapi_spec_hash: 1596f2cf8e092c9775505296958c41e4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6492b8554db528fc5246bec5d18b9743b92507f00f232ed69e10474262be4c8c.yml +openapi_spec_hash: 7c1ee096409f4b59e522bba00c911d07 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 84aff5ca71df5e5111796a622c7951caf140a6b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 20:59:17 +0000 Subject: [PATCH 148/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7e0cef02c8d..c0d7d1987c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6492b8554db528fc5246bec5d18b9743b92507f00f232ed69e10474262be4c8c.yml -openapi_spec_hash: 7c1ee096409f4b59e522bba00c911d07 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4c3d04b5ccf3eef80ced89900e30ba515959d50f395f8d65e610488d1084e9e5.yml +openapi_spec_hash: a3f24daa469d6247827c79c29a04c5fb config_hash: 284c4178d08f75d8c8b29f275948a8fd From a195d99637b25de7b99ab6f10b7fd8e0af1106e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 21:19:22 +0000 Subject: [PATCH 149/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c0d7d1987c7..ed35957815c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4c3d04b5ccf3eef80ced89900e30ba515959d50f395f8d65e610488d1084e9e5.yml -openapi_spec_hash: a3f24daa469d6247827c79c29a04c5fb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0f2bd193526171b33bdf83aed6c80e17bfec552bc98ed3e17ac18329a6e556f8.yml +openapi_spec_hash: ac1d578220e778b767b97cae294a6b51 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 16cdf47bdb7be097bb7a83e9ccfbdc4b61e8405b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:05:25 +0000 Subject: [PATCH 150/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/types/shared/token_policy.py | 4 +- .../types/shared_params/token_policy.py | 4 +- tests/api_resources/accounts/test_tokens.py | 44 +++++++++---------- tests/api_resources/user/test_tokens.py | 36 +++++++-------- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index ed35957815c..65a8b31b36f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0f2bd193526171b33bdf83aed6c80e17bfec552bc98ed3e17ac18329a6e556f8.yml -openapi_spec_hash: ac1d578220e778b767b97cae294a6b51 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fd1b420cb57dab0611a1e37130f60c8c53dcfe02529108fef301812d5dfd9bb6.yml +openapi_spec_hash: 326a08d1b5e9390af5d1fb976a15cbae config_hash: 284c4178d08f75d8c8b29f275948a8fd diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index 3a42b91896d..c20e4daffd2 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List, Union, Optional from typing_extensions import Literal from ..._models import BaseModel @@ -35,5 +35,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Dict[str, Dict[str, str]] + resources: Union[Dict[str, str], Dict[str, Dict[str, str]]] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index 5008129b536..7a6cfd2e9b5 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Dict, Union, Iterable from typing_extensions import Literal, Required, TypedDict __all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] @@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Dict[str, Dict[str, str]]] + resources: Required[Union[Dict[str, str], Dict[str, Dict[str, str]]]] """A list of resource names that the policy applies to.""" diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index f4d22a11007..a936ded5e33 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -68,7 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], condition={ @@ -95,7 +95,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -118,7 +118,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) as response: @@ -144,7 +144,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -163,7 +163,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -195,7 +195,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], condition={ @@ -224,7 +224,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -248,7 +248,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) as response: @@ -275,7 +275,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -292,7 +292,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -515,7 +515,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -546,7 +546,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], condition={ @@ -573,7 +573,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -596,7 +596,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) as response: @@ -622,7 +622,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -641,7 +641,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -673,7 +673,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], condition={ @@ -702,7 +702,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -726,7 +726,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) as response: @@ -753,7 +753,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -770,7 +770,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index b42483ff5ea..bcba28f9023 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -66,7 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], condition={ @@ -92,7 +92,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -114,7 +114,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) as response: @@ -139,7 +139,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -170,7 +170,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], condition={ @@ -198,7 +198,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -221,7 +221,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) as response: @@ -247,7 +247,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -420,7 +420,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -450,7 +450,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], condition={ @@ -476,7 +476,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -498,7 +498,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) as response: @@ -523,7 +523,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -554,7 +554,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], condition={ @@ -582,7 +582,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) @@ -605,7 +605,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) as response: @@ -631,7 +631,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": {"foo": "string"}}, + "resources": {"foo": "string"}, } ], ) From 11902500f3cb19b153c0ec346820469fb47fc70a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:08:44 +0000 Subject: [PATCH 151/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 65a8b31b36f..ae7258e0528 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fd1b420cb57dab0611a1e37130f60c8c53dcfe02529108fef301812d5dfd9bb6.yml -openapi_spec_hash: 326a08d1b5e9390af5d1fb976a15cbae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d533d4e934a66ddbb480577a08bf932947c053f8a5060c4e5a3fae34f405fdc8.yml +openapi_spec_hash: 039b35d08c3bba51af3c4ec5832850a0 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 9900f90f87f4a58b92c7f89d2b92a63be552c102 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:39:28 +0000 Subject: [PATCH 152/392] chore(ci): only run for pushes and fork pull requests --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0c4f8879e9..73446dcfba9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -47,6 +48,7 @@ jobs: contents: read id-token: write runs-on: depot-ubuntu-24.04 + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -67,6 +69,7 @@ jobs: timeout-minutes: 30 name: test runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -88,7 +91,7 @@ jobs: timeout-minutes: 10 name: examples runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.repository == 'cloudflare/cloudflare-python' + if: github.repository == 'cloudflare/cloudflare-python && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)' steps: - uses: actions/checkout@v4 From 9cd6ad82fbb755dd3509e50e92d81ce242c7dadd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:53:39 +0000 Subject: [PATCH 153/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ae7258e0528..8f5a2e75a08 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d533d4e934a66ddbb480577a08bf932947c053f8a5060c4e5a3fae34f405fdc8.yml -openapi_spec_hash: 039b35d08c3bba51af3c4ec5832850a0 +openapi_spec_hash: e7921ba2e6f51641f1bd5ea80ed8de04 config_hash: 284c4178d08f75d8c8b29f275948a8fd From ec2e81ceae5ebb21bfedb8f5706a8ce51094340a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:59:43 +0000 Subject: [PATCH 154/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/types/shared/token_policy.py | 2 +- src/cloudflare/types/shared_params/token_policy.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8f5a2e75a08..80deeaf33e6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d533d4e934a66ddbb480577a08bf932947c053f8a5060c4e5a3fae34f405fdc8.yml -openapi_spec_hash: e7921ba2e6f51641f1bd5ea80ed8de04 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07850c05f5faee9033ffe4970b3e0a2368458141d05da9b761a534f8195e6e6d.yml +openapi_spec_hash: 69b3076f1524a788b18a81893fee1ee3 config_hash: 284c4178d08f75d8c8b29f275948a8fd diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index c20e4daffd2..6674df67455 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -35,5 +35,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Union[Dict[str, str], Dict[str, Dict[str, str]]] + resources: Dict[str, Union[str, Dict[str, str]]] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index 7a6cfd2e9b5..d1f663c2d40 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Union[Dict[str, str], Dict[str, Dict[str, str]]]] + resources: Required[Dict[str, Union[str, Dict[str, str]]]] """A list of resource names that the policy applies to.""" From 427f8f1c4f8e6431e8593718658a954b9503d41d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 28 Jun 2025 03:26:53 +0000 Subject: [PATCH 155/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/resources/logpush/jobs.py | 58 ++++++++----------- .../types/logpush/job_create_params.py | 17 +++--- .../types/logpush/job_update_params.py | 17 +++--- src/cloudflare/types/logpush/logpush_job.py | 17 +++--- 5 files changed, 48 insertions(+), 65 deletions(-) diff --git a/.stats.yml b/.stats.yml index 80deeaf33e6..c098e9b98a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07850c05f5faee9033ffe4970b3e0a2368458141d05da9b761a534f8195e6e6d.yml -openapi_spec_hash: 69b3076f1524a788b18a81893fee1ee3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97074b550d93648f2a49d85826e270e6d8701c8f7995d398092d47b38a5617d5.yml +openapi_spec_hash: e8767543491a9b3109cd30388421100b config_hash: 284c4178d08f75d8c8b29f275948a8fd diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index 108276bb85a..213ab5db651 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, Union, Optional, cast from typing_extensions import Literal import httpx @@ -88,9 +88,9 @@ def create( frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -139,19 +139,17 @@ def create( max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch - size. This parameter is not available for jobs with `edge` as its kind. + size. max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in - shorter intervals than this. This parameter is only used for jobs with `edge` as - its kind. + shorter intervals than this. max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer - lines than this. This parameter is not available for jobs with `edge` as its - kind. + lines than this. name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify @@ -224,9 +222,9 @@ def update( frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -274,19 +272,17 @@ def update( max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch - size. This parameter is not available for jobs with `edge` as its kind. + size. max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in - shorter intervals than this. This parameter is only used for jobs with `edge` as - its kind. + shorter intervals than this. max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer - lines than this. This parameter is not available for jobs with `edge` as its - kind. + lines than this. name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify @@ -566,9 +562,9 @@ async def create( frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -617,19 +613,17 @@ async def create( max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch - size. This parameter is not available for jobs with `edge` as its kind. + size. max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in - shorter intervals than this. This parameter is only used for jobs with `edge` as - its kind. + shorter intervals than this. max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer - lines than this. This parameter is not available for jobs with `edge` as its - kind. + lines than this. name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify @@ -702,9 +696,9 @@ async def update( frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -752,19 +746,17 @@ async def update( max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch - size. This parameter is not available for jobs with `edge` as its kind. + size. max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in - shorter intervals than this. This parameter is only used for jobs with `edge` as - its kind. + shorter intervals than this. max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer - lines than this. This parameter is not available for jobs with `edge` as its - kind. + lines than this. name: Optional human readable job name. Not unique. Cloudflare suggests that you set this to a meaningful string, like the domain name, to make it easier to identify diff --git a/src/cloudflare/types/logpush/job_create_params.py b/src/cloudflare/types/logpush/job_create_params.py index c238e69e264..29757863a77 100644 --- a/src/cloudflare/types/logpush/job_create_params.py +++ b/src/cloudflare/types/logpush/job_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Optional +from typing import Union, Optional from typing_extensions import Literal, Required, TypedDict from .output_options_param import OutputOptionsParam @@ -92,31 +92,28 @@ class JobCreateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Optional[int] + max_upload_bytes: Union[Literal[0], object, None] """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much - smaller than this batch size. This parameter is not available for jobs with - `edge` as its kind. + smaller than this batch size. """ - max_upload_interval_seconds: Optional[int] + max_upload_interval_seconds: Union[Literal[0], object, None] """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means - that log files may be sent in shorter intervals than this. This parameter is - only used for jobs with `edge` as its kind. + that log files may be sent in shorter intervals than this. """ - max_upload_records: Optional[int] + max_upload_records: Union[Literal[0], object, None] """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means - that log files may contain many fewer lines than this. This parameter is not - available for jobs with `edge` as its kind. + that log files may contain many fewer lines than this. """ name: Optional[str] diff --git a/src/cloudflare/types/logpush/job_update_params.py b/src/cloudflare/types/logpush/job_update_params.py index 9fbcba62623..4f3357c76f1 100644 --- a/src/cloudflare/types/logpush/job_update_params.py +++ b/src/cloudflare/types/logpush/job_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Optional +from typing import Union, Optional from typing_extensions import Literal, TypedDict from .output_options_param import OutputOptionsParam @@ -58,31 +58,28 @@ class JobUpdateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Optional[int] + max_upload_bytes: Union[Literal[0], object, None] """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much - smaller than this batch size. This parameter is not available for jobs with - `edge` as its kind. + smaller than this batch size. """ - max_upload_interval_seconds: Optional[int] + max_upload_interval_seconds: Union[Literal[0], object, None] """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means - that log files may be sent in shorter intervals than this. This parameter is - only used for jobs with `edge` as its kind. + that log files may be sent in shorter intervals than this. """ - max_upload_records: Optional[int] + max_upload_records: Union[Literal[0], object, None] """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means - that log files may contain many fewer lines than this. This parameter is not - available for jobs with `edge` as its kind. + that log files may contain many fewer lines than this. """ name: Optional[str] diff --git a/src/cloudflare/types/logpush/logpush_job.py b/src/cloudflare/types/logpush/logpush_job.py index ce7775c00a3..b89bb376d8b 100644 --- a/src/cloudflare/types/logpush/logpush_job.py +++ b/src/cloudflare/types/logpush/logpush_job.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -107,31 +107,28 @@ class LogpushJob(BaseModel): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Optional[int] = None + max_upload_bytes: Union[Literal[0], object, None] = None """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much - smaller than this batch size. This parameter is not available for jobs with - `edge` as its kind. + smaller than this batch size. """ - max_upload_interval_seconds: Optional[int] = None + max_upload_interval_seconds: Union[Literal[0], object, None] = None """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means - that log files may be sent in shorter intervals than this. This parameter is - only used for jobs with `edge` as its kind. + that log files may be sent in shorter intervals than this. """ - max_upload_records: Optional[int] = None + max_upload_records: Union[Literal[0], object, None] = None """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means - that log files may contain many fewer lines than this. This parameter is not - available for jobs with `edge` as its kind. + that log files may contain many fewer lines than this. """ name: Optional[str] = None From 138f1f067974cca6db7ef33f7f19efad20c85754 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 28 Jun 2025 03:51:18 +0000 Subject: [PATCH 156/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c098e9b98a8..21f590531ae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97074b550d93648f2a49d85826e270e6d8701c8f7995d398092d47b38a5617d5.yml -openapi_spec_hash: e8767543491a9b3109cd30388421100b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1f9bc5d4ff983922303cbeb07f95ce8a1349e7cb85c3c35d54ede88ef7b4457.yml +openapi_spec_hash: 8e71c2e7d6377b510152299736720a11 config_hash: 284c4178d08f75d8c8b29f275948a8fd From dbab0625df0b9e6d9c60e1877bee8ba18d823dc0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 28 Jun 2025 06:17:34 +0000 Subject: [PATCH 157/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 21f590531ae..a9e65769112 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1f9bc5d4ff983922303cbeb07f95ce8a1349e7cb85c3c35d54ede88ef7b4457.yml -openapi_spec_hash: 8e71c2e7d6377b510152299736720a11 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c7d7bd26c4996e7e7241be895166c5f64e8db7d483091c6e3d75c9ad6e11dcbf.yml +openapi_spec_hash: 9592d49009e10003a86a2d24069b6afc config_hash: 284c4178d08f75d8c8b29f275948a8fd From 40895860671d6ea89aa30f0088beea89e18e3afd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Jun 2025 06:14:09 +0000 Subject: [PATCH 158/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a9e65769112..0ea10509115 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c7d7bd26c4996e7e7241be895166c5f64e8db7d483091c6e3d75c9ad6e11dcbf.yml -openapi_spec_hash: 9592d49009e10003a86a2d24069b6afc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8e71359b16a5ccc22c0dce5c16d1ff798500cc8858af25335d85e9d6c0d64b0.yml +openapi_spec_hash: 1bcf0ff8d24d6e63399a9e0c1a331336 config_hash: 284c4178d08f75d8c8b29f275948a8fd From a071a9ac7b25de7454f6ad37ee39af0f5dbcd2b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Jun 2025 06:23:37 +0000 Subject: [PATCH 159/392] fix(ci): correct conditional --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73446dcfba9..75ed9117a16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,14 +41,13 @@ jobs: run: ./scripts/lint upload: - if: github.repository == 'stainless-sdks/cloudflare-python' + if: github.repository == 'stainless-sdks/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) timeout-minutes: 10 name: upload permissions: contents: read id-token: write runs-on: depot-ubuntu-24.04 - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -91,7 +90,7 @@ jobs: timeout-minutes: 10 name: examples runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.repository == 'cloudflare/cloudflare-python && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)' + if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) steps: - uses: actions/checkout@v4 From 0f9df9c9010bb10bcc25432d120f5b73fee55ead Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 06:13:35 +0000 Subject: [PATCH 160/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0ea10509115..cf6586dcf75 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8e71359b16a5ccc22c0dce5c16d1ff798500cc8858af25335d85e9d6c0d64b0.yml -openapi_spec_hash: 1bcf0ff8d24d6e63399a9e0c1a331336 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56825afb1a7a893f4928c3184b8db1345893562278db43d1ab77ebeff740082e.yml +openapi_spec_hash: 2b5b0dcc1d4a02ae0cee79e6065bbef1 config_hash: 284c4178d08f75d8c8b29f275948a8fd From c78996bbe8f0e33bedf4d928d9b8878b18ec81e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:36:24 +0000 Subject: [PATCH 161/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/resources/radar/search.py | 12 +- .../resources/radar/verified_bots/top.py | 61 +++++-- .../types/radar/entities/asn_get_response.py | 3 - .../types/radar/entities/asn_ip_response.py | 3 - .../types/radar/entities/asn_list_response.py | 3 - .../types/radar/search_global_params.py | 4 +- .../radar/verified_bots/test_top.py | 170 ++++++++++-------- 8 files changed, 153 insertions(+), 107 deletions(-) diff --git a/.stats.yml b/.stats.yml index cf6586dcf75..dcb3152b214 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56825afb1a7a893f4928c3184b8db1345893562278db43d1ab77ebeff740082e.yml -openapi_spec_hash: 2b5b0dcc1d4a02ae0cee79e6065bbef1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7c566c3ce59d925331b04a5c4802747f67167d4645637414a17b2db0f89a5a.yml +openapi_spec_hash: 43e4ef78fd8c5d5a4695688659db7fbd config_hash: 284c4178d08f75d8c8b29f275948a8fd diff --git a/src/cloudflare/resources/radar/search.py b/src/cloudflare/resources/radar/search.py index a1e32a7d272..629f5ad0215 100644 --- a/src/cloudflare/resources/radar/search.py +++ b/src/cloudflare/resources/radar/search.py @@ -49,9 +49,9 @@ def global_( self, *, query: str, - exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, limit_per_group: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -62,7 +62,7 @@ def global_( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SearchGlobalResponse: """ - Searches for locations, autonomous systems, and reports. + Searches for locations, autonomous systems, reports, and bots. Args: query: Search for locations, autonomous systems and reports. @@ -133,9 +133,9 @@ async def global_( self, *, query: str, - exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, limit_per_group: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -146,7 +146,7 @@ async def global_( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SearchGlobalResponse: """ - Searches for locations, autonomous systems, and reports. + Searches for locations, autonomous systems, reports, and bots. Args: query: Search for locations, autonomous systems and reports. diff --git a/src/cloudflare/resources/radar/verified_bots/top.py b/src/cloudflare/resources/radar/verified_bots/top.py index 1a56c1d62c9..a9363226ced 100644 --- a/src/cloudflare/resources/radar/verified_bots/top.py +++ b/src/cloudflare/resources/radar/verified_bots/top.py @@ -2,6 +2,7 @@ from __future__ import annotations +import typing_extensions from typing import List, Type, Union, cast from datetime import datetime from typing_extensions import Literal @@ -47,6 +48,9 @@ def with_streaming_response(self) -> TopResourceWithStreamingResponse: """ return TopResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." + ) def bots( self, *, @@ -131,6 +135,9 @@ def bots( cast_to=cast(Type[TopBotsResponse], ResultWrapper[TopBotsResponse]), ) + @typing_extensions.deprecated( + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." + ) def categories( self, *, @@ -237,6 +244,9 @@ def with_streaming_response(self) -> AsyncTopResourceWithStreamingResponse: """ return AsyncTopResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." + ) async def bots( self, *, @@ -321,6 +331,9 @@ async def bots( cast_to=cast(Type[TopBotsResponse], ResultWrapper[TopBotsResponse]), ) + @typing_extensions.deprecated( + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." + ) async def categories( self, *, @@ -411,11 +424,15 @@ class TopResourceWithRawResponse: def __init__(self, top: TopResource) -> None: self._top = top - self.bots = to_raw_response_wrapper( - top.bots, + self.bots = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + top.bots # pyright: ignore[reportDeprecated], + ) ) - self.categories = to_raw_response_wrapper( - top.categories, + self.categories = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + top.categories # pyright: ignore[reportDeprecated], + ) ) @@ -423,11 +440,15 @@ class AsyncTopResourceWithRawResponse: def __init__(self, top: AsyncTopResource) -> None: self._top = top - self.bots = async_to_raw_response_wrapper( - top.bots, + self.bots = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + top.bots # pyright: ignore[reportDeprecated], + ) ) - self.categories = async_to_raw_response_wrapper( - top.categories, + self.categories = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + top.categories # pyright: ignore[reportDeprecated], + ) ) @@ -435,11 +456,15 @@ class TopResourceWithStreamingResponse: def __init__(self, top: TopResource) -> None: self._top = top - self.bots = to_streamed_response_wrapper( - top.bots, + self.bots = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + top.bots # pyright: ignore[reportDeprecated], + ) ) - self.categories = to_streamed_response_wrapper( - top.categories, + self.categories = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + top.categories # pyright: ignore[reportDeprecated], + ) ) @@ -447,9 +472,13 @@ class AsyncTopResourceWithStreamingResponse: def __init__(self, top: AsyncTopResource) -> None: self._top = top - self.bots = async_to_streamed_response_wrapper( - top.bots, + self.bots = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + top.bots # pyright: ignore[reportDeprecated], + ) ) - self.categories = async_to_streamed_response_wrapper( - top.categories, + self.categories = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + top.categories # pyright: ignore[reportDeprecated], + ) ) diff --git a/src/cloudflare/types/radar/entities/asn_get_response.py b/src/cloudflare/types/radar/entities/asn_get_response.py index 211edb79618..91682548ba1 100644 --- a/src/cloudflare/types/radar/entities/asn_get_response.py +++ b/src/cloudflare/types/radar/entities/asn_get_response.py @@ -60,9 +60,6 @@ class ASN(BaseModel): aka: Optional[str] = None - name_long: Optional[str] = FieldInfo(alias="nameLong", default=None) - """Deprecated field. Please use 'aka'.""" - class ASNGetResponse(BaseModel): asn: ASN diff --git a/src/cloudflare/types/radar/entities/asn_ip_response.py b/src/cloudflare/types/radar/entities/asn_ip_response.py index 9cf0df4ecb7..6a26dc3d92c 100644 --- a/src/cloudflare/types/radar/entities/asn_ip_response.py +++ b/src/cloudflare/types/radar/entities/asn_ip_response.py @@ -58,9 +58,6 @@ class ASN(BaseModel): aka: Optional[str] = None - name_long: Optional[str] = FieldInfo(alias="nameLong", default=None) - """Deprecated field. Please use 'aka'.""" - class ASNIPResponse(BaseModel): asn: ASN diff --git a/src/cloudflare/types/radar/entities/asn_list_response.py b/src/cloudflare/types/radar/entities/asn_list_response.py index 8ab3d93b80b..9a6d5b811ca 100644 --- a/src/cloudflare/types/radar/entities/asn_list_response.py +++ b/src/cloudflare/types/radar/entities/asn_list_response.py @@ -20,9 +20,6 @@ class ASN(BaseModel): aka: Optional[str] = None - name_long: Optional[str] = FieldInfo(alias="nameLong", default=None) - """Deprecated field. Please use 'aka'.""" - org_name: Optional[str] = FieldInfo(alias="orgName", default=None) website: Optional[str] = None diff --git a/src/cloudflare/types/radar/search_global_params.py b/src/cloudflare/types/radar/search_global_params.py index e0b1c49791a..2c6cc534162 100644 --- a/src/cloudflare/types/radar/search_global_params.py +++ b/src/cloudflare/types/radar/search_global_params.py @@ -14,13 +14,13 @@ class SearchGlobalParams(TypedDict, total=False): query: Required[str] """Search for locations, autonomous systems and reports.""" - exclude: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] + exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] """Search types excluded from results.""" format: Literal["JSON", "CSV"] """Format in which results will be returned.""" - include: List[Literal["ASNS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] + include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] """Search types included in results.""" limit: int diff --git a/tests/api_resources/radar/verified_bots/test_top.py b/tests/api_resources/radar/verified_bots/test_top.py index 3178128724a..2a1576beb5a 100644 --- a/tests/api_resources/radar/verified_bots/test_top.py +++ b/tests/api_resources/radar/verified_bots/test_top.py @@ -15,6 +15,8 @@ TopCategoriesResponse, ) +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,27 +25,32 @@ class TestTop: @parametrize def test_method_bots(self, client: Cloudflare) -> None: - top = client.radar.verified_bots.top.bots() + with pytest.warns(DeprecationWarning): + top = client.radar.verified_bots.top.bots() + assert_matches_type(TopBotsResponse, top, path=["response"]) @parametrize def test_method_bots_with_all_params(self, client: Cloudflare) -> None: - top = client.radar.verified_bots.top.bots( - asn=["string"], - continent=["string"], - date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], - date_range=["7d"], - date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], - format="JSON", - limit=5, - location=["string"], - name=["main_series"], - ) + with pytest.warns(DeprecationWarning): + top = client.radar.verified_bots.top.bots( + asn=["string"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit=5, + location=["string"], + name=["main_series"], + ) + assert_matches_type(TopBotsResponse, top, path=["response"]) @parametrize def test_raw_response_bots(self, client: Cloudflare) -> None: - response = client.radar.verified_bots.top.with_raw_response.bots() + with pytest.warns(DeprecationWarning): + response = client.radar.verified_bots.top.with_raw_response.bots() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -52,38 +59,44 @@ def test_raw_response_bots(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_bots(self, client: Cloudflare) -> None: - with client.radar.verified_bots.top.with_streaming_response.bots() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.radar.verified_bots.top.with_streaming_response.bots() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - top = response.parse() - assert_matches_type(TopBotsResponse, top, path=["response"]) + top = response.parse() + assert_matches_type(TopBotsResponse, top, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_categories(self, client: Cloudflare) -> None: - top = client.radar.verified_bots.top.categories() + with pytest.warns(DeprecationWarning): + top = client.radar.verified_bots.top.categories() + assert_matches_type(TopCategoriesResponse, top, path=["response"]) @parametrize def test_method_categories_with_all_params(self, client: Cloudflare) -> None: - top = client.radar.verified_bots.top.categories( - asn=["string"], - continent=["string"], - date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], - date_range=["7d"], - date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], - format="JSON", - limit=5, - location=["string"], - name=["main_series"], - ) + with pytest.warns(DeprecationWarning): + top = client.radar.verified_bots.top.categories( + asn=["string"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit=5, + location=["string"], + name=["main_series"], + ) + assert_matches_type(TopCategoriesResponse, top, path=["response"]) @parametrize def test_raw_response_categories(self, client: Cloudflare) -> None: - response = client.radar.verified_bots.top.with_raw_response.categories() + with pytest.warns(DeprecationWarning): + response = client.radar.verified_bots.top.with_raw_response.categories() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -92,12 +105,13 @@ def test_raw_response_categories(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_categories(self, client: Cloudflare) -> None: - with client.radar.verified_bots.top.with_streaming_response.categories() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.radar.verified_bots.top.with_streaming_response.categories() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - top = response.parse() - assert_matches_type(TopCategoriesResponse, top, path=["response"]) + top = response.parse() + assert_matches_type(TopCategoriesResponse, top, path=["response"]) assert cast(Any, response.is_closed) is True @@ -109,27 +123,32 @@ class TestAsyncTop: @parametrize async def test_method_bots(self, async_client: AsyncCloudflare) -> None: - top = await async_client.radar.verified_bots.top.bots() + with pytest.warns(DeprecationWarning): + top = await async_client.radar.verified_bots.top.bots() + assert_matches_type(TopBotsResponse, top, path=["response"]) @parametrize async def test_method_bots_with_all_params(self, async_client: AsyncCloudflare) -> None: - top = await async_client.radar.verified_bots.top.bots( - asn=["string"], - continent=["string"], - date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], - date_range=["7d"], - date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], - format="JSON", - limit=5, - location=["string"], - name=["main_series"], - ) + with pytest.warns(DeprecationWarning): + top = await async_client.radar.verified_bots.top.bots( + asn=["string"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit=5, + location=["string"], + name=["main_series"], + ) + assert_matches_type(TopBotsResponse, top, path=["response"]) @parametrize async def test_raw_response_bots(self, async_client: AsyncCloudflare) -> None: - response = await async_client.radar.verified_bots.top.with_raw_response.bots() + with pytest.warns(DeprecationWarning): + response = await async_client.radar.verified_bots.top.with_raw_response.bots() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -138,38 +157,44 @@ async def test_raw_response_bots(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_bots(self, async_client: AsyncCloudflare) -> None: - async with async_client.radar.verified_bots.top.with_streaming_response.bots() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.radar.verified_bots.top.with_streaming_response.bots() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - top = await response.parse() - assert_matches_type(TopBotsResponse, top, path=["response"]) + top = await response.parse() + assert_matches_type(TopBotsResponse, top, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_categories(self, async_client: AsyncCloudflare) -> None: - top = await async_client.radar.verified_bots.top.categories() + with pytest.warns(DeprecationWarning): + top = await async_client.radar.verified_bots.top.categories() + assert_matches_type(TopCategoriesResponse, top, path=["response"]) @parametrize async def test_method_categories_with_all_params(self, async_client: AsyncCloudflare) -> None: - top = await async_client.radar.verified_bots.top.categories( - asn=["string"], - continent=["string"], - date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], - date_range=["7d"], - date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], - format="JSON", - limit=5, - location=["string"], - name=["main_series"], - ) + with pytest.warns(DeprecationWarning): + top = await async_client.radar.verified_bots.top.categories( + asn=["string"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit=5, + location=["string"], + name=["main_series"], + ) + assert_matches_type(TopCategoriesResponse, top, path=["response"]) @parametrize async def test_raw_response_categories(self, async_client: AsyncCloudflare) -> None: - response = await async_client.radar.verified_bots.top.with_raw_response.categories() + with pytest.warns(DeprecationWarning): + response = await async_client.radar.verified_bots.top.with_raw_response.categories() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -178,11 +203,12 @@ async def test_raw_response_categories(self, async_client: AsyncCloudflare) -> N @parametrize async def test_streaming_response_categories(self, async_client: AsyncCloudflare) -> None: - async with async_client.radar.verified_bots.top.with_streaming_response.categories() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.radar.verified_bots.top.with_streaming_response.categories() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - top = await response.parse() - assert_matches_type(TopCategoriesResponse, top, path=["response"]) + top = await response.parse() + assert_matches_type(TopCategoriesResponse, top, path=["response"]) assert cast(Any, response.is_closed) is True From 6249040212d54f6e296c545a940be3c1b3f2357b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 12:07:37 +0000 Subject: [PATCH 162/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index dcb3152b214..26887e5ac2b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7c566c3ce59d925331b04a5c4802747f67167d4645637414a17b2db0f89a5a.yml -openapi_spec_hash: 43e4ef78fd8c5d5a4695688659db7fbd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-85dad60f1b2821be03c3c8a58b223fceae36de496cee13a358f7603d685d31c0.yml +openapi_spec_hash: b57f7fe72b7083fa0c7ed0ec30569810 config_hash: 284c4178d08f75d8c8b29f275948a8fd From f96551d3275d2c8117705c84614f924eb62da98b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 12:36:22 +0000 Subject: [PATCH 163/392] feat(api): api update --- .stats.yml | 4 +- .../resources/firewall/lockdowns.py | 8 +- src/cloudflare/resources/firewall/ua_rules.py | 260 +++++++++--------- .../types/firewall/lockdown_create_params.py | 2 +- .../types/firewall/ua_rule_create_params.py | 9 + .../types/firewall/ua_rule_create_response.py | 39 ++- .../types/firewall/ua_rule_delete_response.py | 29 +- .../types/firewall/ua_rule_get_response.py | 39 ++- .../types/firewall/ua_rule_list_params.py | 8 +- .../types/firewall/ua_rule_update_params.py | 9 + .../types/firewall/ua_rule_update_response.py | 39 ++- src/cloudflare/types/firewall/waf/override.py | 2 +- .../types/rate_limits/rate_limit.py | 2 +- .../rate_limits/rate_limit_delete_response.py | 2 +- tests/api_resources/firewall/test_ua_rules.py | 16 +- 15 files changed, 310 insertions(+), 158 deletions(-) diff --git a/.stats.yml b/.stats.yml index 26887e5ac2b..fbaed1d32c0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-85dad60f1b2821be03c3c8a58b223fceae36de496cee13a358f7603d685d31c0.yml -openapi_spec_hash: b57f7fe72b7083fa0c7ed0ec30569810 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00c303ed3ff51e75fd30ab890a69ebbfde9bcb7c3a64397b081abfdd30c7b212.yml +openapi_spec_hash: 6886ec9a0f6960b8da8ef7309236eefb config_hash: 284c4178d08f75d8c8b29f275948a8fd diff --git a/src/cloudflare/resources/firewall/lockdowns.py b/src/cloudflare/resources/firewall/lockdowns.py index 1081d553f48..28f38881898 100644 --- a/src/cloudflare/resources/firewall/lockdowns.py +++ b/src/cloudflare/resources/firewall/lockdowns.py @@ -79,8 +79,8 @@ def create( entered URL will be escaped before use, which means you can only use simple wildcard patterns. - description: An informative summary of the rate limit. This value is sanitized and any tags - will be removed. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. paused: When true, indicates that the rule is currently paused. @@ -413,8 +413,8 @@ async def create( entered URL will be escaped before use, which means you can only use simple wildcard patterns. - description: An informative summary of the rate limit. This value is sanitized and any tags - will be removed. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. paused: When true, indicates that the rule is currently paused. diff --git a/src/cloudflare/resources/firewall/ua_rules.py b/src/cloudflare/resources/firewall/ua_rules.py index 5de9246f2c3..69989c1cb50 100644 --- a/src/cloudflare/resources/firewall/ua_rules.py +++ b/src/cloudflare/resources/firewall/ua_rules.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, cast +from typing import Type, cast from typing_extensions import Literal import httpx @@ -56,6 +56,8 @@ def create( zone_id: str, configuration: ua_rule_create_params.Configuration, mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"], + description: str | NotGiven = NOT_GIVEN, + paused: bool | 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, @@ -71,6 +73,11 @@ def create( mode: The action to apply to a matched request. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. + + paused: When true, indicates that the rule is currently paused. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -81,28 +88,25 @@ def create( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - UARuleCreateResponse, - self._post( - f"/zones/{zone_id}/firewall/ua_rules", - body=maybe_transform( - { - "configuration": configuration, - "mode": mode, - }, - ua_rule_create_params.UARuleCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleCreateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._post( + f"/zones/{zone_id}/firewall/ua_rules", + body=maybe_transform( + { + "configuration": configuration, + "mode": mode, + "description": description, + "paused": paused, + }, + ua_rule_create_params.UARuleCreateParams, ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper, + ), + cast_to=cast(Type[UARuleCreateResponse], ResultWrapper[UARuleCreateResponse]), ) def update( @@ -112,6 +116,8 @@ def update( zone_id: str, configuration: ua_rule_update_params.Configuration, mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"], + description: str | NotGiven = NOT_GIVEN, + paused: bool | 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, @@ -131,6 +137,11 @@ def update( mode: The action to apply to a matched request. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. + + paused: When true, indicates that the rule is currently paused. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -143,28 +154,25 @@ def update( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not ua_rule_id: raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}") - return cast( - UARuleUpdateResponse, - self._put( - f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", - body=maybe_transform( - { - "configuration": configuration, - "mode": mode, - }, - ua_rule_update_params.UARuleUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._put( + f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", + body=maybe_transform( + { + "configuration": configuration, + "mode": mode, + "description": description, + "paused": paused, + }, + ua_rule_update_params.UARuleUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper, ), + cast_to=cast(Type[UARuleUpdateResponse], ResultWrapper[UARuleUpdateResponse]), ) def list( @@ -172,10 +180,10 @@ def list( *, zone_id: str, description: str | NotGiven = NOT_GIVEN, - description_search: str | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, + paused: bool | NotGiven = NOT_GIVEN, per_page: float | NotGiven = NOT_GIVEN, - ua_search: str | NotGiven = NOT_GIVEN, + user_agent: 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, @@ -193,14 +201,14 @@ def list( description: A string to search for in the description of existing rules. - description_search: A string to search for in the description of existing rules. - page: Page number of paginated results. + paused: When true, indicates that the rule is currently paused. + per_page: The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. - ua_search: A string to search for in the user agent values of existing rules. + user_agent: A string to search for in the user agent values of existing rules. extra_headers: Send extra headers @@ -223,10 +231,10 @@ def list( query=maybe_transform( { "description": description, - "description_search": description_search, "page": page, + "paused": paused, "per_page": per_page, - "ua_search": ua_search, + "user_agent": user_agent, }, ua_rule_list_params.UARuleListParams, ), @@ -310,21 +318,16 @@ def get( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not ua_rule_id: raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}") - return cast( - UARuleGetResponse, - self._get( - f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get( + f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleGetResponse]._unwrapper, ), + cast_to=cast(Type[UARuleGetResponse], ResultWrapper[UARuleGetResponse]), ) @@ -354,6 +357,8 @@ async def create( zone_id: str, configuration: ua_rule_create_params.Configuration, mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"], + description: str | NotGiven = NOT_GIVEN, + paused: bool | 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, @@ -369,6 +374,11 @@ async def create( mode: The action to apply to a matched request. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. + + paused: When true, indicates that the rule is currently paused. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -379,28 +389,25 @@ async def create( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - UARuleCreateResponse, - await self._post( - f"/zones/{zone_id}/firewall/ua_rules", - body=await async_maybe_transform( - { - "configuration": configuration, - "mode": mode, - }, - ua_rule_create_params.UARuleCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleCreateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._post( + f"/zones/{zone_id}/firewall/ua_rules", + body=await async_maybe_transform( + { + "configuration": configuration, + "mode": mode, + "description": description, + "paused": paused, + }, + ua_rule_create_params.UARuleCreateParams, ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleCreateResponse]._unwrapper, + ), + cast_to=cast(Type[UARuleCreateResponse], ResultWrapper[UARuleCreateResponse]), ) async def update( @@ -410,6 +417,8 @@ async def update( zone_id: str, configuration: ua_rule_update_params.Configuration, mode: Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"], + description: str | NotGiven = NOT_GIVEN, + paused: bool | 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, @@ -429,6 +438,11 @@ async def update( mode: The action to apply to a matched request. + description: An informative summary of the rule. This value is sanitized and any tags will be + removed. + + paused: When true, indicates that the rule is currently paused. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -441,28 +455,25 @@ async def update( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not ua_rule_id: raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}") - return cast( - UARuleUpdateResponse, - await self._put( - f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", - body=await async_maybe_transform( - { - "configuration": configuration, - "mode": mode, - }, - ua_rule_update_params.UARuleUpdateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._put( + f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", + body=await async_maybe_transform( + { + "configuration": configuration, + "mode": mode, + "description": description, + "paused": paused, + }, + ua_rule_update_params.UARuleUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleUpdateResponse]._unwrapper, ), + cast_to=cast(Type[UARuleUpdateResponse], ResultWrapper[UARuleUpdateResponse]), ) def list( @@ -470,10 +481,10 @@ def list( *, zone_id: str, description: str | NotGiven = NOT_GIVEN, - description_search: str | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, + paused: bool | NotGiven = NOT_GIVEN, per_page: float | NotGiven = NOT_GIVEN, - ua_search: str | NotGiven = NOT_GIVEN, + user_agent: 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, @@ -491,14 +502,14 @@ def list( description: A string to search for in the description of existing rules. - description_search: A string to search for in the description of existing rules. - page: Page number of paginated results. + paused: When true, indicates that the rule is currently paused. + per_page: The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. - ua_search: A string to search for in the user agent values of existing rules. + user_agent: A string to search for in the user agent values of existing rules. extra_headers: Send extra headers @@ -521,10 +532,10 @@ def list( query=maybe_transform( { "description": description, - "description_search": description_search, "page": page, + "paused": paused, "per_page": per_page, - "ua_search": ua_search, + "user_agent": user_agent, }, ua_rule_list_params.UARuleListParams, ), @@ -608,21 +619,16 @@ async def get( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not ua_rule_id: raise ValueError(f"Expected a non-empty value for `ua_rule_id` but received {ua_rule_id!r}") - return cast( - UARuleGetResponse, - await self._get( - f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[UARuleGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[UARuleGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._get( + f"/zones/{zone_id}/firewall/ua_rules/{ua_rule_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[UARuleGetResponse]._unwrapper, ), + cast_to=cast(Type[UARuleGetResponse], ResultWrapper[UARuleGetResponse]), ) diff --git a/src/cloudflare/types/firewall/lockdown_create_params.py b/src/cloudflare/types/firewall/lockdown_create_params.py index 7a8edc23ab5..40da506f5fb 100644 --- a/src/cloudflare/types/firewall/lockdown_create_params.py +++ b/src/cloudflare/types/firewall/lockdown_create_params.py @@ -30,7 +30,7 @@ class LockdownCreateParams(TypedDict, total=False): """ description: str - """An informative summary of the rate limit. + """An informative summary of the rule. This value is sanitized and any tags will be removed. """ diff --git a/src/cloudflare/types/firewall/ua_rule_create_params.py b/src/cloudflare/types/firewall/ua_rule_create_params.py index 63ae7961c1f..01e49728041 100644 --- a/src/cloudflare/types/firewall/ua_rule_create_params.py +++ b/src/cloudflare/types/firewall/ua_rule_create_params.py @@ -16,6 +16,15 @@ class UARuleCreateParams(TypedDict, total=False): mode: Required[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]] """The action to apply to a matched request.""" + description: str + """An informative summary of the rule. + + This value is sanitized and any tags will be removed. + """ + + paused: bool + """When true, indicates that the rule is currently paused.""" + class Configuration(TypedDict, total=False): target: Literal["ua"] diff --git a/src/cloudflare/types/firewall/ua_rule_create_response.py b/src/cloudflare/types/firewall/ua_rule_create_response.py index bb2d6671967..83b176379ac 100644 --- a/src/cloudflare/types/firewall/ua_rule_create_response.py +++ b/src/cloudflare/types/firewall/ua_rule_create_response.py @@ -1,8 +1,39 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional +from typing_extensions import Literal -__all__ = ["UARuleCreateResponse"] +from ..._models import BaseModel -UARuleCreateResponse: TypeAlias = Union[Optional[str], Optional[object]] +__all__ = ["UARuleCreateResponse", "Configuration"] + + +class Configuration(BaseModel): + target: Optional[str] = None + """The configuration target for this rule. + + You must set the target to `ua` for User Agent Blocking rules. + """ + + value: Optional[str] = None + """The exact user agent string to match. + + This value will be compared to the received `User-Agent` HTTP header value. + """ + + +class UARuleCreateResponse(BaseModel): + id: Optional[str] = None + """The unique identifier of the User Agent Blocking rule.""" + + configuration: Optional[Configuration] = None + """The configuration object for the current rule.""" + + description: Optional[str] = None + """An informative summary of the rule.""" + + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None + """The action to apply to a matched request.""" + + paused: Optional[bool] = None + """When true, indicates that the rule is currently paused.""" diff --git a/src/cloudflare/types/firewall/ua_rule_delete_response.py b/src/cloudflare/types/firewall/ua_rule_delete_response.py index 0d7cbd7d69d..2ded475139d 100644 --- a/src/cloudflare/types/firewall/ua_rule_delete_response.py +++ b/src/cloudflare/types/firewall/ua_rule_delete_response.py @@ -1,12 +1,39 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["UARuleDeleteResponse"] +__all__ = ["UARuleDeleteResponse", "Configuration"] + + +class Configuration(BaseModel): + target: Optional[str] = None + """The configuration target for this rule. + + You must set the target to `ua` for User Agent Blocking rules. + """ + + value: Optional[str] = None + """The exact user agent string to match. + + This value will be compared to the received `User-Agent` HTTP header value. + """ class UARuleDeleteResponse(BaseModel): id: Optional[str] = None """The unique identifier of the User Agent Blocking rule.""" + + configuration: Optional[Configuration] = None + """The configuration object for the current rule.""" + + description: Optional[str] = None + """An informative summary of the rule.""" + + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None + """The action to apply to a matched request.""" + + paused: Optional[bool] = None + """When true, indicates that the rule is currently paused.""" diff --git a/src/cloudflare/types/firewall/ua_rule_get_response.py b/src/cloudflare/types/firewall/ua_rule_get_response.py index 10613bd3d5b..ef98656691d 100644 --- a/src/cloudflare/types/firewall/ua_rule_get_response.py +++ b/src/cloudflare/types/firewall/ua_rule_get_response.py @@ -1,8 +1,39 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional +from typing_extensions import Literal -__all__ = ["UARuleGetResponse"] +from ..._models import BaseModel -UARuleGetResponse: TypeAlias = Union[Optional[str], Optional[object]] +__all__ = ["UARuleGetResponse", "Configuration"] + + +class Configuration(BaseModel): + target: Optional[str] = None + """The configuration target for this rule. + + You must set the target to `ua` for User Agent Blocking rules. + """ + + value: Optional[str] = None + """The exact user agent string to match. + + This value will be compared to the received `User-Agent` HTTP header value. + """ + + +class UARuleGetResponse(BaseModel): + id: Optional[str] = None + """The unique identifier of the User Agent Blocking rule.""" + + configuration: Optional[Configuration] = None + """The configuration object for the current rule.""" + + description: Optional[str] = None + """An informative summary of the rule.""" + + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None + """The action to apply to a matched request.""" + + paused: Optional[bool] = None + """When true, indicates that the rule is currently paused.""" diff --git a/src/cloudflare/types/firewall/ua_rule_list_params.py b/src/cloudflare/types/firewall/ua_rule_list_params.py index cc342a98c48..c40c8bd6cde 100644 --- a/src/cloudflare/types/firewall/ua_rule_list_params.py +++ b/src/cloudflare/types/firewall/ua_rule_list_params.py @@ -14,12 +14,12 @@ class UARuleListParams(TypedDict, total=False): description: str """A string to search for in the description of existing rules.""" - description_search: str - """A string to search for in the description of existing rules.""" - page: float """Page number of paginated results.""" + paused: bool + """When true, indicates that the rule is currently paused.""" + per_page: float """The maximum number of results per page. @@ -27,5 +27,5 @@ class UARuleListParams(TypedDict, total=False): or `20`. """ - ua_search: str + user_agent: str """A string to search for in the user agent values of existing rules.""" diff --git a/src/cloudflare/types/firewall/ua_rule_update_params.py b/src/cloudflare/types/firewall/ua_rule_update_params.py index 95d526a5c3a..eb27661492d 100644 --- a/src/cloudflare/types/firewall/ua_rule_update_params.py +++ b/src/cloudflare/types/firewall/ua_rule_update_params.py @@ -24,6 +24,15 @@ class UARuleUpdateParams(TypedDict, total=False): mode: Required[Literal["block", "challenge", "whitelist", "js_challenge", "managed_challenge"]] """The action to apply to a matched request.""" + description: str + """An informative summary of the rule. + + This value is sanitized and any tags will be removed. + """ + + paused: bool + """When true, indicates that the rule is currently paused.""" + Configuration: TypeAlias = Union[ AccessRuleIPConfigurationParam, diff --git a/src/cloudflare/types/firewall/ua_rule_update_response.py b/src/cloudflare/types/firewall/ua_rule_update_response.py index 4dc4d0ae168..6576f69965c 100644 --- a/src/cloudflare/types/firewall/ua_rule_update_response.py +++ b/src/cloudflare/types/firewall/ua_rule_update_response.py @@ -1,8 +1,39 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional +from typing_extensions import Literal -__all__ = ["UARuleUpdateResponse"] +from ..._models import BaseModel -UARuleUpdateResponse: TypeAlias = Union[Optional[str], Optional[object]] +__all__ = ["UARuleUpdateResponse", "Configuration"] + + +class Configuration(BaseModel): + target: Optional[str] = None + """The configuration target for this rule. + + You must set the target to `ua` for User Agent Blocking rules. + """ + + value: Optional[str] = None + """The exact user agent string to match. + + This value will be compared to the received `User-Agent` HTTP header value. + """ + + +class UARuleUpdateResponse(BaseModel): + id: Optional[str] = None + """The unique identifier of the User Agent Blocking rule.""" + + configuration: Optional[Configuration] = None + """The configuration object for the current rule.""" + + description: Optional[str] = None + """An informative summary of the rule.""" + + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None + """The action to apply to a matched request.""" + + paused: Optional[bool] = None + """When true, indicates that the rule is currently paused.""" diff --git a/src/cloudflare/types/firewall/waf/override.py b/src/cloudflare/types/firewall/waf/override.py index a758b89d18b..2a1312ee4ec 100644 --- a/src/cloudflare/types/firewall/waf/override.py +++ b/src/cloudflare/types/firewall/waf/override.py @@ -27,7 +27,7 @@ class Override(BaseModel): """ paused: Optional[bool] = None - """When true, indicates that the WAF package is currently paused.""" + """When true, indicates that the rule is currently paused.""" priority: Optional[float] = None """ diff --git a/src/cloudflare/types/rate_limits/rate_limit.py b/src/cloudflare/types/rate_limits/rate_limit.py index 24cc1540a32..301fed3c9e5 100644 --- a/src/cloudflare/types/rate_limits/rate_limit.py +++ b/src/cloudflare/types/rate_limits/rate_limit.py @@ -123,7 +123,7 @@ class RateLimit(BaseModel): """ description: Optional[str] = None - """An informative summary of the rate limit. + """An informative summary of the rule. This value is sanitized and any tags will be removed. """ diff --git a/src/cloudflare/types/rate_limits/rate_limit_delete_response.py b/src/cloudflare/types/rate_limits/rate_limit_delete_response.py index 077f6303106..c2901e3cb71 100644 --- a/src/cloudflare/types/rate_limits/rate_limit_delete_response.py +++ b/src/cloudflare/types/rate_limits/rate_limit_delete_response.py @@ -132,7 +132,7 @@ class RateLimitDeleteResponse(BaseModel): """ description: Optional[str] = None - """An informative summary of the rate limit. + """An informative summary of the rule. This value is sanitized and any tags will be removed. """ diff --git a/tests/api_resources/firewall/test_ua_rules.py b/tests/api_resources/firewall/test_ua_rules.py index 5282aad763c..269d7e2662b 100644 --- a/tests/api_resources/firewall/test_ua_rules.py +++ b/tests/api_resources/firewall/test_ua_rules.py @@ -44,6 +44,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "value": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)", }, mode="challenge", + description="Prevent multiple login failures to mitigate brute force attacks", + paused=False, ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) @@ -109,6 +111,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "value": "198.51.100.4", }, mode="challenge", + description="Prevent multiple login failures to mitigate brute force attacks", + paused=False, ) assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"]) @@ -175,10 +179,10 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", description="abusive", - description_search="abusive", page=1, + paused=False, per_page=1, - ua_search="Safari", + user_agent="Safari", ) assert_matches_type(SyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) @@ -335,6 +339,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "value": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)", }, mode="challenge", + description="Prevent multiple login failures to mitigate brute force attacks", + paused=False, ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) @@ -400,6 +406,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "value": "198.51.100.4", }, mode="challenge", + description="Prevent multiple login failures to mitigate brute force attacks", + paused=False, ) assert_matches_type(UARuleUpdateResponse, ua_rule, path=["response"]) @@ -466,10 +474,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ua_rule = await async_client.firewall.ua_rules.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", description="abusive", - description_search="abusive", page=1, + paused=False, per_page=1, - ua_search="Safari", + user_agent="Safari", ) assert_matches_type(AsyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) From 2d3187794d5cc12d39dacfb58b51626b03495c12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 14:55:23 +0000 Subject: [PATCH 164/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/resources/bot_management.py | 20 +++++++++---------- .../bot_fight_mode_configuration.py | 2 +- .../bot_fight_mode_configuration_param.py | 2 +- .../bot_management_update_params.py | 8 ++++---- .../subscription_configuration.py | 2 +- .../subscription_configuration_param.py | 2 +- ...bot_fight_mode_definitely_configuration.py | 2 +- ...ght_mode_definitely_configuration_param.py | 2 +- ...per_bot_fight_mode_likely_configuration.py | 2 +- ...t_fight_mode_likely_configuration_param.py | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbaed1d32c0..06bb9eb0d3e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00c303ed3ff51e75fd30ab890a69ebbfde9bcb7c3a64397b081abfdd30c7b212.yml -openapi_spec_hash: 6886ec9a0f6960b8da8ef7309236eefb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fe53c8e1ba9040b0f7a669ede08f5e9c2a888661408036e7ea14b76ad713de49.yml +openapi_spec_hash: 5652d9793419b03cb9bba3883f6c2a92 config_hash: 284c4178d08f75d8c8b29f275948a8fd diff --git a/src/cloudflare/resources/bot_management.py b/src/cloudflare/resources/bot_management.py index f3a541ea1f7..943b0354b45 100644 --- a/src/cloudflare/resources/bot_management.py +++ b/src/cloudflare/resources/bot_management.py @@ -51,7 +51,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, fight_mode: bool | NotGiven = NOT_GIVEN, @@ -152,7 +152,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, optimize_wordpress: bool | NotGiven = NOT_GIVEN, @@ -264,7 +264,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, optimize_wordpress: bool | NotGiven = NOT_GIVEN, @@ -379,7 +379,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, auto_update_model: bool | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, @@ -486,7 +486,7 @@ def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, fight_mode: bool | NotGiven = NOT_GIVEN, @@ -609,7 +609,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, fight_mode: bool | NotGiven = NOT_GIVEN, @@ -710,7 +710,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, optimize_wordpress: bool | NotGiven = NOT_GIVEN, @@ -822,7 +822,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, optimize_wordpress: bool | NotGiven = NOT_GIVEN, @@ -937,7 +937,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, auto_update_model: bool | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, @@ -1044,7 +1044,7 @@ async def update( self, *, zone_id: str, - ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN, + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN, crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN, enable_js: bool | NotGiven = NOT_GIVEN, fight_mode: bool | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py b/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py index 1321d2b5f99..5acfb9a5088 100644 --- a/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py +++ b/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py @@ -35,7 +35,7 @@ class StaleZoneConfiguration(BaseModel): class BotFightModeConfiguration(BaseModel): - ai_bots_protection: Optional[Literal["block", "disabled"]] = None + ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Optional[Literal["enabled", "disabled"]] = None diff --git a/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py b/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py index 4eb28780e1e..aef20bd0801 100644 --- a/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py +++ b/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py @@ -8,7 +8,7 @@ class BotFightModeConfigurationParam(TypedDict, total=False): - ai_bots_protection: Literal["block", "disabled"] + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Literal["enabled", "disabled"] diff --git a/src/cloudflare/types/bot_management/bot_management_update_params.py b/src/cloudflare/types/bot_management/bot_management_update_params.py index 447deb3c4c7..f272d5858ac 100644 --- a/src/cloudflare/types/bot_management/bot_management_update_params.py +++ b/src/cloudflare/types/bot_management/bot_management_update_params.py @@ -18,7 +18,7 @@ class BotFightModeConfiguration(TypedDict, total=False): zone_id: Required[str] """Identifier.""" - ai_bots_protection: Literal["block", "disabled"] + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Literal["enabled", "disabled"] @@ -38,7 +38,7 @@ class SuperBotFightModeDefinitelyConfiguration(TypedDict, total=False): zone_id: Required[str] """Identifier.""" - ai_bots_protection: Literal["block", "disabled"] + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Literal["enabled", "disabled"] @@ -71,7 +71,7 @@ class SuperBotFightModeLikelyConfiguration(TypedDict, total=False): zone_id: Required[str] """Identifier.""" - ai_bots_protection: Literal["block", "disabled"] + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Literal["enabled", "disabled"] @@ -107,7 +107,7 @@ class SubscriptionConfiguration(TypedDict, total=False): zone_id: Required[str] """Identifier.""" - ai_bots_protection: Literal["block", "disabled"] + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] """Enable rule to block AI Scrapers and Crawlers.""" auto_update_model: bool diff --git a/src/cloudflare/types/bot_management/subscription_configuration.py b/src/cloudflare/types/bot_management/subscription_configuration.py index 8a874700038..c2e6d5ebd60 100644 --- a/src/cloudflare/types/bot_management/subscription_configuration.py +++ b/src/cloudflare/types/bot_management/subscription_configuration.py @@ -35,7 +35,7 @@ class StaleZoneConfiguration(BaseModel): class SubscriptionConfiguration(BaseModel): - ai_bots_protection: Optional[Literal["block", "disabled"]] = None + ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None """Enable rule to block AI Scrapers and Crawlers.""" auto_update_model: Optional[bool] = None diff --git a/src/cloudflare/types/bot_management/subscription_configuration_param.py b/src/cloudflare/types/bot_management/subscription_configuration_param.py index a58d9f30ac6..3c7fdf849bc 100644 --- a/src/cloudflare/types/bot_management/subscription_configuration_param.py +++ b/src/cloudflare/types/bot_management/subscription_configuration_param.py @@ -8,7 +8,7 @@ class SubscriptionConfigurationParam(TypedDict, total=False): - ai_bots_protection: Literal["block", "disabled"] + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] """Enable rule to block AI Scrapers and Crawlers.""" auto_update_model: bool diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py index 63e9cbc33cf..9d225bd56c2 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py @@ -20,7 +20,7 @@ class StaleZoneConfiguration(BaseModel): class SuperBotFightModeDefinitelyConfiguration(BaseModel): - ai_bots_protection: Optional[Literal["block", "disabled"]] = None + ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Optional[Literal["enabled", "disabled"]] = None diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py index d8b195afaf4..17f1564dfc5 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py @@ -8,7 +8,7 @@ class SuperBotFightModeDefinitelyConfigurationParam(TypedDict, total=False): - ai_bots_protection: Literal["block", "disabled"] + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Literal["enabled", "disabled"] diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py index 1547b01318c..6355082b4e8 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py @@ -14,7 +14,7 @@ class StaleZoneConfiguration(BaseModel): class SuperBotFightModeLikelyConfiguration(BaseModel): - ai_bots_protection: Optional[Literal["block", "disabled"]] = None + ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Optional[Literal["enabled", "disabled"]] = None diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py index 6cb2e09143d..2c4c57a6e00 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py @@ -8,7 +8,7 @@ class SuperBotFightModeLikelyConfigurationParam(TypedDict, total=False): - ai_bots_protection: Literal["block", "disabled"] + ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] """Enable rule to block AI Scrapers and Crawlers.""" crawler_protection: Literal["enabled", "disabled"] From 566e8feee1c2633decd30ee9bb28cbaef8614872 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 15:45:01 +0000 Subject: [PATCH 165/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 06bb9eb0d3e..29997a37be5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fe53c8e1ba9040b0f7a669ede08f5e9c2a888661408036e7ea14b76ad713de49.yml -openapi_spec_hash: 5652d9793419b03cb9bba3883f6c2a92 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3d3cbf5ec66167f9d4a0256b0157b7aa22a9e19c6df38dc69fe5ba9d545b8f7f.yml +openapi_spec_hash: 440056f075a5e6290e1d275b399dfdb8 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 5c9a632f1b7fdf28e4479c57e3e6f6110ebdae94 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 15:51:47 +0000 Subject: [PATCH 166/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 29997a37be5..eb9e1b7277d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3d3cbf5ec66167f9d4a0256b0157b7aa22a9e19c6df38dc69fe5ba9d545b8f7f.yml -openapi_spec_hash: 440056f075a5e6290e1d275b399dfdb8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d8531090b44f32249e0eed01bb829c6e720593a78a2d02a551fab20cdd8ee20.yml +openapi_spec_hash: 6a479f8eb296f4049aaff05a951ee2eb config_hash: 284c4178d08f75d8c8b29f275948a8fd From 79d999411b3206b78861f99734ca81c408581f57 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 16:20:45 +0000 Subject: [PATCH 167/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index eb9e1b7277d..3f7e003864f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d8531090b44f32249e0eed01bb829c6e720593a78a2d02a551fab20cdd8ee20.yml -openapi_spec_hash: 6a479f8eb296f4049aaff05a951ee2eb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a7660a9125cd0eb5273d15f53de60d7ce676054089c6a0c297d086bb7eacd35.yml +openapi_spec_hash: f0c71ff66c24814cbca35d23b2e7f644 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 23a0a7c49ba988c56c581d7fb9c0e1cb0f3d9426 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 16:41:37 +0000 Subject: [PATCH 168/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3f7e003864f..9c14e339d48 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a7660a9125cd0eb5273d15f53de60d7ce676054089c6a0c297d086bb7eacd35.yml -openapi_spec_hash: f0c71ff66c24814cbca35d23b2e7f644 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7b0e31b73481fdd677267f9a351a6e34b90594566f61eb273887fdfcf04c1830.yml +openapi_spec_hash: 423a55384fc788ed54721636851ee81d config_hash: 284c4178d08f75d8c8b29f275948a8fd From d711a036cd40fc355be2ca66bb8564dcfe4515d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 17:28:17 +0000 Subject: [PATCH 169/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9c14e339d48..82529119433 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7b0e31b73481fdd677267f9a351a6e34b90594566f61eb273887fdfcf04c1830.yml -openapi_spec_hash: 423a55384fc788ed54721636851ee81d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-583c4de47352785441e316de8134bcb10cb0b359b1f85de236d18bae8e185bd7.yml +openapi_spec_hash: f628190422f169e155747747116cc414 config_hash: 284c4178d08f75d8c8b29f275948a8fd From daee173b8a929e0c6dbbda2bfe54dc52df5c725b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 17:43:03 +0000 Subject: [PATCH 170/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 82529119433..914fbc2f2f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-583c4de47352785441e316de8134bcb10cb0b359b1f85de236d18bae8e185bd7.yml -openapi_spec_hash: f628190422f169e155747747116cc414 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0655902c1ad875fb19db63fc4f8c6704fae4967ca6b91ae482125884c174ed24.yml +openapi_spec_hash: bd789cc3f543fa2869a732b53f9398c0 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 1e141f29be6878064dece4b5fb53ff6027595b6d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 20:09:22 +0000 Subject: [PATCH 171/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 914fbc2f2f8..d1fcb81e0ee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0655902c1ad875fb19db63fc4f8c6704fae4967ca6b91ae482125884c174ed24.yml -openapi_spec_hash: bd789cc3f543fa2869a732b53f9398c0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-abb65a4a263d4d85eb2903b7afcc3d8a376bdf85143d1ab9f05e0988db6ced90.yml +openapi_spec_hash: 5a134fafe63a192ef9c2f41f4b7ebed9 config_hash: 284c4178d08f75d8c8b29f275948a8fd From c8e76fe323f3322fde3cb30a695f2593728b9782 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 20:57:50 +0000 Subject: [PATCH 172/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d1fcb81e0ee..be3b6c8e22e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1752 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-abb65a4a263d4d85eb2903b7afcc3d8a376bdf85143d1ab9f05e0988db6ced90.yml -openapi_spec_hash: 5a134fafe63a192ef9c2f41f4b7ebed9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-33820eebc9530ec8e1c285a315f055d92e1f1b02db794934b6947616075562fd.yml +openapi_spec_hash: dd485200592659d406659d8d731779f5 config_hash: 284c4178d08f75d8c8b29f275948a8fd From 4d80c5529a4680d0cb58e63073d90edc65b289a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:20:07 +0000 Subject: [PATCH 173/392] feat(api): Add Radar Bots and Web Crawlers --- .stats.yml | 4 +- api.md | 38 + src/cloudflare/resources/radar/__init__.py | 14 + .../resources/radar/bots/__init__.py | 33 + src/cloudflare/resources/radar/bots/bots.py | 1210 +++++++++++++++++ .../resources/radar/bots/web_crawlers.py | 437 ++++++ src/cloudflare/resources/radar/radar.py | 32 + src/cloudflare/types/radar/__init__.py | 10 + .../types/radar/as112_timeseries_response.py | 4 +- .../attacks/layer3_timeseries_response.py | 4 +- src/cloudflare/types/radar/bot_get_params.py | 12 + .../types/radar/bot_get_response.py | 37 + src/cloudflare/types/radar/bot_list_params.py | 49 + .../types/radar/bot_list_response.py | 28 + .../types/radar/bot_summary_params.py | 98 ++ .../types/radar/bot_summary_response.py | 91 ++ .../radar/bot_timeseries_groups_params.py | 105 ++ .../radar/bot_timeseries_groups_response.py | 111 ++ .../types/radar/bot_timeseries_params.py | 98 ++ .../types/radar/bot_timeseries_response.py | 105 ++ src/cloudflare/types/radar/bots/__init__.py | 10 + .../radar/bots/web_crawler_summary_params.py | 43 + .../bots/web_crawler_summary_response.py | 91 ++ .../web_crawler_timeseries_groups_params.py | 50 + .../web_crawler_timeseries_groups_response.py | 111 ++ .../types/radar/dns_timeseries_response.py | 4 +- .../types/radar/http_timeseries_response.py | 4 +- tests/api_resources/radar/bots/__init__.py | 1 + .../radar/bots/test_web_crawlers.py | 210 +++ tests/api_resources/radar/test_bots.py | 491 +++++++ 30 files changed, 3525 insertions(+), 10 deletions(-) create mode 100644 src/cloudflare/resources/radar/bots/__init__.py create mode 100644 src/cloudflare/resources/radar/bots/bots.py create mode 100644 src/cloudflare/resources/radar/bots/web_crawlers.py create mode 100644 src/cloudflare/types/radar/bot_get_params.py create mode 100644 src/cloudflare/types/radar/bot_get_response.py create mode 100644 src/cloudflare/types/radar/bot_list_params.py create mode 100644 src/cloudflare/types/radar/bot_list_response.py create mode 100644 src/cloudflare/types/radar/bot_summary_params.py create mode 100644 src/cloudflare/types/radar/bot_summary_response.py create mode 100644 src/cloudflare/types/radar/bot_timeseries_groups_params.py create mode 100644 src/cloudflare/types/radar/bot_timeseries_groups_response.py create mode 100644 src/cloudflare/types/radar/bot_timeseries_params.py create mode 100644 src/cloudflare/types/radar/bot_timeseries_response.py create mode 100644 src/cloudflare/types/radar/bots/__init__.py create mode 100644 src/cloudflare/types/radar/bots/web_crawler_summary_params.py create mode 100644 src/cloudflare/types/radar/bots/web_crawler_summary_response.py create mode 100644 src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py create mode 100644 src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py create mode 100644 tests/api_resources/radar/bots/__init__.py create mode 100644 tests/api_resources/radar/bots/test_web_crawlers.py create mode 100644 tests/api_resources/radar/test_bots.py diff --git a/.stats.yml b/.stats.yml index be3b6c8e22e..1f73a6564a9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1752 +configured_endpoints: 1759 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-33820eebc9530ec8e1c285a315f055d92e1f1b02db794934b6947616075562fd.yml openapi_spec_hash: dd485200592659d406659d8d731779f5 -config_hash: 284c4178d08f75d8c8b29f275948a8fd +config_hash: 920bb1b417565d337cbdb7c39e77be5b diff --git a/api.md b/api.md index 80849c44661..9fa77d331ca 100644 --- a/api.md +++ b/api.md @@ -7274,6 +7274,44 @@ Methods: - client.radar.bgp.ips.timeseries(\*\*params) -> IPTimeseriesResponse +## Bots + +Types: + +```python +from cloudflare.types.radar import ( + BotListResponse, + BotGetResponse, + BotSummaryResponse, + BotTimeseriesResponse, + BotTimeseriesGroupsResponse, +) +``` + +Methods: + +- client.radar.bots.list(\*\*params) -> BotListResponse +- client.radar.bots.get(bot_slug, \*\*params) -> BotGetResponse +- client.radar.bots.summary(dimension, \*\*params) -> BotSummaryResponse +- client.radar.bots.timeseries(\*\*params) -> BotTimeseriesResponse +- client.radar.bots.timeseries_groups(dimension, \*\*params) -> BotTimeseriesGroupsResponse + +### WebCrawlers + +Types: + +```python +from cloudflare.types.radar.bots import ( + WebCrawlerSummaryResponse, + WebCrawlerTimeseriesGroupsResponse, +) +``` + +Methods: + +- client.radar.bots.web_crawlers.summary(dimension, \*\*params) -> WebCrawlerSummaryResponse +- client.radar.bots.web_crawlers.timeseries_groups(dimension, \*\*params) -> WebCrawlerTimeseriesGroupsResponse + ## Datasets Types: diff --git a/src/cloudflare/resources/radar/__init__.py b/src/cloudflare/resources/radar/__init__.py index 7be87145a2c..4b60e3b280e 100644 --- a/src/cloudflare/resources/radar/__init__.py +++ b/src/cloudflare/resources/radar/__init__.py @@ -24,6 +24,14 @@ DNSResourceWithStreamingResponse, AsyncDNSResourceWithStreamingResponse, ) +from .bots import ( + BotsResource, + AsyncBotsResource, + BotsResourceWithRawResponse, + AsyncBotsResourceWithRawResponse, + BotsResourceWithStreamingResponse, + AsyncBotsResourceWithStreamingResponse, +) from .http import ( HTTPResource, AsyncHTTPResource, @@ -180,6 +188,12 @@ "AsyncBGPResourceWithRawResponse", "BGPResourceWithStreamingResponse", "AsyncBGPResourceWithStreamingResponse", + "BotsResource", + "AsyncBotsResource", + "BotsResourceWithRawResponse", + "AsyncBotsResourceWithRawResponse", + "BotsResourceWithStreamingResponse", + "AsyncBotsResourceWithStreamingResponse", "DatasetsResource", "AsyncDatasetsResource", "DatasetsResourceWithRawResponse", diff --git a/src/cloudflare/resources/radar/bots/__init__.py b/src/cloudflare/resources/radar/bots/__init__.py new file mode 100644 index 00000000000..7d7fb66c90e --- /dev/null +++ b/src/cloudflare/resources/radar/bots/__init__.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .bots import ( + BotsResource, + AsyncBotsResource, + BotsResourceWithRawResponse, + AsyncBotsResourceWithRawResponse, + BotsResourceWithStreamingResponse, + AsyncBotsResourceWithStreamingResponse, +) +from .web_crawlers import ( + WebCrawlersResource, + AsyncWebCrawlersResource, + WebCrawlersResourceWithRawResponse, + AsyncWebCrawlersResourceWithRawResponse, + WebCrawlersResourceWithStreamingResponse, + AsyncWebCrawlersResourceWithStreamingResponse, +) + +__all__ = [ + "WebCrawlersResource", + "AsyncWebCrawlersResource", + "WebCrawlersResourceWithRawResponse", + "AsyncWebCrawlersResourceWithRawResponse", + "WebCrawlersResourceWithStreamingResponse", + "AsyncWebCrawlersResourceWithStreamingResponse", + "BotsResource", + "AsyncBotsResource", + "BotsResourceWithRawResponse", + "AsyncBotsResourceWithRawResponse", + "BotsResourceWithStreamingResponse", + "AsyncBotsResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/radar/bots/bots.py b/src/cloudflare/resources/radar/bots/bots.py new file mode 100644 index 00000000000..c20a17996aa --- /dev/null +++ b/src/cloudflare/resources/radar/bots/bots.py @@ -0,0 +1,1210 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Type, Union, cast +from datetime import datetime +from typing_extensions import Literal + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import maybe_transform, async_maybe_transform +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._wrappers import ResultWrapper +from .web_crawlers import ( + WebCrawlersResource, + AsyncWebCrawlersResource, + WebCrawlersResourceWithRawResponse, + AsyncWebCrawlersResourceWithRawResponse, + WebCrawlersResourceWithStreamingResponse, + AsyncWebCrawlersResourceWithStreamingResponse, +) +from ....types.radar import ( + bot_get_params, + bot_list_params, + bot_summary_params, + bot_timeseries_params, + bot_timeseries_groups_params, +) +from ...._base_client import make_request_options +from ....types.radar.bot_get_response import BotGetResponse +from ....types.radar.bot_list_response import BotListResponse +from ....types.radar.bot_summary_response import BotSummaryResponse +from ....types.radar.bot_timeseries_response import BotTimeseriesResponse +from ....types.radar.bot_timeseries_groups_response import BotTimeseriesGroupsResponse + +__all__ = ["BotsResource", "AsyncBotsResource"] + + +class BotsResource(SyncAPIResource): + @cached_property + def web_crawlers(self) -> WebCrawlersResource: + return WebCrawlersResource(self._client) + + @cached_property + def with_raw_response(self) -> BotsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return BotsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> BotsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return BotsResourceWithStreamingResponse(self) + + def list( + self, + *, + bot_category: Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + | NotGiven = NOT_GIVEN, + bot_operator: str | NotGiven = NOT_GIVEN, + bot_verification_status: Literal["VERIFIED"] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + offset: int | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotListResponse: + """ + Retrieves a list of bots. + + Args: + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status. + + format: Format in which results will be returned. + + limit: Limits the number of objects returned in the response. + + offset: Skips the specified number of objects before fetching the results. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/radar/bots", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "format": format, + "limit": limit, + "offset": offset, + }, + bot_list_params.BotListParams, + ), + post_parser=ResultWrapper[BotListResponse]._unwrapper, + ), + cast_to=cast(Type[BotListResponse], ResultWrapper[BotListResponse]), + ) + + def get( + self, + bot_slug: str, + *, + format: Literal["JSON", "CSV"] | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotGetResponse: + """ + Retrieves the requested bot information. + + Args: + bot_slug: Bot slug. + + format: Format in which results will be returned. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not bot_slug: + raise ValueError(f"Expected a non-empty value for `bot_slug` but received {bot_slug!r}") + return self._get( + f"/radar/bots/{bot_slug}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"format": format}, bot_get_params.BotGetParams), + post_parser=ResultWrapper[BotGetResponse]._unwrapper, + ), + cast_to=cast(Type[BotGetResponse], ResultWrapper[BotGetResponse]), + ) + + def summary( + self, + dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"], + *, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotSummaryResponse: + """ + Retrieves an aggregated summary of bots HTTP requests grouped by the specified + dimension. + + Args: + dimension: Specifies the attribute by which to group the results. + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return self._get( + f"/radar/bots/summary/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "location": location, + "name": name, + }, + bot_summary_params.BotSummaryParams, + ), + post_parser=ResultWrapper[BotSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[BotSummaryResponse], ResultWrapper[BotSummaryResponse]), + ) + + def timeseries( + self, + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotTimeseriesResponse: + """ + Retrieves bots HTTP request volume over time. + + Args: + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/radar/bots/timeseries", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "location": location, + "name": name, + }, + bot_timeseries_params.BotTimeseriesParams, + ), + post_parser=ResultWrapper[BotTimeseriesResponse]._unwrapper, + ), + cast_to=cast(Type[BotTimeseriesResponse], ResultWrapper[BotTimeseriesResponse]), + ) + + def timeseries_groups( + self, + dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"], + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotTimeseriesGroupsResponse: + """ + Retrieves the distribution of HTTP requests from bots, grouped by chosen the + specified dimension over time. + + Args: + dimension: Specifies the attribute by which to group the results. + + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return self._get( + f"/radar/bots/timeseries_groups/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "location": location, + "name": name, + }, + bot_timeseries_groups_params.BotTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[BotTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast(Type[BotTimeseriesGroupsResponse], ResultWrapper[BotTimeseriesGroupsResponse]), + ) + + +class AsyncBotsResource(AsyncAPIResource): + @cached_property + def web_crawlers(self) -> AsyncWebCrawlersResource: + return AsyncWebCrawlersResource(self._client) + + @cached_property + def with_raw_response(self) -> AsyncBotsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncBotsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncBotsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncBotsResourceWithStreamingResponse(self) + + async def list( + self, + *, + bot_category: Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + | NotGiven = NOT_GIVEN, + bot_operator: str | NotGiven = NOT_GIVEN, + bot_verification_status: Literal["VERIFIED"] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + offset: int | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotListResponse: + """ + Retrieves a list of bots. + + Args: + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status. + + format: Format in which results will be returned. + + limit: Limits the number of objects returned in the response. + + offset: Skips the specified number of objects before fetching the results. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/radar/bots", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "format": format, + "limit": limit, + "offset": offset, + }, + bot_list_params.BotListParams, + ), + post_parser=ResultWrapper[BotListResponse]._unwrapper, + ), + cast_to=cast(Type[BotListResponse], ResultWrapper[BotListResponse]), + ) + + async def get( + self, + bot_slug: str, + *, + format: Literal["JSON", "CSV"] | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotGetResponse: + """ + Retrieves the requested bot information. + + Args: + bot_slug: Bot slug. + + format: Format in which results will be returned. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not bot_slug: + raise ValueError(f"Expected a non-empty value for `bot_slug` but received {bot_slug!r}") + return await self._get( + f"/radar/bots/{bot_slug}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform({"format": format}, bot_get_params.BotGetParams), + post_parser=ResultWrapper[BotGetResponse]._unwrapper, + ), + cast_to=cast(Type[BotGetResponse], ResultWrapper[BotGetResponse]), + ) + + async def summary( + self, + dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"], + *, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotSummaryResponse: + """ + Retrieves an aggregated summary of bots HTTP requests grouped by the specified + dimension. + + Args: + dimension: Specifies the attribute by which to group the results. + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return await self._get( + f"/radar/bots/summary/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "location": location, + "name": name, + }, + bot_summary_params.BotSummaryParams, + ), + post_parser=ResultWrapper[BotSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[BotSummaryResponse], ResultWrapper[BotSummaryResponse]), + ) + + async def timeseries( + self, + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotTimeseriesResponse: + """ + Retrieves bots HTTP request volume over time. + + Args: + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/radar/bots/timeseries", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "location": location, + "name": name, + }, + bot_timeseries_params.BotTimeseriesParams, + ), + post_parser=ResultWrapper[BotTimeseriesResponse]._unwrapper, + ), + cast_to=cast(Type[BotTimeseriesResponse], ResultWrapper[BotTimeseriesResponse]), + ) + + async def timeseries_groups( + self, + dimension: Literal["BOT", "BOT_OPERATOR", "BOT_CATEGORY"], + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + asn: List[str] | NotGiven = NOT_GIVEN, + bot: List[str] | NotGiven = NOT_GIVEN, + bot_category: List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ] + | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + bot_verification_status: List[Literal["VERIFIED"]] | NotGiven = NOT_GIVEN, + continent: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + location: List[str] | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> BotTimeseriesGroupsResponse: + """ + Retrieves the distribution of HTTP requests from bots, grouped by chosen the + specified dimension over time. + + Args: + dimension: Specifies the attribute by which to group the results. + + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + asn: Filters results by Autonomous System. Specify one or more Autonomous System + Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from + results. For example, `-174, 3356` excludes results from AS174, but includes + results from AS3356. + + bot: Filters results by bot name. + + bot_category: Filters results by bot category. + + bot_operator: Filters results by bot operator. + + bot_verification_status: Filters results by bot verification status (Verified vs. Unverified). + + continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude continents from results. For example, `-EU,NA` + excludes results from EU, but includes results from NA. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + location: Filters results by location. Specify a comma-separated list of alpha-2 codes. + Prefix with `-` to exclude locations from results. For example, `-US,PT` + excludes results from the US, but includes results from PT. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return await self._get( + f"/radar/bots/timeseries_groups/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agg_interval": agg_interval, + "asn": asn, + "bot": bot, + "bot_category": bot_category, + "bot_operator": bot_operator, + "bot_verification_status": bot_verification_status, + "continent": continent, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "location": location, + "name": name, + }, + bot_timeseries_groups_params.BotTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[BotTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast(Type[BotTimeseriesGroupsResponse], ResultWrapper[BotTimeseriesGroupsResponse]), + ) + + +class BotsResourceWithRawResponse: + def __init__(self, bots: BotsResource) -> None: + self._bots = bots + + self.list = to_raw_response_wrapper( + bots.list, + ) + self.get = to_raw_response_wrapper( + bots.get, + ) + self.summary = to_raw_response_wrapper( + bots.summary, + ) + self.timeseries = to_raw_response_wrapper( + bots.timeseries, + ) + self.timeseries_groups = to_raw_response_wrapper( + bots.timeseries_groups, + ) + + @cached_property + def web_crawlers(self) -> WebCrawlersResourceWithRawResponse: + return WebCrawlersResourceWithRawResponse(self._bots.web_crawlers) + + +class AsyncBotsResourceWithRawResponse: + def __init__(self, bots: AsyncBotsResource) -> None: + self._bots = bots + + self.list = async_to_raw_response_wrapper( + bots.list, + ) + self.get = async_to_raw_response_wrapper( + bots.get, + ) + self.summary = async_to_raw_response_wrapper( + bots.summary, + ) + self.timeseries = async_to_raw_response_wrapper( + bots.timeseries, + ) + self.timeseries_groups = async_to_raw_response_wrapper( + bots.timeseries_groups, + ) + + @cached_property + def web_crawlers(self) -> AsyncWebCrawlersResourceWithRawResponse: + return AsyncWebCrawlersResourceWithRawResponse(self._bots.web_crawlers) + + +class BotsResourceWithStreamingResponse: + def __init__(self, bots: BotsResource) -> None: + self._bots = bots + + self.list = to_streamed_response_wrapper( + bots.list, + ) + self.get = to_streamed_response_wrapper( + bots.get, + ) + self.summary = to_streamed_response_wrapper( + bots.summary, + ) + self.timeseries = to_streamed_response_wrapper( + bots.timeseries, + ) + self.timeseries_groups = to_streamed_response_wrapper( + bots.timeseries_groups, + ) + + @cached_property + def web_crawlers(self) -> WebCrawlersResourceWithStreamingResponse: + return WebCrawlersResourceWithStreamingResponse(self._bots.web_crawlers) + + +class AsyncBotsResourceWithStreamingResponse: + def __init__(self, bots: AsyncBotsResource) -> None: + self._bots = bots + + self.list = async_to_streamed_response_wrapper( + bots.list, + ) + self.get = async_to_streamed_response_wrapper( + bots.get, + ) + self.summary = async_to_streamed_response_wrapper( + bots.summary, + ) + self.timeseries = async_to_streamed_response_wrapper( + bots.timeseries, + ) + self.timeseries_groups = async_to_streamed_response_wrapper( + bots.timeseries_groups, + ) + + @cached_property + def web_crawlers(self) -> AsyncWebCrawlersResourceWithStreamingResponse: + return AsyncWebCrawlersResourceWithStreamingResponse(self._bots.web_crawlers) diff --git a/src/cloudflare/resources/radar/bots/web_crawlers.py b/src/cloudflare/resources/radar/bots/web_crawlers.py new file mode 100644 index 00000000000..4537233e160 --- /dev/null +++ b/src/cloudflare/resources/radar/bots/web_crawlers.py @@ -0,0 +1,437 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Type, Union, cast +from datetime import datetime +from typing_extensions import Literal + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import maybe_transform, async_maybe_transform +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._wrappers import ResultWrapper +from ...._base_client import make_request_options +from ....types.radar.bots import web_crawler_summary_params, web_crawler_timeseries_groups_params +from ....types.radar.bots.web_crawler_summary_response import WebCrawlerSummaryResponse +from ....types.radar.bots.web_crawler_timeseries_groups_response import WebCrawlerTimeseriesGroupsResponse + +__all__ = ["WebCrawlersResource", "AsyncWebCrawlersResource"] + + +class WebCrawlersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> WebCrawlersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return WebCrawlersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> WebCrawlersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return WebCrawlersResourceWithStreamingResponse(self) + + def summary( + self, + dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"], + *, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> WebCrawlerSummaryResponse: + """ + Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the + specified dimension. + + Args: + dimension: Specifies the attribute by which to group the results. + + bot_operator: Filters results by bot operator. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return self._get( + f"/radar/bots/crawlers/summary/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "bot_operator": bot_operator, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "name": name, + }, + web_crawler_summary_params.WebCrawlerSummaryParams, + ), + post_parser=ResultWrapper[WebCrawlerSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[WebCrawlerSummaryResponse], ResultWrapper[WebCrawlerSummaryResponse]), + ) + + def timeseries_groups( + self, + dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"], + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> WebCrawlerTimeseriesGroupsResponse: + """ + Retrieves the distribution of HTTP requests from crawlers, grouped by chosen the + specified dimension over time. + + Args: + dimension: Specifies the attribute by which to group the results. + + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + bot_operator: Filters results by bot operator. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return self._get( + f"/radar/bots/crawlers/timeseries_groups/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agg_interval": agg_interval, + "bot_operator": bot_operator, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "name": name, + }, + web_crawler_timeseries_groups_params.WebCrawlerTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[WebCrawlerTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast(Type[WebCrawlerTimeseriesGroupsResponse], ResultWrapper[WebCrawlerTimeseriesGroupsResponse]), + ) + + +class AsyncWebCrawlersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncWebCrawlersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncWebCrawlersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncWebCrawlersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncWebCrawlersResourceWithStreamingResponse(self) + + async def summary( + self, + dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"], + *, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> WebCrawlerSummaryResponse: + """ + Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the + specified dimension. + + Args: + dimension: Specifies the attribute by which to group the results. + + bot_operator: Filters results by bot operator. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return await self._get( + f"/radar/bots/crawlers/summary/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "bot_operator": bot_operator, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "name": name, + }, + web_crawler_summary_params.WebCrawlerSummaryParams, + ), + post_parser=ResultWrapper[WebCrawlerSummaryResponse]._unwrapper, + ), + cast_to=cast(Type[WebCrawlerSummaryResponse], ResultWrapper[WebCrawlerSummaryResponse]), + ) + + async def timeseries_groups( + self, + dimension: Literal["USER_AGENT", "REFERER", "CRAWL_REFER_RATIO"], + *, + agg_interval: Literal["15m", "1h", "1d", "1w"] | NotGiven = NOT_GIVEN, + bot_operator: List[str] | NotGiven = NOT_GIVEN, + date_end: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + date_range: List[str] | NotGiven = NOT_GIVEN, + date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, + format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, + name: List[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> WebCrawlerTimeseriesGroupsResponse: + """ + Retrieves the distribution of HTTP requests from crawlers, grouped by chosen the + specified dimension over time. + + Args: + dimension: Specifies the attribute by which to group the results. + + agg_interval: Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + + bot_operator: Filters results by bot operator. + + date_end: End of the date range (inclusive). + + date_range: Filters results by date range. For example, use `7d` and `7dcontrol` to compare + this week with the previous week. Use this parameter or set specific start and + end dates (`dateStart` and `dateEnd` parameters). + + date_start: Start of the date range. + + format: Format in which results will be returned. + + limit_per_group: Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + + name: Array of names used to label the series in the response. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not dimension: + raise ValueError(f"Expected a non-empty value for `dimension` but received {dimension!r}") + return await self._get( + f"/radar/bots/crawlers/timeseries_groups/{dimension}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agg_interval": agg_interval, + "bot_operator": bot_operator, + "date_end": date_end, + "date_range": date_range, + "date_start": date_start, + "format": format, + "limit_per_group": limit_per_group, + "name": name, + }, + web_crawler_timeseries_groups_params.WebCrawlerTimeseriesGroupsParams, + ), + post_parser=ResultWrapper[WebCrawlerTimeseriesGroupsResponse]._unwrapper, + ), + cast_to=cast(Type[WebCrawlerTimeseriesGroupsResponse], ResultWrapper[WebCrawlerTimeseriesGroupsResponse]), + ) + + +class WebCrawlersResourceWithRawResponse: + def __init__(self, web_crawlers: WebCrawlersResource) -> None: + self._web_crawlers = web_crawlers + + self.summary = to_raw_response_wrapper( + web_crawlers.summary, + ) + self.timeseries_groups = to_raw_response_wrapper( + web_crawlers.timeseries_groups, + ) + + +class AsyncWebCrawlersResourceWithRawResponse: + def __init__(self, web_crawlers: AsyncWebCrawlersResource) -> None: + self._web_crawlers = web_crawlers + + self.summary = async_to_raw_response_wrapper( + web_crawlers.summary, + ) + self.timeseries_groups = async_to_raw_response_wrapper( + web_crawlers.timeseries_groups, + ) + + +class WebCrawlersResourceWithStreamingResponse: + def __init__(self, web_crawlers: WebCrawlersResource) -> None: + self._web_crawlers = web_crawlers + + self.summary = to_streamed_response_wrapper( + web_crawlers.summary, + ) + self.timeseries_groups = to_streamed_response_wrapper( + web_crawlers.timeseries_groups, + ) + + +class AsyncWebCrawlersResourceWithStreamingResponse: + def __init__(self, web_crawlers: AsyncWebCrawlersResource) -> None: + self._web_crawlers = web_crawlers + + self.summary = async_to_streamed_response_wrapper( + web_crawlers.summary, + ) + self.timeseries_groups = async_to_streamed_response_wrapper( + web_crawlers.timeseries_groups, + ) diff --git a/src/cloudflare/resources/radar/radar.py b/src/cloudflare/resources/radar/radar.py index 7242f18dd38..b0bc2fafe7e 100644 --- a/src/cloudflare/resources/radar/radar.py +++ b/src/cloudflare/resources/radar/radar.py @@ -43,6 +43,14 @@ AsyncDatasetsResourceWithStreamingResponse, ) from ..._compat import cached_property +from .bots.bots import ( + BotsResource, + AsyncBotsResource, + BotsResourceWithRawResponse, + AsyncBotsResourceWithRawResponse, + BotsResourceWithStreamingResponse, + AsyncBotsResourceWithStreamingResponse, +) from .http.http import ( HTTPResource, AsyncHTTPResource, @@ -173,6 +181,10 @@ def annotations(self) -> AnnotationsResource: def bgp(self) -> BGPResource: return BGPResource(self._client) + @cached_property + def bots(self) -> BotsResource: + return BotsResource(self._client) + @cached_property def datasets(self) -> DatasetsResource: return DatasetsResource(self._client) @@ -270,6 +282,10 @@ def annotations(self) -> AsyncAnnotationsResource: def bgp(self) -> AsyncBGPResource: return AsyncBGPResource(self._client) + @cached_property + def bots(self) -> AsyncBotsResource: + return AsyncBotsResource(self._client) + @cached_property def datasets(self) -> AsyncDatasetsResource: return AsyncDatasetsResource(self._client) @@ -370,6 +386,10 @@ def annotations(self) -> AnnotationsResourceWithRawResponse: def bgp(self) -> BGPResourceWithRawResponse: return BGPResourceWithRawResponse(self._radar.bgp) + @cached_property + def bots(self) -> BotsResourceWithRawResponse: + return BotsResourceWithRawResponse(self._radar.bots) + @cached_property def datasets(self) -> DatasetsResourceWithRawResponse: return DatasetsResourceWithRawResponse(self._radar.datasets) @@ -451,6 +471,10 @@ def annotations(self) -> AsyncAnnotationsResourceWithRawResponse: def bgp(self) -> AsyncBGPResourceWithRawResponse: return AsyncBGPResourceWithRawResponse(self._radar.bgp) + @cached_property + def bots(self) -> AsyncBotsResourceWithRawResponse: + return AsyncBotsResourceWithRawResponse(self._radar.bots) + @cached_property def datasets(self) -> AsyncDatasetsResourceWithRawResponse: return AsyncDatasetsResourceWithRawResponse(self._radar.datasets) @@ -532,6 +556,10 @@ def annotations(self) -> AnnotationsResourceWithStreamingResponse: def bgp(self) -> BGPResourceWithStreamingResponse: return BGPResourceWithStreamingResponse(self._radar.bgp) + @cached_property + def bots(self) -> BotsResourceWithStreamingResponse: + return BotsResourceWithStreamingResponse(self._radar.bots) + @cached_property def datasets(self) -> DatasetsResourceWithStreamingResponse: return DatasetsResourceWithStreamingResponse(self._radar.datasets) @@ -613,6 +641,10 @@ def annotations(self) -> AsyncAnnotationsResourceWithStreamingResponse: def bgp(self) -> AsyncBGPResourceWithStreamingResponse: return AsyncBGPResourceWithStreamingResponse(self._radar.bgp) + @cached_property + def bots(self) -> AsyncBotsResourceWithStreamingResponse: + return AsyncBotsResourceWithStreamingResponse(self._radar.bots) + @cached_property def datasets(self) -> AsyncDatasetsResourceWithStreamingResponse: return AsyncDatasetsResourceWithStreamingResponse(self._radar.datasets) diff --git a/src/cloudflare/types/radar/__init__.py b/src/cloudflare/types/radar/__init__.py index d2ee6584473..6f15952230b 100644 --- a/src/cloudflare/types/radar/__init__.py +++ b/src/cloudflare/types/radar/__init__.py @@ -2,16 +2,23 @@ from __future__ import annotations +from .bot_get_params import BotGetParams as BotGetParams +from .bot_list_params import BotListParams as BotListParams +from .bot_get_response import BotGetResponse as BotGetResponse +from .bot_list_response import BotListResponse as BotListResponse from .entity_get_params import EntityGetParams as EntityGetParams +from .bot_summary_params import BotSummaryParams as BotSummaryParams from .radar_email_series import RadarEmailSeries as RadarEmailSeries from .ranking_top_params import RankingTopParams as RankingTopParams from .dataset_list_params import DatasetListParams as DatasetListParams from .entity_get_response import EntityGetResponse as EntityGetResponse from .radar_email_summary import RadarEmailSummary as RadarEmailSummary +from .bot_summary_response import BotSummaryResponse as BotSummaryResponse from .dataset_get_response import DatasetGetResponse as DatasetGetResponse from .ranking_top_response import RankingTopResponse as RankingTopResponse from .search_global_params import SearchGlobalParams as SearchGlobalParams from .bgp_timeseries_params import BGPTimeseriesParams as BGPTimeseriesParams +from .bot_timeseries_params import BotTimeseriesParams as BotTimeseriesParams from .dataset_list_response import DatasetListResponse as DatasetListResponse from .dns_timeseries_params import DNSTimeseriesParams as DNSTimeseriesParams from .annotation_list_params import AnnotationListParams as AnnotationListParams @@ -20,6 +27,7 @@ from .search_global_response import SearchGlobalResponse as SearchGlobalResponse from .as112_timeseries_params import AS112TimeseriesParams as AS112TimeseriesParams from .bgp_timeseries_response import BGPTimeseriesResponse as BGPTimeseriesResponse +from .bot_timeseries_response import BotTimeseriesResponse as BotTimeseriesResponse from .dataset_download_params import DatasetDownloadParams as DatasetDownloadParams from .dns_timeseries_response import DNSTimeseriesResponse as DNSTimeseriesResponse from .annotation_list_response import AnnotationListResponse as AnnotationListResponse @@ -30,7 +38,9 @@ from .netflow_timeseries_params import NetflowTimeseriesParams as NetflowTimeseriesParams from .traffic_anomaly_get_params import TrafficAnomalyGetParams as TrafficAnomalyGetParams from .netflow_timeseries_response import NetflowTimeseriesResponse as NetflowTimeseriesResponse +from .bot_timeseries_groups_params import BotTimeseriesGroupsParams as BotTimeseriesGroupsParams from .traffic_anomaly_get_response import TrafficAnomalyGetResponse as TrafficAnomalyGetResponse +from .bot_timeseries_groups_response import BotTimeseriesGroupsResponse as BotTimeseriesGroupsResponse from .ranking_timeseries_groups_params import RankingTimeseriesGroupsParams as RankingTimeseriesGroupsParams from .tcp_resets_timeout_summary_params import TCPResetsTimeoutSummaryParams as TCPResetsTimeoutSummaryParams from .ranking_timeseries_groups_response import RankingTimeseriesGroupsResponse as RankingTimeseriesGroupsResponse diff --git a/src/cloudflare/types/radar/as112_timeseries_response.py b/src/cloudflare/types/radar/as112_timeseries_response.py index ed23b66b45f..46a96f7dd7e 100644 --- a/src/cloudflare/types/radar/as112_timeseries_response.py +++ b/src/cloudflare/types/radar/as112_timeseries_response.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .as112_timeseries_response import UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item +from .as112_timeseries_response import UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item __all__ = [ "AS112TimeseriesResponse", @@ -102,4 +102,4 @@ class AS112TimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item: ... + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item: ... diff --git a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py index 18b51a6a0d4..d689c8fbc51 100644 --- a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py +++ b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel -from .layer3_timeseries_response import UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item +from .layer3_timeseries_response import UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item __all__ = [ "Layer3TimeseriesResponse", @@ -102,4 +102,4 @@ class Layer3TimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item: ... + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item: ... diff --git a/src/cloudflare/types/radar/bot_get_params.py b/src/cloudflare/types/radar/bot_get_params.py new file mode 100644 index 00000000000..85b78dcff72 --- /dev/null +++ b/src/cloudflare/types/radar/bot_get_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["BotGetParams"] + + +class BotGetParams(TypedDict, total=False): + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" diff --git a/src/cloudflare/types/radar/bot_get_response.py b/src/cloudflare/types/radar/bot_get_response.py new file mode 100644 index 00000000000..4aeeb0b82c6 --- /dev/null +++ b/src/cloudflare/types/radar/bot_get_response.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["BotGetResponse", "Bot"] + + +class Bot(BaseModel): + category: str + """The category of the bot.""" + + description: str + """A summary for the bot (e.g., purpose).""" + + name: str + """The name of the bot.""" + + operator: str + """The organization that owns and operates the bot.""" + + operator_url: str = FieldInfo(alias="operatorUrl") + """The link to the bot documentation.""" + + slug: str + """A kebab-case identifier derived from the bot name.""" + + user_agent_patterns: List[str] = FieldInfo(alias="userAgentPatterns") + + user_agents: List[str] = FieldInfo(alias="userAgents") + + +class BotGetResponse(BaseModel): + bot: Bot diff --git a/src/cloudflare/types/radar/bot_list_params.py b/src/cloudflare/types/radar/bot_list_params.py new file mode 100644 index 00000000000..5f24b188b0d --- /dev/null +++ b/src/cloudflare/types/radar/bot_list_params.py @@ -0,0 +1,49 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["BotListParams"] + + +class BotListParams(TypedDict, total=False): + bot_category: Annotated[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ], + PropertyInfo(alias="botCategory"), + ] + """Filters results by bot category.""" + + bot_operator: Annotated[str, PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + bot_verification_status: Annotated[Literal["VERIFIED"], PropertyInfo(alias="botVerificationStatus")] + """Filters results by bot verification status.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit: int + """Limits the number of objects returned in the response.""" + + offset: int + """Skips the specified number of objects before fetching the results.""" diff --git a/src/cloudflare/types/radar/bot_list_response.py b/src/cloudflare/types/radar/bot_list_response.py new file mode 100644 index 00000000000..66e1fdb72d9 --- /dev/null +++ b/src/cloudflare/types/radar/bot_list_response.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from ..._models import BaseModel + +__all__ = ["BotListResponse", "Bot"] + + +class Bot(BaseModel): + category: str + """The category of the bot.""" + + description: str + """A summary for the bot (e.g., purpose).""" + + name: str + """The name of the bot.""" + + operator: str + """The organization that owns and operates the bot.""" + + slug: str + """A kebab-case identifier derived from the bot name.""" + + +class BotListResponse(BaseModel): + bots: List[Bot] diff --git a/src/cloudflare/types/radar/bot_summary_params.py b/src/cloudflare/types/radar/bot_summary_params.py new file mode 100644 index 00000000000..f8a439351d2 --- /dev/null +++ b/src/cloudflare/types/radar/bot_summary_params.py @@ -0,0 +1,98 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["BotSummaryParams"] + + +class BotSummaryParams(TypedDict, total=False): + asn: List[str] + """Filters results by Autonomous System. + + Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. + Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes + results from AS174, but includes results from AS3356. + """ + + bot: List[str] + """Filters results by bot name.""" + + bot_category: Annotated[ + List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ], + PropertyInfo(alias="botCategory"), + ] + """Filters results by bot category.""" + + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")] + """Filters results by bot verification status (Verified vs. Unverified).""" + + continent: List[str] + """Filters results by continent. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + continents from results. For example, `-EU,NA` excludes results from EU, but + includes results from NA. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + """ + + location: List[str] + """Filters results by location. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + locations from results. For example, `-US,PT` excludes results from the US, but + includes results from PT. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bot_summary_response.py b/src/cloudflare/types/radar/bot_summary_response.py new file mode 100644 index 00000000000..a3d33a4143a --- /dev/null +++ b/src/cloudflare/types/radar/bot_summary_response.py @@ -0,0 +1,91 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = [ + "BotSummaryResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class BotSummaryResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/bot_timeseries_groups_params.py b/src/cloudflare/types/radar/bot_timeseries_groups_params.py new file mode 100644 index 00000000000..efab8a5c95b --- /dev/null +++ b/src/cloudflare/types/radar/bot_timeseries_groups_params.py @@ -0,0 +1,105 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["BotTimeseriesGroupsParams"] + + +class BotTimeseriesGroupsParams(TypedDict, total=False): + agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + asn: List[str] + """Filters results by Autonomous System. + + Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. + Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes + results from AS174, but includes results from AS3356. + """ + + bot: List[str] + """Filters results by bot name.""" + + bot_category: Annotated[ + List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ], + PropertyInfo(alias="botCategory"), + ] + """Filters results by bot category.""" + + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")] + """Filters results by bot verification status (Verified vs. Unverified).""" + + continent: List[str] + """Filters results by continent. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + continents from results. For example, `-EU,NA` excludes results from EU, but + includes results from NA. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + """ + + location: List[str] + """Filters results by location. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + locations from results. For example, `-US,PT` excludes results from the US, but + includes results from PT. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bot_timeseries_groups_response.py b/src/cloudflare/types/radar/bot_timeseries_groups_response.py new file mode 100644 index 00000000000..5a2913f66a9 --- /dev/null +++ b/src/cloudflare/types/radar/bot_timeseries_groups_response.py @@ -0,0 +1,111 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, List +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = [ + "BotTimeseriesGroupsResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", + "Serie0", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo( + alias="aggInterval" + ) + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class Serie0(BaseModel): + timestamps: List[datetime] + + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> List[str]: ... + + +class BotTimeseriesGroupsResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + serie_0: Serie0 diff --git a/src/cloudflare/types/radar/bot_timeseries_params.py b/src/cloudflare/types/radar/bot_timeseries_params.py new file mode 100644 index 00000000000..9541c960fd7 --- /dev/null +++ b/src/cloudflare/types/radar/bot_timeseries_params.py @@ -0,0 +1,98 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["BotTimeseriesParams"] + + +class BotTimeseriesParams(TypedDict, total=False): + agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + asn: List[str] + """Filters results by Autonomous System. + + Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. + Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes + results from AS174, but includes results from AS3356. + """ + + bot: List[str] + """Filters results by bot name.""" + + bot_category: Annotated[ + List[ + Literal[ + "SEARCH_ENGINE_CRAWLER", + "SEARCH_ENGINE_OPTIMIZATION", + "MONITORING_AND_ANALYTICS", + "ADVERTISING_AND_MARKETING", + "SOCIAL_MEDIA_MARKETING", + "PAGE_PREVIEW", + "ACADEMIC_RESEARCH", + "SECURITY", + "ACCESSIBILITY", + "WEBHOOKS", + "FEED_FETCHER", + "AI_CRAWLER", + "AGGREGATOR", + "AI_ASSISTANT", + "AI_SEARCH", + "ARCHIVER", + ] + ], + PropertyInfo(alias="botCategory"), + ] + """Filters results by bot category.""" + + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + bot_verification_status: Annotated[List[Literal["VERIFIED"]], PropertyInfo(alias="botVerificationStatus")] + """Filters results by bot verification status (Verified vs. Unverified).""" + + continent: List[str] + """Filters results by continent. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + continents from results. For example, `-EU,NA` excludes results from EU, but + includes results from NA. + """ + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + location: List[str] + """Filters results by location. + + Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude + locations from results. For example, `-US,PT` excludes results from the US, but + includes results from PT. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bot_timeseries_response.py b/src/cloudflare/types/radar/bot_timeseries_response.py new file mode 100644 index 00000000000..f08aadea698 --- /dev/null +++ b/src/cloudflare/types/radar/bot_timeseries_response.py @@ -0,0 +1,105 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, List +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel +from .bot_timeseries_response import UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item + +__all__ = [ + "BotTimeseriesResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo( + alias="aggInterval" + ) + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class BotTimeseriesResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item: ... diff --git a/src/cloudflare/types/radar/bots/__init__.py b/src/cloudflare/types/radar/bots/__init__.py new file mode 100644 index 00000000000..4dd0e4c99e7 --- /dev/null +++ b/src/cloudflare/types/radar/bots/__init__.py @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .web_crawler_summary_params import WebCrawlerSummaryParams as WebCrawlerSummaryParams +from .web_crawler_summary_response import WebCrawlerSummaryResponse as WebCrawlerSummaryResponse +from .web_crawler_timeseries_groups_params import WebCrawlerTimeseriesGroupsParams as WebCrawlerTimeseriesGroupsParams +from .web_crawler_timeseries_groups_response import ( + WebCrawlerTimeseriesGroupsResponse as WebCrawlerTimeseriesGroupsResponse, +) diff --git a/src/cloudflare/types/radar/bots/web_crawler_summary_params.py b/src/cloudflare/types/radar/bots/web_crawler_summary_params.py new file mode 100644 index 00000000000..2fb3190cc07 --- /dev/null +++ b/src/cloudflare/types/radar/bots/web_crawler_summary_params.py @@ -0,0 +1,43 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ...._utils import PropertyInfo + +__all__ = ["WebCrawlerSummaryParams"] + + +class WebCrawlerSummaryParams(TypedDict, total=False): + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bots/web_crawler_summary_response.py b/src/cloudflare/types/radar/bots/web_crawler_summary_response.py new file mode 100644 index 00000000000..5076d68d8b3 --- /dev/null +++ b/src/cloudflare/types/radar/bots/web_crawler_summary_response.py @@ -0,0 +1,91 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = [ + "WebCrawlerSummaryResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class WebCrawlerSummaryResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py new file mode 100644 index 00000000000..fe3831f14cd --- /dev/null +++ b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_params.py @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from ...._utils import PropertyInfo + +__all__ = ["WebCrawlerTimeseriesGroupsParams"] + + +class WebCrawlerTimeseriesGroupsParams(TypedDict, total=False): + agg_interval: Annotated[Literal["15m", "1h", "1d", "1w"], PropertyInfo(alias="aggInterval")] + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + bot_operator: Annotated[List[str], PropertyInfo(alias="botOperator")] + """Filters results by bot operator.""" + + date_end: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateEnd", format="iso8601")] + """End of the date range (inclusive).""" + + date_range: Annotated[List[str], PropertyInfo(alias="dateRange")] + """Filters results by date range. + + For example, use `7d` and `7dcontrol` to compare this week with the previous + week. Use this parameter or set specific start and end dates (`dateStart` and + `dateEnd` parameters). + """ + + date_start: Annotated[List[Union[str, datetime]], PropertyInfo(alias="dateStart", format="iso8601")] + """Start of the date range.""" + + format: Literal["JSON", "CSV"] + """Format in which results will be returned.""" + + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limits the number of objects per group to the top items within the specified + time range. When item count exceeds the limit, extra items appear grouped under + an "other" category. + """ + + name: List[str] + """Array of names used to label the series in the response.""" diff --git a/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py new file mode 100644 index 00000000000..b7a819d8282 --- /dev/null +++ b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py @@ -0,0 +1,111 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, List +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = [ + "WebCrawlerTimeseriesGroupsResponse", + "Meta", + "MetaConfidenceInfo", + "MetaConfidenceInfoAnnotation", + "MetaDateRange", + "MetaUnit", + "Serie0", +] + + +class MetaConfidenceInfoAnnotation(BaseModel): + data_source: str = FieldInfo(alias="dataSource") + + description: str + + end_date: datetime = FieldInfo(alias="endDate") + + event_type: str = FieldInfo(alias="eventType") + + is_instantaneous: bool = FieldInfo(alias="isInstantaneous") + """Whether event is a single point in time or a time range.""" + + linked_url: str = FieldInfo(alias="linkedUrl") + + start_date: datetime = FieldInfo(alias="startDate") + + +class MetaConfidenceInfo(BaseModel): + annotations: List[MetaConfidenceInfoAnnotation] + + level: int + """Provides an indication of how much confidence Cloudflare has in the data.""" + + +class MetaDateRange(BaseModel): + end_time: datetime = FieldInfo(alias="endTime") + """Adjusted end of date range.""" + + start_time: datetime = FieldInfo(alias="startTime") + """Adjusted start of date range.""" + + +class MetaUnit(BaseModel): + name: str + + value: str + + +class Meta(BaseModel): + agg_interval: Literal["FIFTEEN_MINUTES", "ONE_HOUR", "ONE_DAY", "ONE_WEEK", "ONE_MONTH"] = FieldInfo( + alias="aggInterval" + ) + """Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). + + Refer to + [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + """ + + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") + + date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") + + last_updated: datetime = FieldInfo(alias="lastUpdated") + """Timestamp of the last dataset update.""" + + normalization: Literal[ + "PERCENTAGE", + "MIN0_MAX", + "MIN_MAX", + "RAW_VALUES", + "PERCENTAGE_CHANGE", + "ROLLING_AVERAGE", + "OVERLAPPED_PERCENTAGE", + "RATIO", + ] + """Normalization method applied to the results. + + Refer to + [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). + """ + + units: List[MetaUnit] + """Measurement units for the results.""" + + +class Serie0(BaseModel): + timestamps: List[datetime] + + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> List[str]: ... + + +class WebCrawlerTimeseriesGroupsResponse(BaseModel): + meta: Meta + """Metadata for the results.""" + + serie_0: Serie0 diff --git a/src/cloudflare/types/radar/dns_timeseries_response.py b/src/cloudflare/types/radar/dns_timeseries_response.py index 64f06be307e..7c58dd700fd 100644 --- a/src/cloudflare/types/radar/dns_timeseries_response.py +++ b/src/cloudflare/types/radar/dns_timeseries_response.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .dns_timeseries_response import UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item +from .dns_timeseries_response import UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item __all__ = [ "DNSTimeseriesResponse", @@ -102,4 +102,4 @@ class DNSTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item: ... + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item: ... diff --git a/src/cloudflare/types/radar/http_timeseries_response.py b/src/cloudflare/types/radar/http_timeseries_response.py index a756b7bdeca..2d5c7494112 100644 --- a/src/cloudflare/types/radar/http_timeseries_response.py +++ b/src/cloudflare/types/radar/http_timeseries_response.py @@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .http_timeseries_response import UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item +from .http_timeseries_response import UnnamedTypeWithobjectParent4UnnamedTypeWithobjectParent4Item __all__ = [ "HTTPTimeseriesResponse", @@ -102,4 +102,4 @@ class HTTPTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item: ... + def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent4UnnamedTypeWithobjectParent4Item: ... diff --git a/tests/api_resources/radar/bots/__init__.py b/tests/api_resources/radar/bots/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/radar/bots/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/radar/bots/test_web_crawlers.py b/tests/api_resources/radar/bots/test_web_crawlers.py new file mode 100644 index 00000000000..4aee2bae6e8 --- /dev/null +++ b/tests/api_resources/radar/bots/test_web_crawlers.py @@ -0,0 +1,210 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare._utils import parse_datetime +from cloudflare.types.radar.bots import ( + WebCrawlerSummaryResponse, + WebCrawlerTimeseriesGroupsResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestWebCrawlers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_summary(self, client: Cloudflare) -> None: + web_crawler = client.radar.bots.web_crawlers.summary( + dimension="USER_AGENT", + ) + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + def test_method_summary_with_all_params(self, client: Cloudflare) -> None: + web_crawler = client.radar.bots.web_crawlers.summary( + dimension="USER_AGENT", + bot_operator=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + name=["main_series"], + ) + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + def test_raw_response_summary(self, client: Cloudflare) -> None: + response = client.radar.bots.web_crawlers.with_raw_response.summary( + dimension="USER_AGENT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + web_crawler = response.parse() + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + def test_streaming_response_summary(self, client: Cloudflare) -> None: + with client.radar.bots.web_crawlers.with_streaming_response.summary( + dimension="USER_AGENT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + web_crawler = response.parse() + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_timeseries_groups(self, client: Cloudflare) -> None: + web_crawler = client.radar.bots.web_crawlers.timeseries_groups( + dimension="USER_AGENT", + ) + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: + web_crawler = client.radar.bots.web_crawlers.timeseries_groups( + dimension="USER_AGENT", + agg_interval="1h", + bot_operator=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + name=["main_series"], + ) + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: + response = client.radar.bots.web_crawlers.with_raw_response.timeseries_groups( + dimension="USER_AGENT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + web_crawler = response.parse() + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: + with client.radar.bots.web_crawlers.with_streaming_response.timeseries_groups( + dimension="USER_AGENT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + web_crawler = response.parse() + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncWebCrawlers: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_summary(self, async_client: AsyncCloudflare) -> None: + web_crawler = await async_client.radar.bots.web_crawlers.summary( + dimension="USER_AGENT", + ) + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: + web_crawler = await async_client.radar.bots.web_crawlers.summary( + dimension="USER_AGENT", + bot_operator=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + name=["main_series"], + ) + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.web_crawlers.with_raw_response.summary( + dimension="USER_AGENT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + web_crawler = await response.parse() + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + @parametrize + async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.web_crawlers.with_streaming_response.summary( + dimension="USER_AGENT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + web_crawler = await response.parse() + assert_matches_type(WebCrawlerSummaryResponse, web_crawler, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + web_crawler = await async_client.radar.bots.web_crawlers.timeseries_groups( + dimension="USER_AGENT", + ) + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: + web_crawler = await async_client.radar.bots.web_crawlers.timeseries_groups( + dimension="USER_AGENT", + agg_interval="1h", + bot_operator=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + name=["main_series"], + ) + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.web_crawlers.with_raw_response.timeseries_groups( + dimension="USER_AGENT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + web_crawler = await response.parse() + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + @parametrize + async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.web_crawlers.with_streaming_response.timeseries_groups( + dimension="USER_AGENT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + web_crawler = await response.parse() + assert_matches_type(WebCrawlerTimeseriesGroupsResponse, web_crawler, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/radar/test_bots.py b/tests/api_resources/radar/test_bots.py new file mode 100644 index 00000000000..dfddc19bd0b --- /dev/null +++ b/tests/api_resources/radar/test_bots.py @@ -0,0 +1,491 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare._utils import parse_datetime +from cloudflare.types.radar import ( + BotGetResponse, + BotListResponse, + BotSummaryResponse, + BotTimeseriesResponse, + BotTimeseriesGroupsResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestBots: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_list(self, client: Cloudflare) -> None: + bot = client.radar.bots.list() + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.list( + bot_category="SEARCH_ENGINE_CRAWLER", + bot_operator="botOperator", + bot_verification_status="VERIFIED", + format="JSON", + limit=5, + offset=0, + ) + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotListResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + bot = client.radar.bots.get( + bot_slug="gptbot", + ) + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + def test_method_get_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.get( + bot_slug="gptbot", + format="JSON", + ) + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.get( + bot_slug="gptbot", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.get( + bot_slug="gptbot", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotGetResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `bot_slug` but received ''"): + client.radar.bots.with_raw_response.get( + bot_slug="", + ) + + @parametrize + def test_method_summary(self, client: Cloudflare) -> None: + bot = client.radar.bots.summary( + dimension="BOT", + ) + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + def test_method_summary_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.summary( + dimension="BOT", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_summary(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.summary( + dimension="BOT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_summary(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.summary( + dimension="BOT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_timeseries(self, client: Cloudflare) -> None: + bot = client.radar.bots.timeseries() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.timeseries( + agg_interval="1h", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_timeseries(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.timeseries() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_timeseries(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.timeseries() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_timeseries_groups(self, client: Cloudflare) -> None: + bot = client.radar.bots.timeseries_groups( + dimension="BOT", + ) + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + def test_method_timeseries_groups_with_all_params(self, client: Cloudflare) -> None: + bot = client.radar.bots.timeseries_groups( + dimension="BOT", + agg_interval="1h", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + def test_raw_response_timeseries_groups(self, client: Cloudflare) -> None: + response = client.radar.bots.with_raw_response.timeseries_groups( + dimension="BOT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = response.parse() + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + def test_streaming_response_timeseries_groups(self, client: Cloudflare) -> None: + with client.radar.bots.with_streaming_response.timeseries_groups( + dimension="BOT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = response.parse() + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncBots: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_list(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.list() + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.list( + bot_category="SEARCH_ENGINE_CRAWLER", + bot_operator="botOperator", + bot_verification_status="VERIFIED", + format="JSON", + limit=5, + offset=0, + ) + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotListResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotListResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.get( + bot_slug="gptbot", + ) + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.get( + bot_slug="gptbot", + format="JSON", + ) + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.get( + bot_slug="gptbot", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotGetResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.get( + bot_slug="gptbot", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotGetResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `bot_slug` but received ''"): + await async_client.radar.bots.with_raw_response.get( + bot_slug="", + ) + + @parametrize + async def test_method_summary(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.summary( + dimension="BOT", + ) + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + async def test_method_summary_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.summary( + dimension="BOT", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_summary(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.summary( + dimension="BOT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_summary(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.summary( + dimension="BOT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotSummaryResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.timeseries() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.timeseries( + agg_interval="1h", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_timeseries(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.timeseries() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_timeseries(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.timeseries() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotTimeseriesResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.timeseries_groups( + dimension="BOT", + ) + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + async def test_method_timeseries_groups_with_all_params(self, async_client: AsyncCloudflare) -> None: + bot = await async_client.radar.bots.timeseries_groups( + dimension="BOT", + agg_interval="1h", + asn=["string"], + bot=["string"], + bot_category=["SEARCH_ENGINE_CRAWLER"], + bot_operator=["string"], + bot_verification_status=["VERIFIED"], + continent=["string"], + date_end=[parse_datetime("2019-12-27T18:11:19.117Z")], + date_range=["7d"], + date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], + format="JSON", + limit_per_group=10, + location=["string"], + name=["main_series"], + ) + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + async def test_raw_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + response = await async_client.radar.bots.with_raw_response.timeseries_groups( + dimension="BOT", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + bot = await response.parse() + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + @parametrize + async def test_streaming_response_timeseries_groups(self, async_client: AsyncCloudflare) -> None: + async with async_client.radar.bots.with_streaming_response.timeseries_groups( + dimension="BOT", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + bot = await response.parse() + assert_matches_type(BotTimeseriesGroupsResponse, bot, path=["response"]) + + assert cast(Any, response.is_closed) is True From 4d9b003a4144b495a871b359eb6c1b9e4bfb9dbd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 06:18:01 +0000 Subject: [PATCH 174/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f73a6564a9..6fa7b96a9db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-33820eebc9530ec8e1c285a315f055d92e1f1b02db794934b6947616075562fd.yml -openapi_spec_hash: dd485200592659d406659d8d731779f5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c74d75f6406242d4a1d91f9e6008f6a4b7d2a570447b6c4d17a52074c1e03e4c.yml +openapi_spec_hash: a48c7884808af06b2064c9c5b287979c config_hash: 920bb1b417565d337cbdb7c39e77be5b From ee955f5b1c59c6217ba96eb821646793dc7a9e74 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 08:56:44 +0000 Subject: [PATCH 175/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6fa7b96a9db..39f629f8e8d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c74d75f6406242d4a1d91f9e6008f6a4b7d2a570447b6c4d17a52074c1e03e4c.yml -openapi_spec_hash: a48c7884808af06b2064c9c5b287979c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b911d4653c4d46d20e78d8bd5c2a97558f93520ef9896d2aae9c6ba90563d74c.yml +openapi_spec_hash: d78d3216f3e8a78a36757e260531d1d5 config_hash: 920bb1b417565d337cbdb7c39e77be5b From 3a325630dd2b564f3a11022912194ebf2f87efaa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 09:19:37 +0000 Subject: [PATCH 176/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 39f629f8e8d..2db0b8c1cb8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b911d4653c4d46d20e78d8bd5c2a97558f93520ef9896d2aae9c6ba90563d74c.yml -openapi_spec_hash: d78d3216f3e8a78a36757e260531d1d5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb4f00f35d216fc086f41a566a2008bf2d7665f18c9977f0c305df8aa50610f9.yml +openapi_spec_hash: 07db6ce298038f2c1688b7b2ee9f4c43 config_hash: 920bb1b417565d337cbdb7c39e77be5b From 3f94ddfeded1cd708596ffec9c7b63a3f78951b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 10:30:49 +0000 Subject: [PATCH 177/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/resources/images/v1/v1.py | 58 ++++++++++--------- .../types/images/v1_create_params.py | 5 +- tests/api_resources/images/test_v1.py | 8 +-- 4 files changed, 40 insertions(+), 35 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2db0b8c1cb8..1c1b14cecd0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb4f00f35d216fc086f41a566a2008bf2d7665f18c9977f0c305df8aa50610f9.yml -openapi_spec_hash: 07db6ce298038f2c1688b7b2ee9f4c43 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9da40dd6e26c12cb5cc2621882e3a721c33102947241937aecf8b1cf1bfd1906.yml +openapi_spec_hash: 8e673d154552fd22c1291dc39644d664 config_hash: 920bb1b417565d337cbdb7c39e77be5b diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index f22695c42d3..8c8c30b70e6 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -3,7 +3,7 @@ from __future__ import annotations import typing_extensions -from typing import Any, Type, cast +from typing import Any, Type, Mapping, cast import httpx @@ -39,8 +39,8 @@ VariantsResourceWithStreamingResponse, AsyncVariantsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import maybe_transform, async_maybe_transform +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes +from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -100,8 +100,8 @@ def create( self, *, account_id: str, - id: object | NotGiven = NOT_GIVEN, - file: object | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, + file: FileTypes | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, url: str | NotGiven = NOT_GIVEN, @@ -142,22 +142,24 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + body = deepcopy_minimal( + { + "id": id, + "file": file, + "metadata": metadata, + "require_signed_urls": require_signed_urls, + "url": url, + } + ) + files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/images/v1", - body=maybe_transform( - { - "id": id, - "file": file, - "metadata": metadata, - "require_signed_urls": require_signed_urls, - "url": url, - }, - v1_create_params.V1CreateParams, - ), + body=maybe_transform(body, v1_create_params.V1CreateParams), + files=files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -421,8 +423,8 @@ async def create( self, *, account_id: str, - id: object | NotGiven = NOT_GIVEN, - file: object | NotGiven = NOT_GIVEN, + id: str | NotGiven = NOT_GIVEN, + file: FileTypes | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, url: str | NotGiven = NOT_GIVEN, @@ -463,22 +465,24 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + body = deepcopy_minimal( + { + "id": id, + "file": file, + "metadata": metadata, + "require_signed_urls": require_signed_urls, + "url": url, + } + ) + files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/images/v1", - body=await async_maybe_transform( - { - "id": id, - "file": file, - "metadata": metadata, - "require_signed_urls": require_signed_urls, - "url": url, - }, - v1_create_params.V1CreateParams, - ), + body=await async_maybe_transform(body, v1_create_params.V1CreateParams), + files=files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/types/images/v1_create_params.py b/src/cloudflare/types/images/v1_create_params.py index 68b12b2e7d5..d5f63555521 100644 --- a/src/cloudflare/types/images/v1_create_params.py +++ b/src/cloudflare/types/images/v1_create_params.py @@ -4,6 +4,7 @@ from typing_extensions import Required, Annotated, TypedDict +from ..._types import FileTypes from ..._utils import PropertyInfo __all__ = ["V1CreateParams"] @@ -13,10 +14,10 @@ class V1CreateParams(TypedDict, total=False): account_id: Required[str] """Account identifier tag.""" - id: object + id: str """An optional custom unique identifier for your image.""" - file: object + file: FileTypes """An image binary data. Only needed when type is uploading a file.""" metadata: object diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index 98eeb7db720..ef5f5fb4905 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -37,8 +37,8 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - id={}, - file={}, + id="id", + file=b"raw file contents", metadata={}, require_signed_urls=True, url="https://example.com/path/to/logo.png", @@ -306,8 +306,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - id={}, - file={}, + id="id", + file=b"raw file contents", metadata={}, require_signed_urls=True, url="https://example.com/path/to/logo.png", From c432058df2f1f7372812361833cfeee2c8f44079 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 10:34:49 +0000 Subject: [PATCH 178/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1c1b14cecd0..511dac55570 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9da40dd6e26c12cb5cc2621882e3a721c33102947241937aecf8b1cf1bfd1906.yml -openapi_spec_hash: 8e673d154552fd22c1291dc39644d664 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c3c5cb5abba2fdace82af1aa067daef34549bd71bc77c1a87094ad437585d728.yml +openapi_spec_hash: 0a2ad51009bc14a0c79c2b0d16512ff4 config_hash: 920bb1b417565d337cbdb7c39e77be5b From da58d5e5ff239e575968fea23a72d2bb5622ec1b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 11:27:18 +0000 Subject: [PATCH 179/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 511dac55570..a4a83a89e7a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c3c5cb5abba2fdace82af1aa067daef34549bd71bc77c1a87094ad437585d728.yml -openapi_spec_hash: 0a2ad51009bc14a0c79c2b0d16512ff4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f8f9d2fc74cc4e5d448a399616ade4c32e3a1c06021a1c56c310a05ec1acc78e.yml +openapi_spec_hash: f9312bdf6d65d3010c60742469b6abe3 config_hash: 920bb1b417565d337cbdb7c39e77be5b From d90839b70adb9642c1ac257d8e69a3eb00ef7936 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 11:59:57 +0000 Subject: [PATCH 180/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a4a83a89e7a..e991ae68413 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f8f9d2fc74cc4e5d448a399616ade4c32e3a1c06021a1c56c310a05ec1acc78e.yml -openapi_spec_hash: f9312bdf6d65d3010c60742469b6abe3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2960e6379741ec36e2d9ce4951603341a209d327c23b8dd612059d5d54d6a462.yml +openapi_spec_hash: 20d3ceeadc6efd9590f482c695bf82ab config_hash: 920bb1b417565d337cbdb7c39e77be5b From b4de1922aee64c681f492c3fac24fec414d5fb84 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 13:00:53 +0000 Subject: [PATCH 181/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/types/workers/script_update_params.py | 9 ++++++++- .../dispatch/namespaces/script_update_params.py | 9 ++++++++- tests/api_resources/workers/test_scripts.py | 2 ++ .../dispatch/namespaces/test_scripts.py | 2 ++ 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index e991ae68413..ceec7fb88a6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2960e6379741ec36e2d9ce4951603341a209d327c23b8dd612059d5d54d6a462.yml -openapi_spec_hash: 20d3ceeadc6efd9590f482c695bf82ab +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa63baaf2c1412979e523b2d379b69688e66d1c142c257ba10c6b8cfd454ae71.yml +openapi_spec_hash: 3acb03ed76d72e2ad13ade8064e2bb98 config_hash: 920bb1b417565d337cbdb7c39e77be5b diff --git a/src/cloudflare/types/workers/script_update_params.py b/src/cloudflare/types/workers/script_update_params.py index b34cacf091f..0e0f6448f72 100644 --- a/src/cloudflare/types/workers/script_update_params.py +++ b/src/cloudflare/types/workers/script_update_params.py @@ -78,7 +78,7 @@ class MetadataAssetsConfig(TypedDict, total=False): is no Worker script. """ - run_worker_first: List[str] + run_worker_first: Union[List[str], bool] """Contains a list path rules to control routing to either the Worker or assets. Glob (\\**) and negative (!) rules are supported. Rules must start with either '/' @@ -86,6 +86,13 @@ class MetadataAssetsConfig(TypedDict, total=False): have higher precedence than non-negative rules. """ + serve_directly: bool + """ + When true and the incoming request matches an asset, that will be served instead + of invoking the Worker script. When false, requests will always invoke the + Worker script. + """ + class MetadataAssets(TypedDict, total=False): config: MetadataAssetsConfig diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py index 64b5d00a594..3fc25ca73fd 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py @@ -81,7 +81,7 @@ class MetadataAssetsConfig(TypedDict, total=False): is no Worker script. """ - run_worker_first: List[str] + run_worker_first: Union[List[str], bool] """Contains a list path rules to control routing to either the Worker or assets. Glob (\\**) and negative (!) rules are supported. Rules must start with either '/' @@ -89,6 +89,13 @@ class MetadataAssetsConfig(TypedDict, total=False): have higher precedence than non-negative rules. """ + serve_directly: bool + """ + When true and the incoming request matches an asset, that will be served instead + of invoking the Worker script. When false, requests will always invoke the + Worker script. + """ + class MetadataAssets(TypedDict, total=False): config: MetadataAssetsConfig diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index fb6608c8f83..0ac098a416a 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -45,6 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "html_handling": "auto-trailing-slash", "not_found_handling": "404-page", "run_worker_first": ["string"], + "serve_directly": True, }, "jwt": "jwt", }, @@ -325,6 +326,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "html_handling": "auto-trailing-slash", "not_found_handling": "404-page", "run_worker_first": ["string"], + "serve_directly": True, }, "jwt": "jwt", }, diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index 1da778e981a..7fd78a6c457 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -46,6 +46,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "html_handling": "auto-trailing-slash", "not_found_handling": "404-page", "run_worker_first": ["string"], + "serve_directly": True, }, "jwt": "jwt", }, @@ -327,6 +328,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "html_handling": "auto-trailing-slash", "not_found_handling": "404-page", "run_worker_first": ["string"], + "serve_directly": True, }, "jwt": "jwt", }, From 3697fa37b90561d877690edf074fb58763193b9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 13:40:09 +0000 Subject: [PATCH 182/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ceec7fb88a6..82d0fa8dcb3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa63baaf2c1412979e523b2d379b69688e66d1c142c257ba10c6b8cfd454ae71.yml -openapi_spec_hash: 3acb03ed76d72e2ad13ade8064e2bb98 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e699b704303a3de4af5d25822ea00206bb403c43516b3743e2c008d696821af6.yml +openapi_spec_hash: 1f09210c6b263f4ece3a683f7291974b config_hash: 920bb1b417565d337cbdb7c39e77be5b From f1165925dbdd92232cfce87647c568c373a6c46f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 14:29:48 +0000 Subject: [PATCH 183/392] feat(api): api update --- .stats.yml | 4 +-- .../resources/hyperdrive/configs.py | 30 +++++++++++++++++++ .../types/hyperdrive/config_create_params.py | 6 ++++ .../types/hyperdrive/config_edit_params.py | 6 ++++ .../types/hyperdrive/config_update_params.py | 6 ++++ src/cloudflare/types/hyperdrive/hyperdrive.py | 6 ++++ .../api_resources/hyperdrive/test_configs.py | 6 ++++ 7 files changed, 62 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 82d0fa8dcb3..53d0c7c2c74 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e699b704303a3de4af5d25822ea00206bb403c43516b3743e2c008d696821af6.yml -openapi_spec_hash: 1f09210c6b263f4ece3a683f7291974b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2149603ebd47ac872065d6594e87a6561ffe30aebfe31084beb2277c0ee621aa.yml +openapi_spec_hash: 4a72e88a017593587a3a08c629e506fa config_hash: 920bb1b417565d337cbdb7c39e77be5b diff --git a/src/cloudflare/resources/hyperdrive/configs.py b/src/cloudflare/resources/hyperdrive/configs.py index ba977432b3c..9376308d7bf 100644 --- a/src/cloudflare/resources/hyperdrive/configs.py +++ b/src/cloudflare/resources/hyperdrive/configs.py @@ -53,6 +53,7 @@ def create( origin: config_create_params.Origin, caching: config_create_params.Caching | NotGiven = NOT_GIVEN, mtls: config_create_params.MTLS | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -66,6 +67,9 @@ def create( Args: account_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -84,6 +88,7 @@ def create( "origin": origin, "caching": caching, "mtls": mtls, + "origin_connection_limit": origin_connection_limit, }, config_create_params.ConfigCreateParams, ), @@ -106,6 +111,7 @@ def update( origin: config_update_params.Origin, caching: config_update_params.Caching | NotGiven = NOT_GIVEN, mtls: config_update_params.MTLS | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -121,6 +127,9 @@ def update( hyperdrive_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -141,6 +150,7 @@ def update( "origin": origin, "caching": caching, "mtls": mtls, + "origin_connection_limit": origin_connection_limit, }, config_update_params.ConfigUpdateParams, ), @@ -243,6 +253,7 @@ def edit( mtls: config_edit_params.MTLS | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, origin: config_edit_params.Origin | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -260,6 +271,9 @@ def edit( hyperdrive_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -280,6 +294,7 @@ def edit( "mtls": mtls, "name": name, "origin": origin, + "origin_connection_limit": origin_connection_limit, }, config_edit_params.ConfigEditParams, ), @@ -366,6 +381,7 @@ async def create( origin: config_create_params.Origin, caching: config_create_params.Caching | NotGiven = NOT_GIVEN, mtls: config_create_params.MTLS | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -379,6 +395,9 @@ async def create( Args: account_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -397,6 +416,7 @@ async def create( "origin": origin, "caching": caching, "mtls": mtls, + "origin_connection_limit": origin_connection_limit, }, config_create_params.ConfigCreateParams, ), @@ -419,6 +439,7 @@ async def update( origin: config_update_params.Origin, caching: config_update_params.Caching | NotGiven = NOT_GIVEN, mtls: config_update_params.MTLS | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -434,6 +455,9 @@ async def update( hyperdrive_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -454,6 +478,7 @@ async def update( "origin": origin, "caching": caching, "mtls": mtls, + "origin_connection_limit": origin_connection_limit, }, config_update_params.ConfigUpdateParams, ), @@ -556,6 +581,7 @@ async def edit( mtls: config_edit_params.MTLS | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, origin: config_edit_params.Origin | NotGiven = NOT_GIVEN, + origin_connection_limit: int | 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, @@ -573,6 +599,9 @@ async def edit( hyperdrive_id: Define configurations using a unique string identifier. + origin_connection_limit: The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -593,6 +622,7 @@ async def edit( "mtls": mtls, "name": name, "origin": origin, + "origin_connection_limit": origin_connection_limit, }, config_edit_params.ConfigEditParams, ), diff --git a/src/cloudflare/types/hyperdrive/config_create_params.py b/src/cloudflare/types/hyperdrive/config_create_params.py index 9a753acdd76..50a65a5af56 100644 --- a/src/cloudflare/types/hyperdrive/config_create_params.py +++ b/src/cloudflare/types/hyperdrive/config_create_params.py @@ -29,6 +29,12 @@ class ConfigCreateParams(TypedDict, total=False): mtls: MTLS + origin_connection_limit: int + """ + The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + """ + class OriginPublicDatabase(TypedDict, total=False): database: Required[str] diff --git a/src/cloudflare/types/hyperdrive/config_edit_params.py b/src/cloudflare/types/hyperdrive/config_edit_params.py index e1d9887063d..8adba3c4f7c 100644 --- a/src/cloudflare/types/hyperdrive/config_edit_params.py +++ b/src/cloudflare/types/hyperdrive/config_edit_params.py @@ -30,6 +30,12 @@ class ConfigEditParams(TypedDict, total=False): origin: Origin + origin_connection_limit: int + """ + The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + """ + class CachingHyperdriveHyperdriveCachingCommon(TypedDict, total=False): disabled: bool diff --git a/src/cloudflare/types/hyperdrive/config_update_params.py b/src/cloudflare/types/hyperdrive/config_update_params.py index c9e8b668194..9e22c66ee81 100644 --- a/src/cloudflare/types/hyperdrive/config_update_params.py +++ b/src/cloudflare/types/hyperdrive/config_update_params.py @@ -29,6 +29,12 @@ class ConfigUpdateParams(TypedDict, total=False): mtls: MTLS + origin_connection_limit: int + """ + The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + """ + class OriginPublicDatabase(TypedDict, total=False): database: Required[str] diff --git a/src/cloudflare/types/hyperdrive/hyperdrive.py b/src/cloudflare/types/hyperdrive/hyperdrive.py index d9ea0507b3d..033b05a5249 100644 --- a/src/cloudflare/types/hyperdrive/hyperdrive.py +++ b/src/cloudflare/types/hyperdrive/hyperdrive.py @@ -111,3 +111,9 @@ class Hyperdrive(BaseModel): """Defines the last modified time of the Hyperdrive configuration.""" mtls: Optional[MTLS] = None + + origin_connection_limit: Optional[int] = None + """ + The (soft) maximum number of connections the Hyperdrive is allowed to make to + the origin database. + """ diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index e38d4344dff..cbd44624bd7 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -55,6 +55,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "mtls_certificate_id": "00000000-0000-0000-0000-0000000000", "sslmode": "verify-full", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -158,6 +159,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "mtls_certificate_id": "00000000-0000-0000-0000-0000000000", "sslmode": "verify-full", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -353,6 +355,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "scheme": "postgres", "user": "postgres", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -490,6 +493,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "mtls_certificate_id": "00000000-0000-0000-0000-0000000000", "sslmode": "verify-full", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -593,6 +597,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "mtls_certificate_id": "00000000-0000-0000-0000-0000000000", "sslmode": "verify-full", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) @@ -788,6 +793,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "scheme": "postgres", "user": "postgres", }, + origin_connection_limit=60, ) assert_matches_type(Hyperdrive, config, path=["response"]) From 493c6287801e269227c5a6ce58748ed30040f16d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 14:36:16 +0000 Subject: [PATCH 184/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/resources/bot_management.py | 24 ++++++++++++------- .../bot_fight_mode_configuration.py | 6 ++++- .../bot_fight_mode_configuration_param.py | 6 ++++- .../bot_management_update_params.py | 24 +++++++++++++++---- .../subscription_configuration.py | 6 ++++- .../subscription_configuration_param.py | 6 ++++- ...bot_fight_mode_definitely_configuration.py | 6 ++++- ...ght_mode_definitely_configuration_param.py | 6 ++++- ...per_bot_fight_mode_likely_configuration.py | 6 ++++- ...t_fight_mode_likely_configuration_param.py | 6 ++++- 11 files changed, 78 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 53d0c7c2c74..613232bc97a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2149603ebd47ac872065d6594e87a6561ffe30aebfe31084beb2277c0ee621aa.yml -openapi_spec_hash: 4a72e88a017593587a3a08c629e506fa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90dc16f3a79cea2e47b58d0e4c9d2a47acf00b29de5e4e33427ac0a1911bbe54.yml +openapi_spec_hash: cf0290a44e021b2c81d8b0b00ea09b5d config_hash: 920bb1b417565d337cbdb7c39e77be5b diff --git a/src/cloudflare/resources/bot_management.py b/src/cloudflare/resources/bot_management.py index 943b0354b45..540928b30e3 100644 --- a/src/cloudflare/resources/bot_management.py +++ b/src/cloudflare/resources/bot_management.py @@ -128,7 +128,8 @@ def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -232,7 +233,8 @@ def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -345,7 +347,8 @@ def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -457,7 +460,8 @@ def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. auto_update_model: Automatically update to the newest bot detection models created by Cloudflare as they are released. @@ -686,7 +690,8 @@ async def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -790,7 +795,8 @@ async def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -903,7 +909,8 @@ async def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze. @@ -1015,7 +1022,8 @@ async def update( Args: zone_id: Identifier. - ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. + ai_bots_protection: Enable rule to block AI Scrapers and Crawlers. Please note the value + `only_on_ad_pages` is currently not available for Enterprise customers. auto_update_model: Automatically update to the newest bot detection models created by Cloudflare as they are released. diff --git a/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py b/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py index 5acfb9a5088..072d28c6a48 100644 --- a/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py +++ b/src/cloudflare/types/bot_management/bot_fight_mode_configuration.py @@ -36,7 +36,11 @@ class StaleZoneConfiguration(BaseModel): class BotFightModeConfiguration(BaseModel): ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Optional[Literal["enabled", "disabled"]] = None """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py b/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py index aef20bd0801..f74042c5799 100644 --- a/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py +++ b/src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py @@ -9,7 +9,11 @@ class BotFightModeConfigurationParam(TypedDict, total=False): ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/bot_management_update_params.py b/src/cloudflare/types/bot_management/bot_management_update_params.py index f272d5858ac..310a2d6515f 100644 --- a/src/cloudflare/types/bot_management/bot_management_update_params.py +++ b/src/cloudflare/types/bot_management/bot_management_update_params.py @@ -19,7 +19,11 @@ class BotFightModeConfiguration(TypedDict, total=False): """Identifier.""" ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" @@ -39,7 +43,11 @@ class SuperBotFightModeDefinitelyConfiguration(TypedDict, total=False): """Identifier.""" ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" @@ -72,7 +80,11 @@ class SuperBotFightModeLikelyConfiguration(TypedDict, total=False): """Identifier.""" ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" @@ -108,7 +120,11 @@ class SubscriptionConfiguration(TypedDict, total=False): """Identifier.""" ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ auto_update_model: bool """ diff --git a/src/cloudflare/types/bot_management/subscription_configuration.py b/src/cloudflare/types/bot_management/subscription_configuration.py index c2e6d5ebd60..5aa253353c6 100644 --- a/src/cloudflare/types/bot_management/subscription_configuration.py +++ b/src/cloudflare/types/bot_management/subscription_configuration.py @@ -36,7 +36,11 @@ class StaleZoneConfiguration(BaseModel): class SubscriptionConfiguration(BaseModel): ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ auto_update_model: Optional[bool] = None """ diff --git a/src/cloudflare/types/bot_management/subscription_configuration_param.py b/src/cloudflare/types/bot_management/subscription_configuration_param.py index 3c7fdf849bc..9a61562625e 100644 --- a/src/cloudflare/types/bot_management/subscription_configuration_param.py +++ b/src/cloudflare/types/bot_management/subscription_configuration_param.py @@ -9,7 +9,11 @@ class SubscriptionConfigurationParam(TypedDict, total=False): ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ auto_update_model: bool """ diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py index 9d225bd56c2..23595091365 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration.py @@ -21,7 +21,11 @@ class StaleZoneConfiguration(BaseModel): class SuperBotFightModeDefinitelyConfiguration(BaseModel): ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Optional[Literal["enabled", "disabled"]] = None """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py index 17f1564dfc5..c04a33374e5 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py @@ -9,7 +9,11 @@ class SuperBotFightModeDefinitelyConfigurationParam(TypedDict, total=False): ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py index 6355082b4e8..e3cf122345b 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration.py @@ -15,7 +15,11 @@ class StaleZoneConfiguration(BaseModel): class SuperBotFightModeLikelyConfiguration(BaseModel): ai_bots_protection: Optional[Literal["block", "disabled", "only_on_ad_pages"]] = None - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Optional[Literal["enabled", "disabled"]] = None """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" diff --git a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py index 2c4c57a6e00..ef00c4bc186 100644 --- a/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py +++ b/src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py @@ -9,7 +9,11 @@ class SuperBotFightModeLikelyConfigurationParam(TypedDict, total=False): ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] - """Enable rule to block AI Scrapers and Crawlers.""" + """Enable rule to block AI Scrapers and Crawlers. + + Please note the value `only_on_ad_pages` is currently not available for + Enterprise customers. + """ crawler_protection: Literal["enabled", "disabled"] """Enable rule to punish AI Scrapers and Crawlers via a link maze.""" From 5c7fff8e21d57c058aa9e0c1cf68239be4ebf66b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 15:11:23 +0000 Subject: [PATCH 185/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 613232bc97a..c417ef820b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-90dc16f3a79cea2e47b58d0e4c9d2a47acf00b29de5e4e33427ac0a1911bbe54.yml -openapi_spec_hash: cf0290a44e021b2c81d8b0b00ea09b5d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-72ccd962eacd927de86cc8917acaec93193c9484653be8e007fba551f57ce7f5.yml +openapi_spec_hash: 61defcff3c762ccb93de4e8f57abafde config_hash: 920bb1b417565d337cbdb7c39e77be5b From 3aa455282b7d2f2b4c5964b9d39fe59be443c3ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 15:34:39 +0000 Subject: [PATCH 186/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c417ef820b0..ed84d9943c3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-72ccd962eacd927de86cc8917acaec93193c9484653be8e007fba551f57ce7f5.yml -openapi_spec_hash: 61defcff3c762ccb93de4e8f57abafde +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c848d71196a076e0d5926338c8981578f01ded251c3f11f6158a32c0752f4d20.yml +openapi_spec_hash: 168ba7d971d38a51a6e555c7761dc843 config_hash: 920bb1b417565d337cbdb7c39e77be5b From 253714773aaf885099c379b8d10374852cd7e4ff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 16:21:14 +0000 Subject: [PATCH 187/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ed84d9943c3..3548382968c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c848d71196a076e0d5926338c8981578f01ded251c3f11f6158a32c0752f4d20.yml -openapi_spec_hash: 168ba7d971d38a51a6e555c7761dc843 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b849b08cec7799f83a6e8ba6f2e03744ed25d4a11a4fc713210e3f72c1fcaa61.yml +openapi_spec_hash: fc505ee06b02b22d6b8c1fe727462da5 config_hash: 920bb1b417565d337cbdb7c39e77be5b From d982424f3f04cb7f6d13a1d12738cafb514be1bb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 16:54:17 +0000 Subject: [PATCH 188/392] feat(api): api update --- .stats.yml | 4 ++-- .../resources/magic_transit/connectors/connectors.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3548382968c..0d8503f6231 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b849b08cec7799f83a6e8ba6f2e03744ed25d4a11a4fc713210e3f72c1fcaa61.yml -openapi_spec_hash: fc505ee06b02b22d6b8c1fe727462da5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-09b68172990dcc34346c9a3546d868f23ebfae2aca1ce360c05737bd354e7a77.yml +openapi_spec_hash: f2d1f5bb248b492901829037456eb820 config_hash: 920bb1b417565d337cbdb7c39e77be5b diff --git a/src/cloudflare/resources/magic_transit/connectors/connectors.py b/src/cloudflare/resources/magic_transit/connectors/connectors.py index 0af23684c7b..4eeae59a387 100644 --- a/src/cloudflare/resources/magic_transit/connectors/connectors.py +++ b/src/cloudflare/resources/magic_transit/connectors/connectors.py @@ -183,7 +183,7 @@ def edit( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ConnectorEditResponse: """ - Update Connector + Edit Connector to update specific properties Args: account_id: Account identifier @@ -404,7 +404,7 @@ async def edit( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ConnectorEditResponse: """ - Update Connector + Edit Connector to update specific properties Args: account_id: Account identifier From 050846659707d96b12440f403fb4896bda999bd1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 17:33:32 +0000 Subject: [PATCH 189/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0d8503f6231..81dec321382 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-09b68172990dcc34346c9a3546d868f23ebfae2aca1ce360c05737bd354e7a77.yml -openapi_spec_hash: f2d1f5bb248b492901829037456eb820 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cd8b1d9b635c7b928aa2cb2c0b234c8460480fa728bf58eabbe0114a8bbbc8d7.yml +openapi_spec_hash: d5521db1bcd738df2fa37758428b50b5 config_hash: 920bb1b417565d337cbdb7c39e77be5b From fa432493c10e38c4319538a3b684c4914f22aeaa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 18:53:02 +0000 Subject: [PATCH 190/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 81dec321382..61f90b85858 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cd8b1d9b635c7b928aa2cb2c0b234c8460480fa728bf58eabbe0114a8bbbc8d7.yml -openapi_spec_hash: d5521db1bcd738df2fa37758428b50b5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-50d313a43a3c21981b7cf7108cdc2807680897f608b68af47448e94d021abc64.yml +openapi_spec_hash: 84fe8b174bf976fe3f997f0638e04d5d config_hash: 920bb1b417565d337cbdb7c39e77be5b From dcf06c8b08df6d6210dd58eb968b46ec56c02077 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 19:26:58 +0000 Subject: [PATCH 191/392] feat(api): api update --- .stats.yml | 4 ++-- .../types/zero_trust/gateway/block_page_settings.py | 9 +++++++++ .../types/zero_trust/gateway/extended_email_matching.py | 9 +++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 61f90b85858..303a00973ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-50d313a43a3c21981b7cf7108cdc2807680897f608b68af47448e94d021abc64.yml -openapi_spec_hash: 84fe8b174bf976fe3f997f0638e04d5d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8b0c7335cafcf00063d2dd5a4dfd902cc95e87ad3ac390031e0a5090a0e2cd47.yml +openapi_spec_hash: aaad6f471b374afa61b4a64c40ef79e1 config_hash: 920bb1b417565d337cbdb7c39e77be5b diff --git a/src/cloudflare/types/zero_trust/gateway/block_page_settings.py b/src/cloudflare/types/zero_trust/gateway/block_page_settings.py index 2b587764cff..de40b9268d4 100644 --- a/src/cloudflare/types/zero_trust/gateway/block_page_settings.py +++ b/src/cloudflare/types/zero_trust/gateway/block_page_settings.py @@ -50,6 +50,15 @@ class BlockPageSettings(BaseModel): name: Optional[str] = None """If mode is customized_block_page: block page title.""" + read_only: Optional[bool] = None + """ + This setting was shared via the Orgs API and cannot be edited by the current + account + """ + + source_account: Optional[str] = None + """Account tag of account that shared this setting""" + suppress_footer: Optional[bool] = None """ If mode is customized_block_page: suppress detailed info at the bottom of the diff --git a/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py b/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py index ff34962235c..28425d6c1d6 100644 --- a/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py +++ b/src/cloudflare/types/zero_trust/gateway/extended_email_matching.py @@ -13,3 +13,12 @@ class ExtendedEmailMatching(BaseModel): modifiers) used as criteria in Firewall policies. """ + + read_only: Optional[bool] = None + """ + This setting was shared via the Orgs API and cannot be edited by the current + account + """ + + source_account: Optional[str] = None + """Account tag of account that shared this setting""" From 87e1a8adc545c7a7070b6b45e1d74dcc92006c01 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 20:09:44 +0000 Subject: [PATCH 192/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 303a00973ff..cfd5ef24788 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8b0c7335cafcf00063d2dd5a4dfd902cc95e87ad3ac390031e0a5090a0e2cd47.yml openapi_spec_hash: aaad6f471b374afa61b4a64c40ef79e1 -config_hash: 920bb1b417565d337cbdb7c39e77be5b +config_hash: 9a6819cd23665bc55dedbd5b424cc286 From bb1987d9dd1b9e2443763986b263acb881de52f6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 20:21:37 +0000 Subject: [PATCH 193/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cfd5ef24788..90e2396e8b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8b0c7335cafcf00063d2dd5a4dfd902cc95e87ad3ac390031e0a5090a0e2cd47.yml -openapi_spec_hash: aaad6f471b374afa61b4a64c40ef79e1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4623fb0f45b5cc7ed7d7da530b19aceaed9f0da2c8579d5d34f5cbf8ad4a484b.yml +openapi_spec_hash: b9cec67d693f344fc68310280f0bbdc4 config_hash: 9a6819cd23665bc55dedbd5b424cc286 From a876e99265c7708faf272c2e901b5a6afd77693b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 20:35:36 +0000 Subject: [PATCH 194/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 90e2396e8b2..c64d3c6507d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4623fb0f45b5cc7ed7d7da530b19aceaed9f0da2c8579d5d34f5cbf8ad4a484b.yml -openapi_spec_hash: b9cec67d693f344fc68310280f0bbdc4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-64096ea6bc13f0f87cf421dc237b5047f4f65161ce9e4dc3c97e60a2002f14ac.yml +openapi_spec_hash: d7f0482bfcc1f1c37377fde00e72f86b config_hash: 9a6819cd23665bc55dedbd5b424cc286 From 9a96496de2c378f027c06ad13500359e6004c139 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 20:48:41 +0000 Subject: [PATCH 195/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c64d3c6507d..7e37bb57a4b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1759 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-64096ea6bc13f0f87cf421dc237b5047f4f65161ce9e4dc3c97e60a2002f14ac.yml -openapi_spec_hash: d7f0482bfcc1f1c37377fde00e72f86b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b5f6a17157fe19892f8737208ed142c4d431d81cfe0d13bedc16a8213cc58f32.yml +openapi_spec_hash: 956f10079edd2cb55bd255500a85ccb3 config_hash: 9a6819cd23665bc55dedbd5b424cc286 From 42705d7ab89a26af0a185b8753aa009509780c76 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 21:35:59 +0000 Subject: [PATCH 196/392] feat(api): Add DELETE and POST routes for Magic Connector --- .stats.yml | 4 +- api.md | 4 + .../magic_transit/connectors/connectors.py | 224 +++++++++++++++++- .../types/magic_transit/__init__.py | 3 + .../magic_transit/connector_create_params.py | 30 +++ .../connector_create_response.py | 35 +++ .../connector_delete_response.py | 35 +++ .../magic_transit/test_connectors.py | 214 +++++++++++++++++ 8 files changed, 546 insertions(+), 3 deletions(-) create mode 100644 src/cloudflare/types/magic_transit/connector_create_params.py create mode 100644 src/cloudflare/types/magic_transit/connector_create_response.py create mode 100644 src/cloudflare/types/magic_transit/connector_delete_response.py diff --git a/.stats.yml b/.stats.yml index 7e37bb57a4b..d16f68a4c8b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1759 +configured_endpoints: 1761 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b5f6a17157fe19892f8737208ed142c4d431d81cfe0d13bedc16a8213cc58f32.yml openapi_spec_hash: 956f10079edd2cb55bd255500a85ccb3 -config_hash: 9a6819cd23665bc55dedbd5b424cc286 +config_hash: 73823d0a9cad0920101df8ab49b929ff diff --git a/api.md b/api.md index 9fa77d331ca..d1290cf9c90 100644 --- a/api.md +++ b/api.md @@ -3923,8 +3923,10 @@ Types: ```python from cloudflare.types.magic_transit import ( + ConnectorCreateResponse, ConnectorUpdateResponse, ConnectorListResponse, + ConnectorDeleteResponse, ConnectorEditResponse, ConnectorGetResponse, ) @@ -3932,8 +3934,10 @@ from cloudflare.types.magic_transit import ( Methods: +- client.magic_transit.connectors.create(\*, account_id, \*\*params) -> ConnectorCreateResponse - client.magic_transit.connectors.update(connector_id, \*, account_id, \*\*params) -> ConnectorUpdateResponse - client.magic_transit.connectors.list(\*, account_id) -> SyncSinglePage[ConnectorListResponse] +- client.magic_transit.connectors.delete(connector_id, \*, account_id) -> ConnectorDeleteResponse - client.magic_transit.connectors.edit(connector_id, \*, account_id, \*\*params) -> ConnectorEditResponse - client.magic_transit.connectors.get(connector_id, \*, account_id) -> ConnectorGetResponse diff --git a/src/cloudflare/resources/magic_transit/connectors/connectors.py b/src/cloudflare/resources/magic_transit/connectors/connectors.py index 4eeae59a387..c22d2084c31 100644 --- a/src/cloudflare/resources/magic_transit/connectors/connectors.py +++ b/src/cloudflare/resources/magic_transit/connectors/connectors.py @@ -35,10 +35,12 @@ SnapshotsResourceWithStreamingResponse, AsyncSnapshotsResourceWithStreamingResponse, ) -from ....types.magic_transit import connector_edit_params, connector_update_params +from ....types.magic_transit import connector_edit_params, connector_create_params, connector_update_params from ....types.magic_transit.connector_get_response import ConnectorGetResponse from ....types.magic_transit.connector_edit_response import ConnectorEditResponse from ....types.magic_transit.connector_list_response import ConnectorListResponse +from ....types.magic_transit.connector_create_response import ConnectorCreateResponse +from ....types.magic_transit.connector_delete_response import ConnectorDeleteResponse from ....types.magic_transit.connector_update_response import ConnectorUpdateResponse __all__ = ["ConnectorsResource", "AsyncConnectorsResource"] @@ -72,6 +74,62 @@ def with_streaming_response(self) -> ConnectorsResourceWithStreamingResponse: """ return ConnectorsResourceWithStreamingResponse(self) + def create( + self, + *, + account_id: str, + device: connector_create_params.Device, + activated: bool | NotGiven = NOT_GIVEN, + interrupt_window_duration_hours: float | NotGiven = NOT_GIVEN, + interrupt_window_hour_of_day: float | NotGiven = NOT_GIVEN, + notes: str | NotGiven = NOT_GIVEN, + timezone: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ConnectorCreateResponse: + """ + Add a connector to your account + + Args: + account_id: Account identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._post( + f"/accounts/{account_id}/magic/connectors", + body=maybe_transform( + { + "device": device, + "activated": activated, + "interrupt_window_duration_hours": interrupt_window_duration_hours, + "interrupt_window_hour_of_day": interrupt_window_hour_of_day, + "notes": notes, + "timezone": timezone, + }, + connector_create_params.ConnectorCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ConnectorCreateResponse]._unwrapper, + ), + cast_to=cast(Type[ConnectorCreateResponse], ResultWrapper[ConnectorCreateResponse]), + ) + def update( self, connector_id: str, @@ -165,6 +223,48 @@ def list( model=ConnectorListResponse, ) + def delete( + self, + connector_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ConnectorDeleteResponse: + """ + Remove a connector from your account + + Args: + account_id: Account identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not connector_id: + raise ValueError(f"Expected a non-empty value for `connector_id` but received {connector_id!r}") + return self._delete( + f"/accounts/{account_id}/magic/connectors/{connector_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ConnectorDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[ConnectorDeleteResponse], ResultWrapper[ConnectorDeleteResponse]), + ) + def edit( self, connector_id: str, @@ -293,6 +393,62 @@ def with_streaming_response(self) -> AsyncConnectorsResourceWithStreamingRespons """ return AsyncConnectorsResourceWithStreamingResponse(self) + async def create( + self, + *, + account_id: str, + device: connector_create_params.Device, + activated: bool | NotGiven = NOT_GIVEN, + interrupt_window_duration_hours: float | NotGiven = NOT_GIVEN, + interrupt_window_hour_of_day: float | NotGiven = NOT_GIVEN, + notes: str | NotGiven = NOT_GIVEN, + timezone: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ConnectorCreateResponse: + """ + Add a connector to your account + + Args: + account_id: Account identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._post( + f"/accounts/{account_id}/magic/connectors", + body=await async_maybe_transform( + { + "device": device, + "activated": activated, + "interrupt_window_duration_hours": interrupt_window_duration_hours, + "interrupt_window_hour_of_day": interrupt_window_hour_of_day, + "notes": notes, + "timezone": timezone, + }, + connector_create_params.ConnectorCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ConnectorCreateResponse]._unwrapper, + ), + cast_to=cast(Type[ConnectorCreateResponse], ResultWrapper[ConnectorCreateResponse]), + ) + async def update( self, connector_id: str, @@ -386,6 +542,48 @@ def list( model=ConnectorListResponse, ) + async def delete( + self, + connector_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ConnectorDeleteResponse: + """ + Remove a connector from your account + + Args: + account_id: Account identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not connector_id: + raise ValueError(f"Expected a non-empty value for `connector_id` but received {connector_id!r}") + return await self._delete( + f"/accounts/{account_id}/magic/connectors/{connector_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ConnectorDeleteResponse]._unwrapper, + ), + cast_to=cast(Type[ConnectorDeleteResponse], ResultWrapper[ConnectorDeleteResponse]), + ) + async def edit( self, connector_id: str, @@ -490,12 +688,18 @@ class ConnectorsResourceWithRawResponse: def __init__(self, connectors: ConnectorsResource) -> None: self._connectors = connectors + self.create = to_raw_response_wrapper( + connectors.create, + ) self.update = to_raw_response_wrapper( connectors.update, ) self.list = to_raw_response_wrapper( connectors.list, ) + self.delete = to_raw_response_wrapper( + connectors.delete, + ) self.edit = to_raw_response_wrapper( connectors.edit, ) @@ -516,12 +720,18 @@ class AsyncConnectorsResourceWithRawResponse: def __init__(self, connectors: AsyncConnectorsResource) -> None: self._connectors = connectors + self.create = async_to_raw_response_wrapper( + connectors.create, + ) self.update = async_to_raw_response_wrapper( connectors.update, ) self.list = async_to_raw_response_wrapper( connectors.list, ) + self.delete = async_to_raw_response_wrapper( + connectors.delete, + ) self.edit = async_to_raw_response_wrapper( connectors.edit, ) @@ -542,12 +752,18 @@ class ConnectorsResourceWithStreamingResponse: def __init__(self, connectors: ConnectorsResource) -> None: self._connectors = connectors + self.create = to_streamed_response_wrapper( + connectors.create, + ) self.update = to_streamed_response_wrapper( connectors.update, ) self.list = to_streamed_response_wrapper( connectors.list, ) + self.delete = to_streamed_response_wrapper( + connectors.delete, + ) self.edit = to_streamed_response_wrapper( connectors.edit, ) @@ -568,12 +784,18 @@ class AsyncConnectorsResourceWithStreamingResponse: def __init__(self, connectors: AsyncConnectorsResource) -> None: self._connectors = connectors + self.create = async_to_streamed_response_wrapper( + connectors.create, + ) self.update = async_to_streamed_response_wrapper( connectors.update, ) self.list = async_to_streamed_response_wrapper( connectors.list, ) + self.delete = async_to_streamed_response_wrapper( + connectors.delete, + ) self.edit = async_to_streamed_response_wrapper( connectors.edit, ) diff --git a/src/cloudflare/types/magic_transit/__init__.py b/src/cloudflare/types/magic_transit/__init__.py index 4bca98d1cde..700b72f955b 100644 --- a/src/cloudflare/types/magic_transit/__init__.py +++ b/src/cloudflare/types/magic_transit/__init__.py @@ -41,6 +41,7 @@ from .route_delete_response import RouteDeleteResponse as RouteDeleteResponse from .route_update_response import RouteUpdateResponse as RouteUpdateResponse from .connector_get_response import ConnectorGetResponse as ConnectorGetResponse +from .connector_create_params import ConnectorCreateParams as ConnectorCreateParams from .connector_edit_response import ConnectorEditResponse as ConnectorEditResponse from .connector_list_response import ConnectorListResponse as ConnectorListResponse from .connector_update_params import ConnectorUpdateParams as ConnectorUpdateParams @@ -49,6 +50,8 @@ from .gre_tunnel_list_response import GRETunnelListResponse as GRETunnelListResponse from .gre_tunnel_update_params import GRETunnelUpdateParams as GRETunnelUpdateParams from .route_bulk_update_params import RouteBulkUpdateParams as RouteBulkUpdateParams +from .connector_create_response import ConnectorCreateResponse as ConnectorCreateResponse +from .connector_delete_response import ConnectorDeleteResponse as ConnectorDeleteResponse from .connector_update_response import ConnectorUpdateResponse as ConnectorUpdateResponse from .ipsec_tunnel_get_response import IPSECTunnelGetResponse as IPSECTunnelGetResponse from .gre_tunnel_create_response import GRETunnelCreateResponse as GRETunnelCreateResponse diff --git a/src/cloudflare/types/magic_transit/connector_create_params.py b/src/cloudflare/types/magic_transit/connector_create_params.py new file mode 100644 index 00000000000..3325692038f --- /dev/null +++ b/src/cloudflare/types/magic_transit/connector_create_params.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["ConnectorCreateParams", "Device"] + + +class ConnectorCreateParams(TypedDict, total=False): + account_id: Required[str] + """Account identifier""" + + device: Required[Device] + + activated: bool + + interrupt_window_duration_hours: float + + interrupt_window_hour_of_day: float + + notes: str + + timezone: str + + +class Device(TypedDict, total=False): + id: str + + serial_number: str diff --git a/src/cloudflare/types/magic_transit/connector_create_response.py b/src/cloudflare/types/magic_transit/connector_create_response.py new file mode 100644 index 00000000000..02edf9b3370 --- /dev/null +++ b/src/cloudflare/types/magic_transit/connector_create_response.py @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["ConnectorCreateResponse", "Device"] + + +class Device(BaseModel): + id: str + + serial_number: Optional[str] = None + + +class ConnectorCreateResponse(BaseModel): + id: str + + activated: bool + + interrupt_window_duration_hours: float + + interrupt_window_hour_of_day: float + + last_updated: str + + notes: str + + timezone: str + + device: Optional[Device] = None + + last_heartbeat: Optional[str] = None + + last_seen_version: Optional[str] = None diff --git a/src/cloudflare/types/magic_transit/connector_delete_response.py b/src/cloudflare/types/magic_transit/connector_delete_response.py new file mode 100644 index 00000000000..7b07e28c483 --- /dev/null +++ b/src/cloudflare/types/magic_transit/connector_delete_response.py @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["ConnectorDeleteResponse", "Device"] + + +class Device(BaseModel): + id: str + + serial_number: Optional[str] = None + + +class ConnectorDeleteResponse(BaseModel): + id: str + + activated: bool + + interrupt_window_duration_hours: float + + interrupt_window_hour_of_day: float + + last_updated: str + + notes: str + + timezone: str + + device: Optional[Device] = None + + last_heartbeat: Optional[str] = None + + last_seen_version: Optional[str] = None diff --git a/tests/api_resources/magic_transit/test_connectors.py b/tests/api_resources/magic_transit/test_connectors.py index c1db3d02862..f87ed4dfdbd 100644 --- a/tests/api_resources/magic_transit/test_connectors.py +++ b/tests/api_resources/magic_transit/test_connectors.py @@ -14,6 +14,8 @@ ConnectorGetResponse, ConnectorEditResponse, ConnectorListResponse, + ConnectorCreateResponse, + ConnectorDeleteResponse, ConnectorUpdateResponse, ) @@ -23,6 +25,64 @@ class TestConnectors: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + connector = client.magic_transit.connectors.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + connector = client.magic_transit.connectors.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={ + "id": "id", + "serial_number": "serial_number", + }, + activated=True, + interrupt_window_duration_hours=0, + interrupt_window_hour_of_day=0, + notes="notes", + timezone="timezone", + ) + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.magic_transit.connectors.with_raw_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + connector = response.parse() + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.magic_transit.connectors.with_streaming_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + connector = response.parse() + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.magic_transit.connectors.with_raw_response.create( + account_id="", + device={}, + ) + @parametrize def test_method_update(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.update( @@ -122,6 +182,54 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + connector = client.magic_transit.connectors.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.magic_transit.connectors.with_raw_response.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + connector = response.parse() + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.magic_transit.connectors.with_streaming_response.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + connector = response.parse() + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.magic_transit.connectors.with_raw_response.delete( + connector_id="connector_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): + client.magic_transit.connectors.with_raw_response.delete( + connector_id="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize def test_method_edit(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.edit( @@ -237,6 +345,64 @@ class TestAsyncConnectors: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + connector = await async_client.magic_transit.connectors.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + connector = await async_client.magic_transit.connectors.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={ + "id": "id", + "serial_number": "serial_number", + }, + activated=True, + interrupt_window_duration_hours=0, + interrupt_window_hour_of_day=0, + notes="notes", + timezone="timezone", + ) + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.connectors.with_raw_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + connector = await response.parse() + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.connectors.with_streaming_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + device={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + connector = await response.parse() + assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.magic_transit.connectors.with_raw_response.create( + account_id="", + device={}, + ) + @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.update( @@ -336,6 +502,54 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="", ) + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + connector = await async_client.magic_transit.connectors.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.magic_transit.connectors.with_raw_response.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + connector = await response.parse() + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.magic_transit.connectors.with_streaming_response.delete( + connector_id="connector_id", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + connector = await response.parse() + assert_matches_type(ConnectorDeleteResponse, connector, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.magic_transit.connectors.with_raw_response.delete( + connector_id="connector_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): + await async_client.magic_transit.connectors.with_raw_response.delete( + connector_id="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.edit( From af37d2fa87f6b3fb1f714c91381bbccc1810fa28 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 21:39:21 +0000 Subject: [PATCH 197/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d16f68a4c8b..198b0a59213 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b5f6a17157fe19892f8737208ed142c4d431d81cfe0d13bedc16a8213cc58f32.yml openapi_spec_hash: 956f10079edd2cb55bd255500a85ccb3 -config_hash: 73823d0a9cad0920101df8ab49b929ff +config_hash: 1d47998f5beedb88688bf4a0e549b14b From 5d9961ce4aba38d828f3279e7081b30b76db74ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 22:15:54 +0000 Subject: [PATCH 198/392] feat(brand_protection): Add new routes --- .stats.yml | 2 +- api.md | 4 ++-- src/cloudflare/_client.py | 2 +- .../resources/brand_protection/__init__.py | 19 ++++++++++++++++++ .../brand_protection.py | 20 +++++++++---------- .../brand_protection/__init__.py | 1 + 6 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 src/cloudflare/resources/brand_protection/__init__.py rename src/cloudflare/resources/{ => brand_protection}/brand_protection.py (95%) create mode 100644 tests/api_resources/brand_protection/__init__.py diff --git a/.stats.yml b/.stats.yml index 198b0a59213..c32a1ebee10 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b5f6a17157fe19892f8737208ed142c4d431d81cfe0d13bedc16a8213cc58f32.yml openapi_spec_hash: 956f10079edd2cb55bd255500a85ccb3 -config_hash: 1d47998f5beedb88688bf4a0e549b14b +config_hash: 150f1595200b5d085e0c40682eb2010b diff --git a/api.md b/api.md index d1290cf9c90..abba67ceadc 100644 --- a/api.md +++ b/api.md @@ -3371,8 +3371,8 @@ from cloudflare.types.brand_protection import ( Methods: -- client.brand_protection.submit(\*, account_id, \*\*params) -> Optional[Submit] -- client.brand_protection.url_info(\*, account_id, \*\*params) -> Optional[Info] +- client.brand_protection.submit(\*, account_id, \*\*params) -> Optional[Submit] +- client.brand_protection.url_info(\*, account_id, \*\*params) -> Optional[Info] # Diagnostics diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index 141eaf0be63..77031e103b3 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -170,7 +170,6 @@ from .resources.billing.billing import BillingResource, AsyncBillingResource from .resources.logpush.logpush import LogpushResource, AsyncLogpushResource from .resources.workers.workers import WorkersResource, AsyncWorkersResource - from .resources.brand_protection import BrandProtectionResource, AsyncBrandProtectionResource from .resources.accounts.accounts import AccountsResource, AsyncAccountsResource from .resources.alerting.alerting import AlertingResource, AsyncAlertingResource from .resources.firewall.firewall import FirewallResource, AsyncFirewallResource @@ -214,6 +213,7 @@ from .resources.durable_objects.durable_objects import DurableObjectsResource, AsyncDurableObjectsResource from .resources.request_tracers.request_tracers import RequestTracersResource, AsyncRequestTracersResource from .resources.security_center.security_center import SecurityCenterResource, AsyncSecurityCenterResource + from .resources.brand_protection.brand_protection import BrandProtectionResource, AsyncBrandProtectionResource from .resources.content_scanning.content_scanning import ContentScanningResource, AsyncContentScanningResource from .resources.custom_hostnames.custom_hostnames import CustomHostnamesResource, AsyncCustomHostnamesResource from .resources.resource_sharing.resource_sharing import ResourceSharingResource, AsyncResourceSharingResource diff --git a/src/cloudflare/resources/brand_protection/__init__.py b/src/cloudflare/resources/brand_protection/__init__.py new file mode 100644 index 00000000000..11906c084fe --- /dev/null +++ b/src/cloudflare/resources/brand_protection/__init__.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .brand_protection import ( + BrandProtectionResource, + AsyncBrandProtectionResource, + BrandProtectionResourceWithRawResponse, + AsyncBrandProtectionResourceWithRawResponse, + BrandProtectionResourceWithStreamingResponse, + AsyncBrandProtectionResourceWithStreamingResponse, +) + +__all__ = [ + "BrandProtectionResource", + "AsyncBrandProtectionResource", + "BrandProtectionResourceWithRawResponse", + "AsyncBrandProtectionResourceWithRawResponse", + "BrandProtectionResourceWithStreamingResponse", + "AsyncBrandProtectionResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/brand_protection.py b/src/cloudflare/resources/brand_protection/brand_protection.py similarity index 95% rename from src/cloudflare/resources/brand_protection.py rename to src/cloudflare/resources/brand_protection/brand_protection.py index 659ee0c7e7c..2f4981451a5 100644 --- a/src/cloudflare/resources/brand_protection.py +++ b/src/cloudflare/resources/brand_protection/brand_protection.py @@ -6,21 +6,21 @@ import httpx -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform, async_maybe_transform -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( to_raw_response_wrapper, to_streamed_response_wrapper, async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._wrappers import ResultWrapper -from .._base_client import make_request_options -from ..types.brand_protection import brand_protection_submit_params, brand_protection_url_info_params -from ..types.brand_protection.info import Info -from ..types.brand_protection.submit import Submit +from ..._wrappers import ResultWrapper +from ..._base_client import make_request_options +from ...types.brand_protection import brand_protection_submit_params, brand_protection_url_info_params +from ...types.brand_protection.info import Info +from ...types.brand_protection.submit import Submit __all__ = ["BrandProtectionResource", "AsyncBrandProtectionResource"] diff --git a/tests/api_resources/brand_protection/__init__.py b/tests/api_resources/brand_protection/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/brand_protection/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. From 12fa4c60114aceeee97241613c152e2ef669e8a1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 22:48:09 +0000 Subject: [PATCH 199/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c32a1ebee10..5d178e91547 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b5f6a17157fe19892f8737208ed142c4d431d81cfe0d13bedc16a8213cc58f32.yml -openapi_spec_hash: 956f10079edd2cb55bd255500a85ccb3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7db30851a3af46d23c10f4c7bdab08d78b61dee0769cac91002d0b49f77cae04.yml +openapi_spec_hash: 18f774f4c52644270da29a8f84369ea4 config_hash: 150f1595200b5d085e0c40682eb2010b From 6a7747743adf9e47b72d616ed1cec3f5ea35f218 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:17:28 +0000 Subject: [PATCH 200/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5d178e91547..a5f658918a7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7db30851a3af46d23c10f4c7bdab08d78b61dee0769cac91002d0b49f77cae04.yml -openapi_spec_hash: 18f774f4c52644270da29a8f84369ea4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-13301345b521afb4aedeb19dbc4084f475af39781c614f62d0d8947a580b64c6.yml +openapi_spec_hash: fc0e79abd55a265a5ed9bc88b06a5962 config_hash: 150f1595200b5d085e0c40682eb2010b From 88a99586b00f00557d5cf1b7f77979184e71034c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:34:58 +0000 Subject: [PATCH 201/392] chore(ci): change upload type --- .github/workflows/ci.yml | 18 ++++++++++++++++-- scripts/utils/upload-artifact.sh | 12 +++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75ed9117a16..c07a6a74f27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,10 +40,10 @@ jobs: - name: Run lints run: ./scripts/lint - upload: + build: if: github.repository == 'stainless-sdks/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) timeout-minutes: 10 - name: upload + name: build permissions: contents: read id-token: write @@ -51,6 +51,20 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: '0.44.0' + RYE_INSTALL_OPTION: '--yes' + + - name: Install dependencies + run: rye sync --all-features + + - name: Run build + run: rye build + - name: Get GitHub OIDC Token id: github-oidc uses: actions/github-script@v6 diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index 6ba857e8d3b..fc6462eccf8 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash set -exuo pipefail -RESPONSE=$(curl -X POST "$URL" \ +FILENAME=$(basename dist/*.whl) + +RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \ -H "Authorization: Bearer $AUTH" \ -H "Content-Type: application/json") @@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then exit 1 fi -UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \ - -H "Content-Type: application/gzip" \ - --data-binary @- "$SIGNED_URL" 2>&1) +UPLOAD_RESPONSE=$(curl -v -X PUT \ + -H "Content-Type: binary/octet-stream" \ + --data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1) if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/cloudflare-python/$SHA'\033[0m" + echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/cloudflare-python/$SHA/$FILENAME'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 From 0fe0c9695c788e2954f0d72257e7598fef5e7082 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 01:20:43 +0000 Subject: [PATCH 202/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a5f658918a7..b5282fd4cd1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-13301345b521afb4aedeb19dbc4084f475af39781c614f62d0d8947a580b64c6.yml -openapi_spec_hash: fc0e79abd55a265a5ed9bc88b06a5962 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0412455878f0654a6b767f64c0f6d735a634dae50625511cb9bb8fc8cdaf6d43.yml +openapi_spec_hash: 7b36137f1a550644d5f0447b6e88841c config_hash: 150f1595200b5d085e0c40682eb2010b From 1a0fb4d6569daec5e9befcd2c606f0bf6e70ee86 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 02:20:07 +0000 Subject: [PATCH 203/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b5282fd4cd1..831d7ee3a0d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0412455878f0654a6b767f64c0f6d735a634dae50625511cb9bb8fc8cdaf6d43.yml -openapi_spec_hash: 7b36137f1a550644d5f0447b6e88841c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8099ae57ddc6576c2cc9b66bd3ad20b615dde48dcb6ea92a9045ac7125fa582c.yml +openapi_spec_hash: 15badddc13be4018560fec531e37cb74 config_hash: 150f1595200b5d085e0c40682eb2010b From fdc3ce019eb72c3fc962edc3f96557ec7065d105 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 06:16:47 +0000 Subject: [PATCH 204/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 831d7ee3a0d..e6d3d03c8b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8099ae57ddc6576c2cc9b66bd3ad20b615dde48dcb6ea92a9045ac7125fa582c.yml -openapi_spec_hash: 15badddc13be4018560fec531e37cb74 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a71ab160d081949ed522ed65c9c0dc7b99ea6654a550fba960af8275428fbb48.yml +openapi_spec_hash: 57f7f3d11ff48010e031da95936b4121 config_hash: 150f1595200b5d085e0c40682eb2010b From 9d6bd88a4f11af1bac470bad97a767169db3d03c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 09:10:37 +0000 Subject: [PATCH 205/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e6d3d03c8b0..f99daecab9a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a71ab160d081949ed522ed65c9c0dc7b99ea6654a550fba960af8275428fbb48.yml -openapi_spec_hash: 57f7f3d11ff48010e031da95936b4121 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be1bec014e666107bf2e9c486a1fb519f9f1d365c997588bacf72cf88a4ef96d.yml +openapi_spec_hash: 904bdef52d4aed5a3f55aa68816363be config_hash: 150f1595200b5d085e0c40682eb2010b From 93641791622657dc2bfa672d6b269de9bdb2d822 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 09:44:18 +0000 Subject: [PATCH 206/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f99daecab9a..ba0c58d8250 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be1bec014e666107bf2e9c486a1fb519f9f1d365c997588bacf72cf88a4ef96d.yml -openapi_spec_hash: 904bdef52d4aed5a3f55aa68816363be +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c1d43c5ed5afccd8f9c33f430bdc6327bfc68e71afaecc63f692a082fe9de4e6.yml +openapi_spec_hash: 99bbb15c544742f818a72be436e5ddc3 config_hash: 150f1595200b5d085e0c40682eb2010b From 2432b16e3e61573bf6b90fb04845185f2c64da82 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 10:10:55 +0000 Subject: [PATCH 207/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ba0c58d8250..be5c6fd17e9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c1d43c5ed5afccd8f9c33f430bdc6327bfc68e71afaecc63f692a082fe9de4e6.yml -openapi_spec_hash: 99bbb15c544742f818a72be436e5ddc3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f782604bbee6c6e01169cb67a3fb54e9433f9d5058122a6fccf1b542880d80ff.yml +openapi_spec_hash: 9137ae92331df0a7b8900897ea7a59c4 config_hash: 150f1595200b5d085e0c40682eb2010b From 0ddeaf4caf2f93c2219496bf516c68709c44f2b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 10:23:23 +0000 Subject: [PATCH 208/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/resources/workflows/instances/instances.py | 4 ++++ src/cloudflare/types/workflows/instance_bulk_params.py | 2 ++ src/cloudflare/types/workflows/instance_create_params.py | 2 ++ tests/api_resources/workflows/test_instances.py | 4 ++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index be5c6fd17e9..aaed1e3b727 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f782604bbee6c6e01169cb67a3fb54e9433f9d5058122a6fccf1b542880d80ff.yml -openapi_spec_hash: 9137ae92331df0a7b8900897ea7a59c4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52fe0ebcbd9659cb9d111428183437c53ff6c8adfe97ffa4e80f934e28ba3d3c.yml +openapi_spec_hash: 951f2fac0c6b1291702fae7239a0c3a4 config_hash: 150f1595200b5d085e0c40682eb2010b diff --git a/src/cloudflare/resources/workflows/instances/instances.py b/src/cloudflare/resources/workflows/instances/instances.py index 1ba9e5e73f3..5cb640d33be 100644 --- a/src/cloudflare/resources/workflows/instances/instances.py +++ b/src/cloudflare/resources/workflows/instances/instances.py @@ -80,6 +80,7 @@ def create( *, account_id: str, instance_id: str | NotGiven = NOT_GIVEN, + instance_retention: object | NotGiven = NOT_GIVEN, params: object | 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. @@ -109,6 +110,7 @@ def create( body=maybe_transform( { "instance_id": instance_id, + "instance_retention": instance_retention, "params": params, }, instance_create_params.InstanceCreateParams, @@ -303,6 +305,7 @@ async def create( *, account_id: str, instance_id: str | NotGiven = NOT_GIVEN, + instance_retention: object | NotGiven = NOT_GIVEN, params: object | 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. @@ -332,6 +335,7 @@ async def create( body=await async_maybe_transform( { "instance_id": instance_id, + "instance_retention": instance_retention, "params": params, }, instance_create_params.InstanceCreateParams, diff --git a/src/cloudflare/types/workflows/instance_bulk_params.py b/src/cloudflare/types/workflows/instance_bulk_params.py index 5aeb318c935..edc05c332f3 100644 --- a/src/cloudflare/types/workflows/instance_bulk_params.py +++ b/src/cloudflare/types/workflows/instance_bulk_params.py @@ -17,4 +17,6 @@ class InstanceBulkParams(TypedDict, total=False): class Body(TypedDict, total=False): instance_id: str + instance_retention: object + params: object diff --git a/src/cloudflare/types/workflows/instance_create_params.py b/src/cloudflare/types/workflows/instance_create_params.py index 6ae239fdc8f..2aa80a07347 100644 --- a/src/cloudflare/types/workflows/instance_create_params.py +++ b/src/cloudflare/types/workflows/instance_create_params.py @@ -12,4 +12,6 @@ class InstanceCreateParams(TypedDict, total=False): instance_id: str + instance_retention: object + params: object diff --git a/tests/api_resources/workflows/test_instances.py b/tests/api_resources/workflows/test_instances.py index 00dcaf09d72..2e0f178d0c3 100644 --- a/tests/api_resources/workflows/test_instances.py +++ b/tests/api_resources/workflows/test_instances.py @@ -38,6 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: workflow_name="x", account_id="account_id", instance_id="instance_id", + instance_retention={}, params={}, ) assert_matches_type(InstanceCreateResponse, instance, path=["response"]) @@ -159,6 +160,7 @@ def test_method_bulk_with_all_params(self, client: Cloudflare) -> None: body=[ { "instance_id": "instance_id", + "instance_retention": {}, "params": {}, } ], @@ -285,6 +287,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare workflow_name="x", account_id="account_id", instance_id="instance_id", + instance_retention={}, params={}, ) assert_matches_type(InstanceCreateResponse, instance, path=["response"]) @@ -406,6 +409,7 @@ async def test_method_bulk_with_all_params(self, async_client: AsyncCloudflare) body=[ { "instance_id": "instance_id", + "instance_retention": {}, "params": {}, } ], From d41a1ec5949c628e5dae37f351ca4e6753a143d0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 10:35:26 +0000 Subject: [PATCH 209/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index aaed1e3b727..85e286d3b74 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-52fe0ebcbd9659cb9d111428183437c53ff6c8adfe97ffa4e80f934e28ba3d3c.yml -openapi_spec_hash: 951f2fac0c6b1291702fae7239a0c3a4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00ca4745e1b78819403fead0016cd1ff310b282298116b06a4de7fb5806b6d10.yml +openapi_spec_hash: 31f75dca8aa26cc6df7046980aab9423 config_hash: 150f1595200b5d085e0c40682eb2010b From 430e57eadc8c61cbe47c59a58a2d368e6691b9f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 11:31:21 +0000 Subject: [PATCH 210/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 85e286d3b74..bf5d68d5ea8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-00ca4745e1b78819403fead0016cd1ff310b282298116b06a4de7fb5806b6d10.yml -openapi_spec_hash: 31f75dca8aa26cc6df7046980aab9423 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-44333c264aa4d3c5b6d5d493787148dab1a1b917aa0c1d3122f47e9619d146b4.yml +openapi_spec_hash: b00f072b1e794e8773f8d243da920b30 config_hash: 150f1595200b5d085e0c40682eb2010b From 82e0746b4b2732b07da167a0332b2d113a9018dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 12:51:45 +0000 Subject: [PATCH 211/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bf5d68d5ea8..c304ea0e509 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-44333c264aa4d3c5b6d5d493787148dab1a1b917aa0c1d3122f47e9619d146b4.yml -openapi_spec_hash: b00f072b1e794e8773f8d243da920b30 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c339bcdd3afb64a79e456a3adcd1196bc0b0cb7bd764453ef271c4475a9b102.yml +openapi_spec_hash: e42c5ceaee2e031fd017f6a1b41bcb3f config_hash: 150f1595200b5d085e0c40682eb2010b From d220489c4ce22e0962856f77203481c87da88777 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 12:59:01 +0000 Subject: [PATCH 212/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c304ea0e509..7bff6919412 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c339bcdd3afb64a79e456a3adcd1196bc0b0cb7bd764453ef271c4475a9b102.yml -openapi_spec_hash: e42c5ceaee2e031fd017f6a1b41bcb3f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f4d479b9299a79bbba441500a9ae432d07b57f1520e619750d8592aff83fdc3.yml +openapi_spec_hash: 92f6b63d22b2abf23d22cd9f9b88fc9e config_hash: 150f1595200b5d085e0c40682eb2010b From c651496d39f91b3660d51c2e30cd94ead2b85140 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:57:37 +0000 Subject: [PATCH 213/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7bff6919412..723aa938943 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f4d479b9299a79bbba441500a9ae432d07b57f1520e619750d8592aff83fdc3.yml -openapi_spec_hash: 92f6b63d22b2abf23d22cd9f9b88fc9e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6d3627f529a2adaa2a56a85ba3112bcfbb6d46dd5b892f2ad69a741b6c5baa2a.yml +openapi_spec_hash: 7deb7ae06ca5d8e79fdc5699505ce9fc config_hash: 150f1595200b5d085e0c40682eb2010b From b1c4cb1c9a6448e67e88ccbde6ef472f2a8b7857 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 14:41:24 +0000 Subject: [PATCH 214/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 723aa938943..570dac80c09 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6d3627f529a2adaa2a56a85ba3112bcfbb6d46dd5b892f2ad69a741b6c5baa2a.yml -openapi_spec_hash: 7deb7ae06ca5d8e79fdc5699505ce9fc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-48ea58586fdfea89c9c4a0b819c3713beb0e7bbafe987716d12a5ccbc89ca6ac.yml +openapi_spec_hash: 17e03fb4daf93fdb0be1c6b157846a03 config_hash: 150f1595200b5d085e0c40682eb2010b From 2902ef72d1619da0cef7f5ac3200ed6fe5cda008 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 14:54:15 +0000 Subject: [PATCH 215/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 570dac80c09..d4d048a7afe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-48ea58586fdfea89c9c4a0b819c3713beb0e7bbafe987716d12a5ccbc89ca6ac.yml -openapi_spec_hash: 17e03fb4daf93fdb0be1c6b157846a03 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-904acf001a19486fc665d68776c780c2c0ebb6e3df975bcaea184d1f976cef61.yml +openapi_spec_hash: 32e61168ec1e789fcda734b320fec0af config_hash: 150f1595200b5d085e0c40682eb2010b From a41f91706ede598e26fa7ff0c30281635e53b71d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 15:06:14 +0000 Subject: [PATCH 216/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d4d048a7afe..a0d8af3873f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-904acf001a19486fc665d68776c780c2c0ebb6e3df975bcaea184d1f976cef61.yml -openapi_spec_hash: 32e61168ec1e789fcda734b320fec0af +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d6ef0fd50e82786856c1e7f11c0a52ce6daf5433fd1a7a8e129d5a51eae36cf8.yml +openapi_spec_hash: c31b714a7b2a0ce044e62e9d1a92d3a9 config_hash: 150f1595200b5d085e0c40682eb2010b From ad30a1b14f571c621d4e07e215c12746b74ba3af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 15:11:34 +0000 Subject: [PATCH 217/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a0d8af3873f..2663be958fc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d6ef0fd50e82786856c1e7f11c0a52ce6daf5433fd1a7a8e129d5a51eae36cf8.yml -openapi_spec_hash: c31b714a7b2a0ce044e62e9d1a92d3a9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1912f548f1c1c96272e9b9fc2594366f1ef1831f2f193eef9b95dc4bcf14d33f.yml +openapi_spec_hash: abf1a657e673c594312a7b2118334bfe config_hash: 150f1595200b5d085e0c40682eb2010b From 578424f5b131d479b79e2c6622c3a77e450f06e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 15:23:54 +0000 Subject: [PATCH 218/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2663be958fc..4c3d9120ea1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1761 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1912f548f1c1c96272e9b9fc2594366f1ef1831f2f193eef9b95dc4bcf14d33f.yml -openapi_spec_hash: abf1a657e673c594312a7b2118334bfe +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96ad9bfaad2a1dce9c6cccc0b105a257651c44566e5038a75fbf769f2ffacd9b.yml +openapi_spec_hash: 241cae658fd35c1eca02921272879760 config_hash: 150f1595200b5d085e0c40682eb2010b From 96581bc4d785392715269ca32b09dfa8fce0ac51 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 17:23:52 +0000 Subject: [PATCH 219/392] feat(zero_trust_dlp): Added individual resources and new routes --- .stats.yml | 4 +- api.md | 60 +- .../resources/zero_trust/dlp/dlp.py | 16 +- .../zero_trust/dlp/entries/__init__.py | 61 ++ .../zero_trust/dlp/entries/custom.py | 581 +++++++++++++++ .../zero_trust/dlp/{ => entries}/entries.py | 124 +++- .../zero_trust/dlp/entries/integration.py | 395 +++++++++++ .../zero_trust/dlp/entries/predefined.py | 395 +++++++++++ .../zero_trust/dlp/profiles/predefined.py | 240 ++++++- .../types/zero_trust/dlp/entries/__init__.py | 16 + .../dlp/entries/custom_create_params.py | 21 + .../dlp/entries/custom_create_response.py | 25 + .../dlp/entries/custom_update_params.py | 41 ++ .../dlp/entries/custom_update_response.py | 137 ++++ .../dlp/entries/integration_create_params.py | 22 + .../entries/integration_create_response.py | 22 + .../dlp/entries/integration_update_params.py | 13 + .../entries/integration_update_response.py | 22 + .../dlp/entries/predefined_create_params.py | 22 + .../dlp/entries/predefined_create_response.py | 30 + .../dlp/entries/predefined_update_params.py | 13 + .../dlp/entries/predefined_update_response.py | 30 + .../types/zero_trust/dlp/profiles/__init__.py | 1 + .../dlp/profiles/predefined_create_params.py | 38 + .../zero_trust/dlp/entries/__init__.py | 1 + .../zero_trust/dlp/entries/test_custom.py | 667 ++++++++++++++++++ .../dlp/entries/test_integration.py | 341 +++++++++ .../zero_trust/dlp/entries/test_predefined.py | 341 +++++++++ .../dlp/profiles/test_predefined.py | 224 ++++++ 29 files changed, 3872 insertions(+), 31 deletions(-) create mode 100644 src/cloudflare/resources/zero_trust/dlp/entries/__init__.py create mode 100644 src/cloudflare/resources/zero_trust/dlp/entries/custom.py rename src/cloudflare/resources/zero_trust/dlp/{ => entries}/entries.py (86%) create mode 100644 src/cloudflare/resources/zero_trust/dlp/entries/integration.py create mode 100644 src/cloudflare/resources/zero_trust/dlp/entries/predefined.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/__init__.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/custom_create_params.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/custom_create_response.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/custom_update_params.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/custom_update_response.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/integration_create_params.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/integration_create_response.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/integration_update_params.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/integration_update_response.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/predefined_create_params.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/predefined_create_response.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/predefined_update_params.py create mode 100644 src/cloudflare/types/zero_trust/dlp/entries/predefined_update_response.py create mode 100644 src/cloudflare/types/zero_trust/dlp/profiles/predefined_create_params.py create mode 100644 tests/api_resources/zero_trust/dlp/entries/__init__.py create mode 100644 tests/api_resources/zero_trust/dlp/entries/test_custom.py create mode 100644 tests/api_resources/zero_trust/dlp/entries/test_integration.py create mode 100644 tests/api_resources/zero_trust/dlp/entries/test_predefined.py diff --git a/.stats.yml b/.stats.yml index 4c3d9120ea1..322f9bf3179 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1761 +configured_endpoints: 1769 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96ad9bfaad2a1dce9c6cccc0b105a257651c44566e5038a75fbf769f2ffacd9b.yml openapi_spec_hash: 241cae658fd35c1eca02921272879760 -config_hash: 150f1595200b5d085e0c40682eb2010b +config_hash: 553b8c9fbe8068eae649aed371f36d6f diff --git a/api.md b/api.md index abba67ceadc..b84941a1401 100644 --- a/api.md +++ b/api.md @@ -6506,7 +6506,9 @@ from cloudflare.types.zero_trust.dlp.profiles import PredefinedProfile Methods: +- client.zero_trust.dlp.profiles.predefined.create(\*, account_id, \*\*params) -> Optional[Profile] - client.zero_trust.dlp.profiles.predefined.update(profile_id, \*, account_id, \*\*params) -> Optional[Profile] +- client.zero_trust.dlp.profiles.predefined.delete(profile_id, \*, account_id) -> object - client.zero_trust.dlp.profiles.predefined.get(profile_id, \*, account_id) -> Optional[Profile] ### Limits @@ -6536,11 +6538,59 @@ from cloudflare.types.zero_trust.dlp import ( Methods: -- client.zero_trust.dlp.entries.create(\*, account_id, \*\*params) -> Optional[EntryCreateResponse] -- client.zero_trust.dlp.entries.update(entry_id, \*, account_id, \*\*params) -> Optional[EntryUpdateResponse] -- client.zero_trust.dlp.entries.list(\*, account_id) -> SyncSinglePage[EntryListResponse] -- client.zero_trust.dlp.entries.delete(entry_id, \*, account_id) -> object -- client.zero_trust.dlp.entries.get(entry_id, \*, account_id) -> Optional[EntryGetResponse] +- client.zero_trust.dlp.entries.create(\*, account_id, \*\*params) -> Optional[EntryCreateResponse] +- client.zero_trust.dlp.entries.update(entry_id, \*, account_id, \*\*params) -> Optional[EntryUpdateResponse] +- client.zero_trust.dlp.entries.list(\*, account_id) -> SyncSinglePage[EntryListResponse] +- client.zero_trust.dlp.entries.delete(entry_id, \*, account_id) -> object +- client.zero_trust.dlp.entries.get(entry_id, \*, account_id) -> Optional[EntryGetResponse] + +#### Custom + +Types: + +```python +from cloudflare.types.zero_trust.dlp.entries import CustomCreateResponse, CustomUpdateResponse +``` + +Methods: + +- client.zero_trust.dlp.entries.custom.create(\*, account_id, \*\*params) -> Optional[CustomCreateResponse] +- client.zero_trust.dlp.entries.custom.update(entry_id, \*, account_id, \*\*params) -> Optional[CustomUpdateResponse] +- client.zero_trust.dlp.entries.custom.delete(entry_id, \*, account_id) -> object + +#### Predefined + +Types: + +```python +from cloudflare.types.zero_trust.dlp.entries import ( + PredefinedCreateResponse, + PredefinedUpdateResponse, +) +``` + +Methods: + +- client.zero_trust.dlp.entries.predefined.create(\*, account_id, \*\*params) -> Optional[PredefinedCreateResponse] +- client.zero_trust.dlp.entries.predefined.update(entry_id, \*, account_id, \*\*params) -> Optional[PredefinedUpdateResponse] +- client.zero_trust.dlp.entries.predefined.delete(entry_id, \*, account_id) -> object + +#### Integration + +Types: + +```python +from cloudflare.types.zero_trust.dlp.entries import ( + IntegrationCreateResponse, + IntegrationUpdateResponse, +) +``` + +Methods: + +- client.zero_trust.dlp.entries.integration.create(\*, account_id, \*\*params) -> Optional[IntegrationCreateResponse] +- client.zero_trust.dlp.entries.integration.update(entry_id, \*, account_id, \*\*params) -> Optional[IntegrationUpdateResponse] +- client.zero_trust.dlp.entries.integration.delete(entry_id, \*, account_id) -> object ## Gateway diff --git a/src/cloudflare/resources/zero_trust/dlp/dlp.py b/src/cloudflare/resources/zero_trust/dlp/dlp.py index 3769892598e..7444c2b17de 100644 --- a/src/cloudflare/resources/zero_trust/dlp/dlp.py +++ b/src/cloudflare/resources/zero_trust/dlp/dlp.py @@ -10,14 +10,6 @@ LimitsResourceWithStreamingResponse, AsyncLimitsResourceWithStreamingResponse, ) -from .entries import ( - EntriesResource, - AsyncEntriesResource, - EntriesResourceWithRawResponse, - AsyncEntriesResourceWithRawResponse, - EntriesResourceWithStreamingResponse, - AsyncEntriesResourceWithStreamingResponse, -) from .patterns import ( PatternsResource, AsyncPatternsResource, @@ -44,6 +36,14 @@ PayloadLogsResourceWithStreamingResponse, AsyncPayloadLogsResourceWithStreamingResponse, ) +from .entries.entries import ( + EntriesResource, + AsyncEntriesResource, + EntriesResourceWithRawResponse, + AsyncEntriesResourceWithRawResponse, + EntriesResourceWithStreamingResponse, + AsyncEntriesResourceWithStreamingResponse, +) from .datasets.datasets import ( DatasetsResource, AsyncDatasetsResource, diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/__init__.py b/src/cloudflare/resources/zero_trust/dlp/entries/__init__.py new file mode 100644 index 00000000000..01f7546037f --- /dev/null +++ b/src/cloudflare/resources/zero_trust/dlp/entries/__init__.py @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .custom import ( + CustomResource, + AsyncCustomResource, + CustomResourceWithRawResponse, + AsyncCustomResourceWithRawResponse, + CustomResourceWithStreamingResponse, + AsyncCustomResourceWithStreamingResponse, +) +from .entries import ( + EntriesResource, + AsyncEntriesResource, + EntriesResourceWithRawResponse, + AsyncEntriesResourceWithRawResponse, + EntriesResourceWithStreamingResponse, + AsyncEntriesResourceWithStreamingResponse, +) +from .predefined import ( + PredefinedResource, + AsyncPredefinedResource, + PredefinedResourceWithRawResponse, + AsyncPredefinedResourceWithRawResponse, + PredefinedResourceWithStreamingResponse, + AsyncPredefinedResourceWithStreamingResponse, +) +from .integration import ( + IntegrationResource, + AsyncIntegrationResource, + IntegrationResourceWithRawResponse, + AsyncIntegrationResourceWithRawResponse, + IntegrationResourceWithStreamingResponse, + AsyncIntegrationResourceWithStreamingResponse, +) + +__all__ = [ + "CustomResource", + "AsyncCustomResource", + "CustomResourceWithRawResponse", + "AsyncCustomResourceWithRawResponse", + "CustomResourceWithStreamingResponse", + "AsyncCustomResourceWithStreamingResponse", + "PredefinedResource", + "AsyncPredefinedResource", + "PredefinedResourceWithRawResponse", + "AsyncPredefinedResourceWithRawResponse", + "PredefinedResourceWithStreamingResponse", + "AsyncPredefinedResourceWithStreamingResponse", + "IntegrationResource", + "AsyncIntegrationResource", + "IntegrationResourceWithRawResponse", + "AsyncIntegrationResourceWithRawResponse", + "IntegrationResourceWithStreamingResponse", + "AsyncIntegrationResourceWithStreamingResponse", + "EntriesResource", + "AsyncEntriesResource", + "EntriesResourceWithRawResponse", + "AsyncEntriesResourceWithRawResponse", + "EntriesResourceWithStreamingResponse", + "AsyncEntriesResourceWithStreamingResponse", +] diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/custom.py b/src/cloudflare/resources/zero_trust/dlp/entries/custom.py new file mode 100644 index 00000000000..67aaeed4ffb --- /dev/null +++ b/src/cloudflare/resources/zero_trust/dlp/entries/custom.py @@ -0,0 +1,581 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Any, Type, Optional, cast +from typing_extensions import Literal, overload + +import httpx + +from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._utils import required_args, maybe_transform, async_maybe_transform +from ....._compat import cached_property +from ....._resource import SyncAPIResource, AsyncAPIResource +from ....._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ....._wrappers import ResultWrapper +from ....._base_client import make_request_options +from .....types.zero_trust.dlp.entries import custom_create_params, custom_update_params +from .....types.zero_trust.dlp.profiles.pattern_param import PatternParam +from .....types.zero_trust.dlp.entries.custom_create_response import CustomCreateResponse +from .....types.zero_trust.dlp.entries.custom_update_response import CustomUpdateResponse + +__all__ = ["CustomResource", "AsyncCustomResource"] + + +class CustomResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CustomResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return CustomResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CustomResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return CustomResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + enabled: bool, + name: str, + pattern: PatternParam, + profile_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomCreateResponse]: + """ + Creates a DLP custom entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._post( + f"/accounts/{account_id}/dlp/entries", + body=maybe_transform( + { + "enabled": enabled, + "name": name, + "pattern": pattern, + "profile_id": profile_id, + }, + custom_create_params.CustomCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomCreateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CustomCreateResponse]], ResultWrapper[CustomCreateResponse]), + ) + + @overload + def update( + self, + entry_id: str, + *, + account_id: str, + name: str, + pattern: PatternParam, + type: Literal["custom"], + enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def update( + self, + entry_id: str, + *, + account_id: str, + type: Literal["predefined"], + enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + def update( + self, + entry_id: str, + *, + account_id: str, + type: Literal["integration"], + enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @required_args(["account_id", "name", "pattern", "type"], ["account_id", "type"]) + def update( + self, + entry_id: str, + *, + account_id: str, + name: str | NotGiven = NOT_GIVEN, + pattern: PatternParam | NotGiven = NOT_GIVEN, + type: Literal["custom"] | Literal["predefined"] | Literal["integration"], + enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomUpdateResponse]: + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return cast( + Optional[CustomUpdateResponse], + self._put( + f"/accounts/{account_id}/dlp/entries/{entry_id}", + body=maybe_transform( + { + "name": name, + "pattern": pattern, + "type": type, + "enabled": enabled, + }, + custom_update_params.CustomUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomUpdateResponse]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[CustomUpdateResponse] + ), # Union types cannot be passed in as arguments in the type system + ), + ) + + def delete( + self, + entry_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Deletes a DLP custom entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return self._delete( + f"/accounts/{account_id}/dlp/entries/{entry_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + + +class AsyncCustomResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCustomResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncCustomResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCustomResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncCustomResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + enabled: bool, + name: str, + pattern: PatternParam, + profile_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomCreateResponse]: + """ + Creates a DLP custom entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._post( + f"/accounts/{account_id}/dlp/entries", + body=await async_maybe_transform( + { + "enabled": enabled, + "name": name, + "pattern": pattern, + "profile_id": profile_id, + }, + custom_create_params.CustomCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomCreateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[CustomCreateResponse]], ResultWrapper[CustomCreateResponse]), + ) + + @overload + async def update( + self, + entry_id: str, + *, + account_id: str, + name: str, + pattern: PatternParam, + type: Literal["custom"], + enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def update( + self, + entry_id: str, + *, + account_id: str, + type: Literal["predefined"], + enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @overload + async def update( + self, + entry_id: str, + *, + account_id: str, + type: Literal["integration"], + enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @required_args(["account_id", "name", "pattern", "type"], ["account_id", "type"]) + async def update( + self, + entry_id: str, + *, + account_id: str, + name: str | NotGiven = NOT_GIVEN, + pattern: PatternParam | NotGiven = NOT_GIVEN, + type: Literal["custom"] | Literal["predefined"] | Literal["integration"], + enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[CustomUpdateResponse]: + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return cast( + Optional[CustomUpdateResponse], + await self._put( + f"/accounts/{account_id}/dlp/entries/{entry_id}", + body=await async_maybe_transform( + { + "name": name, + "pattern": pattern, + "type": type, + "enabled": enabled, + }, + custom_update_params.CustomUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[CustomUpdateResponse]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[CustomUpdateResponse] + ), # Union types cannot be passed in as arguments in the type system + ), + ) + + async def delete( + self, + entry_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Deletes a DLP custom entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return await self._delete( + f"/accounts/{account_id}/dlp/entries/{entry_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + + +class CustomResourceWithRawResponse: + def __init__(self, custom: CustomResource) -> None: + self._custom = custom + + self.create = to_raw_response_wrapper( + custom.create, + ) + self.update = to_raw_response_wrapper( + custom.update, + ) + self.delete = to_raw_response_wrapper( + custom.delete, + ) + + +class AsyncCustomResourceWithRawResponse: + def __init__(self, custom: AsyncCustomResource) -> None: + self._custom = custom + + self.create = async_to_raw_response_wrapper( + custom.create, + ) + self.update = async_to_raw_response_wrapper( + custom.update, + ) + self.delete = async_to_raw_response_wrapper( + custom.delete, + ) + + +class CustomResourceWithStreamingResponse: + def __init__(self, custom: CustomResource) -> None: + self._custom = custom + + self.create = to_streamed_response_wrapper( + custom.create, + ) + self.update = to_streamed_response_wrapper( + custom.update, + ) + self.delete = to_streamed_response_wrapper( + custom.delete, + ) + + +class AsyncCustomResourceWithStreamingResponse: + def __init__(self, custom: AsyncCustomResource) -> None: + self._custom = custom + + self.create = async_to_streamed_response_wrapper( + custom.create, + ) + self.update = async_to_streamed_response_wrapper( + custom.update, + ) + self.delete = async_to_streamed_response_wrapper( + custom.delete, + ) diff --git a/src/cloudflare/resources/zero_trust/dlp/entries.py b/src/cloudflare/resources/zero_trust/dlp/entries/entries.py similarity index 86% rename from src/cloudflare/resources/zero_trust/dlp/entries.py rename to src/cloudflare/resources/zero_trust/dlp/entries/entries.py index 162b3e79fe5..2f084fa78cf 100644 --- a/src/cloudflare/resources/zero_trust/dlp/entries.py +++ b/src/cloudflare/resources/zero_trust/dlp/entries/entries.py @@ -7,30 +7,66 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import required_args, maybe_transform, async_maybe_transform -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( +from .custom import ( + CustomResource, + AsyncCustomResource, + CustomResourceWithRawResponse, + AsyncCustomResourceWithRawResponse, + CustomResourceWithStreamingResponse, + AsyncCustomResourceWithStreamingResponse, +) +from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._utils import required_args, maybe_transform, async_maybe_transform +from .predefined import ( + PredefinedResource, + AsyncPredefinedResource, + PredefinedResourceWithRawResponse, + AsyncPredefinedResourceWithRawResponse, + PredefinedResourceWithStreamingResponse, + AsyncPredefinedResourceWithStreamingResponse, +) +from ....._compat import cached_property +from .integration import ( + IntegrationResource, + AsyncIntegrationResource, + IntegrationResourceWithRawResponse, + AsyncIntegrationResourceWithRawResponse, + IntegrationResourceWithStreamingResponse, + AsyncIntegrationResourceWithStreamingResponse, +) +from ....._resource import SyncAPIResource, AsyncAPIResource +from ....._response import ( to_raw_response_wrapper, to_streamed_response_wrapper, async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper -from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import AsyncPaginator, make_request_options -from ....types.zero_trust.dlp import entry_create_params, entry_update_params -from ....types.zero_trust.dlp.entry_get_response import EntryGetResponse -from ....types.zero_trust.dlp.entry_list_response import EntryListResponse -from ....types.zero_trust.dlp.entry_create_response import EntryCreateResponse -from ....types.zero_trust.dlp.entry_update_response import EntryUpdateResponse -from ....types.zero_trust.dlp.profiles.pattern_param import PatternParam +from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage +from ....._base_client import AsyncPaginator, make_request_options +from .....types.zero_trust.dlp import entry_create_params, entry_update_params +from .....types.zero_trust.dlp.entry_get_response import EntryGetResponse +from .....types.zero_trust.dlp.entry_list_response import EntryListResponse +from .....types.zero_trust.dlp.entry_create_response import EntryCreateResponse +from .....types.zero_trust.dlp.entry_update_response import EntryUpdateResponse +from .....types.zero_trust.dlp.profiles.pattern_param import PatternParam __all__ = ["EntriesResource", "AsyncEntriesResource"] class EntriesResource(SyncAPIResource): + @cached_property + def custom(self) -> CustomResource: + return CustomResource(self._client) + + @cached_property + def predefined(self) -> PredefinedResource: + return PredefinedResource(self._client) + + @cached_property + def integration(self) -> IntegrationResource: + return IntegrationResource(self._client) + @cached_property def with_raw_response(self) -> EntriesResourceWithRawResponse: """ @@ -357,6 +393,18 @@ def get( class AsyncEntriesResource(AsyncAPIResource): + @cached_property + def custom(self) -> AsyncCustomResource: + return AsyncCustomResource(self._client) + + @cached_property + def predefined(self) -> AsyncPredefinedResource: + return AsyncPredefinedResource(self._client) + + @cached_property + def integration(self) -> AsyncIntegrationResource: + return AsyncIntegrationResource(self._client) + @cached_property def with_raw_response(self) -> AsyncEntriesResourceWithRawResponse: """ @@ -702,6 +750,18 @@ def __init__(self, entries: EntriesResource) -> None: entries.get, ) + @cached_property + def custom(self) -> CustomResourceWithRawResponse: + return CustomResourceWithRawResponse(self._entries.custom) + + @cached_property + def predefined(self) -> PredefinedResourceWithRawResponse: + return PredefinedResourceWithRawResponse(self._entries.predefined) + + @cached_property + def integration(self) -> IntegrationResourceWithRawResponse: + return IntegrationResourceWithRawResponse(self._entries.integration) + class AsyncEntriesResourceWithRawResponse: def __init__(self, entries: AsyncEntriesResource) -> None: @@ -723,6 +783,18 @@ def __init__(self, entries: AsyncEntriesResource) -> None: entries.get, ) + @cached_property + def custom(self) -> AsyncCustomResourceWithRawResponse: + return AsyncCustomResourceWithRawResponse(self._entries.custom) + + @cached_property + def predefined(self) -> AsyncPredefinedResourceWithRawResponse: + return AsyncPredefinedResourceWithRawResponse(self._entries.predefined) + + @cached_property + def integration(self) -> AsyncIntegrationResourceWithRawResponse: + return AsyncIntegrationResourceWithRawResponse(self._entries.integration) + class EntriesResourceWithStreamingResponse: def __init__(self, entries: EntriesResource) -> None: @@ -744,6 +816,18 @@ def __init__(self, entries: EntriesResource) -> None: entries.get, ) + @cached_property + def custom(self) -> CustomResourceWithStreamingResponse: + return CustomResourceWithStreamingResponse(self._entries.custom) + + @cached_property + def predefined(self) -> PredefinedResourceWithStreamingResponse: + return PredefinedResourceWithStreamingResponse(self._entries.predefined) + + @cached_property + def integration(self) -> IntegrationResourceWithStreamingResponse: + return IntegrationResourceWithStreamingResponse(self._entries.integration) + class AsyncEntriesResourceWithStreamingResponse: def __init__(self, entries: AsyncEntriesResource) -> None: @@ -764,3 +848,15 @@ def __init__(self, entries: AsyncEntriesResource) -> None: self.get = async_to_streamed_response_wrapper( entries.get, ) + + @cached_property + def custom(self) -> AsyncCustomResourceWithStreamingResponse: + return AsyncCustomResourceWithStreamingResponse(self._entries.custom) + + @cached_property + def predefined(self) -> AsyncPredefinedResourceWithStreamingResponse: + return AsyncPredefinedResourceWithStreamingResponse(self._entries.predefined) + + @cached_property + def integration(self) -> AsyncIntegrationResourceWithStreamingResponse: + return AsyncIntegrationResourceWithStreamingResponse(self._entries.integration) diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/integration.py b/src/cloudflare/resources/zero_trust/dlp/entries/integration.py new file mode 100644 index 00000000000..57b4b3a6507 --- /dev/null +++ b/src/cloudflare/resources/zero_trust/dlp/entries/integration.py @@ -0,0 +1,395 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, Optional, cast + +import httpx + +from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._utils import maybe_transform, async_maybe_transform +from ....._compat import cached_property +from ....._resource import SyncAPIResource, AsyncAPIResource +from ....._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ....._wrappers import ResultWrapper +from ....._base_client import make_request_options +from .....types.zero_trust.dlp.entries import integration_create_params, integration_update_params +from .....types.zero_trust.dlp.entries.integration_create_response import IntegrationCreateResponse +from .....types.zero_trust.dlp.entries.integration_update_response import IntegrationUpdateResponse + +__all__ = ["IntegrationResource", "AsyncIntegrationResource"] + + +class IntegrationResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> IntegrationResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return IntegrationResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> IntegrationResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return IntegrationResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + enabled: bool, + entry_id: str, + profile_id: Optional[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[IntegrationCreateResponse]: + """ + This will update an existing integration entry + + Args: + profile_id: This field is not actually used as the owning profile for a predefined entry is + already set to a predefined profile + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._post( + f"/accounts/{account_id}/dlp/entries/integration", + body=maybe_transform( + { + "enabled": enabled, + "entry_id": entry_id, + "profile_id": profile_id, + }, + integration_create_params.IntegrationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[IntegrationCreateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[IntegrationCreateResponse]], ResultWrapper[IntegrationCreateResponse]), + ) + + def update( + self, + entry_id: str, + *, + account_id: str, + enabled: bool, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[IntegrationUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return self._put( + f"/accounts/{account_id}/dlp/entries/integration/{entry_id}", + body=maybe_transform({"enabled": enabled}, integration_update_params.IntegrationUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[IntegrationUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[IntegrationUpdateResponse]], ResultWrapper[IntegrationUpdateResponse]), + ) + + def delete( + self, + entry_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + This is a no-op as integration entires can't be deleted but is needed for our + generated terraform API + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return self._delete( + f"/accounts/{account_id}/dlp/entries/integration/{entry_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + + +class AsyncIntegrationResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncIntegrationResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncIntegrationResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncIntegrationResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncIntegrationResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + enabled: bool, + entry_id: str, + profile_id: Optional[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[IntegrationCreateResponse]: + """ + This will update an existing integration entry + + Args: + profile_id: This field is not actually used as the owning profile for a predefined entry is + already set to a predefined profile + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._post( + f"/accounts/{account_id}/dlp/entries/integration", + body=await async_maybe_transform( + { + "enabled": enabled, + "entry_id": entry_id, + "profile_id": profile_id, + }, + integration_create_params.IntegrationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[IntegrationCreateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[IntegrationCreateResponse]], ResultWrapper[IntegrationCreateResponse]), + ) + + async def update( + self, + entry_id: str, + *, + account_id: str, + enabled: bool, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[IntegrationUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return await self._put( + f"/accounts/{account_id}/dlp/entries/integration/{entry_id}", + body=await async_maybe_transform({"enabled": enabled}, integration_update_params.IntegrationUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[IntegrationUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[IntegrationUpdateResponse]], ResultWrapper[IntegrationUpdateResponse]), + ) + + async def delete( + self, + entry_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + This is a no-op as integration entires can't be deleted but is needed for our + generated terraform API + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return await self._delete( + f"/accounts/{account_id}/dlp/entries/integration/{entry_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + + +class IntegrationResourceWithRawResponse: + def __init__(self, integration: IntegrationResource) -> None: + self._integration = integration + + self.create = to_raw_response_wrapper( + integration.create, + ) + self.update = to_raw_response_wrapper( + integration.update, + ) + self.delete = to_raw_response_wrapper( + integration.delete, + ) + + +class AsyncIntegrationResourceWithRawResponse: + def __init__(self, integration: AsyncIntegrationResource) -> None: + self._integration = integration + + self.create = async_to_raw_response_wrapper( + integration.create, + ) + self.update = async_to_raw_response_wrapper( + integration.update, + ) + self.delete = async_to_raw_response_wrapper( + integration.delete, + ) + + +class IntegrationResourceWithStreamingResponse: + def __init__(self, integration: IntegrationResource) -> None: + self._integration = integration + + self.create = to_streamed_response_wrapper( + integration.create, + ) + self.update = to_streamed_response_wrapper( + integration.update, + ) + self.delete = to_streamed_response_wrapper( + integration.delete, + ) + + +class AsyncIntegrationResourceWithStreamingResponse: + def __init__(self, integration: AsyncIntegrationResource) -> None: + self._integration = integration + + self.create = async_to_streamed_response_wrapper( + integration.create, + ) + self.update = async_to_streamed_response_wrapper( + integration.update, + ) + self.delete = async_to_streamed_response_wrapper( + integration.delete, + ) diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py b/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py new file mode 100644 index 00000000000..b5cf2fcd9a5 --- /dev/null +++ b/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py @@ -0,0 +1,395 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, Optional, cast + +import httpx + +from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._utils import maybe_transform, async_maybe_transform +from ....._compat import cached_property +from ....._resource import SyncAPIResource, AsyncAPIResource +from ....._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ....._wrappers import ResultWrapper +from ....._base_client import make_request_options +from .....types.zero_trust.dlp.entries import predefined_create_params, predefined_update_params +from .....types.zero_trust.dlp.entries.predefined_create_response import PredefinedCreateResponse +from .....types.zero_trust.dlp.entries.predefined_update_response import PredefinedUpdateResponse + +__all__ = ["PredefinedResource", "AsyncPredefinedResource"] + + +class PredefinedResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> PredefinedResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return PredefinedResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> PredefinedResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return PredefinedResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + enabled: bool, + entry_id: str, + profile_id: Optional[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[PredefinedCreateResponse]: + """ + This will update an existing predefined entry + + Args: + profile_id: This field is not actually used as the owning profile for a predefined entry is + already set to a predefined profile + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._post( + f"/accounts/{account_id}/dlp/entries/predefined", + body=maybe_transform( + { + "enabled": enabled, + "entry_id": entry_id, + "profile_id": profile_id, + }, + predefined_create_params.PredefinedCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[PredefinedCreateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[PredefinedCreateResponse]], ResultWrapper[PredefinedCreateResponse]), + ) + + def update( + self, + entry_id: str, + *, + account_id: str, + enabled: bool, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[PredefinedUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return self._put( + f"/accounts/{account_id}/dlp/entries/predefined/{entry_id}", + body=maybe_transform({"enabled": enabled}, predefined_update_params.PredefinedUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[PredefinedUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[PredefinedUpdateResponse]], ResultWrapper[PredefinedUpdateResponse]), + ) + + def delete( + self, + entry_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + This is a no-op as predefined entires can't be deleted but is needed for our + generated terraform API + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return self._delete( + f"/accounts/{account_id}/dlp/entries/predefined/{entry_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + + +class AsyncPredefinedResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncPredefinedResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncPredefinedResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncPredefinedResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncPredefinedResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + enabled: bool, + entry_id: str, + profile_id: Optional[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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[PredefinedCreateResponse]: + """ + This will update an existing predefined entry + + Args: + profile_id: This field is not actually used as the owning profile for a predefined entry is + already set to a predefined profile + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._post( + f"/accounts/{account_id}/dlp/entries/predefined", + body=await async_maybe_transform( + { + "enabled": enabled, + "entry_id": entry_id, + "profile_id": profile_id, + }, + predefined_create_params.PredefinedCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[PredefinedCreateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[PredefinedCreateResponse]], ResultWrapper[PredefinedCreateResponse]), + ) + + async def update( + self, + entry_id: str, + *, + account_id: str, + enabled: bool, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[PredefinedUpdateResponse]: + """ + Updates a DLP entry. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return await self._put( + f"/accounts/{account_id}/dlp/entries/predefined/{entry_id}", + body=await async_maybe_transform({"enabled": enabled}, predefined_update_params.PredefinedUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[PredefinedUpdateResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[PredefinedUpdateResponse]], ResultWrapper[PredefinedUpdateResponse]), + ) + + async def delete( + self, + entry_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + This is a no-op as predefined entires can't be deleted but is needed for our + generated terraform API + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not entry_id: + raise ValueError(f"Expected a non-empty value for `entry_id` but received {entry_id!r}") + return await self._delete( + f"/accounts/{account_id}/dlp/entries/predefined/{entry_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + + +class PredefinedResourceWithRawResponse: + def __init__(self, predefined: PredefinedResource) -> None: + self._predefined = predefined + + self.create = to_raw_response_wrapper( + predefined.create, + ) + self.update = to_raw_response_wrapper( + predefined.update, + ) + self.delete = to_raw_response_wrapper( + predefined.delete, + ) + + +class AsyncPredefinedResourceWithRawResponse: + def __init__(self, predefined: AsyncPredefinedResource) -> None: + self._predefined = predefined + + self.create = async_to_raw_response_wrapper( + predefined.create, + ) + self.update = async_to_raw_response_wrapper( + predefined.update, + ) + self.delete = async_to_raw_response_wrapper( + predefined.delete, + ) + + +class PredefinedResourceWithStreamingResponse: + def __init__(self, predefined: PredefinedResource) -> None: + self._predefined = predefined + + self.create = to_streamed_response_wrapper( + predefined.create, + ) + self.update = to_streamed_response_wrapper( + predefined.update, + ) + self.delete = to_streamed_response_wrapper( + predefined.delete, + ) + + +class AsyncPredefinedResourceWithStreamingResponse: + def __init__(self, predefined: AsyncPredefinedResource) -> None: + self._predefined = predefined + + self.create = async_to_streamed_response_wrapper( + predefined.create, + ) + self.update = async_to_streamed_response_wrapper( + predefined.update, + ) + self.delete = async_to_streamed_response_wrapper( + predefined.delete, + ) diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py b/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py index 9eafd67697f..a20a3179cda 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Iterable, Optional, cast +from typing import Any, Type, Iterable, Optional, cast import httpx @@ -19,7 +19,7 @@ from ....._wrappers import ResultWrapper from ....._base_client import make_request_options from .....types.zero_trust.dlp.profile import Profile -from .....types.zero_trust.dlp.profiles import predefined_update_params +from .....types.zero_trust.dlp.profiles import predefined_create_params, predefined_update_params from .....types.zero_trust.dlp.context_awareness_param import ContextAwarenessParam __all__ = ["PredefinedResource", "AsyncPredefinedResource"] @@ -45,6 +45,71 @@ def with_streaming_response(self) -> PredefinedResourceWithStreamingResponse: """ return PredefinedResourceWithStreamingResponse(self) + def create( + self, + *, + account_id: str, + profile_id: str, + ai_context_enabled: bool | NotGiven = NOT_GIVEN, + allowed_match_count: Optional[int] | NotGiven = NOT_GIVEN, + confidence_threshold: Optional[str] | NotGiven = NOT_GIVEN, + context_awareness: ContextAwarenessParam | NotGiven = NOT_GIVEN, + entries: Iterable[predefined_create_params.Entry] | NotGiven = NOT_GIVEN, + ocr_enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[Profile]: + """Creates a DLP predefined profile. + + Only supports enabling/disabling entries. + + Args: + context_awareness: Scan the context of predefined entries to only return matches surrounded by + keywords. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return cast( + Optional[Profile], + self._post( + f"/accounts/{account_id}/dlp/profiles/predefined", + body=maybe_transform( + { + "profile_id": profile_id, + "ai_context_enabled": ai_context_enabled, + "allowed_match_count": allowed_match_count, + "confidence_threshold": confidence_threshold, + "context_awareness": context_awareness, + "entries": entries, + "ocr_enabled": ocr_enabled, + }, + predefined_create_params.PredefinedCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[Profile]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[Profile] + ), # Union types cannot be passed in as arguments in the type system + ), + ) + def update( self, profile_id: str, @@ -111,6 +176,47 @@ def update( ), ) + def delete( + self, + profile_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + This is a no-op as predefined profiles can't be deleted but is needed for our + generated terraform API + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not profile_id: + raise ValueError(f"Expected a non-empty value for `profile_id` but received {profile_id!r}") + return self._delete( + f"/accounts/{account_id}/dlp/profiles/predefined/{profile_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + def get( self, profile_id: str, @@ -177,6 +283,71 @@ def with_streaming_response(self) -> AsyncPredefinedResourceWithStreamingRespons """ return AsyncPredefinedResourceWithStreamingResponse(self) + async def create( + self, + *, + account_id: str, + profile_id: str, + ai_context_enabled: bool | NotGiven = NOT_GIVEN, + allowed_match_count: Optional[int] | NotGiven = NOT_GIVEN, + confidence_threshold: Optional[str] | NotGiven = NOT_GIVEN, + context_awareness: ContextAwarenessParam | NotGiven = NOT_GIVEN, + entries: Iterable[predefined_create_params.Entry] | NotGiven = NOT_GIVEN, + ocr_enabled: bool | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[Profile]: + """Creates a DLP predefined profile. + + Only supports enabling/disabling entries. + + Args: + context_awareness: Scan the context of predefined entries to only return matches surrounded by + keywords. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return cast( + Optional[Profile], + await self._post( + f"/accounts/{account_id}/dlp/profiles/predefined", + body=await async_maybe_transform( + { + "profile_id": profile_id, + "ai_context_enabled": ai_context_enabled, + "allowed_match_count": allowed_match_count, + "confidence_threshold": confidence_threshold, + "context_awareness": context_awareness, + "entries": entries, + "ocr_enabled": ocr_enabled, + }, + predefined_create_params.PredefinedCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[Profile]]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[Profile] + ), # Union types cannot be passed in as arguments in the type system + ), + ) + async def update( self, profile_id: str, @@ -243,6 +414,47 @@ async def update( ), ) + async def delete( + self, + profile_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + This is a no-op as predefined profiles can't be deleted but is needed for our + generated terraform API + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not profile_id: + raise ValueError(f"Expected a non-empty value for `profile_id` but received {profile_id!r}") + return await self._delete( + f"/accounts/{account_id}/dlp/profiles/predefined/{profile_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + async def get( self, profile_id: str, @@ -293,9 +505,15 @@ class PredefinedResourceWithRawResponse: def __init__(self, predefined: PredefinedResource) -> None: self._predefined = predefined + self.create = to_raw_response_wrapper( + predefined.create, + ) self.update = to_raw_response_wrapper( predefined.update, ) + self.delete = to_raw_response_wrapper( + predefined.delete, + ) self.get = to_raw_response_wrapper( predefined.get, ) @@ -305,9 +523,15 @@ class AsyncPredefinedResourceWithRawResponse: def __init__(self, predefined: AsyncPredefinedResource) -> None: self._predefined = predefined + self.create = async_to_raw_response_wrapper( + predefined.create, + ) self.update = async_to_raw_response_wrapper( predefined.update, ) + self.delete = async_to_raw_response_wrapper( + predefined.delete, + ) self.get = async_to_raw_response_wrapper( predefined.get, ) @@ -317,9 +541,15 @@ class PredefinedResourceWithStreamingResponse: def __init__(self, predefined: PredefinedResource) -> None: self._predefined = predefined + self.create = to_streamed_response_wrapper( + predefined.create, + ) self.update = to_streamed_response_wrapper( predefined.update, ) + self.delete = to_streamed_response_wrapper( + predefined.delete, + ) self.get = to_streamed_response_wrapper( predefined.get, ) @@ -329,9 +559,15 @@ class AsyncPredefinedResourceWithStreamingResponse: def __init__(self, predefined: AsyncPredefinedResource) -> None: self._predefined = predefined + self.create = async_to_streamed_response_wrapper( + predefined.create, + ) self.update = async_to_streamed_response_wrapper( predefined.update, ) + self.delete = async_to_streamed_response_wrapper( + predefined.delete, + ) self.get = async_to_streamed_response_wrapper( predefined.get, ) diff --git a/src/cloudflare/types/zero_trust/dlp/entries/__init__.py b/src/cloudflare/types/zero_trust/dlp/entries/__init__.py new file mode 100644 index 00000000000..15d05debac2 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/__init__.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .custom_create_params import CustomCreateParams as CustomCreateParams +from .custom_update_params import CustomUpdateParams as CustomUpdateParams +from .custom_create_response import CustomCreateResponse as CustomCreateResponse +from .custom_update_response import CustomUpdateResponse as CustomUpdateResponse +from .predefined_create_params import PredefinedCreateParams as PredefinedCreateParams +from .predefined_update_params import PredefinedUpdateParams as PredefinedUpdateParams +from .integration_create_params import IntegrationCreateParams as IntegrationCreateParams +from .integration_update_params import IntegrationUpdateParams as IntegrationUpdateParams +from .predefined_create_response import PredefinedCreateResponse as PredefinedCreateResponse +from .predefined_update_response import PredefinedUpdateResponse as PredefinedUpdateResponse +from .integration_create_response import IntegrationCreateResponse as IntegrationCreateResponse +from .integration_update_response import IntegrationUpdateResponse as IntegrationUpdateResponse diff --git a/src/cloudflare/types/zero_trust/dlp/entries/custom_create_params.py b/src/cloudflare/types/zero_trust/dlp/entries/custom_create_params.py new file mode 100644 index 00000000000..7e3a42d319f --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/custom_create_params.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +from ..profiles.pattern_param import PatternParam + +__all__ = ["CustomCreateParams"] + + +class CustomCreateParams(TypedDict, total=False): + account_id: Required[str] + + enabled: Required[bool] + + name: Required[str] + + pattern: Required[PatternParam] + + profile_id: Required[str] diff --git a/src/cloudflare/types/zero_trust/dlp/entries/custom_create_response.py b/src/cloudflare/types/zero_trust/dlp/entries/custom_create_response.py new file mode 100644 index 00000000000..5a695cc08f1 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/custom_create_response.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ....._models import BaseModel +from ..profiles.pattern import Pattern + +__all__ = ["CustomCreateResponse"] + + +class CustomCreateResponse(BaseModel): + id: str + + created_at: datetime + + enabled: bool + + name: str + + pattern: Pattern + + updated_at: datetime + + profile_id: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/dlp/entries/custom_update_params.py b/src/cloudflare/types/zero_trust/dlp/entries/custom_update_params.py new file mode 100644 index 00000000000..9fe4584c196 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/custom_update_params.py @@ -0,0 +1,41 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +from ..profiles.pattern_param import PatternParam + +__all__ = ["CustomUpdateParams", "Variant0", "Variant1", "Variant2"] + + +class Variant0(TypedDict, total=False): + account_id: Required[str] + + name: Required[str] + + pattern: Required[PatternParam] + + type: Required[Literal["custom"]] + + enabled: bool + + +class Variant1(TypedDict, total=False): + account_id: Required[str] + + type: Required[Literal["predefined"]] + + enabled: bool + + +class Variant2(TypedDict, total=False): + account_id: Required[str] + + type: Required[Literal["integration"]] + + enabled: bool + + +CustomUpdateParams: TypeAlias = Union[Variant0, Variant1, Variant2] diff --git a/src/cloudflare/types/zero_trust/dlp/entries/custom_update_response.py b/src/cloudflare/types/zero_trust/dlp/entries/custom_update_response.py new file mode 100644 index 00000000000..423846debdf --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/custom_update_response.py @@ -0,0 +1,137 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Union, Optional +from datetime import datetime +from typing_extensions import Literal, TypeAlias + +from ....._models import BaseModel +from ..profiles.pattern import Pattern + +__all__ = [ + "CustomUpdateResponse", + "CustomEntry", + "PredefinedEntry", + "PredefinedEntryConfidence", + "IntegrationEntry", + "ExactDataEntry", + "DocumentFingerprintEntry", + "WordListEntry", +] + + +class CustomEntry(BaseModel): + id: str + + created_at: datetime + + enabled: bool + + name: str + + pattern: Pattern + + type: Literal["custom"] + + updated_at: datetime + + profile_id: Optional[str] = None + + +class PredefinedEntryConfidence(BaseModel): + ai_context_available: bool + """Indicates whether this entry has AI remote service validation.""" + + available: bool + """ + Indicates whether this entry has any form of validation that is not an AI remote + service. + """ + + +class PredefinedEntry(BaseModel): + id: str + + confidence: PredefinedEntryConfidence + + enabled: bool + + name: str + + type: Literal["predefined"] + + profile_id: Optional[str] = None + + +class IntegrationEntry(BaseModel): + id: str + + created_at: datetime + + enabled: bool + + name: str + + type: Literal["integration"] + + updated_at: datetime + + profile_id: Optional[str] = None + + +class ExactDataEntry(BaseModel): + id: str + + case_sensitive: bool + """ + Only applies to custom word lists. Determines if the words should be matched in + a case-sensitive manner Cannot be set to false if secret is true + """ + + created_at: datetime + + enabled: bool + + name: str + + secret: bool + + type: Literal["exact_data"] + + updated_at: datetime + + +class DocumentFingerprintEntry(BaseModel): + id: str + + created_at: datetime + + enabled: bool + + name: str + + type: Literal["document_fingerprint"] + + updated_at: datetime + + +class WordListEntry(BaseModel): + id: str + + created_at: datetime + + enabled: bool + + name: str + + type: Literal["word_list"] + + updated_at: datetime + + word_list: object + + profile_id: Optional[str] = None + + +CustomUpdateResponse: TypeAlias = Union[ + CustomEntry, PredefinedEntry, IntegrationEntry, ExactDataEntry, DocumentFingerprintEntry, WordListEntry +] diff --git a/src/cloudflare/types/zero_trust/dlp/entries/integration_create_params.py b/src/cloudflare/types/zero_trust/dlp/entries/integration_create_params.py new file mode 100644 index 00000000000..0127261b9d5 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/integration_create_params.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import Required, TypedDict + +__all__ = ["IntegrationCreateParams"] + + +class IntegrationCreateParams(TypedDict, total=False): + account_id: Required[str] + + enabled: Required[bool] + + entry_id: Required[str] + + profile_id: Optional[str] + """ + This field is not actually used as the owning profile for a predefined entry is + already set to a predefined profile + """ diff --git a/src/cloudflare/types/zero_trust/dlp/entries/integration_create_response.py b/src/cloudflare/types/zero_trust/dlp/entries/integration_create_response.py new file mode 100644 index 00000000000..1ee434ffa96 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/integration_create_response.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ....._models import BaseModel + +__all__ = ["IntegrationCreateResponse"] + + +class IntegrationCreateResponse(BaseModel): + id: str + + created_at: datetime + + enabled: bool + + name: str + + updated_at: datetime + + profile_id: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/dlp/entries/integration_update_params.py b/src/cloudflare/types/zero_trust/dlp/entries/integration_update_params.py new file mode 100644 index 00000000000..a17458b6ae0 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/integration_update_params.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["IntegrationUpdateParams"] + + +class IntegrationUpdateParams(TypedDict, total=False): + account_id: Required[str] + + enabled: Required[bool] diff --git a/src/cloudflare/types/zero_trust/dlp/entries/integration_update_response.py b/src/cloudflare/types/zero_trust/dlp/entries/integration_update_response.py new file mode 100644 index 00000000000..757686d7058 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/integration_update_response.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ....._models import BaseModel + +__all__ = ["IntegrationUpdateResponse"] + + +class IntegrationUpdateResponse(BaseModel): + id: str + + created_at: datetime + + enabled: bool + + name: str + + updated_at: datetime + + profile_id: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_params.py b/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_params.py new file mode 100644 index 00000000000..8801782faca --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_params.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import Required, TypedDict + +__all__ = ["PredefinedCreateParams"] + + +class PredefinedCreateParams(TypedDict, total=False): + account_id: Required[str] + + enabled: Required[bool] + + entry_id: Required[str] + + profile_id: Optional[str] + """ + This field is not actually used as the owning profile for a predefined entry is + already set to a predefined profile + """ diff --git a/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_response.py b/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_response.py new file mode 100644 index 00000000000..de5ef65e7eb --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/predefined_create_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ....._models import BaseModel + +__all__ = ["PredefinedCreateResponse", "Confidence"] + + +class Confidence(BaseModel): + ai_context_available: bool + """Indicates whether this entry has AI remote service validation.""" + + available: bool + """ + Indicates whether this entry has any form of validation that is not an AI remote + service. + """ + + +class PredefinedCreateResponse(BaseModel): + id: str + + confidence: Confidence + + enabled: bool + + name: str + + profile_id: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_params.py b/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_params.py new file mode 100644 index 00000000000..d38e07163d7 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_params.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["PredefinedUpdateParams"] + + +class PredefinedUpdateParams(TypedDict, total=False): + account_id: Required[str] + + enabled: Required[bool] diff --git a/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_response.py b/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_response.py new file mode 100644 index 00000000000..06d5f98e106 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/entries/predefined_update_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ....._models import BaseModel + +__all__ = ["PredefinedUpdateResponse", "Confidence"] + + +class Confidence(BaseModel): + ai_context_available: bool + """Indicates whether this entry has AI remote service validation.""" + + available: bool + """ + Indicates whether this entry has any form of validation that is not an AI remote + service. + """ + + +class PredefinedUpdateResponse(BaseModel): + id: str + + confidence: Confidence + + enabled: bool + + name: str + + profile_id: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py b/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py index 48d09684f7b..4b821ad9fd6 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/__init__.py @@ -6,4 +6,5 @@ from .pattern_param import PatternParam as PatternParam from .custom_create_params import CustomCreateParams as CustomCreateParams from .custom_update_params import CustomUpdateParams as CustomUpdateParams +from .predefined_create_params import PredefinedCreateParams as PredefinedCreateParams from .predefined_update_params import PredefinedUpdateParams as PredefinedUpdateParams diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/predefined_create_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/predefined_create_params.py new file mode 100644 index 00000000000..e36d738f641 --- /dev/null +++ b/src/cloudflare/types/zero_trust/dlp/profiles/predefined_create_params.py @@ -0,0 +1,38 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable, Optional +from typing_extensions import Required, TypedDict + +from ..context_awareness_param import ContextAwarenessParam + +__all__ = ["PredefinedCreateParams", "Entry"] + + +class PredefinedCreateParams(TypedDict, total=False): + account_id: Required[str] + + profile_id: Required[str] + + ai_context_enabled: bool + + allowed_match_count: Optional[int] + + confidence_threshold: Optional[str] + + context_awareness: ContextAwarenessParam + """ + Scan the context of predefined entries to only return matches surrounded by + keywords. + """ + + entries: Iterable[Entry] + + ocr_enabled: bool + + +class Entry(TypedDict, total=False): + id: Required[str] + + enabled: Required[bool] diff --git a/tests/api_resources/zero_trust/dlp/entries/__init__.py b/tests/api_resources/zero_trust/dlp/entries/__init__.py new file mode 100644 index 00000000000..fd8019a9a1a --- /dev/null +++ b/tests/api_resources/zero_trust/dlp/entries/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/zero_trust/dlp/entries/test_custom.py b/tests/api_resources/zero_trust/dlp/entries/test_custom.py new file mode 100644 index 00000000000..c289e4c17b2 --- /dev/null +++ b/tests/api_resources/zero_trust/dlp/entries/test_custom.py @@ -0,0 +1,667 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, Optional, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.zero_trust.dlp.entries import ( + CustomCreateResponse, + CustomUpdateResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCustom: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.create( + account_id="account_id", + enabled=True, + name="name", + pattern={"regex": "regex"}, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.create( + account_id="account_id", + enabled=True, + name="name", + pattern={ + "regex": "regex", + "validation": "luhn", + }, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.custom.with_raw_response.create( + account_id="account_id", + enabled=True, + name="name", + pattern={"regex": "regex"}, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = response.parse() + assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.custom.with_streaming_response.create( + account_id="account_id", + enabled=True, + name="name", + pattern={"regex": "regex"}, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = response.parse() + assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.custom.with_raw_response.create( + account_id="", + enabled=True, + name="name", + pattern={"regex": "regex"}, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + @parametrize + def test_method_update_overload_1(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + name="name", + pattern={ + "regex": "regex", + "validation": "luhn", + }, + type="custom", + enabled=True, + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.custom.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update_overload_1(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="", + account_id="account_id", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) + + @parametrize + def test_method_update_overload_2(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="predefined", + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="predefined", + enabled=True, + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="predefined", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.custom.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="predefined", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update_overload_2(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + type="predefined", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="", + account_id="account_id", + type="predefined", + ) + + @parametrize + def test_method_update_overload_3(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="integration", + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="integration", + enabled=True, + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="integration", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.custom.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="integration", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update_overload_3(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + type="integration", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="", + account_id="account_id", + type="integration", + ) + + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + custom = client.zero_trust.dlp.entries.custom.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + assert_matches_type(object, custom, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.custom.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = response.parse() + assert_matches_type(object, custom, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.custom.with_streaming_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = response.parse() + assert_matches_type(object, custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.dlp.entries.custom.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + client.zero_trust.dlp.entries.custom.with_raw_response.delete( + entry_id="", + account_id="account_id", + ) + + +class TestAsyncCustom: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.create( + account_id="account_id", + enabled=True, + name="name", + pattern={"regex": "regex"}, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.create( + account_id="account_id", + enabled=True, + name="name", + pattern={ + "regex": "regex", + "validation": "luhn", + }, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.create( + account_id="account_id", + enabled=True, + name="name", + pattern={"regex": "regex"}, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = await response.parse() + assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.create( + account_id="account_id", + enabled=True, + name="name", + pattern={"regex": "regex"}, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = await response.parse() + assert_matches_type(Optional[CustomCreateResponse], custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.custom.with_raw_response.create( + account_id="", + enabled=True, + name="name", + pattern={"regex": "regex"}, + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + @parametrize + async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + name="name", + pattern={ + "regex": "regex", + "validation": "luhn", + }, + type="custom", + enabled=True, + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = await response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = await response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update_overload_1(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.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="", + account_id="account_id", + name="name", + pattern={"regex": "regex"}, + type="custom", + ) + + @parametrize + async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="predefined", + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="predefined", + enabled=True, + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="predefined", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = await response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="predefined", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = await response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update_overload_2(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.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + type="predefined", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="", + account_id="account_id", + type="predefined", + ) + + @parametrize + async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="integration", + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="integration", + enabled=True, + ) + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="integration", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = await response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + @parametrize + async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + type="integration", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = await response.parse() + assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update_overload_3(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.dlp.entries.custom.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + type="integration", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( + entry_id="", + account_id="account_id", + type="integration", + ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + custom = await async_client.zero_trust.dlp.entries.custom.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + assert_matches_type(object, custom, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + custom = await response.parse() + assert_matches_type(object, custom, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + custom = await response.parse() + assert_matches_type(object, custom, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(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.dlp.entries.custom.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + await async_client.zero_trust.dlp.entries.custom.with_raw_response.delete( + entry_id="", + account_id="account_id", + ) diff --git a/tests/api_resources/zero_trust/dlp/entries/test_integration.py b/tests/api_resources/zero_trust/dlp/entries/test_integration.py new file mode 100644 index 00000000000..8b1aadcb469 --- /dev/null +++ b/tests/api_resources/zero_trust/dlp/entries/test_integration.py @@ -0,0 +1,341 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, Optional, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.zero_trust.dlp.entries import ( + IntegrationCreateResponse, + IntegrationUpdateResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestIntegration: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + integration = client.zero_trust.dlp.entries.integration.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + integration = client.zero_trust.dlp.entries.integration.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.integration.with_raw_response.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + integration = response.parse() + assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.integration.with_streaming_response.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + integration = response.parse() + assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.integration.with_raw_response.create( + account_id="", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + integration = client.zero_trust.dlp.entries.integration.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) + assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.integration.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + integration = response.parse() + assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.integration.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + integration = response.parse() + assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.integration.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + enabled=True, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + client.zero_trust.dlp.entries.integration.with_raw_response.update( + entry_id="", + account_id="account_id", + enabled=True, + ) + + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + integration = client.zero_trust.dlp.entries.integration.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + assert_matches_type(object, integration, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.integration.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + integration = response.parse() + assert_matches_type(object, integration, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.integration.with_streaming_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + integration = response.parse() + assert_matches_type(object, integration, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.dlp.entries.integration.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + client.zero_trust.dlp.entries.integration.with_raw_response.delete( + entry_id="", + account_id="account_id", + ) + + +class TestAsyncIntegration: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + integration = await async_client.zero_trust.dlp.entries.integration.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + integration = await async_client.zero_trust.dlp.entries.integration.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.integration.with_raw_response.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + integration = await response.parse() + assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.integration.with_streaming_response.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + integration = await response.parse() + assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.integration.with_raw_response.create( + account_id="", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + integration = await async_client.zero_trust.dlp.entries.integration.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) + assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.integration.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + integration = await response.parse() + assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.integration.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + integration = await response.parse() + assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.integration.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + enabled=True, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + await async_client.zero_trust.dlp.entries.integration.with_raw_response.update( + entry_id="", + account_id="account_id", + enabled=True, + ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + integration = await async_client.zero_trust.dlp.entries.integration.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + assert_matches_type(object, integration, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.integration.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + integration = await response.parse() + assert_matches_type(object, integration, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.integration.with_streaming_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + integration = await response.parse() + assert_matches_type(object, integration, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(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.dlp.entries.integration.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + await async_client.zero_trust.dlp.entries.integration.with_raw_response.delete( + entry_id="", + account_id="account_id", + ) diff --git a/tests/api_resources/zero_trust/dlp/entries/test_predefined.py b/tests/api_resources/zero_trust/dlp/entries/test_predefined.py new file mode 100644 index 00000000000..66df7764e69 --- /dev/null +++ b/tests/api_resources/zero_trust/dlp/entries/test_predefined.py @@ -0,0 +1,341 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, Optional, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.zero_trust.dlp.entries import ( + PredefinedCreateResponse, + PredefinedUpdateResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestPredefined: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + predefined = client.zero_trust.dlp.entries.predefined.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + predefined = client.zero_trust.dlp.entries.predefined.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.predefined.with_raw_response.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = response.parse() + assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.predefined.with_streaming_response.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = response.parse() + assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.predefined.with_raw_response.create( + account_id="", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + @parametrize + def test_method_update(self, client: Cloudflare) -> None: + predefined = client.zero_trust.dlp.entries.predefined.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) + assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.predefined.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = response.parse() + assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.predefined.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = response.parse() + assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.predefined.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + enabled=True, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + client.zero_trust.dlp.entries.predefined.with_raw_response.update( + entry_id="", + account_id="account_id", + enabled=True, + ) + + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + predefined = client.zero_trust.dlp.entries.predefined.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + assert_matches_type(object, predefined, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.entries.predefined.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = response.parse() + assert_matches_type(object, predefined, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.entries.predefined.with_streaming_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = response.parse() + assert_matches_type(object, predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.dlp.entries.predefined.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + client.zero_trust.dlp.entries.predefined.with_raw_response.delete( + entry_id="", + account_id="account_id", + ) + + +class TestAsyncPredefined: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + predefined = await async_client.zero_trust.dlp.entries.predefined.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + predefined = await async_client.zero_trust.dlp.entries.predefined.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.predefined.with_raw_response.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = await response.parse() + assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.predefined.with_streaming_response.create( + account_id="account_id", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = await response.parse() + assert_matches_type(Optional[PredefinedCreateResponse], predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.predefined.with_raw_response.create( + account_id="", + enabled=True, + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + @parametrize + async def test_method_update(self, async_client: AsyncCloudflare) -> None: + predefined = await async_client.zero_trust.dlp.entries.predefined.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) + assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.predefined.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = await response.parse() + assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.predefined.with_streaming_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + enabled=True, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = await response.parse() + assert_matches_type(Optional[PredefinedUpdateResponse], predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.entries.predefined.with_raw_response.update( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + enabled=True, + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + await async_client.zero_trust.dlp.entries.predefined.with_raw_response.update( + entry_id="", + account_id="account_id", + enabled=True, + ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + predefined = await async_client.zero_trust.dlp.entries.predefined.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + assert_matches_type(object, predefined, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.entries.predefined.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = await response.parse() + assert_matches_type(object, predefined, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.entries.predefined.with_streaming_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = await response.parse() + assert_matches_type(object, predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(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.dlp.entries.predefined.with_raw_response.delete( + entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entry_id` but received ''"): + await async_client.zero_trust.dlp.entries.predefined.with_raw_response.delete( + entry_id="", + account_id="account_id", + ) diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py index ac97b878563..63b7206932b 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py @@ -17,6 +17,70 @@ class TestPredefined: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + predefined = client.zero_trust.dlp.profiles.predefined.create( + account_id="account_id", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[Profile], predefined, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + predefined = client.zero_trust.dlp.profiles.predefined.create( + account_id="account_id", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ai_context_enabled=True, + allowed_match_count=0, + confidence_threshold="confidence_threshold", + context_awareness={ + "enabled": True, + "skip": {"files": True}, + }, + entries=[ + { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "enabled": True, + } + ], + ocr_enabled=True, + ) + assert_matches_type(Optional[Profile], predefined, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.profiles.predefined.with_raw_response.create( + account_id="account_id", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = response.parse() + assert_matches_type(Optional[Profile], predefined, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.profiles.predefined.with_streaming_response.create( + account_id="account_id", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = response.parse() + assert_matches_type(Optional[Profile], predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.profiles.predefined.with_raw_response.create( + account_id="", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + @parametrize def test_method_update(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.update( @@ -87,6 +151,54 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="account_id", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + predefined = client.zero_trust.dlp.profiles.predefined.delete( + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + assert_matches_type(object, predefined, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.zero_trust.dlp.profiles.predefined.with_raw_response.delete( + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = response.parse() + assert_matches_type(object, predefined, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.zero_trust.dlp.profiles.predefined.with_streaming_response.delete( + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = response.parse() + assert_matches_type(object, predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.zero_trust.dlp.profiles.predefined.with_raw_response.delete( + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): + client.zero_trust.dlp.profiles.predefined.with_raw_response.delete( + profile_id="", + account_id="account_id", + ) + @parametrize def test_method_get(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.get( @@ -141,6 +253,70 @@ class TestAsyncPredefined: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + predefined = await async_client.zero_trust.dlp.profiles.predefined.create( + account_id="account_id", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(Optional[Profile], predefined, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + predefined = await async_client.zero_trust.dlp.profiles.predefined.create( + account_id="account_id", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ai_context_enabled=True, + allowed_match_count=0, + confidence_threshold="confidence_threshold", + context_awareness={ + "enabled": True, + "skip": {"files": True}, + }, + entries=[ + { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "enabled": True, + } + ], + ocr_enabled=True, + ) + assert_matches_type(Optional[Profile], predefined, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.create( + account_id="account_id", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = await response.parse() + assert_matches_type(Optional[Profile], predefined, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.create( + account_id="account_id", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = await response.parse() + assert_matches_type(Optional[Profile], predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.dlp.profiles.predefined.with_raw_response.create( + account_id="", + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.update( @@ -211,6 +387,54 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="account_id", ) + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + predefined = await async_client.zero_trust.dlp.profiles.predefined.delete( + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + assert_matches_type(object, predefined, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.delete( + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + predefined = await response.parse() + assert_matches_type(object, predefined, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.delete( + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + predefined = await response.parse() + assert_matches_type(object, predefined, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(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.dlp.profiles.predefined.with_raw_response.delete( + profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): + await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.delete( + profile_id="", + account_id="account_id", + ) + @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.get( From 1f930557c231be493e57c9780341916dd95bedfd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 00:08:09 +0000 Subject: [PATCH 220/392] chore(internal): add breaking change detection --- .github/workflows/detect-breaking-changes.yml | 35 +++++++++++++++++++ .stats.yml | 2 +- scripts/detect-breaking-changes | 19 ++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/detect-breaking-changes.yml create mode 100755 scripts/detect-breaking-changes diff --git a/.github/workflows/detect-breaking-changes.yml b/.github/workflows/detect-breaking-changes.yml new file mode 100644 index 00000000000..a694a70bb2f --- /dev/null +++ b/.github/workflows/detect-breaking-changes.yml @@ -0,0 +1,35 @@ +name: CI +on: + pull_request: + branches: + - main + - next + +jobs: + detect_breaking_changes: + runs-on: 'ubuntu-latest' + name: detect-breaking-changes + if: github.repository == 'cloudflare/cloudflare-python' + steps: + - name: Calculate fetch-depth + run: | + echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV + + - uses: actions/checkout@v4 + with: + # Ensure we can check out the pull request base in the script below. + fetch-depth: ${{ env.FETCH_DEPTH }} + + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: '0.44.0' + RYE_INSTALL_OPTION: '--yes' + - name: Install dependencies + run: | + rye sync --all-features + + - name: Detect breaking changes + run: ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }} \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 322f9bf3179..e80e3c8abe7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96ad9bfaad2a1dce9c6cccc0b105a257651c44566e5038a75fbf769f2ffacd9b.yml openapi_spec_hash: 241cae658fd35c1eca02921272879760 -config_hash: 553b8c9fbe8068eae649aed371f36d6f +config_hash: 18e6b76de8b719dd7c9c28614ac32643 diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes new file mode 100755 index 00000000000..fb28f3a261a --- /dev/null +++ b/scripts/detect-breaking-changes @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +echo "==> Detecting breaking changes" + +TEST_PATHS=( tests/api_resources tests/test_client.py tests/test_response.py ) + +for PATHSPEC in "${TEST_PATHS[@]}"; do + # Try to check out previous versions of the test files + # with the current SDK. + git checkout "$1" -- "${PATHSPEC}" 2>/dev/null || true +done + +# Instead of running the tests, use the linter to check if an +# older test is no longer compatible with the latest SDK. +./scripts/lint From f9365f8e7f743cf24a80049662e1fa58233e6dc5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 14:27:47 +0000 Subject: [PATCH 221/392] feat(api): api update --- .stats.yml | 4 +- requirements-dev.lock | 2 +- requirements.lock | 2 +- .../operations/schema_validation.py | 91 ++- .../api_gateway/settings/schema_validation.py | 91 ++- .../api_gateway/user_schemas/hosts.py | 32 +- .../api_gateway/user_schemas/operations.py | 31 +- .../api_gateway/user_schemas/user_schemas.py | 159 +++-- .../resources/browser_rendering/pdf.py | 8 + .../resources/zero_trust/devices/devices_.py | 4 +- .../zero_trust/devices/registrations.py | 8 +- .../browser_rendering/pdf_create_params.py | 65 ++ .../investigate/move_bulk_response.py | 13 +- .../investigate/move_create_response.py | 13 +- .../types/rules/lists/item_create_params.py | 5 +- .../types/rules/lists/item_get_response.py | 10 +- .../types/rules/lists/item_update_params.py | 5 +- .../zero_trust/devices/device_list_params.py | 2 +- .../devices/registration_list_params.py | 4 +- .../types/zero_trust/dlp/dataset.py | 6 +- .../zero_trust/dlp/datasets/new_version.py | 2 +- .../dlp/datasets/version_create_response.py | 2 +- .../versions/entry_create_response.py | 2 +- .../operations/test_schema_validation.py | 402 ++++++----- .../settings/test_schema_validation.py | 300 ++++---- .../api_gateway/test_user_schemas.py | 646 ++++++++++-------- .../api_gateway/user_schemas/test_hosts.py | 104 +-- .../user_schemas/test_operations.py | 166 +++-- .../browser_rendering/test_pdf.py | 46 ++ 29 files changed, 1349 insertions(+), 876 deletions(-) diff --git a/.stats.yml b/.stats.yml index e80e3c8abe7..2da7945ba02 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-96ad9bfaad2a1dce9c6cccc0b105a257651c44566e5038a75fbf769f2ffacd9b.yml -openapi_spec_hash: 241cae658fd35c1eca02921272879760 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a8a1dc48cc130613e263a41bd6e8da15c355627a9f65b30baefb6d39760b673e.yml +openapi_spec_hash: 62e9cd89bc63bb061215feec9bc9f038 config_hash: 18e6b76de8b719dd7c9c28614ac32643 diff --git a/requirements-dev.lock b/requirements-dev.lock index 0ce6f78d53b..9264ed08d78 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -56,7 +56,7 @@ httpx==0.28.1 # via cloudflare # via httpx-aiohttp # via respx -httpx-aiohttp==0.1.6 +httpx-aiohttp==0.1.8 # via cloudflare idna==3.4 # via anyio diff --git a/requirements.lock b/requirements.lock index 510fa9d9dc2..0dfb3cedbe3 100644 --- a/requirements.lock +++ b/requirements.lock @@ -43,7 +43,7 @@ httpcore==1.0.2 httpx==0.28.1 # via cloudflare # via httpx-aiohttp -httpx-aiohttp==0.1.6 +httpx-aiohttp==0.1.8 # via cloudflare idna==3.4 # via anyio diff --git a/src/cloudflare/resources/api_gateway/operations/schema_validation.py b/src/cloudflare/resources/api_gateway/operations/schema_validation.py index 39718458f87..6f16de7431a 100644 --- a/src/cloudflare/resources/api_gateway/operations/schema_validation.py +++ b/src/cloudflare/resources/api_gateway/operations/schema_validation.py @@ -2,6 +2,7 @@ from __future__ import annotations +import typing_extensions from typing import Type, Optional, cast from typing_extensions import Literal @@ -52,6 +53,9 @@ def with_streaming_response(self) -> SchemaValidationResourceWithStreamingRespon """ return SchemaValidationResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def update( self, operation_id: str, @@ -105,6 +109,9 @@ def update( cast_to=SchemaValidationUpdateResponse, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def edit( self, *, @@ -146,6 +153,9 @@ def edit( cast_to=cast(Type[SettingsMultipleRequest], ResultWrapper[SettingsMultipleRequest]), ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def get( self, operation_id: str, @@ -207,6 +217,9 @@ def with_streaming_response(self) -> AsyncSchemaValidationResourceWithStreamingR """ return AsyncSchemaValidationResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def update( self, operation_id: str, @@ -260,6 +273,9 @@ async def update( cast_to=SchemaValidationUpdateResponse, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def edit( self, *, @@ -303,6 +319,9 @@ async def edit( cast_to=cast(Type[SettingsMultipleRequest], ResultWrapper[SettingsMultipleRequest]), ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def get( self, operation_id: str, @@ -348,14 +367,20 @@ class SchemaValidationResourceWithRawResponse: def __init__(self, schema_validation: SchemaValidationResource) -> None: self._schema_validation = schema_validation - self.update = to_raw_response_wrapper( - schema_validation.update, + self.update = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + schema_validation.update # pyright: ignore[reportDeprecated], + ) ) - self.edit = to_raw_response_wrapper( - schema_validation.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + schema_validation.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = to_raw_response_wrapper( - schema_validation.get, + self.get = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + schema_validation.get # pyright: ignore[reportDeprecated], + ) ) @@ -363,14 +388,20 @@ class AsyncSchemaValidationResourceWithRawResponse: def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None: self._schema_validation = schema_validation - self.update = async_to_raw_response_wrapper( - schema_validation.update, + self.update = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + schema_validation.update # pyright: ignore[reportDeprecated], + ) ) - self.edit = async_to_raw_response_wrapper( - schema_validation.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + schema_validation.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = async_to_raw_response_wrapper( - schema_validation.get, + self.get = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + schema_validation.get # pyright: ignore[reportDeprecated], + ) ) @@ -378,14 +409,20 @@ class SchemaValidationResourceWithStreamingResponse: def __init__(self, schema_validation: SchemaValidationResource) -> None: self._schema_validation = schema_validation - self.update = to_streamed_response_wrapper( - schema_validation.update, + self.update = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + schema_validation.update # pyright: ignore[reportDeprecated], + ) ) - self.edit = to_streamed_response_wrapper( - schema_validation.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + schema_validation.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = to_streamed_response_wrapper( - schema_validation.get, + self.get = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + schema_validation.get # pyright: ignore[reportDeprecated], + ) ) @@ -393,12 +430,18 @@ class AsyncSchemaValidationResourceWithStreamingResponse: def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None: self._schema_validation = schema_validation - self.update = async_to_streamed_response_wrapper( - schema_validation.update, + self.update = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + schema_validation.update # pyright: ignore[reportDeprecated], + ) ) - self.edit = async_to_streamed_response_wrapper( - schema_validation.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + schema_validation.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = async_to_streamed_response_wrapper( - schema_validation.get, + self.get = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + schema_validation.get # pyright: ignore[reportDeprecated], + ) ) diff --git a/src/cloudflare/resources/api_gateway/settings/schema_validation.py b/src/cloudflare/resources/api_gateway/settings/schema_validation.py index 37610d80629..3aca7712b17 100644 --- a/src/cloudflare/resources/api_gateway/settings/schema_validation.py +++ b/src/cloudflare/resources/api_gateway/settings/schema_validation.py @@ -2,6 +2,7 @@ from __future__ import annotations +import typing_extensions from typing import Optional from typing_extensions import Literal @@ -44,6 +45,9 @@ def with_streaming_response(self) -> SchemaValidationResourceWithStreamingRespon """ return SchemaValidationResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def update( self, *, @@ -106,6 +110,9 @@ def update( cast_to=Settings, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def edit( self, *, @@ -169,6 +176,9 @@ def edit( cast_to=Settings, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def get( self, *, @@ -225,6 +235,9 @@ def with_streaming_response(self) -> AsyncSchemaValidationResourceWithStreamingR """ return AsyncSchemaValidationResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def update( self, *, @@ -287,6 +300,9 @@ async def update( cast_to=Settings, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def edit( self, *, @@ -350,6 +366,9 @@ async def edit( cast_to=Settings, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def get( self, *, @@ -390,14 +409,20 @@ class SchemaValidationResourceWithRawResponse: def __init__(self, schema_validation: SchemaValidationResource) -> None: self._schema_validation = schema_validation - self.update = to_raw_response_wrapper( - schema_validation.update, + self.update = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + schema_validation.update # pyright: ignore[reportDeprecated], + ) ) - self.edit = to_raw_response_wrapper( - schema_validation.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + schema_validation.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = to_raw_response_wrapper( - schema_validation.get, + self.get = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + schema_validation.get # pyright: ignore[reportDeprecated], + ) ) @@ -405,14 +430,20 @@ class AsyncSchemaValidationResourceWithRawResponse: def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None: self._schema_validation = schema_validation - self.update = async_to_raw_response_wrapper( - schema_validation.update, + self.update = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + schema_validation.update # pyright: ignore[reportDeprecated], + ) ) - self.edit = async_to_raw_response_wrapper( - schema_validation.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + schema_validation.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = async_to_raw_response_wrapper( - schema_validation.get, + self.get = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + schema_validation.get # pyright: ignore[reportDeprecated], + ) ) @@ -420,14 +451,20 @@ class SchemaValidationResourceWithStreamingResponse: def __init__(self, schema_validation: SchemaValidationResource) -> None: self._schema_validation = schema_validation - self.update = to_streamed_response_wrapper( - schema_validation.update, + self.update = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + schema_validation.update # pyright: ignore[reportDeprecated], + ) ) - self.edit = to_streamed_response_wrapper( - schema_validation.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + schema_validation.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = to_streamed_response_wrapper( - schema_validation.get, + self.get = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + schema_validation.get # pyright: ignore[reportDeprecated], + ) ) @@ -435,12 +472,18 @@ class AsyncSchemaValidationResourceWithStreamingResponse: def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None: self._schema_validation = schema_validation - self.update = async_to_streamed_response_wrapper( - schema_validation.update, + self.update = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + schema_validation.update # pyright: ignore[reportDeprecated], + ) ) - self.edit = async_to_streamed_response_wrapper( - schema_validation.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + schema_validation.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = async_to_streamed_response_wrapper( - schema_validation.get, + self.get = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + schema_validation.get # pyright: ignore[reportDeprecated], + ) ) diff --git a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py index eba45a77d93..52c486a8b81 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py @@ -2,6 +2,8 @@ from __future__ import annotations +import typing_extensions + import httpx from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -42,6 +44,9 @@ def with_streaming_response(self) -> HostsResourceWithStreamingResponse: """ return HostsResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def list( self, *, @@ -115,6 +120,9 @@ def with_streaming_response(self) -> AsyncHostsResourceWithStreamingResponse: """ return AsyncHostsResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def list( self, *, @@ -172,8 +180,10 @@ class HostsResourceWithRawResponse: def __init__(self, hosts: HostsResource) -> None: self._hosts = hosts - self.list = to_raw_response_wrapper( - hosts.list, + self.list = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + hosts.list # pyright: ignore[reportDeprecated], + ) ) @@ -181,8 +191,10 @@ class AsyncHostsResourceWithRawResponse: def __init__(self, hosts: AsyncHostsResource) -> None: self._hosts = hosts - self.list = async_to_raw_response_wrapper( - hosts.list, + self.list = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + hosts.list # pyright: ignore[reportDeprecated], + ) ) @@ -190,8 +202,10 @@ class HostsResourceWithStreamingResponse: def __init__(self, hosts: HostsResource) -> None: self._hosts = hosts - self.list = to_streamed_response_wrapper( - hosts.list, + self.list = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + hosts.list # pyright: ignore[reportDeprecated], + ) ) @@ -199,6 +213,8 @@ class AsyncHostsResourceWithStreamingResponse: def __init__(self, hosts: AsyncHostsResource) -> None: self._hosts = hosts - self.list = async_to_streamed_response_wrapper( - hosts.list, + self.list = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + hosts.list # pyright: ignore[reportDeprecated], + ) ) diff --git a/src/cloudflare/resources/api_gateway/user_schemas/operations.py b/src/cloudflare/resources/api_gateway/user_schemas/operations.py index a75cd28dbfb..0db3ff4076b 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/operations.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/operations.py @@ -2,6 +2,7 @@ from __future__ import annotations +import typing_extensions from typing import Any, List, cast from typing_extensions import Literal @@ -45,6 +46,9 @@ def with_streaming_response(self) -> OperationsResourceWithStreamingResponse: """ return OperationsResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def list( self, schema_id: str, @@ -148,6 +152,9 @@ def with_streaming_response(self) -> AsyncOperationsResourceWithStreamingRespons """ return AsyncOperationsResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def list( self, schema_id: str, @@ -235,8 +242,10 @@ class OperationsResourceWithRawResponse: def __init__(self, operations: OperationsResource) -> None: self._operations = operations - self.list = to_raw_response_wrapper( - operations.list, + self.list = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + operations.list # pyright: ignore[reportDeprecated], + ) ) @@ -244,8 +253,10 @@ class AsyncOperationsResourceWithRawResponse: def __init__(self, operations: AsyncOperationsResource) -> None: self._operations = operations - self.list = async_to_raw_response_wrapper( - operations.list, + self.list = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + operations.list # pyright: ignore[reportDeprecated], + ) ) @@ -253,8 +264,10 @@ class OperationsResourceWithStreamingResponse: def __init__(self, operations: OperationsResource) -> None: self._operations = operations - self.list = to_streamed_response_wrapper( - operations.list, + self.list = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + operations.list # pyright: ignore[reportDeprecated], + ) ) @@ -262,6 +275,8 @@ class AsyncOperationsResourceWithStreamingResponse: def __init__(self, operations: AsyncOperationsResource) -> None: self._operations = operations - self.list = async_to_streamed_response_wrapper( - operations.list, + self.list = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + operations.list # pyright: ignore[reportDeprecated], + ) ) diff --git a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py index 3c2921267ff..2bef6a75ebb 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py @@ -2,6 +2,7 @@ from __future__ import annotations +import typing_extensions from typing import Type, Mapping, cast from typing_extensions import Literal @@ -77,6 +78,9 @@ def with_streaming_response(self) -> UserSchemasResourceWithStreamingResponse: """ return UserSchemasResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def create( self, *, @@ -143,6 +147,9 @@ def create( cast_to=cast(Type[SchemaUpload], ResultWrapper[SchemaUpload]), ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def list( self, *, @@ -203,6 +210,9 @@ def list( model=PublicSchema, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def delete( self, schema_id: str, @@ -241,6 +251,9 @@ def delete( cast_to=UserSchemaDeleteResponse, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def edit( self, schema_id: str, @@ -289,6 +302,9 @@ def edit( cast_to=cast(Type[PublicSchema], ResultWrapper[PublicSchema]), ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def get( self, schema_id: str, @@ -364,6 +380,9 @@ def with_streaming_response(self) -> AsyncUserSchemasResourceWithStreamingRespon """ return AsyncUserSchemasResourceWithStreamingResponse(self) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def create( self, *, @@ -430,6 +449,9 @@ async def create( cast_to=cast(Type[SchemaUpload], ResultWrapper[SchemaUpload]), ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) def list( self, *, @@ -490,6 +512,9 @@ def list( model=PublicSchema, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def delete( self, schema_id: str, @@ -528,6 +553,9 @@ async def delete( cast_to=UserSchemaDeleteResponse, ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def edit( self, schema_id: str, @@ -576,6 +604,9 @@ async def edit( cast_to=cast(Type[PublicSchema], ResultWrapper[PublicSchema]), ) + @typing_extensions.deprecated( + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + ) async def get( self, schema_id: str, @@ -629,20 +660,30 @@ class UserSchemasResourceWithRawResponse: def __init__(self, user_schemas: UserSchemasResource) -> None: self._user_schemas = user_schemas - self.create = to_raw_response_wrapper( - user_schemas.create, + self.create = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + user_schemas.create # pyright: ignore[reportDeprecated], + ) ) - self.list = to_raw_response_wrapper( - user_schemas.list, + self.list = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + user_schemas.list # pyright: ignore[reportDeprecated], + ) ) - self.delete = to_raw_response_wrapper( - user_schemas.delete, + self.delete = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + user_schemas.delete # pyright: ignore[reportDeprecated], + ) ) - self.edit = to_raw_response_wrapper( - user_schemas.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + user_schemas.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = to_raw_response_wrapper( - user_schemas.get, + self.get = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + user_schemas.get # pyright: ignore[reportDeprecated], + ) ) @cached_property @@ -658,20 +699,30 @@ class AsyncUserSchemasResourceWithRawResponse: def __init__(self, user_schemas: AsyncUserSchemasResource) -> None: self._user_schemas = user_schemas - self.create = async_to_raw_response_wrapper( - user_schemas.create, + self.create = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + user_schemas.create # pyright: ignore[reportDeprecated], + ) ) - self.list = async_to_raw_response_wrapper( - user_schemas.list, + self.list = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + user_schemas.list # pyright: ignore[reportDeprecated], + ) ) - self.delete = async_to_raw_response_wrapper( - user_schemas.delete, + self.delete = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + user_schemas.delete # pyright: ignore[reportDeprecated], + ) ) - self.edit = async_to_raw_response_wrapper( - user_schemas.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + user_schemas.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = async_to_raw_response_wrapper( - user_schemas.get, + self.get = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + user_schemas.get # pyright: ignore[reportDeprecated], + ) ) @cached_property @@ -687,20 +738,30 @@ class UserSchemasResourceWithStreamingResponse: def __init__(self, user_schemas: UserSchemasResource) -> None: self._user_schemas = user_schemas - self.create = to_streamed_response_wrapper( - user_schemas.create, + self.create = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + user_schemas.create # pyright: ignore[reportDeprecated], + ) ) - self.list = to_streamed_response_wrapper( - user_schemas.list, + self.list = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + user_schemas.list # pyright: ignore[reportDeprecated], + ) ) - self.delete = to_streamed_response_wrapper( - user_schemas.delete, + self.delete = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + user_schemas.delete # pyright: ignore[reportDeprecated], + ) ) - self.edit = to_streamed_response_wrapper( - user_schemas.edit, + self.edit = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + user_schemas.edit # pyright: ignore[reportDeprecated], + ) ) - self.get = to_streamed_response_wrapper( - user_schemas.get, + self.get = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + user_schemas.get # pyright: ignore[reportDeprecated], + ) ) @cached_property @@ -716,20 +777,30 @@ class AsyncUserSchemasResourceWithStreamingResponse: def __init__(self, user_schemas: AsyncUserSchemasResource) -> None: self._user_schemas = user_schemas - self.create = async_to_streamed_response_wrapper( - user_schemas.create, - ) - self.list = async_to_streamed_response_wrapper( - user_schemas.list, - ) - self.delete = async_to_streamed_response_wrapper( - user_schemas.delete, - ) - self.edit = async_to_streamed_response_wrapper( - user_schemas.edit, - ) - self.get = async_to_streamed_response_wrapper( - user_schemas.get, + self.create = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + user_schemas.create # pyright: ignore[reportDeprecated], + ) + ) + self.list = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + user_schemas.list # pyright: ignore[reportDeprecated], + ) + ) + self.delete = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + user_schemas.delete # pyright: ignore[reportDeprecated], + ) + ) + self.edit = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + user_schemas.edit # pyright: ignore[reportDeprecated], + ) + ) + self.get = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + user_schemas.get # pyright: ignore[reportDeprecated], + ) ) @cached_property diff --git a/src/cloudflare/resources/browser_rendering/pdf.py b/src/cloudflare/resources/browser_rendering/pdf.py index 4b82c076245..d9fd71a2c3b 100644 --- a/src/cloudflare/resources/browser_rendering/pdf.py +++ b/src/cloudflare/resources/browser_rendering/pdf.py @@ -85,6 +85,7 @@ def create( emulate_media_type: str | NotGiven = NOT_GIVEN, goto_options: pdf_create_params.GotoOptions | NotGiven = NOT_GIVEN, html: str | NotGiven = NOT_GIVEN, + pdf_options: pdf_create_params.PDFOptions | NotGiven = NOT_GIVEN, reject_request_pattern: List[str] | NotGiven = NOT_GIVEN, reject_resource_types: List[ Literal[ @@ -158,6 +159,8 @@ def create( html: Set the content of the page, eg: `

Hello World!!

`. Either `html` or `url` must be set. + pdf_options: Check [options](https://pptr.dev/api/puppeteer.pdfoptions). + reject_request_pattern: Block undesired requests that match the provided regex patterns, eg. '/^.\\**\\..(css)'. @@ -199,6 +202,7 @@ def create( "emulate_media_type": emulate_media_type, "goto_options": goto_options, "html": html, + "pdf_options": pdf_options, "reject_request_pattern": reject_request_pattern, "reject_resource_types": reject_resource_types, "set_extra_http_headers": set_extra_http_headers, @@ -280,6 +284,7 @@ async def create( emulate_media_type: str | NotGiven = NOT_GIVEN, goto_options: pdf_create_params.GotoOptions | NotGiven = NOT_GIVEN, html: str | NotGiven = NOT_GIVEN, + pdf_options: pdf_create_params.PDFOptions | NotGiven = NOT_GIVEN, reject_request_pattern: List[str] | NotGiven = NOT_GIVEN, reject_resource_types: List[ Literal[ @@ -353,6 +358,8 @@ async def create( html: Set the content of the page, eg: `

Hello World!!

`. Either `html` or `url` must be set. + pdf_options: Check [options](https://pptr.dev/api/puppeteer.pdfoptions). + reject_request_pattern: Block undesired requests that match the provided regex patterns, eg. '/^.\\**\\..(css)'. @@ -394,6 +401,7 @@ async def create( "emulate_media_type": emulate_media_type, "goto_options": goto_options, "html": html, + "pdf_options": pdf_options, "reject_request_pattern": reject_request_pattern, "reject_resource_types": reject_resource_types, "set_extra_http_headers": set_extra_http_headers, diff --git a/src/cloudflare/resources/zero_trust/devices/devices_.py b/src/cloudflare/resources/zero_trust/devices/devices_.py index 82113483ab9..e8590a1f824 100644 --- a/src/cloudflare/resources/zero_trust/devices/devices_.py +++ b/src/cloudflare/resources/zero_trust/devices/devices_.py @@ -89,7 +89,7 @@ def list( search: Search by device details. - seen_after: Filters by the last_seen timestamp - returns only devices last seen after this + seen_after: Filter by the last_seen timestamp - returns only devices last seen after this timestamp. seen_before: Filter by the last_seen timestamp - returns only devices last seen before this @@ -320,7 +320,7 @@ def list( search: Search by device details. - seen_after: Filters by the last_seen timestamp - returns only devices last seen after this + seen_after: Filter by the last_seen timestamp - returns only devices last seen after this timestamp. seen_before: Filter by the last_seen timestamp - returns only devices last seen before this diff --git a/src/cloudflare/resources/zero_trust/devices/registrations.py b/src/cloudflare/resources/zero_trust/devices/registrations.py index 7e129cc380d..59ddabb48a3 100644 --- a/src/cloudflare/resources/zero_trust/devices/registrations.py +++ b/src/cloudflare/resources/zero_trust/devices/registrations.py @@ -89,10 +89,10 @@ def list( search: Filter by registration details. - seen_after: Filters by the last_seen timestamp - returns only registrations last seen after + seen_after: Filter by the last_seen timestamp - returns only registrations last seen after this timestamp. - seen_before: Filters by the last_seen timestamp - returns only registrations last seen before + seen_before: Filter by the last_seen timestamp - returns only registrations last seen before this timestamp. sort_by: The registration field to order results by. @@ -401,10 +401,10 @@ def list( search: Filter by registration details. - seen_after: Filters by the last_seen timestamp - returns only registrations last seen after + seen_after: Filter by the last_seen timestamp - returns only registrations last seen after this timestamp. - seen_before: Filters by the last_seen timestamp - returns only registrations last seen before + seen_before: Filter by the last_seen timestamp - returns only registrations last seen before this timestamp. sort_by: The registration field to order results by. diff --git a/src/cloudflare/types/browser_rendering/pdf_create_params.py b/src/cloudflare/types/browser_rendering/pdf_create_params.py index a131f2e7193..73fb0505890 100644 --- a/src/cloudflare/types/browser_rendering/pdf_create_params.py +++ b/src/cloudflare/types/browser_rendering/pdf_create_params.py @@ -14,6 +14,8 @@ "Authenticate", "Cookie", "GotoOptions", + "PDFOptions", + "PDFOptionsMargin", "Viewport", "WaitForSelector", ] @@ -95,6 +97,9 @@ class PDFCreateParams(TypedDict, total=False): Either `html` or `url` must be set. """ + pdf_options: Annotated[PDFOptions, PropertyInfo(alias="pdfOptions")] + """Check [options](https://pptr.dev/api/puppeteer.pdfoptions).""" + reject_request_pattern: Annotated[List[str], PropertyInfo(alias="rejectRequestPattern")] """Block undesired requests that match the provided regex patterns, eg. @@ -221,6 +226,66 @@ class GotoOptions(TypedDict, total=False): ] +class PDFOptionsMargin(TypedDict, total=False): + bottom: Union[str, float] + + left: Union[str, float] + + right: Union[str, float] + + top: Union[str, float] + + +class PDFOptions(TypedDict, total=False): + display_header_footer: Annotated[bool, PropertyInfo(alias="displayHeaderFooter")] + """Whether to show the header and footer.""" + + footer_template: Annotated[str, PropertyInfo(alias="footerTemplate")] + """HTML template for the print footer.""" + + format: Literal["letter", "legal", "tabloid", "ledger", "a0", "a1", "a2", "a3", "a4", "a5", "a6"] + """Paper format. Takes priority over width and height if set.""" + + header_template: Annotated[str, PropertyInfo(alias="headerTemplate")] + """HTML template for the print header.""" + + height: Union[str, float] + """Sets the height of paper. Can be a number or string with unit.""" + + landscape: bool + """Whether to print in landscape orientation.""" + + margin: PDFOptionsMargin + """Set the PDF margins. Useful when setting header and footer.""" + + omit_background: Annotated[bool, PropertyInfo(alias="omitBackground")] + """Hides default white background and allows generating pdfs with transparency.""" + + outline: bool + """Generate document outline.""" + + page_ranges: Annotated[str, PropertyInfo(alias="pageRanges")] + """Paper ranges to print, e.g. '1-5, 8, 11-13'.""" + + prefer_css_page_size: Annotated[bool, PropertyInfo(alias="preferCSSPageSize")] + """Give CSS @page size priority over other size declarations.""" + + print_background: Annotated[bool, PropertyInfo(alias="printBackground")] + """Set to true to print background graphics.""" + + scale: float + """Scales the rendering of the web page. Amount must be between 0.1 and 2.""" + + tagged: bool + """Generate tagged (accessible) PDF.""" + + timeout: float + """Timeout in milliseconds.""" + + width: Union[str, float] + """Sets the width of paper. Can be a number or string with unit.""" + + class Viewport(TypedDict, total=False): height: Required[float] diff --git a/src/cloudflare/types/email_security/investigate/move_bulk_response.py b/src/cloudflare/types/email_security/investigate/move_bulk_response.py index ea093f060f1..b3151973d9c 100644 --- a/src/cloudflare/types/email_security/investigate/move_bulk_response.py +++ b/src/cloudflare/types/email_security/investigate/move_bulk_response.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from datetime import datetime from ...._models import BaseModel @@ -10,14 +11,14 @@ class MoveBulkResponse(BaseModel): completed_timestamp: datetime - destination: str - item_count: int - message_id: str + destination: Optional[str] = None + + message_id: Optional[str] = None - operation: str + operation: Optional[str] = None - recipient: str + recipient: Optional[str] = None - status: str + status: Optional[str] = None diff --git a/src/cloudflare/types/email_security/investigate/move_create_response.py b/src/cloudflare/types/email_security/investigate/move_create_response.py index c8509acc388..be90f629d31 100644 --- a/src/cloudflare/types/email_security/investigate/move_create_response.py +++ b/src/cloudflare/types/email_security/investigate/move_create_response.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from datetime import datetime from ...._models import BaseModel @@ -10,14 +11,14 @@ class MoveCreateResponse(BaseModel): completed_timestamp: datetime - destination: str - item_count: int - message_id: str + destination: Optional[str] = None + + message_id: Optional[str] = None - operation: str + operation: Optional[str] = None - recipient: str + recipient: Optional[str] = None - status: str + status: Optional[str] = None diff --git a/src/cloudflare/types/rules/lists/item_create_params.py b/src/cloudflare/types/rules/lists/item_create_params.py index a78b22f5719..77d5d60b76e 100644 --- a/src/cloudflare/types/rules/lists/item_create_params.py +++ b/src/cloudflare/types/rules/lists/item_create_params.py @@ -32,10 +32,7 @@ class Body(TypedDict, total=False): """ ip: str - """An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. - - IPv6 CIDRs are limited to a maximum of /64. - """ + """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" redirect: RedirectParam """The definition of the redirect.""" diff --git a/src/cloudflare/types/rules/lists/item_get_response.py b/src/cloudflare/types/rules/lists/item_get_response.py index 6916c32776d..f78ecad2258 100644 --- a/src/cloudflare/types/rules/lists/item_get_response.py +++ b/src/cloudflare/types/rules/lists/item_get_response.py @@ -30,10 +30,7 @@ class UnionMember0(BaseModel): """ ip: Optional[str] = None - """An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. - - IPv6 CIDRs are limited to a maximum of /64. - """ + """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" modified_on: Optional[str] = None """The RFC 3339 timestamp of when the item was last modified.""" @@ -62,10 +59,7 @@ class UnionMember1(BaseModel): """ ip: Optional[str] = None - """An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. - - IPv6 CIDRs are limited to a maximum of /64. - """ + """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" modified_on: Optional[str] = None """The RFC 3339 timestamp of when the item was last modified.""" diff --git a/src/cloudflare/types/rules/lists/item_update_params.py b/src/cloudflare/types/rules/lists/item_update_params.py index 7d6e79d4f35..a0bd53080ff 100644 --- a/src/cloudflare/types/rules/lists/item_update_params.py +++ b/src/cloudflare/types/rules/lists/item_update_params.py @@ -32,10 +32,7 @@ class Body(TypedDict, total=False): """ ip: str - """An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. - - IPv6 CIDRs are limited to a maximum of /64. - """ + """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" redirect: RedirectParam """The definition of the redirect.""" diff --git a/src/cloudflare/types/zero_trust/devices/device_list_params.py b/src/cloudflare/types/zero_trust/devices/device_list_params.py index 05e638302a6..05858f861ea 100644 --- a/src/cloudflare/types/zero_trust/devices/device_list_params.py +++ b/src/cloudflare/types/zero_trust/devices/device_list_params.py @@ -39,7 +39,7 @@ class DeviceListParams(TypedDict, total=False): seen_after: str """ - Filters by the last_seen timestamp - returns only devices last seen after this + Filter by the last_seen timestamp - returns only devices last seen after this timestamp. """ diff --git a/src/cloudflare/types/zero_trust/devices/registration_list_params.py b/src/cloudflare/types/zero_trust/devices/registration_list_params.py index 28abde847d5..50fad6bd4d2 100644 --- a/src/cloudflare/types/zero_trust/devices/registration_list_params.py +++ b/src/cloudflare/types/zero_trust/devices/registration_list_params.py @@ -33,13 +33,13 @@ class RegistrationListParams(TypedDict, total=False): seen_after: str """ - Filters by the last_seen timestamp - returns only registrations last seen after + Filter by the last_seen timestamp - returns only registrations last seen after this timestamp. """ seen_before: str """ - Filters by the last_seen timestamp - returns only registrations last seen before + Filter by the last_seen timestamp - returns only registrations last seen before this timestamp. """ diff --git a/src/cloudflare/types/zero_trust/dlp/dataset.py b/src/cloudflare/types/zero_trust/dlp/dataset.py index 58f735d023c..775eb6cb3ca 100644 --- a/src/cloudflare/types/zero_trust/dlp/dataset.py +++ b/src/cloudflare/types/zero_trust/dlp/dataset.py @@ -16,13 +16,13 @@ class Column(BaseModel): num_cells: int - upload_status: Literal["empty", "uploading", "processing", "failed", "complete"] + upload_status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"] class Upload(BaseModel): num_cells: int - status: Literal["empty", "uploading", "processing", "failed", "complete"] + status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"] version: int @@ -42,7 +42,7 @@ class Dataset(BaseModel): secret: bool - status: Literal["empty", "uploading", "processing", "failed", "complete"] + status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"] updated_at: datetime """When the dataset was last updated. diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py b/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py index 78fa7f784c4..2e10d4c3770 100644 --- a/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py +++ b/src/cloudflare/types/zero_trust/dlp/datasets/new_version.py @@ -15,7 +15,7 @@ class Column(BaseModel): num_cells: int - upload_status: Literal["empty", "uploading", "processing", "failed", "complete"] + upload_status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"] class NewVersion(BaseModel): diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/version_create_response.py b/src/cloudflare/types/zero_trust/dlp/datasets/version_create_response.py index 53ae57aad51..9b7eaed191e 100755 --- a/src/cloudflare/types/zero_trust/dlp/datasets/version_create_response.py +++ b/src/cloudflare/types/zero_trust/dlp/datasets/version_create_response.py @@ -14,4 +14,4 @@ class VersionCreateResponse(BaseModel): num_cells: int - upload_status: Literal["empty", "uploading", "processing", "failed", "complete"] + upload_status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"] diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_response.py b/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_response.py index 9a830f80747..137d2d89d0e 100755 --- a/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_response.py +++ b/src/cloudflare/types/zero_trust/dlp/datasets/versions/entry_create_response.py @@ -14,4 +14,4 @@ class EntryCreateResponse(BaseModel): num_cells: int - upload_status: Literal["empty", "uploading", "processing", "failed", "complete"] + upload_status: Literal["empty", "uploading", "pending", "processing", "failed", "complete"] diff --git a/tests/api_resources/api_gateway/operations/test_schema_validation.py b/tests/api_resources/api_gateway/operations/test_schema_validation.py index 2f06a4d9a44..dc8cf1adfbb 100644 --- a/tests/api_resources/api_gateway/operations/test_schema_validation.py +++ b/tests/api_resources/api_gateway/operations/test_schema_validation.py @@ -15,6 +15,8 @@ SchemaValidationUpdateResponse, ) +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,27 +25,32 @@ class TestSchemaValidation: @parametrize def test_method_update(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.operations.schema_validation.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.operations.schema_validation.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.operations.schema_validation.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - mitigation_action="block", - ) + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.operations.schema_validation.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + mitigation_action="block", + ) + assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: - response = client.api_gateway.operations.schema_validation.with_raw_response.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.operations.schema_validation.with_raw_response.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -52,52 +59,57 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: - with client.api_gateway.operations.schema_validation.with_streaming_response.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.operations.schema_validation.with_streaming_response.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = response.parse() - assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) + schema_validation = response.parse() + assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize 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.api_gateway.operations.schema_validation.with_raw_response.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.operations.schema_validation.with_raw_response.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): + client.api_gateway.operations.schema_validation.with_raw_response.update( + operation_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): - client.api_gateway.operations.schema_validation.with_raw_response.update( - operation_id="", + @parametrize + def test_method_edit(self, client: Cloudflare) -> None: + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.operations.schema_validation.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", + settings_multiple_request={ + "3818d821-5901-4147-a474-f5f5aec1d54e": {}, + "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, + }, ) - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.operations.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - settings_multiple_request={ - "3818d821-5901-4147-a474-f5f5aec1d54e": {}, - "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, - }, - ) assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"]) @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.api_gateway.operations.schema_validation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - settings_multiple_request={ - "3818d821-5901-4147-a474-f5f5aec1d54e": {}, - "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, - }, - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.operations.schema_validation.with_raw_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + settings_multiple_request={ + "3818d821-5901-4147-a474-f5f5aec1d54e": {}, + "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, + }, + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,46 +118,51 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.api_gateway.operations.schema_validation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - settings_multiple_request={ - "3818d821-5901-4147-a474-f5f5aec1d54e": {}, - "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - schema_validation = response.parse() - assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"]) + with pytest.warns(DeprecationWarning): + with client.api_gateway.operations.schema_validation.with_streaming_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + settings_multiple_request={ + "3818d821-5901-4147-a474-f5f5aec1d54e": {}, + "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + schema_validation = response.parse() + assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.operations.schema_validation.with_raw_response.edit( - zone_id="", - settings_multiple_request={ - "3818d821-5901-4147-a474-f5f5aec1d54e": {}, - "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, - }, - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.operations.schema_validation.with_raw_response.edit( + zone_id="", + settings_multiple_request={ + "3818d821-5901-4147-a474-f5f5aec1d54e": {}, + "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, + }, + ) @parametrize def test_method_get(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.operations.schema_validation.get( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.operations.schema_validation.get( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.api_gateway.operations.schema_validation.with_raw_response.get( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.operations.schema_validation.with_raw_response.get( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -154,31 +171,33 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.api_gateway.operations.schema_validation.with_streaming_response.get( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.operations.schema_validation.with_streaming_response.get( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = response.parse() - assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) + schema_validation = response.parse() + assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.operations.schema_validation.with_raw_response.get( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.operations.schema_validation.with_raw_response.get( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): - client.api_gateway.operations.schema_validation.with_raw_response.get( - operation_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): + client.api_gateway.operations.schema_validation.with_raw_response.get( + operation_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) class TestAsyncSchemaValidation: @@ -188,27 +207,32 @@ class TestAsyncSchemaValidation: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.operations.schema_validation.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.operations.schema_validation.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.operations.schema_validation.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - mitigation_action="block", - ) + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.operations.schema_validation.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + mitigation_action="block", + ) + assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.operations.schema_validation.with_raw_response.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.operations.schema_validation.with_raw_response.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,52 +241,57 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.operations.schema_validation.with_streaming_response.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.operations.schema_validation.with_streaming_response.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = await response.parse() - assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) + schema_validation = await response.parse() + assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize 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.api_gateway.operations.schema_validation.with_raw_response.update( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.operations.schema_validation.with_raw_response.update( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): + await async_client.api_gateway.operations.schema_validation.with_raw_response.update( + operation_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): - await async_client.api_gateway.operations.schema_validation.with_raw_response.update( - operation_id="", + @parametrize + async def test_method_edit(self, async_client: AsyncCloudflare) -> None: + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.operations.schema_validation.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", + settings_multiple_request={ + "3818d821-5901-4147-a474-f5f5aec1d54e": {}, + "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, + }, ) - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.operations.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - settings_multiple_request={ - "3818d821-5901-4147-a474-f5f5aec1d54e": {}, - "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, - }, - ) assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"]) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.operations.schema_validation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - settings_multiple_request={ - "3818d821-5901-4147-a474-f5f5aec1d54e": {}, - "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, - }, - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.operations.schema_validation.with_raw_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + settings_multiple_request={ + "3818d821-5901-4147-a474-f5f5aec1d54e": {}, + "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, + }, + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -271,46 +300,51 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.operations.schema_validation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - settings_multiple_request={ - "3818d821-5901-4147-a474-f5f5aec1d54e": {}, - "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - schema_validation = await response.parse() - assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"]) + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.operations.schema_validation.with_streaming_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + settings_multiple_request={ + "3818d821-5901-4147-a474-f5f5aec1d54e": {}, + "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + schema_validation = await response.parse() + assert_matches_type(SettingsMultipleRequest, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.operations.schema_validation.with_raw_response.edit( - zone_id="", - settings_multiple_request={ - "3818d821-5901-4147-a474-f5f5aec1d54e": {}, - "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, - }, - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.operations.schema_validation.with_raw_response.edit( + zone_id="", + settings_multiple_request={ + "3818d821-5901-4147-a474-f5f5aec1d54e": {}, + "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {}, + }, + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.operations.schema_validation.get( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.operations.schema_validation.get( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.operations.schema_validation.with_raw_response.get( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -319,28 +353,30 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.operations.schema_validation.with_streaming_response.get( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.operations.schema_validation.with_streaming_response.get( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = await response.parse() - assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) + schema_validation = await response.parse() + assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): - await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - operation_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.operations.schema_validation.with_raw_response.get( + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): + await async_client.api_gateway.operations.schema_validation.with_raw_response.get( + operation_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) diff --git a/tests/api_resources/api_gateway/settings/test_schema_validation.py b/tests/api_resources/api_gateway/settings/test_schema_validation.py index deb95100ec4..cbcf33147af 100644 --- a/tests/api_resources/api_gateway/settings/test_schema_validation.py +++ b/tests/api_resources/api_gateway/settings/test_schema_validation.py @@ -13,6 +13,8 @@ Settings, ) +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,27 +23,32 @@ class TestSchemaValidation: @parametrize def test_method_update(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.settings.schema_validation.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - ) + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.settings.schema_validation.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.settings.schema_validation.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - validation_override_mitigation_action="none", - ) + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.settings.schema_validation.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + validation_override_mitigation_action="none", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: - response = client.api_gateway.settings.schema_validation.with_raw_response.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.settings.schema_validation.with_raw_response.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -50,47 +57,54 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: - with client.api_gateway.settings.schema_validation.with_streaming_response.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.settings.schema_validation.with_streaming_response.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) + schema_validation = response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize 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.api_gateway.settings.schema_validation.with_raw_response.update( - zone_id="", - validation_default_mitigation_action="block", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.settings.schema_validation.with_raw_response.update( + zone_id="", + validation_default_mitigation_action="block", + ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.settings.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.settings.schema_validation.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.settings.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - validation_override_mitigation_action="none", - ) + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.settings.schema_validation.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + validation_override_mitigation_action="none", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.api_gateway.settings.schema_validation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.settings.schema_validation.with_raw_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -99,36 +113,41 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.api_gateway.settings.schema_validation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.settings.schema_validation.with_streaming_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) + schema_validation = response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.settings.schema_validation.with_raw_response.edit( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.settings.schema_validation.with_raw_response.edit( + zone_id="", + ) @parametrize def test_method_get(self, client: Cloudflare) -> None: - schema_validation = client.api_gateway.settings.schema_validation.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + schema_validation = client.api_gateway.settings.schema_validation.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.api_gateway.settings.schema_validation.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.settings.schema_validation.with_raw_response.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -137,23 +156,25 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.api_gateway.settings.schema_validation.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.settings.schema_validation.with_streaming_response.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) + schema_validation = response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.settings.schema_validation.with_raw_response.get( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.settings.schema_validation.with_raw_response.get( + zone_id="", + ) class TestAsyncSchemaValidation: @@ -163,27 +184,32 @@ class TestAsyncSchemaValidation: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.settings.schema_validation.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - ) + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.settings.schema_validation.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.settings.schema_validation.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - validation_override_mitigation_action="none", - ) + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.settings.schema_validation.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + validation_override_mitigation_action="none", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.settings.schema_validation.with_raw_response.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.settings.schema_validation.with_raw_response.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,47 +218,54 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.settings.schema_validation.with_streaming_response.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.settings.schema_validation.with_streaming_response.update( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = await response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) + schema_validation = await response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize 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.api_gateway.settings.schema_validation.with_raw_response.update( - zone_id="", - validation_default_mitigation_action="block", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.settings.schema_validation.with_raw_response.update( + zone_id="", + validation_default_mitigation_action="block", + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.settings.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.settings.schema_validation.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.settings.schema_validation.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_default_mitigation_action="block", - validation_override_mitigation_action="none", - ) + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.settings.schema_validation.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_default_mitigation_action="block", + validation_override_mitigation_action="none", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.settings.schema_validation.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.settings.schema_validation.with_raw_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -241,36 +274,41 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.settings.schema_validation.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.settings.schema_validation.with_streaming_response.edit( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = await response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) + schema_validation = await response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.settings.schema_validation.with_raw_response.edit( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.settings.schema_validation.with_raw_response.edit( + zone_id="", + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: - schema_validation = await async_client.api_gateway.settings.schema_validation.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + schema_validation = await async_client.api_gateway.settings.schema_validation.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Settings, schema_validation, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.settings.schema_validation.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.settings.schema_validation.with_raw_response.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -279,20 +317,22 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.settings.schema_validation.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.settings.schema_validation.with_streaming_response.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - schema_validation = await response.parse() - assert_matches_type(Settings, schema_validation, path=["response"]) + schema_validation = await response.parse() + assert_matches_type(Settings, schema_validation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.settings.schema_validation.with_raw_response.get( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.settings.schema_validation.with_raw_response.get( + zone_id="", + ) diff --git a/tests/api_resources/api_gateway/test_user_schemas.py b/tests/api_resources/api_gateway/test_user_schemas.py index c81163c3318..600a7dc5bde 100644 --- a/tests/api_resources/api_gateway/test_user_schemas.py +++ b/tests/api_resources/api_gateway/test_user_schemas.py @@ -16,6 +16,8 @@ UserSchemaDeleteResponse, ) +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,31 +26,36 @@ class TestUserSchemas: @parametrize def test_method_create(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - file=b"raw file contents", - kind="openapi_v3", - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.create( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + file=b"raw file contents", + kind="openapi_v3", + ) + assert_matches_type(SchemaUpload, user_schema, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - file=b"raw file contents", - kind="openapi_v3", - name="petstore schema", - validation_enabled="true", - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.create( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + file=b"raw file contents", + kind="openapi_v3", + name="petstore schema", + validation_enabled="true", + ) + assert_matches_type(SchemaUpload, user_schema, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: - response = client.api_gateway.user_schemas.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - file=b"raw file contents", - kind="openapi_v3", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.user_schemas.with_raw_response.create( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + file=b"raw file contents", + kind="openapi_v3", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -57,51 +64,58 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: - with client.api_gateway.user_schemas.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - file=b"raw file contents", - kind="openapi_v3", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.user_schemas.with_streaming_response.create( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + file=b"raw file contents", + kind="openapi_v3", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = response.parse() - assert_matches_type(SchemaUpload, user_schema, path=["response"]) + user_schema = response.parse() + assert_matches_type(SchemaUpload, user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize 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.api_gateway.user_schemas.with_raw_response.create( - zone_id="", - file=b"raw file contents", - kind="openapi_v3", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.user_schemas.with_raw_response.create( + zone_id="", + file=b"raw file contents", + kind="openapi_v3", + ) @parametrize def test_method_list(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - omit_source=True, - page=1, - per_page=5, - validation_enabled=True, - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + omit_source=True, + page=1, + per_page=5, + validation_enabled=True, + ) + assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: - response = client.api_gateway.user_schemas.with_raw_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.user_schemas.with_raw_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,38 +124,43 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: - with client.api_gateway.user_schemas.with_streaming_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.user_schemas.with_streaming_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = response.parse() - assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) + user_schema = response.parse() + assert_matches_type(SyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_list(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.user_schemas.with_raw_response.list( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.user_schemas.with_raw_response.list( + zone_id="", + ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.delete( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.delete( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.api_gateway.user_schemas.with_raw_response.delete( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.user_schemas.with_raw_response.delete( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -150,55 +169,62 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.api_gateway.user_schemas.with_streaming_response.delete( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.user_schemas.with_streaming_response.delete( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = response.parse() - assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) + user_schema = response.parse() + assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.user_schemas.with_raw_response.delete( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.user_schemas.with_raw_response.delete( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): - client.api_gateway.user_schemas.with_raw_response.delete( - schema_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): + client.api_gateway.user_schemas.with_raw_response.delete( + schema_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(PublicSchema, user_schema, path=["response"]) @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_enabled=True, - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_enabled=True, + ) + assert_matches_type(PublicSchema, user_schema, path=["response"]) @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.api_gateway.user_schemas.with_raw_response.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.user_schemas.with_raw_response.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -207,55 +233,62 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.api_gateway.user_schemas.with_streaming_response.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.user_schemas.with_streaming_response.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = response.parse() - assert_matches_type(PublicSchema, user_schema, path=["response"]) + user_schema = response.parse() + assert_matches_type(PublicSchema, user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.user_schemas.with_raw_response.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.user_schemas.with_raw_response.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): - client.api_gateway.user_schemas.with_raw_response.edit( - schema_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): + client.api_gateway.user_schemas.with_raw_response.edit( + schema_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) @parametrize def test_method_get(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(PublicSchema, user_schema, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: - user_schema = client.api_gateway.user_schemas.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - omit_source=True, - ) + with pytest.warns(DeprecationWarning): + user_schema = client.api_gateway.user_schemas.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + omit_source=True, + ) + assert_matches_type(PublicSchema, user_schema, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.api_gateway.user_schemas.with_raw_response.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.user_schemas.with_raw_response.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -264,31 +297,33 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.api_gateway.user_schemas.with_streaming_response.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.user_schemas.with_streaming_response.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = response.parse() - assert_matches_type(PublicSchema, user_schema, path=["response"]) + user_schema = response.parse() + assert_matches_type(PublicSchema, user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.user_schemas.with_raw_response.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.user_schemas.with_raw_response.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): - client.api_gateway.user_schemas.with_raw_response.get( - schema_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): + client.api_gateway.user_schemas.with_raw_response.get( + schema_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) class TestAsyncUserSchemas: @@ -298,31 +333,36 @@ class TestAsyncUserSchemas: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - file=b"raw file contents", - kind="openapi_v3", - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.create( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + file=b"raw file contents", + kind="openapi_v3", + ) + assert_matches_type(SchemaUpload, user_schema, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - file=b"raw file contents", - kind="openapi_v3", - name="petstore schema", - validation_enabled="true", - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.create( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + file=b"raw file contents", + kind="openapi_v3", + name="petstore schema", + validation_enabled="true", + ) + assert_matches_type(SchemaUpload, user_schema, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.user_schemas.with_raw_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - file=b"raw file contents", - kind="openapi_v3", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.user_schemas.with_raw_response.create( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + file=b"raw file contents", + kind="openapi_v3", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -331,51 +371,58 @@ 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.api_gateway.user_schemas.with_streaming_response.create( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - file=b"raw file contents", - kind="openapi_v3", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.user_schemas.with_streaming_response.create( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + file=b"raw file contents", + kind="openapi_v3", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = await response.parse() - assert_matches_type(SchemaUpload, user_schema, path=["response"]) + user_schema = await response.parse() + assert_matches_type(SchemaUpload, user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize 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.api_gateway.user_schemas.with_raw_response.create( - zone_id="", - file=b"raw file contents", - kind="openapi_v3", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.user_schemas.with_raw_response.create( + zone_id="", + file=b"raw file contents", + kind="openapi_v3", + ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - omit_source=True, - page=1, - per_page=5, - validation_enabled=True, - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + omit_source=True, + page=1, + per_page=5, + validation_enabled=True, + ) + assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.user_schemas.with_raw_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.user_schemas.with_raw_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -384,38 +431,43 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.user_schemas.with_streaming_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.user_schemas.with_streaming_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) + user_schema = await response.parse() + assert_matches_type(AsyncV4PagePaginationArray[PublicSchema], user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.user_schemas.with_raw_response.list( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.user_schemas.with_raw_response.list( + zone_id="", + ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.delete( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.delete( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.user_schemas.with_raw_response.delete( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.user_schemas.with_raw_response.delete( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -424,55 +476,62 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.user_schemas.with_streaming_response.delete( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.user_schemas.with_streaming_response.delete( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = await response.parse() - assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) + user_schema = await response.parse() + assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.user_schemas.with_raw_response.delete( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.user_schemas.with_raw_response.delete( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): - await async_client.api_gateway.user_schemas.with_raw_response.delete( - schema_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): + await async_client.api_gateway.user_schemas.with_raw_response.delete( + schema_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(PublicSchema, user_schema, path=["response"]) @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - validation_enabled=True, - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + validation_enabled=True, + ) + assert_matches_type(PublicSchema, user_schema, path=["response"]) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.user_schemas.with_raw_response.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.user_schemas.with_raw_response.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -481,55 +540,62 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.user_schemas.with_streaming_response.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.user_schemas.with_streaming_response.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = await response.parse() - assert_matches_type(PublicSchema, user_schema, path=["response"]) + user_schema = await response.parse() + assert_matches_type(PublicSchema, user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.user_schemas.with_raw_response.edit( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.user_schemas.with_raw_response.edit( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): - await async_client.api_gateway.user_schemas.with_raw_response.edit( - schema_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): + await async_client.api_gateway.user_schemas.with_raw_response.edit( + schema_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(PublicSchema, user_schema, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: - user_schema = await async_client.api_gateway.user_schemas.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - omit_source=True, - ) + with pytest.warns(DeprecationWarning): + user_schema = await async_client.api_gateway.user_schemas.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + omit_source=True, + ) + assert_matches_type(PublicSchema, user_schema, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.user_schemas.with_raw_response.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.user_schemas.with_raw_response.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -538,28 +604,30 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.user_schemas.with_streaming_response.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.user_schemas.with_streaming_response.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - user_schema = await response.parse() - assert_matches_type(PublicSchema, user_schema, path=["response"]) + user_schema = await response.parse() + assert_matches_type(PublicSchema, user_schema, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.user_schemas.with_raw_response.get( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): - await async_client.api_gateway.user_schemas.with_raw_response.get( - schema_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.user_schemas.with_raw_response.get( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): + await async_client.api_gateway.user_schemas.with_raw_response.get( + schema_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) diff --git a/tests/api_resources/api_gateway/user_schemas/test_hosts.py b/tests/api_resources/api_gateway/user_schemas/test_hosts.py index ec06d6f17ea..37f783ef2e5 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_hosts.py +++ b/tests/api_resources/api_gateway/user_schemas/test_hosts.py @@ -12,6 +12,8 @@ from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.api_gateway.user_schemas import HostListResponse +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,25 +22,30 @@ class TestHosts: @parametrize def test_method_list(self, client: Cloudflare) -> None: - host = client.api_gateway.user_schemas.hosts.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + host = client.api_gateway.user_schemas.hosts.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(SyncV4PagePaginationArray[HostListResponse], host, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: - host = client.api_gateway.user_schemas.hosts.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - page=1, - per_page=5, - ) + with pytest.warns(DeprecationWarning): + host = client.api_gateway.user_schemas.hosts.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + page=1, + per_page=5, + ) + assert_matches_type(SyncV4PagePaginationArray[HostListResponse], host, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: - response = client.api_gateway.user_schemas.hosts.with_raw_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.user_schemas.hosts.with_raw_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -47,23 +54,25 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: - with client.api_gateway.user_schemas.hosts.with_streaming_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.user_schemas.hosts.with_streaming_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - host = response.parse() - assert_matches_type(SyncV4PagePaginationArray[HostListResponse], host, path=["response"]) + host = response.parse() + assert_matches_type(SyncV4PagePaginationArray[HostListResponse], host, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_list(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.user_schemas.hosts.with_raw_response.list( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.user_schemas.hosts.with_raw_response.list( + zone_id="", + ) class TestAsyncHosts: @@ -73,25 +82,30 @@ class TestAsyncHosts: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: - host = await async_client.api_gateway.user_schemas.hosts.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + host = await async_client.api_gateway.user_schemas.hosts.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(AsyncV4PagePaginationArray[HostListResponse], host, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: - host = await async_client.api_gateway.user_schemas.hosts.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - page=1, - per_page=5, - ) + with pytest.warns(DeprecationWarning): + host = await async_client.api_gateway.user_schemas.hosts.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + page=1, + per_page=5, + ) + assert_matches_type(AsyncV4PagePaginationArray[HostListResponse], host, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.user_schemas.hosts.with_raw_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.user_schemas.hosts.with_raw_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -100,20 +114,22 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.user_schemas.hosts.with_streaming_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.user_schemas.hosts.with_streaming_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - host = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[HostListResponse], host, path=["response"]) + host = await response.parse() + assert_matches_type(AsyncV4PagePaginationArray[HostListResponse], host, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.user_schemas.hosts.with_raw_response.list( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.user_schemas.hosts.with_raw_response.list( + zone_id="", + ) diff --git a/tests/api_resources/api_gateway/user_schemas/test_operations.py b/tests/api_resources/api_gateway/user_schemas/test_operations.py index 6aa3e821042..be56db3c8ee 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_operations.py +++ b/tests/api_resources/api_gateway/user_schemas/test_operations.py @@ -12,6 +12,8 @@ from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.api_gateway.user_schemas import OperationListResponse +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,33 +22,38 @@ class TestOperations: @parametrize def test_method_list(self, client: Cloudflare) -> None: - operation = client.api_gateway.user_schemas.operations.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + operation = client.api_gateway.user_schemas.operations.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: - operation = client.api_gateway.user_schemas.operations.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - endpoint="/api/v1", - feature=["thresholds"], - host=["api.cloudflare.com"], - method=["GET"], - operation_status="new", - page=1, - per_page=5, - ) + with pytest.warns(DeprecationWarning): + operation = client.api_gateway.user_schemas.operations.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + endpoint="/api/v1", + feature=["thresholds"], + host=["api.cloudflare.com"], + method=["GET"], + operation_status="new", + page=1, + per_page=5, + ) + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: - response = client.api_gateway.user_schemas.operations.with_raw_response.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.api_gateway.user_schemas.operations.with_raw_response.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -55,31 +62,33 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: - with client.api_gateway.user_schemas.operations.with_streaming_response.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.api_gateway.user_schemas.operations.with_streaming_response.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - operation = response.parse() - assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) + operation = response.parse() + assert_matches_type(SyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_list(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.api_gateway.user_schemas.operations.with_raw_response.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.api_gateway.user_schemas.operations.with_raw_response.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): - client.api_gateway.user_schemas.operations.with_raw_response.list( - schema_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): + client.api_gateway.user_schemas.operations.with_raw_response.list( + schema_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) class TestAsyncOperations: @@ -89,33 +98,38 @@ class TestAsyncOperations: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: - operation = await async_client.api_gateway.user_schemas.operations.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + operation = await async_client.api_gateway.user_schemas.operations.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: - operation = await async_client.api_gateway.user_schemas.operations.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - endpoint="/api/v1", - feature=["thresholds"], - host=["api.cloudflare.com"], - method=["GET"], - operation_status="new", - page=1, - per_page=5, - ) + with pytest.warns(DeprecationWarning): + operation = await async_client.api_gateway.user_schemas.operations.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + endpoint="/api/v1", + feature=["thresholds"], + host=["api.cloudflare.com"], + method=["GET"], + operation_status="new", + page=1, + per_page=5, + ) + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: - response = await async_client.api_gateway.user_schemas.operations.with_raw_response.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.api_gateway.user_schemas.operations.with_raw_response.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -124,28 +138,30 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: - async with async_client.api_gateway.user_schemas.operations.with_streaming_response.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.api_gateway.user_schemas.operations.with_streaming_response.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - operation = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) + operation = await response.parse() + assert_matches_type(AsyncV4PagePaginationArray[OperationListResponse], operation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.api_gateway.user_schemas.operations.with_raw_response.list( - schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zone_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): - await async_client.api_gateway.user_schemas.operations.with_raw_response.list( - schema_id="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.api_gateway.user_schemas.operations.with_raw_response.list( + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + zone_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): + await async_client.api_gateway.user_schemas.operations.with_raw_response.list( + schema_id="", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) diff --git a/tests/api_resources/browser_rendering/test_pdf.py b/tests/api_resources/browser_rendering/test_pdf.py index 511b92e71f1..63c118cff58 100644 --- a/tests/api_resources/browser_rendering/test_pdf.py +++ b/tests/api_resources/browser_rendering/test_pdf.py @@ -94,6 +94,29 @@ def test_method_create_with_all_params(self, client: Cloudflare, respx_mock: Moc "wait_until": "load", }, html="x", + pdf_options={ + "display_header_footer": True, + "footer_template": "footerTemplate", + "format": "letter", + "header_template": "headerTemplate", + "height": "string", + "landscape": True, + "margin": { + "bottom": "string", + "left": "string", + "right": "string", + "top": "string", + }, + "omit_background": True, + "outline": True, + "page_ranges": "pageRanges", + "prefer_css_page_size": True, + "print_background": True, + "scale": 0.1, + "tagged": True, + "timeout": 0, + "width": "string", + }, reject_request_pattern=["string"], reject_resource_types=["document"], set_extra_http_headers={"foo": "string"}, @@ -240,6 +263,29 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "wait_until": "load", }, html="x", + pdf_options={ + "display_header_footer": True, + "footer_template": "footerTemplate", + "format": "letter", + "header_template": "headerTemplate", + "height": "string", + "landscape": True, + "margin": { + "bottom": "string", + "left": "string", + "right": "string", + "top": "string", + }, + "omit_background": True, + "outline": True, + "page_ranges": "pageRanges", + "prefer_css_page_size": True, + "print_background": True, + "scale": 0.1, + "tagged": True, + "timeout": 0, + "width": "string", + }, reject_request_pattern=["string"], reject_resource_types=["document"], set_extra_http_headers={"foo": "string"}, From ee58942023e049bf304347b0dc365dfd5f3e070f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 15:07:40 +0000 Subject: [PATCH 222/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2da7945ba02..09d8d41aec3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a8a1dc48cc130613e263a41bd6e8da15c355627a9f65b30baefb6d39760b673e.yml -openapi_spec_hash: 62e9cd89bc63bb061215feec9bc9f038 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d319fd338a14e2d95bc5f6083b1dee103e3046630646cbf2d24b635a99b043c.yml +openapi_spec_hash: 9c4ce0f2db2c1747b0a321c9839dc7b3 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From df4f8a72ec1956551955c59cbc5d3b7dfa96d25e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:44:12 +0000 Subject: [PATCH 223/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 09d8d41aec3..2da7945ba02 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d319fd338a14e2d95bc5f6083b1dee103e3046630646cbf2d24b635a99b043c.yml -openapi_spec_hash: 9c4ce0f2db2c1747b0a321c9839dc7b3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a8a1dc48cc130613e263a41bd6e8da15c355627a9f65b30baefb6d39760b673e.yml +openapi_spec_hash: 62e9cd89bc63bb061215feec9bc9f038 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From d2f4a44783848398b6fab056b9839b37e10d8cd5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:12:01 +0000 Subject: [PATCH 224/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2da7945ba02..5a74bbf4c89 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a8a1dc48cc130613e263a41bd6e8da15c355627a9f65b30baefb6d39760b673e.yml -openapi_spec_hash: 62e9cd89bc63bb061215feec9bc9f038 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f8ebdd366bf24068f45f648f861a4e690f0ac40931a47433018d05cbfed66c22.yml +openapi_spec_hash: 4aac8051f07b4cbf9efa808dca181fcb config_hash: 18e6b76de8b719dd7c9c28614ac32643 From b3fe225549bbd770d358c97be36941789e91bb5a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:24:22 +0000 Subject: [PATCH 225/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5a74bbf4c89..2d58dea5fef 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f8ebdd366bf24068f45f648f861a4e690f0ac40931a47433018d05cbfed66c22.yml -openapi_spec_hash: 4aac8051f07b4cbf9efa808dca181fcb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ef61498e6e48cf3ab3714e47d6d1135f1ae52734c4c711c41aacd0cb3bf5bdb6.yml +openapi_spec_hash: b433c40658ad9497fffc91c56ed1b310 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 2c4373c188018c15bfb0ba8fab3f28a8306b5126 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:38:33 +0000 Subject: [PATCH 226/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2d58dea5fef..e1a8e668bee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ef61498e6e48cf3ab3714e47d6d1135f1ae52734c4c711c41aacd0cb3bf5bdb6.yml -openapi_spec_hash: b433c40658ad9497fffc91c56ed1b310 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b913ce68f68b64302bee524fbdc459f6e6d1f087a90c661041a34b15d175c56e.yml +openapi_spec_hash: 334401353b8be151fe90a96888b2357a config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 62ff7055647bf9a123bdd0a3133089859dcec3e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:54:18 +0000 Subject: [PATCH 227/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e1a8e668bee..d07243d0d8f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b913ce68f68b64302bee524fbdc459f6e6d1f087a90c661041a34b15d175c56e.yml -openapi_spec_hash: 334401353b8be151fe90a96888b2357a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9bc93f9df081f55843306433133d6add8d79667b7df6d4d2e9b62b0246566301.yml +openapi_spec_hash: 6448ebcb6744955340de7ffb6c5839ed config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 3dbbe9c6d42f498d303173fc5bab1c4efba3a8a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 18:06:25 +0000 Subject: [PATCH 228/392] feat(api): api update --- .stats.yml | 4 ++-- .../access/applications/applications.py | 8 ++++++++ .../access/application_list_params.py | 3 +++ .../access/applications/access_rule.py | 18 ++++++++++++++++++ .../access/applications/access_rule_param.py | 18 ++++++++++++++++++ .../zero_trust/access/test_applications.py | 2 ++ 6 files changed, 51 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d07243d0d8f..25a8760440b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9bc93f9df081f55843306433133d6add8d79667b7df6d4d2e9b62b0246566301.yml -openapi_spec_hash: 6448ebcb6744955340de7ffb6c5839ed +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89b2a01eec6a13b3b9080a223928986ca8413816539f6b527e240db5f8f4d8ef.yml +openapi_spec_hash: 89ab55e868b69507d29d91bb6ed4b64a config_hash: 18e6b76de8b719dd7c9c28614ac32643 diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index a9f48d3a14c..726acda86ad 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -2399,6 +2399,7 @@ def list( zone_id: str | NotGiven = NOT_GIVEN, aud: str | NotGiven = NOT_GIVEN, domain: str | NotGiven = NOT_GIVEN, + exact: bool | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -2420,6 +2421,8 @@ def list( domain: The domain of the app. + exact: True for only exact string matches against passed name/domain query parameters. + name: The name of the app. search: Search for apps by other listed query parameters. @@ -2456,6 +2459,7 @@ def list( { "aud": aud, "domain": domain, + "exact": exact, "name": name, "search": search, }, @@ -4960,6 +4964,7 @@ def list( zone_id: str | NotGiven = NOT_GIVEN, aud: str | NotGiven = NOT_GIVEN, domain: str | NotGiven = NOT_GIVEN, + exact: bool | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -4981,6 +4986,8 @@ def list( domain: The domain of the app. + exact: True for only exact string matches against passed name/domain query parameters. + name: The name of the app. search: Search for apps by other listed query parameters. @@ -5017,6 +5024,7 @@ def list( { "aud": aud, "domain": domain, + "exact": exact, "name": name, "search": search, }, diff --git a/src/cloudflare/types/zero_trust/access/application_list_params.py b/src/cloudflare/types/zero_trust/access/application_list_params.py index 8f3ab7e19c9..a44c9eef463 100644 --- a/src/cloudflare/types/zero_trust/access/application_list_params.py +++ b/src/cloudflare/types/zero_trust/access/application_list_params.py @@ -20,6 +20,9 @@ class ApplicationListParams(TypedDict, total=False): domain: str """The domain of the app.""" + exact: bool + """True for only exact string matches against passed name/domain query parameters.""" + name: str """The name of the app.""" diff --git a/src/cloudflare/types/zero_trust/access/applications/access_rule.py b/src/cloudflare/types/zero_trust/access/applications/access_rule.py index 09100b8aa59..2f80cd6f4de 100644 --- a/src/cloudflare/types/zero_trust/access/applications/access_rule.py +++ b/src/cloudflare/types/zero_trust/access/applications/access_rule.py @@ -32,6 +32,8 @@ "AccessCommonNameRuleCommonName", "AccessLoginMethodRule", "AccessLoginMethodRuleLoginMethod", + "AccessOIDCClaimRule", + "AccessOIDCClaimRuleOIDC", ] @@ -68,6 +70,21 @@ class AccessLoginMethodRule(BaseModel): login_method: AccessLoginMethodRuleLoginMethod +class AccessOIDCClaimRuleOIDC(BaseModel): + claim_name: str + """The name of the OIDC claim.""" + + claim_value: str + """The OIDC claim value to look for.""" + + identity_provider_id: str + """The ID of your OIDC identity provider.""" + + +class AccessOIDCClaimRule(BaseModel): + oidc: AccessOIDCClaimRuleOIDC + + AccessRule: TypeAlias = Union[ GroupRule, AnyValidServiceTokenRule, @@ -90,5 +107,6 @@ class AccessLoginMethodRule(BaseModel): IPRule, OktaGroupRule, SAMLGroupRule, + AccessOIDCClaimRule, ServiceTokenRule, ] diff --git a/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py b/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py index 0e33f24de62..377206a0903 100644 --- a/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py +++ b/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py @@ -33,6 +33,8 @@ "AccessCommonNameRuleCommonName", "AccessLoginMethodRule", "AccessLoginMethodRuleLoginMethod", + "AccessOIDCClaimRule", + "AccessOIDCClaimRuleOIDC", ] @@ -69,6 +71,21 @@ class AccessLoginMethodRule(TypedDict, total=False): login_method: Required[AccessLoginMethodRuleLoginMethod] +class AccessOIDCClaimRuleOIDC(TypedDict, total=False): + claim_name: Required[str] + """The name of the OIDC claim.""" + + claim_value: Required[str] + """The OIDC claim value to look for.""" + + identity_provider_id: Required[str] + """The ID of your OIDC identity provider.""" + + +class AccessOIDCClaimRule(TypedDict, total=False): + oidc: Required[AccessOIDCClaimRuleOIDC] + + AccessRuleParam: TypeAlias = Union[ GroupRuleParam, AnyValidServiceTokenRuleParam, @@ -91,5 +108,6 @@ class AccessLoginMethodRule(TypedDict, total=False): IPRuleParam, OktaGroupRuleParam, SAMLGroupRuleParam, + AccessOIDCClaimRule, ServiceTokenRuleParam, ] diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 32545b7e0f6..deddd4bc9f2 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -2909,6 +2909,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="account_id", aud="aud", domain="domain", + exact=True, name="name", search="search", ) @@ -6045,6 +6046,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="account_id", aud="aud", domain="domain", + exact=True, name="name", search="search", ) From f25c8ce630f4d503091ba7b4083bceddfefc3b21 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 18:21:24 +0000 Subject: [PATCH 229/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 25a8760440b..aa01a328407 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-89b2a01eec6a13b3b9080a223928986ca8413816539f6b527e240db5f8f4d8ef.yml -openapi_spec_hash: 89ab55e868b69507d29d91bb6ed4b64a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c876b177dbba3599b1318016d08090007ae62b19c8b16a3ca5c1f8b2f87c6da.yml +openapi_spec_hash: 29e6443234745412b8d74e8728eb477c config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 278a7997b8107d50031886fe09b0039faed7d46c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 18:34:40 +0000 Subject: [PATCH 230/392] feat(api): api update --- .stats.yml | 4 +- api.md | 6 +- .../accounts/tokens/permission_groups.py | 95 ++++++++++++++++--- .../user/tokens/permission_groups.py | 64 ++++++++++++- .../types/accounts/tokens/__init__.py | 2 + .../tokens/permission_group_get_params.py | 18 ++++ .../tokens/permission_group_get_response.py | 9 +- .../tokens/permission_group_list_params.py | 18 ++++ src/cloudflare/types/user/tokens/__init__.py | 1 + .../tokens/permission_group_list_params.py | 15 +++ .../accounts/tokens/test_permission_groups.py | 59 ++++++++++-- .../user/tokens/test_permission_groups.py | 18 ++++ 12 files changed, 276 insertions(+), 33 deletions(-) create mode 100644 src/cloudflare/types/accounts/tokens/permission_group_get_params.py create mode 100644 src/cloudflare/types/accounts/tokens/permission_group_list_params.py create mode 100644 src/cloudflare/types/user/tokens/permission_group_list_params.py diff --git a/.stats.yml b/.stats.yml index aa01a328407..455fdf734e2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c876b177dbba3599b1318016d08090007ae62b19c8b16a3ca5c1f8b2f87c6da.yml -openapi_spec_hash: 29e6443234745412b8d74e8728eb477c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-39e4b2fb9790bb8423896c1bb946e7678e6b92593a16dbd5ae95b9a362dc3122.yml +openapi_spec_hash: 6c754370b2fe531dcc849359b69d26c9 config_hash: 18e6b76de8b719dd7c9c28614ac32643 diff --git a/api.md b/api.md index b84941a1401..99f3edf1b5e 100644 --- a/api.md +++ b/api.md @@ -110,8 +110,8 @@ from cloudflare.types.accounts.tokens import PermissionGroupListResponse, Permis Methods: -- client.accounts.tokens.permission_groups.list(\*, account_id) -> SyncSinglePage[PermissionGroupListResponse] -- client.accounts.tokens.permission_groups.get(\*, account_id) -> SyncSinglePage[PermissionGroupGetResponse] +- client.accounts.tokens.permission_groups.list(\*, account_id, \*\*params) -> SyncSinglePage[PermissionGroupListResponse] +- client.accounts.tokens.permission_groups.get(\*, account_id, \*\*params) -> Optional[PermissionGroupGetResponse] ### Value @@ -297,7 +297,7 @@ from cloudflare.types.user.tokens import PermissionGroupListResponse Methods: -- client.user.tokens.permission_groups.list() -> SyncSinglePage[PermissionGroupListResponse] +- client.user.tokens.permission_groups.list(\*\*params) -> SyncSinglePage[PermissionGroupListResponse] ### Value diff --git a/src/cloudflare/resources/accounts/tokens/permission_groups.py b/src/cloudflare/resources/accounts/tokens/permission_groups.py index d98d5235ce0..34419575c03 100644 --- a/src/cloudflare/resources/accounts/tokens/permission_groups.py +++ b/src/cloudflare/resources/accounts/tokens/permission_groups.py @@ -2,9 +2,12 @@ from __future__ import annotations +from typing import Type, Optional, cast + import httpx from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -13,8 +16,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) +from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import AsyncPaginator, make_request_options +from ....types.accounts.tokens import permission_group_get_params, permission_group_list_params from ....types.accounts.tokens.permission_group_get_response import PermissionGroupGetResponse from ....types.accounts.tokens.permission_group_list_response import PermissionGroupListResponse @@ -45,6 +50,8 @@ def list( self, *, account_id: str, + name: str | NotGiven = NOT_GIVEN, + scope: 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, @@ -58,6 +65,10 @@ def list( Args: account_id: Account identifier tag. + name: Filter by the name of the permission group. The value must be URL-encoded. + + scope: Filter by the scope of the permission group. The value must be URL-encoded. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -72,7 +83,17 @@ def list( f"/accounts/{account_id}/tokens/permission_groups", page=SyncSinglePage[PermissionGroupListResponse], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "name": name, + "scope": scope, + }, + permission_group_list_params.PermissionGroupListParams, + ), ), model=PermissionGroupListResponse, ) @@ -81,19 +102,25 @@ def get( self, *, account_id: str, + name: str | NotGiven = NOT_GIVEN, + scope: 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncSinglePage[PermissionGroupGetResponse]: + ) -> Optional[PermissionGroupGetResponse]: """ Find all available permission groups for Account Owned API Tokens Args: account_id: Account identifier tag. + name: Filter by the name of the permission group. The value must be URL-encoded. + + scope: Filter by the scope of the permission group. The value must be URL-encoded. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -104,13 +131,23 @@ def get( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get_api_list( + return self._get( f"/accounts/{account_id}/tokens/permission_groups", - page=SyncSinglePage[PermissionGroupGetResponse], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "name": name, + "scope": scope, + }, + permission_group_get_params.PermissionGroupGetParams, + ), + post_parser=ResultWrapper[Optional[PermissionGroupGetResponse]]._unwrapper, ), - model=PermissionGroupGetResponse, + cast_to=cast(Type[Optional[PermissionGroupGetResponse]], ResultWrapper[PermissionGroupGetResponse]), ) @@ -138,6 +175,8 @@ def list( self, *, account_id: str, + name: str | NotGiven = NOT_GIVEN, + scope: 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, @@ -151,6 +190,10 @@ def list( Args: account_id: Account identifier tag. + name: Filter by the name of the permission group. The value must be URL-encoded. + + scope: Filter by the scope of the permission group. The value must be URL-encoded. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -165,28 +208,44 @@ def list( f"/accounts/{account_id}/tokens/permission_groups", page=AsyncSinglePage[PermissionGroupListResponse], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "name": name, + "scope": scope, + }, + permission_group_list_params.PermissionGroupListParams, + ), ), model=PermissionGroupListResponse, ) - def get( + async def get( self, *, account_id: str, + name: str | NotGiven = NOT_GIVEN, + scope: 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[PermissionGroupGetResponse, AsyncSinglePage[PermissionGroupGetResponse]]: + ) -> Optional[PermissionGroupGetResponse]: """ Find all available permission groups for Account Owned API Tokens Args: account_id: Account identifier tag. + name: Filter by the name of the permission group. The value must be URL-encoded. + + scope: Filter by the scope of the permission group. The value must be URL-encoded. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -197,13 +256,23 @@ def get( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get_api_list( + return await self._get( f"/accounts/{account_id}/tokens/permission_groups", - page=AsyncSinglePage[PermissionGroupGetResponse], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "name": name, + "scope": scope, + }, + permission_group_get_params.PermissionGroupGetParams, + ), + post_parser=ResultWrapper[Optional[PermissionGroupGetResponse]]._unwrapper, ), - model=PermissionGroupGetResponse, + cast_to=cast(Type[Optional[PermissionGroupGetResponse]], ResultWrapper[PermissionGroupGetResponse]), ) diff --git a/src/cloudflare/resources/user/tokens/permission_groups.py b/src/cloudflare/resources/user/tokens/permission_groups.py index 87479a4720e..ba2696ca82b 100644 --- a/src/cloudflare/resources/user/tokens/permission_groups.py +++ b/src/cloudflare/resources/user/tokens/permission_groups.py @@ -5,6 +5,7 @@ import httpx from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -15,6 +16,7 @@ ) from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import AsyncPaginator, make_request_options +from ....types.user.tokens import permission_group_list_params from ....types.user.tokens.permission_group_list_response import PermissionGroupListResponse __all__ = ["PermissionGroupsResource", "AsyncPermissionGroupsResource"] @@ -43,6 +45,8 @@ def with_streaming_response(self) -> PermissionGroupsResourceWithStreamingRespon def list( self, *, + name: str | NotGiven = NOT_GIVEN, + scope: 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, @@ -50,12 +54,37 @@ def list( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[PermissionGroupListResponse]: - """Find all available permission groups for API Tokens""" + """ + Find all available permission groups for API Tokens + + Args: + name: Filter by the name of the permission group. The value must be URL-encoded. + + scope: Filter by the scope of the permission group. The value must be URL-encoded. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ return self._get_api_list( "/user/tokens/permission_groups", page=SyncSinglePage[PermissionGroupListResponse], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "name": name, + "scope": scope, + }, + permission_group_list_params.PermissionGroupListParams, + ), ), model=PermissionGroupListResponse, ) @@ -84,6 +113,8 @@ def with_streaming_response(self) -> AsyncPermissionGroupsResourceWithStreamingR def list( self, *, + name: str | NotGiven = NOT_GIVEN, + scope: 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, @@ -91,12 +122,37 @@ def list( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[PermissionGroupListResponse, AsyncSinglePage[PermissionGroupListResponse]]: - """Find all available permission groups for API Tokens""" + """ + Find all available permission groups for API Tokens + + Args: + name: Filter by the name of the permission group. The value must be URL-encoded. + + scope: Filter by the scope of the permission group. The value must be URL-encoded. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ return self._get_api_list( "/user/tokens/permission_groups", page=AsyncSinglePage[PermissionGroupListResponse], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "name": name, + "scope": scope, + }, + permission_group_list_params.PermissionGroupListParams, + ), ), model=PermissionGroupListResponse, ) diff --git a/src/cloudflare/types/accounts/tokens/__init__.py b/src/cloudflare/types/accounts/tokens/__init__.py index bc8d7e3d210..249ef18bc57 100644 --- a/src/cloudflare/types/accounts/tokens/__init__.py +++ b/src/cloudflare/types/accounts/tokens/__init__.py @@ -3,5 +3,7 @@ from __future__ import annotations from .value_update_params import ValueUpdateParams as ValueUpdateParams +from .permission_group_get_params import PermissionGroupGetParams as PermissionGroupGetParams +from .permission_group_list_params import PermissionGroupListParams as PermissionGroupListParams from .permission_group_get_response import PermissionGroupGetResponse as PermissionGroupGetResponse from .permission_group_list_response import PermissionGroupListResponse as PermissionGroupListResponse diff --git a/src/cloudflare/types/accounts/tokens/permission_group_get_params.py b/src/cloudflare/types/accounts/tokens/permission_group_get_params.py new file mode 100644 index 00000000000..c91ca4db066 --- /dev/null +++ b/src/cloudflare/types/accounts/tokens/permission_group_get_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["PermissionGroupGetParams"] + + +class PermissionGroupGetParams(TypedDict, total=False): + account_id: Required[str] + """Account identifier tag.""" + + name: str + """Filter by the name of the permission group. The value must be URL-encoded.""" + + scope: str + """Filter by the scope of the permission group. The value must be URL-encoded.""" diff --git a/src/cloudflare/types/accounts/tokens/permission_group_get_response.py b/src/cloudflare/types/accounts/tokens/permission_group_get_response.py index f7b20d1bcfb..81d6a1d88ba 100644 --- a/src/cloudflare/types/accounts/tokens/permission_group_get_response.py +++ b/src/cloudflare/types/accounts/tokens/permission_group_get_response.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional -from typing_extensions import Literal +from typing_extensions import Literal, TypeAlias from ...._models import BaseModel -__all__ = ["PermissionGroupGetResponse"] +__all__ = ["PermissionGroupGetResponse", "PermissionGroupGetResponseItem"] -class PermissionGroupGetResponse(BaseModel): +class PermissionGroupGetResponseItem(BaseModel): id: Optional[str] = None """Public ID.""" @@ -26,3 +26,6 @@ class PermissionGroupGetResponse(BaseModel): ] ] = None """Resources to which the Permission Group is scoped""" + + +PermissionGroupGetResponse: TypeAlias = List[PermissionGroupGetResponseItem] diff --git a/src/cloudflare/types/accounts/tokens/permission_group_list_params.py b/src/cloudflare/types/accounts/tokens/permission_group_list_params.py new file mode 100644 index 00000000000..3a3000cb8a6 --- /dev/null +++ b/src/cloudflare/types/accounts/tokens/permission_group_list_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["PermissionGroupListParams"] + + +class PermissionGroupListParams(TypedDict, total=False): + account_id: Required[str] + """Account identifier tag.""" + + name: str + """Filter by the name of the permission group. The value must be URL-encoded.""" + + scope: str + """Filter by the scope of the permission group. The value must be URL-encoded.""" diff --git a/src/cloudflare/types/user/tokens/__init__.py b/src/cloudflare/types/user/tokens/__init__.py index 9d03684a586..1f7905cdafa 100644 --- a/src/cloudflare/types/user/tokens/__init__.py +++ b/src/cloudflare/types/user/tokens/__init__.py @@ -3,4 +3,5 @@ from __future__ import annotations from .value_update_params import ValueUpdateParams as ValueUpdateParams +from .permission_group_list_params import PermissionGroupListParams as PermissionGroupListParams from .permission_group_list_response import PermissionGroupListResponse as PermissionGroupListResponse diff --git a/src/cloudflare/types/user/tokens/permission_group_list_params.py b/src/cloudflare/types/user/tokens/permission_group_list_params.py new file mode 100644 index 00000000000..da8fb1f0cf7 --- /dev/null +++ b/src/cloudflare/types/user/tokens/permission_group_list_params.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["PermissionGroupListParams"] + + +class PermissionGroupListParams(TypedDict, total=False): + name: str + """Filter by the name of the permission group. The value must be URL-encoded.""" + + scope: str + """Filter by the scope of the permission group. The value must be URL-encoded.""" diff --git a/tests/api_resources/accounts/tokens/test_permission_groups.py b/tests/api_resources/accounts/tokens/test_permission_groups.py index e8398ef2527..fd4d295b70e 100644 --- a/tests/api_resources/accounts/tokens/test_permission_groups.py +++ b/tests/api_resources/accounts/tokens/test_permission_groups.py @@ -3,14 +3,17 @@ from __future__ import annotations import os -from typing import Any, cast +from typing import Any, Optional, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.accounts.tokens import PermissionGroupGetResponse, PermissionGroupListResponse +from cloudflare.types.accounts.tokens import ( + PermissionGroupGetResponse, + PermissionGroupListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,6 +29,16 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + permission_group = client.accounts.tokens.permission_groups.list( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="Account%20Settings%20Write", + scope="com.cloudflare.api.account.zone", + ) + assert_matches_type(SyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -66,7 +79,17 @@ def test_method_get(self, client: Cloudflare) -> None: permission_group = client.accounts.tokens.permission_groups.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"]) + assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_method_get_with_all_params(self, client: Cloudflare) -> None: + permission_group = client.accounts.tokens.permission_groups.get( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="Account%20Settings%20Write", + scope="com.cloudflare.api.account.zone", + ) + assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"]) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -78,7 +101,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission_group = response.parse() - assert_matches_type(SyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"]) + assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"]) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -90,7 +113,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission_group = response.parse() - assert_matches_type(SyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"]) + assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,6 +139,16 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + permission_group = await async_client.accounts.tokens.permission_groups.list( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="Account%20Settings%20Write", + scope="com.cloudflare.api.account.zone", + ) + assert_matches_type(AsyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @@ -156,7 +189,17 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: permission_group = await async_client.accounts.tokens.permission_groups.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"]) + assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: + permission_group = await async_client.accounts.tokens.permission_groups.get( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + name="Account%20Settings%20Write", + scope="com.cloudflare.api.account.zone", + ) + assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"]) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -168,7 +211,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission_group = await response.parse() - assert_matches_type(AsyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"]) + assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"]) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize @@ -180,7 +223,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission_group = await response.parse() - assert_matches_type(AsyncSinglePage[PermissionGroupGetResponse], permission_group, path=["response"]) + assert_matches_type(Optional[PermissionGroupGetResponse], permission_group, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/tokens/test_permission_groups.py b/tests/api_resources/user/tokens/test_permission_groups.py index 185dbfb8771..3e813ab1b1e 100644 --- a/tests/api_resources/user/tokens/test_permission_groups.py +++ b/tests/api_resources/user/tokens/test_permission_groups.py @@ -24,6 +24,15 @@ def test_method_list(self, client: Cloudflare) -> None: permission_group = client.user.tokens.permission_groups.list() assert_matches_type(SyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + permission_group = client.user.tokens.permission_groups.list( + name="Account%20Settings%20Write", + scope="com.cloudflare.api.account.zone", + ) + assert_matches_type(SyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -58,6 +67,15 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: permission_group = await async_client.user.tokens.permission_groups.list() assert_matches_type(AsyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken test") + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + permission_group = await async_client.user.tokens.permission_groups.list( + name="Account%20Settings%20Write", + scope="com.cloudflare.api.account.zone", + ) + assert_matches_type(AsyncSinglePage[PermissionGroupListResponse], permission_group, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: From 49cb3e3550f9ebfb232ae3ed29f420cf9a283508 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 18:50:36 +0000 Subject: [PATCH 231/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 455fdf734e2..264a8746eea 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-39e4b2fb9790bb8423896c1bb946e7678e6b92593a16dbd5ae95b9a362dc3122.yml -openapi_spec_hash: 6c754370b2fe531dcc849359b69d26c9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a3b681bee135b9d153bb92127dc3ed9f1f55033953737214419c85ae5892fb2c.yml +openapi_spec_hash: efe3f6cc1d874e5c1aa5918c39a0d123 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From f636ca67ef291c643ab3ee4e6c5cd89896d441a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:26:58 +0000 Subject: [PATCH 232/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 264a8746eea..1de4182c864 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a3b681bee135b9d153bb92127dc3ed9f1f55033953737214419c85ae5892fb2c.yml -openapi_spec_hash: efe3f6cc1d874e5c1aa5918c39a0d123 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-251ed12b6423354ba79225e0857dd51db560c1d2daff94c3c1983556660db7b6.yml +openapi_spec_hash: 83b01005ba0731c81b91162be38b3323 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From ac33445264f26137c753797164541bdaf83d56ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 20:33:12 +0000 Subject: [PATCH 233/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1de4182c864..a64f23b69e1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-251ed12b6423354ba79225e0857dd51db560c1d2daff94c3c1983556660db7b6.yml -openapi_spec_hash: 83b01005ba0731c81b91162be38b3323 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d90cb3386d14f460381aa94724ad55621900413fe23e953f5ecdd69fc5ed0df.yml +openapi_spec_hash: fe510d5f149f7547ccd8e48868070f2a config_hash: 18e6b76de8b719dd7c9c28614ac32643 From f1eb29fcb85dae39fb2c95da5b31aba646ebaa41 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 21:41:03 +0000 Subject: [PATCH 234/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a64f23b69e1..da9289050eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d90cb3386d14f460381aa94724ad55621900413fe23e953f5ecdd69fc5ed0df.yml -openapi_spec_hash: fe510d5f149f7547ccd8e48868070f2a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4b8bed05363482407f265490661f4d78d1d8d4821b43f3e91d20749c0e8130ea.yml +openapi_spec_hash: 5a7b63a8bce5be014792698e251fdcaa config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 0497d11708222ebb0cf0fd37d364298b634c629f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 21:47:25 +0000 Subject: [PATCH 235/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index da9289050eb..76a103521c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4b8bed05363482407f265490661f4d78d1d8d4821b43f3e91d20749c0e8130ea.yml -openapi_spec_hash: 5a7b63a8bce5be014792698e251fdcaa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1a98b9f95587a0e38776f672dbd11190953a8692def207f7b3327904bb19e1d4.yml +openapi_spec_hash: add4314e0b788c13f0cd52a4d787496f config_hash: 18e6b76de8b719dd7c9c28614ac32643 From b7b2ddfd07252a2ea62d80e0da3ae90ef3ed0982 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 22:25:57 +0000 Subject: [PATCH 236/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 76a103521c8..609095bcb48 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1a98b9f95587a0e38776f672dbd11190953a8692def207f7b3327904bb19e1d4.yml -openapi_spec_hash: add4314e0b788c13f0cd52a4d787496f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07207b3fad263df8906fe4eb8aad770d1d44181bb34f98102bd0d69334511a12.yml +openapi_spec_hash: 4fa0f27cc1ed815d3b4edc58bff756b1 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From ff426dda03e0af90e8c1b9029a460a8a4c8f9c48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:19:33 +0000 Subject: [PATCH 237/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 609095bcb48..75dcdf540d5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07207b3fad263df8906fe4eb8aad770d1d44181bb34f98102bd0d69334511a12.yml -openapi_spec_hash: 4fa0f27cc1ed815d3b4edc58bff756b1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ef30ed8694b8304be8d6980c14d8e8848f9677dabe2b65377ae9eafc741c18be.yml +openapi_spec_hash: 83173cc84c5e1c69e64d10b8a6643a28 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 9fd5b05826cc886159bcf2cf684277ec45e9fc99 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 00:39:41 +0000 Subject: [PATCH 238/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 75dcdf540d5..d323ffc5a07 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ef30ed8694b8304be8d6980c14d8e8848f9677dabe2b65377ae9eafc741c18be.yml -openapi_spec_hash: 83173cc84c5e1c69e64d10b8a6643a28 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fad9c5480e13ca1d4076001dab8dc87f59fd56c28ce34ada2a1df9396d072577.yml +openapi_spec_hash: d8af8282a93d93cd1e5d65fbfa542d6d config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 2b643f521ab50b7d50cd313f38a1bd758229e941 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 06:12:00 +0000 Subject: [PATCH 239/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d323ffc5a07..a98b52cd086 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fad9c5480e13ca1d4076001dab8dc87f59fd56c28ce34ada2a1df9396d072577.yml -openapi_spec_hash: d8af8282a93d93cd1e5d65fbfa542d6d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2ce645f71c916d17c955b81d879fc83368f9d990c7d6e5d6ede0cafd0df8808b.yml +openapi_spec_hash: bc2df7f3ef0baaa97752a5e2507c6567 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From a71948efc6edb4d10edad0b73085406c6e10b9c5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 09:58:13 +0000 Subject: [PATCH 240/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a98b52cd086..eae794e82e0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2ce645f71c916d17c955b81d879fc83368f9d990c7d6e5d6ede0cafd0df8808b.yml -openapi_spec_hash: bc2df7f3ef0baaa97752a5e2507c6567 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-320c56f6dadc7c93e15e8f14284b2d5aeb0c2928b348ee231b0ba95cda018766.yml +openapi_spec_hash: ec1d30a07ce77828289a6936c0020e8f config_hash: 18e6b76de8b719dd7c9c28614ac32643 From c6096aeb9836a7d19c358d0a0217649d9e5455dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 12:42:33 +0000 Subject: [PATCH 241/392] feat(api): api update --- .stats.yml | 4 +- api.md | 5 +- .../resources/rules/lists/bulk_operations.py | 48 ++- src/cloudflare/resources/rules/lists/items.py | 295 +++++++----------- src/cloudflare/resources/rules/lists/lists.py | 273 +++++++--------- src/cloudflare/types/rules/__init__.py | 2 +- .../types/rules/list_create_response.py | 41 +-- .../types/rules/list_delete_response.py | 10 +- .../types/rules/list_get_response.py | 41 +-- .../types/rules/list_list_response.py | 8 - .../types/rules/list_update_response.py | 41 +-- .../lists/bulk_operation_get_response.py | 29 +- .../types/rules/lists/item_create_response.py | 10 +- .../types/rules/lists/item_delete_response.py | 10 +- .../types/rules/lists/item_get_response.py | 39 +-- .../types/rules/lists/item_list_response.py | 36 ++- .../types/rules/lists/item_update_response.py | 10 +- src/cloudflare/types/rules/lists_list.py | 38 +++ tests/api_resources/rules/lists/test_items.py | 17 +- tests/api_resources/rules/test_lists.py | 15 +- 20 files changed, 374 insertions(+), 598 deletions(-) delete mode 100644 src/cloudflare/types/rules/list_list_response.py create mode 100644 src/cloudflare/types/rules/lists_list.py diff --git a/.stats.yml b/.stats.yml index eae794e82e0..27c36985613 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-320c56f6dadc7c93e15e8f14284b2d5aeb0c2928b348ee231b0ba95cda018766.yml -openapi_spec_hash: ec1d30a07ce77828289a6936c0020e8f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f01c5820e3fa29ff2c54c65a758f57f9ad2ae5c5e43b5ba3f6571149aff7f582.yml +openapi_spec_hash: 3caaa313ff85cf56702035727d10c419 config_hash: 18e6b76de8b719dd7c9c28614ac32643 diff --git a/api.md b/api.md index 99f3edf1b5e..b1d8f1cf518 100644 --- a/api.md +++ b/api.md @@ -4442,7 +4442,6 @@ from cloudflare.types.rules import ( Redirect, ListCreateResponse, ListUpdateResponse, - ListListResponse, ListDeleteResponse, ListGetResponse, ) @@ -4452,7 +4451,7 @@ Methods: - client.rules.lists.create(\*, account_id, \*\*params) -> ListCreateResponse - client.rules.lists.update(list_id, \*, account_id, \*\*params) -> ListUpdateResponse -- client.rules.lists.list(\*, account_id) -> ListListResponse +- client.rules.lists.list(\*, account_id) -> SyncSinglePage[ListsList] - client.rules.lists.delete(list_id, \*, account_id) -> ListDeleteResponse - client.rules.lists.get(list_id, \*, account_id) -> ListGetResponse @@ -4488,7 +4487,7 @@ Methods: - client.rules.lists.items.create(list_id, \*, account_id, \*\*params) -> ItemCreateResponse - client.rules.lists.items.update(list_id, \*, account_id, \*\*params) -> ItemUpdateResponse -- client.rules.lists.items.list(list_id, \*, account_id, \*\*params) -> ItemListResponse +- client.rules.lists.items.list(list_id, \*, account_id, \*\*params) -> SyncCursorPagination[ItemListResponse] - client.rules.lists.items.delete(list_id, \*, account_id) -> ItemDeleteResponse - client.rules.lists.items.get(item_id, \*, account_id, list_id) -> ItemGetResponse diff --git a/src/cloudflare/resources/rules/lists/bulk_operations.py b/src/cloudflare/resources/rules/lists/bulk_operations.py index d9a333b3113..8e7184794a0 100644 --- a/src/cloudflare/resources/rules/lists/bulk_operations.py +++ b/src/cloudflare/resources/rules/lists/bulk_operations.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, cast +from typing import Type, cast import httpx @@ -78,21 +78,16 @@ def get( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not operation_id: raise ValueError(f"Expected a non-empty value for `operation_id` but received {operation_id!r}") - return cast( - BulkOperationGetResponse, - self._get( - f"/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[BulkOperationGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[BulkOperationGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get( + f"/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[BulkOperationGetResponse]._unwrapper, ), + cast_to=cast(Type[BulkOperationGetResponse], ResultWrapper[BulkOperationGetResponse]), ) @@ -152,21 +147,16 @@ async def get( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not operation_id: raise ValueError(f"Expected a non-empty value for `operation_id` but received {operation_id!r}") - return cast( - BulkOperationGetResponse, - await self._get( - f"/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[BulkOperationGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[BulkOperationGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._get( + f"/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[BulkOperationGetResponse]._unwrapper, ), + cast_to=cast(Type[BulkOperationGetResponse], ResultWrapper[BulkOperationGetResponse]), ) diff --git a/src/cloudflare/resources/rules/lists/items.py b/src/cloudflare/resources/rules/lists/items.py index 5c4aef53245..0921d989871 100644 --- a/src/cloudflare/resources/rules/lists/items.py +++ b/src/cloudflare/resources/rules/lists/items.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Iterable, cast +from typing import Type, Iterable, cast import httpx @@ -17,7 +17,8 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ...._base_client import make_request_options +from ....pagination import SyncCursorPagination, AsyncCursorPagination +from ...._base_client import AsyncPaginator, make_request_options from ....types.rules.lists import item_list_params, item_create_params, item_update_params from ....types.rules.lists.item_get_response import ItemGetResponse from ....types.rules.lists.item_list_response import ItemListResponse @@ -66,8 +67,7 @@ def create( This operation is asynchronous. To get current the operation status, invoke the - [Get bulk operation status](/operations/lists-get-bulk-operation-status) - endpoint with the returned `operation_id`. + `Get bulk operation status` endpoint with the returned `operation_id`. Args: account_id: Defines an identifier. @@ -86,22 +86,17 @@ def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ItemCreateResponse, - self._post( - f"/accounts/{account_id}/rules/lists/{list_id}/items", - body=maybe_transform(body, Iterable[item_create_params.Body]), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ItemCreateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ItemCreateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._post( + f"/accounts/{account_id}/rules/lists/{list_id}/items", + body=maybe_transform(body, Iterable[item_create_params.Body]), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ItemCreateResponse]._unwrapper, ), + cast_to=cast(Type[ItemCreateResponse], ResultWrapper[ItemCreateResponse]), ) def update( @@ -122,8 +117,7 @@ def update( list. This operation is asynchronous. To get current the operation status, invoke the - [Get bulk operation status](/operations/lists-get-bulk-operation-status) - endpoint with the returned `operation_id`. + `Get bulk operation status` endpoint with the returned `operation_id`. Args: account_id: Defines an identifier. @@ -142,22 +136,17 @@ def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ItemUpdateResponse, - self._put( - f"/accounts/{account_id}/rules/lists/{list_id}/items", - body=maybe_transform(body, Iterable[item_update_params.Body]), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ItemUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ItemUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._put( + f"/accounts/{account_id}/rules/lists/{list_id}/items", + body=maybe_transform(body, Iterable[item_update_params.Body]), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ItemUpdateResponse]._unwrapper, ), + cast_to=cast(Type[ItemUpdateResponse], ResultWrapper[ItemUpdateResponse]), ) def list( @@ -174,7 +163,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ItemListResponse: + ) -> SyncCursorPagination[ItemListResponse]: """ Fetches all the items in the list. @@ -208,29 +197,24 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ItemListResponse, - self._get( - f"/accounts/{account_id}/rules/lists/{list_id}/items", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "cursor": cursor, - "per_page": per_page, - "search": search, - }, - item_list_params.ItemListParams, - ), - post_parser=ResultWrapper[ItemListResponse]._unwrapper, + return self._get_api_list( + f"/accounts/{account_id}/rules/lists/{list_id}/items", + page=SyncCursorPagination[ItemListResponse], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "cursor": cursor, + "per_page": per_page, + "search": search, + }, + item_list_params.ItemListParams, ), - cast_to=cast( - Any, ResultWrapper[ItemListResponse] - ), # Union types cannot be passed in as arguments in the type system ), + model=ItemListResponse, ) def delete( @@ -250,8 +234,7 @@ def delete( This operation is asynchronous. To get current the operation status, invoke the - [Get bulk operation status](/operations/lists-get-bulk-operation-status) - endpoint with the returned `operation_id`. + `Get bulk operation status` endpoint with the returned `operation_id`. Args: account_id: Defines an identifier. @@ -270,21 +253,16 @@ def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ItemDeleteResponse, - self._delete( - f"/accounts/{account_id}/rules/lists/{list_id}/items", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ItemDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ItemDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._delete( + f"/accounts/{account_id}/rules/lists/{list_id}/items", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ItemDeleteResponse]._unwrapper, ), + cast_to=cast(Type[ItemDeleteResponse], ResultWrapper[ItemDeleteResponse]), ) def get( @@ -324,21 +302,16 @@ def get( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") if not item_id: raise ValueError(f"Expected a non-empty value for `item_id` but received {item_id!r}") - return cast( - ItemGetResponse, - self._get( - f"/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ItemGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ItemGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get( + f"/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ItemGetResponse]._unwrapper, ), + cast_to=cast(Type[ItemGetResponse], ResultWrapper[ItemGetResponse]), ) @@ -380,8 +353,7 @@ async def create( This operation is asynchronous. To get current the operation status, invoke the - [Get bulk operation status](/operations/lists-get-bulk-operation-status) - endpoint with the returned `operation_id`. + `Get bulk operation status` endpoint with the returned `operation_id`. Args: account_id: Defines an identifier. @@ -400,22 +372,17 @@ async def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ItemCreateResponse, - await self._post( - f"/accounts/{account_id}/rules/lists/{list_id}/items", - body=await async_maybe_transform(body, Iterable[item_create_params.Body]), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ItemCreateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ItemCreateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._post( + f"/accounts/{account_id}/rules/lists/{list_id}/items", + body=await async_maybe_transform(body, Iterable[item_create_params.Body]), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ItemCreateResponse]._unwrapper, ), + cast_to=cast(Type[ItemCreateResponse], ResultWrapper[ItemCreateResponse]), ) async def update( @@ -436,8 +403,7 @@ async def update( list. This operation is asynchronous. To get current the operation status, invoke the - [Get bulk operation status](/operations/lists-get-bulk-operation-status) - endpoint with the returned `operation_id`. + `Get bulk operation status` endpoint with the returned `operation_id`. Args: account_id: Defines an identifier. @@ -456,25 +422,20 @@ async def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ItemUpdateResponse, - await self._put( - f"/accounts/{account_id}/rules/lists/{list_id}/items", - body=await async_maybe_transform(body, Iterable[item_update_params.Body]), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ItemUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ItemUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._put( + f"/accounts/{account_id}/rules/lists/{list_id}/items", + body=await async_maybe_transform(body, Iterable[item_update_params.Body]), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ItemUpdateResponse]._unwrapper, ), + cast_to=cast(Type[ItemUpdateResponse], ResultWrapper[ItemUpdateResponse]), ) - async def list( + def list( self, list_id: str, *, @@ -488,7 +449,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ItemListResponse: + ) -> AsyncPaginator[ItemListResponse, AsyncCursorPagination[ItemListResponse]]: """ Fetches all the items in the list. @@ -522,29 +483,24 @@ async def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ItemListResponse, - await self._get( - f"/accounts/{account_id}/rules/lists/{list_id}/items", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "cursor": cursor, - "per_page": per_page, - "search": search, - }, - item_list_params.ItemListParams, - ), - post_parser=ResultWrapper[ItemListResponse]._unwrapper, + return self._get_api_list( + f"/accounts/{account_id}/rules/lists/{list_id}/items", + page=AsyncCursorPagination[ItemListResponse], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "cursor": cursor, + "per_page": per_page, + "search": search, + }, + item_list_params.ItemListParams, ), - cast_to=cast( - Any, ResultWrapper[ItemListResponse] - ), # Union types cannot be passed in as arguments in the type system ), + model=ItemListResponse, ) async def delete( @@ -564,8 +520,7 @@ async def delete( This operation is asynchronous. To get current the operation status, invoke the - [Get bulk operation status](/operations/lists-get-bulk-operation-status) - endpoint with the returned `operation_id`. + `Get bulk operation status` endpoint with the returned `operation_id`. Args: account_id: Defines an identifier. @@ -584,21 +539,16 @@ async def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ItemDeleteResponse, - await self._delete( - f"/accounts/{account_id}/rules/lists/{list_id}/items", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ItemDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ItemDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._delete( + f"/accounts/{account_id}/rules/lists/{list_id}/items", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ItemDeleteResponse]._unwrapper, ), + cast_to=cast(Type[ItemDeleteResponse], ResultWrapper[ItemDeleteResponse]), ) async def get( @@ -638,21 +588,16 @@ async def get( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") if not item_id: raise ValueError(f"Expected a non-empty value for `item_id` but received {item_id!r}") - return cast( - ItemGetResponse, - await self._get( - f"/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ItemGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ItemGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._get( + f"/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ItemGetResponse]._unwrapper, ), + cast_to=cast(Type[ItemGetResponse], ResultWrapper[ItemGetResponse]), ) diff --git a/src/cloudflare/resources/rules/lists/lists.py b/src/cloudflare/resources/rules/lists/lists.py index 8d698ddb452..c2b635e87a2 100644 --- a/src/cloudflare/resources/rules/lists/lists.py +++ b/src/cloudflare/resources/rules/lists/lists.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, cast +from typing import Type, cast from typing_extensions import Literal import httpx @@ -26,8 +26,9 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.rules import list_create_params, list_update_params -from ...._base_client import make_request_options +from ...._base_client import AsyncPaginator, make_request_options from .bulk_operations import ( BulkOperationsResource, AsyncBulkOperationsResource, @@ -36,8 +37,8 @@ BulkOperationsResourceWithStreamingResponse, AsyncBulkOperationsResourceWithStreamingResponse, ) +from ....types.rules.lists_list import ListsList from ....types.rules.list_get_response import ListGetResponse -from ....types.rules.list_list_response import ListListResponse from ....types.rules.list_create_response import ListCreateResponse from ....types.rules.list_delete_response import ListDeleteResponse from ....types.rules.list_update_response import ListUpdateResponse @@ -110,29 +111,24 @@ def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return cast( - ListCreateResponse, - self._post( - f"/accounts/{account_id}/rules/lists", - body=maybe_transform( - { - "kind": kind, - "name": name, - "description": description, - }, - list_create_params.ListCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListCreateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListCreateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._post( + f"/accounts/{account_id}/rules/lists", + body=maybe_transform( + { + "kind": kind, + "name": name, + "description": description, + }, + list_create_params.ListCreateParams, ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ListCreateResponse]._unwrapper, + ), + cast_to=cast(Type[ListCreateResponse], ResultWrapper[ListCreateResponse]), ) def update( @@ -170,22 +166,17 @@ def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ListUpdateResponse, - self._put( - f"/accounts/{account_id}/rules/lists/{list_id}", - body=maybe_transform({"description": description}, list_update_params.ListUpdateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._put( + f"/accounts/{account_id}/rules/lists/{list_id}", + body=maybe_transform({"description": description}, list_update_params.ListUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ListUpdateResponse]._unwrapper, ), + cast_to=cast(Type[ListUpdateResponse], ResultWrapper[ListUpdateResponse]), ) def list( @@ -198,7 +189,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListListResponse: + ) -> SyncSinglePage[ListsList]: """ Fetches all lists in the account. @@ -215,21 +206,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return cast( - ListListResponse, - self._get( - f"/accounts/{account_id}/rules/lists", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListListResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListListResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get_api_list( + f"/accounts/{account_id}/rules/lists", + page=SyncSinglePage[ListsList], + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + model=ListsList, ) def delete( @@ -264,21 +247,16 @@ def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ListDeleteResponse, - self._delete( - f"/accounts/{account_id}/rules/lists/{list_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._delete( + f"/accounts/{account_id}/rules/lists/{list_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ListDeleteResponse]._unwrapper, ), + cast_to=cast(Type[ListDeleteResponse], ResultWrapper[ListDeleteResponse]), ) def get( @@ -313,21 +291,16 @@ def get( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ListGetResponse, - self._get( - f"/accounts/{account_id}/rules/lists/{list_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get( + f"/accounts/{account_id}/rules/lists/{list_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ListGetResponse]._unwrapper, ), + cast_to=cast(Type[ListGetResponse], ResultWrapper[ListGetResponse]), ) @@ -396,29 +369,24 @@ async def create( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return cast( - ListCreateResponse, - await self._post( - f"/accounts/{account_id}/rules/lists", - body=await async_maybe_transform( - { - "kind": kind, - "name": name, - "description": description, - }, - list_create_params.ListCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListCreateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListCreateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._post( + f"/accounts/{account_id}/rules/lists", + body=await async_maybe_transform( + { + "kind": kind, + "name": name, + "description": description, + }, + list_create_params.ListCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ListCreateResponse]._unwrapper, ), + cast_to=cast(Type[ListCreateResponse], ResultWrapper[ListCreateResponse]), ) async def update( @@ -456,25 +424,20 @@ async def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ListUpdateResponse, - await self._put( - f"/accounts/{account_id}/rules/lists/{list_id}", - body=await async_maybe_transform({"description": description}, list_update_params.ListUpdateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListUpdateResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListUpdateResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._put( + f"/accounts/{account_id}/rules/lists/{list_id}", + body=await async_maybe_transform({"description": description}, list_update_params.ListUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ListUpdateResponse]._unwrapper, ), + cast_to=cast(Type[ListUpdateResponse], ResultWrapper[ListUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -484,7 +447,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ListListResponse: + ) -> AsyncPaginator[ListsList, AsyncSinglePage[ListsList]]: """ Fetches all lists in the account. @@ -501,21 +464,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return cast( - ListListResponse, - await self._get( - f"/accounts/{account_id}/rules/lists", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListListResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListListResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get_api_list( + f"/accounts/{account_id}/rules/lists", + page=AsyncSinglePage[ListsList], + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + model=ListsList, ) async def delete( @@ -550,21 +505,16 @@ async def delete( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ListDeleteResponse, - await self._delete( - f"/accounts/{account_id}/rules/lists/{list_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListDeleteResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListDeleteResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._delete( + f"/accounts/{account_id}/rules/lists/{list_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ListDeleteResponse]._unwrapper, ), + cast_to=cast(Type[ListDeleteResponse], ResultWrapper[ListDeleteResponse]), ) async def get( @@ -599,21 +549,16 @@ async def get( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return cast( - ListGetResponse, - await self._get( - f"/accounts/{account_id}/rules/lists/{list_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[ListGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[ListGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._get( + f"/accounts/{account_id}/rules/lists/{list_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ListGetResponse]._unwrapper, ), + cast_to=cast(Type[ListGetResponse], ResultWrapper[ListGetResponse]), ) diff --git a/src/cloudflare/types/rules/__init__.py b/src/cloudflare/types/rules/__init__.py index 690a2c33dfd..7dc2efb5d9b 100644 --- a/src/cloudflare/types/rules/__init__.py +++ b/src/cloudflare/types/rules/__init__.py @@ -4,11 +4,11 @@ from .hostname import Hostname as Hostname from .redirect import Redirect as Redirect +from .lists_list import ListsList as ListsList from .hostname_param import HostnameParam as HostnameParam from .redirect_param import RedirectParam as RedirectParam from .list_get_response import ListGetResponse as ListGetResponse from .list_create_params import ListCreateParams as ListCreateParams -from .list_list_response import ListListResponse as ListListResponse from .list_update_params import ListUpdateParams as ListUpdateParams from .list_create_response import ListCreateResponse as ListCreateResponse from .list_delete_response import ListDeleteResponse as ListDeleteResponse diff --git a/src/cloudflare/types/rules/list_create_response.py b/src/cloudflare/types/rules/list_create_response.py index 7713629dcf5..d6be7c5af46 100644 --- a/src/cloudflare/types/rules/list_create_response.py +++ b/src/cloudflare/types/rules/list_create_response.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import Literal, TypeAlias +from typing import Optional +from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["ListCreateResponse", "UnionMember0", "UnionMember1"] +__all__ = ["ListCreateResponse"] -class UnionMember0(BaseModel): +class ListCreateResponse(BaseModel): id: Optional[str] = None """The unique ID of the list.""" @@ -36,36 +36,3 @@ class UnionMember0(BaseModel): num_referencing_filters: Optional[float] = None """The number of [filters](/operations/filters-list-filters) referencing the list.""" - - -class UnionMember1(BaseModel): - id: Optional[str] = None - """The unique ID of the list.""" - - created_on: Optional[str] = None - """The RFC 3339 timestamp of when the list was created.""" - - description: Optional[str] = None - """An informative summary of the list.""" - - kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None - """The type of the list. - - Each type supports specific list items (IP addresses, ASNs, hostnames or - redirects). - """ - - modified_on: Optional[str] = None - """The RFC 3339 timestamp of when the list was last modified.""" - - name: Optional[str] = None - """An informative name for the list. Use this name in filter and rule expressions.""" - - num_items: Optional[float] = None - """The number of items in the list.""" - - num_referencing_filters: Optional[float] = None - """The number of [filters](/operations/filters-list-filters) referencing the list.""" - - -ListCreateResponse: TypeAlias = Union[UnionMember0, UnionMember1] diff --git a/src/cloudflare/types/rules/list_delete_response.py b/src/cloudflare/types/rules/list_delete_response.py index c07f0892236..37284568716 100644 --- a/src/cloudflare/types/rules/list_delete_response.py +++ b/src/cloudflare/types/rules/list_delete_response.py @@ -1,16 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional from ..._models import BaseModel -__all__ = ["ListDeleteResponse", "ID"] +__all__ = ["ListDeleteResponse"] -class ID(BaseModel): +class ListDeleteResponse(BaseModel): id: Optional[str] = None """Defines the unique ID of the item in the List.""" - - -ListDeleteResponse: TypeAlias = Union[ID, ID] diff --git a/src/cloudflare/types/rules/list_get_response.py b/src/cloudflare/types/rules/list_get_response.py index 413789f3e51..ad91887548a 100644 --- a/src/cloudflare/types/rules/list_get_response.py +++ b/src/cloudflare/types/rules/list_get_response.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import Literal, TypeAlias +from typing import Optional +from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["ListGetResponse", "UnionMember0", "UnionMember1"] +__all__ = ["ListGetResponse"] -class UnionMember0(BaseModel): +class ListGetResponse(BaseModel): id: Optional[str] = None """The unique ID of the list.""" @@ -36,36 +36,3 @@ class UnionMember0(BaseModel): num_referencing_filters: Optional[float] = None """The number of [filters](/operations/filters-list-filters) referencing the list.""" - - -class UnionMember1(BaseModel): - id: Optional[str] = None - """The unique ID of the list.""" - - created_on: Optional[str] = None - """The RFC 3339 timestamp of when the list was created.""" - - description: Optional[str] = None - """An informative summary of the list.""" - - kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None - """The type of the list. - - Each type supports specific list items (IP addresses, ASNs, hostnames or - redirects). - """ - - modified_on: Optional[str] = None - """The RFC 3339 timestamp of when the list was last modified.""" - - name: Optional[str] = None - """An informative name for the list. Use this name in filter and rule expressions.""" - - num_items: Optional[float] = None - """The number of items in the list.""" - - num_referencing_filters: Optional[float] = None - """The number of [filters](/operations/filters-list-filters) referencing the list.""" - - -ListGetResponse: TypeAlias = Union[UnionMember0, UnionMember1] diff --git a/src/cloudflare/types/rules/list_list_response.py b/src/cloudflare/types/rules/list_list_response.py deleted file mode 100644 index 4f7368f9fae..00000000000 --- a/src/cloudflare/types/rules/list_list_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union -from typing_extensions import TypeAlias - -__all__ = ["ListListResponse"] - -ListListResponse: TypeAlias = Union[List[object], object] diff --git a/src/cloudflare/types/rules/list_update_response.py b/src/cloudflare/types/rules/list_update_response.py index acec92410d8..cd77ecb85c2 100644 --- a/src/cloudflare/types/rules/list_update_response.py +++ b/src/cloudflare/types/rules/list_update_response.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import Literal, TypeAlias +from typing import Optional +from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["ListUpdateResponse", "UnionMember0", "UnionMember1"] +__all__ = ["ListUpdateResponse"] -class UnionMember0(BaseModel): +class ListUpdateResponse(BaseModel): id: Optional[str] = None """The unique ID of the list.""" @@ -36,36 +36,3 @@ class UnionMember0(BaseModel): num_referencing_filters: Optional[float] = None """The number of [filters](/operations/filters-list-filters) referencing the list.""" - - -class UnionMember1(BaseModel): - id: Optional[str] = None - """The unique ID of the list.""" - - created_on: Optional[str] = None - """The RFC 3339 timestamp of when the list was created.""" - - description: Optional[str] = None - """An informative summary of the list.""" - - kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None - """The type of the list. - - Each type supports specific list items (IP addresses, ASNs, hostnames or - redirects). - """ - - modified_on: Optional[str] = None - """The RFC 3339 timestamp of when the list was last modified.""" - - name: Optional[str] = None - """An informative name for the list. Use this name in filter and rule expressions.""" - - num_items: Optional[float] = None - """The number of items in the list.""" - - num_referencing_filters: Optional[float] = None - """The number of [filters](/operations/filters-list-filters) referencing the list.""" - - -ListUpdateResponse: TypeAlias = Union[UnionMember0, UnionMember1] diff --git a/src/cloudflare/types/rules/lists/bulk_operation_get_response.py b/src/cloudflare/types/rules/lists/bulk_operation_get_response.py index 18bb4058110..0c2766f72b6 100644 --- a/src/cloudflare/types/rules/lists/bulk_operation_get_response.py +++ b/src/cloudflare/types/rules/lists/bulk_operation_get_response.py @@ -1,39 +1,22 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import Literal, TypeAlias +from typing import Optional +from typing_extensions import Literal from ...._models import BaseModel -__all__ = ["BulkOperationGetResponse", "UnionMember0", "UnionMember1"] +__all__ = ["BulkOperationGetResponse"] -class UnionMember0(BaseModel): - id: Optional[str] = None +class BulkOperationGetResponse(BaseModel): + id: str """The unique operation ID of the asynchronous action.""" - completed: Optional[str] = None - """The RFC 3339 timestamp of when the operation was completed.""" - - error: Optional[str] = None - """A message describing the error when the status is `failed`.""" - - status: Optional[Literal["pending", "running", "completed", "failed"]] = None + status: Literal["pending", "running", "completed", "failed"] """The current status of the asynchronous operation.""" - -class UnionMember1(BaseModel): - id: Optional[str] = None - """The unique operation ID of the asynchronous action.""" - completed: Optional[str] = None """The RFC 3339 timestamp of when the operation was completed.""" error: Optional[str] = None """A message describing the error when the status is `failed`.""" - - status: Optional[Literal["pending", "running", "completed", "failed"]] = None - """The current status of the asynchronous operation.""" - - -BulkOperationGetResponse: TypeAlias = Union[UnionMember0, UnionMember1] diff --git a/src/cloudflare/types/rules/lists/item_create_response.py b/src/cloudflare/types/rules/lists/item_create_response.py index 9a8590056c4..4f22d14d393 100644 --- a/src/cloudflare/types/rules/lists/item_create_response.py +++ b/src/cloudflare/types/rules/lists/item_create_response.py @@ -1,16 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional from ...._models import BaseModel -__all__ = ["ItemCreateResponse", "OperationID"] +__all__ = ["ItemCreateResponse"] -class OperationID(BaseModel): +class ItemCreateResponse(BaseModel): operation_id: Optional[str] = None """The unique operation ID of the asynchronous action.""" - - -ItemCreateResponse: TypeAlias = Union[OperationID, OperationID] diff --git a/src/cloudflare/types/rules/lists/item_delete_response.py b/src/cloudflare/types/rules/lists/item_delete_response.py index 79dfdc1ee85..3b0bf9835a9 100644 --- a/src/cloudflare/types/rules/lists/item_delete_response.py +++ b/src/cloudflare/types/rules/lists/item_delete_response.py @@ -1,16 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional from ...._models import BaseModel -__all__ = ["ItemDeleteResponse", "OperationID"] +__all__ = ["ItemDeleteResponse"] -class OperationID(BaseModel): +class ItemDeleteResponse(BaseModel): operation_id: Optional[str] = None """The unique operation ID of the asynchronous action.""" - - -ItemDeleteResponse: TypeAlias = Union[OperationID, OperationID] diff --git a/src/cloudflare/types/rules/lists/item_get_response.py b/src/cloudflare/types/rules/lists/item_get_response.py index f78ecad2258..79994f0ebc9 100644 --- a/src/cloudflare/types/rules/lists/item_get_response.py +++ b/src/cloudflare/types/rules/lists/item_get_response.py @@ -1,16 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional from ..hostname import Hostname from ..redirect import Redirect from ...._models import BaseModel -__all__ = ["ItemGetResponse", "UnionMember0", "UnionMember1"] +__all__ = ["ItemGetResponse"] -class UnionMember0(BaseModel): +class ItemGetResponse(BaseModel): id: Optional[str] = None """The unique ID of the list.""" @@ -37,35 +36,3 @@ class UnionMember0(BaseModel): redirect: Optional[Redirect] = None """The definition of the redirect.""" - - -class UnionMember1(BaseModel): - id: Optional[str] = None - """The unique ID of the list.""" - - asn: Optional[int] = None - """Defines a non-negative 32 bit integer.""" - - comment: Optional[str] = None - """Defines an informative summary of the list item.""" - - created_on: Optional[str] = None - """The RFC 3339 timestamp of when the item was created.""" - - hostname: Optional[Hostname] = None - """ - Valid characters for hostnames are ASCII(7) letters from a to z, the digits from - 0 to 9, wildcards (\\**), and the hyphen (-). - """ - - ip: Optional[str] = None - """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" - - modified_on: Optional[str] = None - """The RFC 3339 timestamp of when the item was last modified.""" - - redirect: Optional[Redirect] = None - """The definition of the redirect.""" - - -ItemGetResponse: TypeAlias = Union[UnionMember0, UnionMember1] diff --git a/src/cloudflare/types/rules/lists/item_list_response.py b/src/cloudflare/types/rules/lists/item_list_response.py index 7c8f0b665bb..01b2ab92346 100644 --- a/src/cloudflare/types/rules/lists/item_list_response.py +++ b/src/cloudflare/types/rules/lists/item_list_response.py @@ -1,8 +1,38 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union -from typing_extensions import TypeAlias +from typing import Optional + +from ..hostname import Hostname +from ..redirect import Redirect +from ...._models import BaseModel __all__ = ["ItemListResponse"] -ItemListResponse: TypeAlias = Union[List[object], object] + +class ItemListResponse(BaseModel): + id: Optional[str] = None + """The unique ID of the list.""" + + asn: Optional[int] = None + """Defines a non-negative 32 bit integer.""" + + comment: Optional[str] = None + """Defines an informative summary of the list item.""" + + created_on: Optional[str] = None + """The RFC 3339 timestamp of when the item was created.""" + + hostname: Optional[Hostname] = None + """ + Valid characters for hostnames are ASCII(7) letters from a to z, the digits from + 0 to 9, wildcards (\\**), and the hyphen (-). + """ + + ip: Optional[str] = None + """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" + + modified_on: Optional[str] = None + """The RFC 3339 timestamp of when the item was last modified.""" + + redirect: Optional[Redirect] = None + """The definition of the redirect.""" diff --git a/src/cloudflare/types/rules/lists/item_update_response.py b/src/cloudflare/types/rules/lists/item_update_response.py index 54b6729e6cc..afd2fa83b57 100644 --- a/src/cloudflare/types/rules/lists/item_update_response.py +++ b/src/cloudflare/types/rules/lists/item_update_response.py @@ -1,16 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional -from typing_extensions import TypeAlias +from typing import Optional from ...._models import BaseModel -__all__ = ["ItemUpdateResponse", "OperationID"] +__all__ = ["ItemUpdateResponse"] -class OperationID(BaseModel): +class ItemUpdateResponse(BaseModel): operation_id: Optional[str] = None """The unique operation ID of the asynchronous action.""" - - -ItemUpdateResponse: TypeAlias = Union[OperationID, OperationID] diff --git a/src/cloudflare/types/rules/lists_list.py b/src/cloudflare/types/rules/lists_list.py new file mode 100644 index 00000000000..17255b5fa7d --- /dev/null +++ b/src/cloudflare/types/rules/lists_list.py @@ -0,0 +1,38 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["ListsList"] + + +class ListsList(BaseModel): + id: Optional[str] = None + """The unique ID of the list.""" + + created_on: Optional[str] = None + """The RFC 3339 timestamp of when the list was created.""" + + description: Optional[str] = None + """An informative summary of the list.""" + + kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None + """The type of the list. + + Each type supports specific list items (IP addresses, ASNs, hostnames or + redirects). + """ + + modified_on: Optional[str] = None + """The RFC 3339 timestamp of when the list was last modified.""" + + name: Optional[str] = None + """An informative name for the list. Use this name in filter and rule expressions.""" + + num_items: Optional[float] = None + """The number of items in the list.""" + + num_referencing_filters: Optional[float] = None + """The number of [filters](/operations/filters-list-filters) referencing the list.""" diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py index ba87c4bcda4..8ebfd8765ed 100644 --- a/tests/api_resources/rules/lists/test_items.py +++ b/tests/api_resources/rules/lists/test_items.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncCursorPagination, AsyncCursorPagination from cloudflare.types.rules.lists import ( ItemGetResponse, ItemListResponse, @@ -135,7 +136,7 @@ def test_method_list(self, client: Cloudflare) -> None: list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ItemListResponse, item, path=["response"]) + assert_matches_type(SyncCursorPagination[ItemListResponse], item, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: @@ -146,7 +147,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: per_page=1, search="1.1.1.", ) - assert_matches_type(ItemListResponse, item, path=["response"]) + assert_matches_type(SyncCursorPagination[ItemListResponse], item, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -158,7 +159,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" item = response.parse() - assert_matches_type(ItemListResponse, item, path=["response"]) + assert_matches_type(SyncCursorPagination[ItemListResponse], item, path=["response"]) @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: @@ -170,7 +171,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" item = response.parse() - assert_matches_type(ItemListResponse, item, path=["response"]) + assert_matches_type(SyncCursorPagination[ItemListResponse], item, path=["response"]) assert cast(Any, response.is_closed) is True @@ -414,7 +415,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ItemListResponse, item, path=["response"]) + assert_matches_type(AsyncCursorPagination[ItemListResponse], item, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -425,7 +426,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) per_page=1, search="1.1.1.", ) - assert_matches_type(ItemListResponse, item, path=["response"]) + assert_matches_type(AsyncCursorPagination[ItemListResponse], item, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @@ -437,7 +438,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" item = await response.parse() - assert_matches_type(ItemListResponse, item, path=["response"]) + assert_matches_type(AsyncCursorPagination[ItemListResponse], item, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: @@ -449,7 +450,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" item = await response.parse() - assert_matches_type(ItemListResponse, item, path=["response"]) + assert_matches_type(AsyncCursorPagination[ItemListResponse], item, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rules/test_lists.py b/tests/api_resources/rules/test_lists.py index ac12105216b..df909befdc9 100644 --- a/tests/api_resources/rules/test_lists.py +++ b/tests/api_resources/rules/test_lists.py @@ -9,9 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.rules import ( + ListsList, ListGetResponse, - ListListResponse, ListCreateResponse, ListDeleteResponse, ListUpdateResponse, @@ -151,7 +152,7 @@ def test_method_list(self, client: Cloudflare) -> None: list_ = client.rules.lists.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ListListResponse, list_, path=["response"]) + assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -162,7 +163,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list_ = response.parse() - assert_matches_type(ListListResponse, list_, path=["response"]) + assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"]) @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: @@ -173,7 +174,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list_ = response.parse() - assert_matches_type(ListListResponse, list_, path=["response"]) + assert_matches_type(SyncSinglePage[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True @@ -418,7 +419,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ListListResponse, list_, path=["response"]) + assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @@ -429,7 +430,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" list_ = await response.parse() - assert_matches_type(ListListResponse, list_, path=["response"]) + assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: @@ -440,7 +441,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" list_ = await response.parse() - assert_matches_type(ListListResponse, list_, path=["response"]) + assert_matches_type(AsyncSinglePage[ListsList], list_, path=["response"]) assert cast(Any, response.is_closed) is True From b1c5063457ae2a174d242a86f0e82da2e93f3c31 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 13:38:37 +0000 Subject: [PATCH 242/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 27c36985613..266177dd60d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f01c5820e3fa29ff2c54c65a758f57f9ad2ae5c5e43b5ba3f6571149aff7f582.yml -openapi_spec_hash: 3caaa313ff85cf56702035727d10c419 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d7cd1443afed130d09f13b1b05ad3ce188b81774fc02dfbd45cc590e1bf787cb.yml +openapi_spec_hash: 6597d244483baa1b73217f3bb11484ae config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 076b2edaa20c3a4aab28ce0865e28c4d03885bc0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 13:44:30 +0000 Subject: [PATCH 243/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 266177dd60d..fee6eeb3a2e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d7cd1443afed130d09f13b1b05ad3ce188b81774fc02dfbd45cc590e1bf787cb.yml -openapi_spec_hash: 6597d244483baa1b73217f3bb11484ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fae398ad7d40cd64a129855d5bf9ad91ef01e2540d72da47987a481c08214770.yml +openapi_spec_hash: 90e82f58b07103bd27e561e1bf2a7425 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From ce2f65fc9522a5ff188d36302b9758c8343d1cdf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:01:52 +0000 Subject: [PATCH 244/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fee6eeb3a2e..1cd47ba0c9d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fae398ad7d40cd64a129855d5bf9ad91ef01e2540d72da47987a481c08214770.yml -openapi_spec_hash: 90e82f58b07103bd27e561e1bf2a7425 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-edae8c9dc39c89bc320cbe4e7ca4263958307f1600f6575f3b5a5a118a343206.yml +openapi_spec_hash: 0c0b13f9c5914e6bbe764aba42861df1 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 0e4168308760688b9c40dac9414a2f4d976bd8ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:16:28 +0000 Subject: [PATCH 245/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1cd47ba0c9d..e214a3cf9b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-edae8c9dc39c89bc320cbe4e7ca4263958307f1600f6575f3b5a5a118a343206.yml -openapi_spec_hash: 0c0b13f9c5914e6bbe764aba42861df1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0f3bf6678e549722d633cef51241e71ea7038a6c5864f515828bd8ac3bfcfe56.yml +openapi_spec_hash: c8f403dd109187ede2e9e53c4bc4828e config_hash: 18e6b76de8b719dd7c9c28614ac32643 From a46cf0d8fdfc88a45ce131656a0a7c3cb9c53fcc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:22:15 +0000 Subject: [PATCH 246/392] feat(api): api update --- .stats.yml | 4 ++-- .../operations/schema_validation.py | 12 +++++------ .../api_gateway/settings/schema_validation.py | 12 +++++------ .../api_gateway/user_schemas/hosts.py | 4 ++-- .../api_gateway/user_schemas/operations.py | 4 ++-- .../api_gateway/user_schemas/user_schemas.py | 20 +++++++++---------- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.stats.yml b/.stats.yml index e214a3cf9b3..1e721564934 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0f3bf6678e549722d633cef51241e71ea7038a6c5864f515828bd8ac3bfcfe56.yml -openapi_spec_hash: c8f403dd109187ede2e9e53c4bc4828e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1808c87874336dc94c3a56c44a1817623312d1c6193bdeb0d23033eb008d8a96.yml +openapi_spec_hash: 120985e048bb5be7a3c96033ed492a55 config_hash: 18e6b76de8b719dd7c9c28614ac32643 diff --git a/src/cloudflare/resources/api_gateway/operations/schema_validation.py b/src/cloudflare/resources/api_gateway/operations/schema_validation.py index 6f16de7431a..6cd68186485 100644 --- a/src/cloudflare/resources/api_gateway/operations/schema_validation.py +++ b/src/cloudflare/resources/api_gateway/operations/schema_validation.py @@ -54,7 +54,7 @@ def with_streaming_response(self) -> SchemaValidationResourceWithStreamingRespon return SchemaValidationResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def update( self, @@ -110,7 +110,7 @@ def update( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def edit( self, @@ -154,7 +154,7 @@ def edit( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def get( self, @@ -218,7 +218,7 @@ def with_streaming_response(self) -> AsyncSchemaValidationResourceWithStreamingR return AsyncSchemaValidationResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def update( self, @@ -274,7 +274,7 @@ async def update( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def edit( self, @@ -320,7 +320,7 @@ async def edit( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def get( self, diff --git a/src/cloudflare/resources/api_gateway/settings/schema_validation.py b/src/cloudflare/resources/api_gateway/settings/schema_validation.py index 3aca7712b17..cb8a1d877f0 100644 --- a/src/cloudflare/resources/api_gateway/settings/schema_validation.py +++ b/src/cloudflare/resources/api_gateway/settings/schema_validation.py @@ -46,7 +46,7 @@ def with_streaming_response(self) -> SchemaValidationResourceWithStreamingRespon return SchemaValidationResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def update( self, @@ -111,7 +111,7 @@ def update( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def edit( self, @@ -177,7 +177,7 @@ def edit( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def get( self, @@ -236,7 +236,7 @@ def with_streaming_response(self) -> AsyncSchemaValidationResourceWithStreamingR return AsyncSchemaValidationResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def update( self, @@ -301,7 +301,7 @@ async def update( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def edit( self, @@ -367,7 +367,7 @@ async def edit( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def get( self, diff --git a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py index 52c486a8b81..7c30d79edfe 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py @@ -45,7 +45,7 @@ def with_streaming_response(self) -> HostsResourceWithStreamingResponse: return HostsResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def list( self, @@ -121,7 +121,7 @@ def with_streaming_response(self) -> AsyncHostsResourceWithStreamingResponse: return AsyncHostsResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def list( self, diff --git a/src/cloudflare/resources/api_gateway/user_schemas/operations.py b/src/cloudflare/resources/api_gateway/user_schemas/operations.py index 0db3ff4076b..20e77b84e56 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/operations.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/operations.py @@ -47,7 +47,7 @@ def with_streaming_response(self) -> OperationsResourceWithStreamingResponse: return OperationsResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def list( self, @@ -153,7 +153,7 @@ def with_streaming_response(self) -> AsyncOperationsResourceWithStreamingRespons return AsyncOperationsResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def list( self, diff --git a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py index 2bef6a75ebb..7fe1f96a09b 100644 --- a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py +++ b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py @@ -79,7 +79,7 @@ def with_streaming_response(self) -> UserSchemasResourceWithStreamingResponse: return UserSchemasResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def create( self, @@ -148,7 +148,7 @@ def create( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def list( self, @@ -211,7 +211,7 @@ def list( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def delete( self, @@ -252,7 +252,7 @@ def delete( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def edit( self, @@ -303,7 +303,7 @@ def edit( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def get( self, @@ -381,7 +381,7 @@ def with_streaming_response(self) -> AsyncUserSchemasResourceWithStreamingRespon return AsyncUserSchemasResourceWithStreamingResponse(self) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def create( self, @@ -450,7 +450,7 @@ async def create( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) def list( self, @@ -513,7 +513,7 @@ def list( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def delete( self, @@ -554,7 +554,7 @@ async def delete( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def edit( self, @@ -605,7 +605,7 @@ async def edit( ) @typing_extensions.deprecated( - "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation) instead." + "Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead." ) async def get( self, From a151be01332015a572bfe280f9708a2abf82dbaf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:30:01 +0000 Subject: [PATCH 247/392] chore(internal): bump pinned h11 dep --- requirements-dev.lock | 4 ++-- requirements.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 9264ed08d78..f3ae899edd1 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -48,9 +48,9 @@ filelock==3.12.4 frozenlist==1.6.2 # via aiohttp # via aiosignal -h11==0.14.0 +h11==0.16.0 # via httpcore -httpcore==1.0.2 +httpcore==1.0.9 # via httpx httpx==0.28.1 # via cloudflare diff --git a/requirements.lock b/requirements.lock index 0dfb3cedbe3..c8746cc1925 100644 --- a/requirements.lock +++ b/requirements.lock @@ -36,9 +36,9 @@ exceptiongroup==1.2.2 frozenlist==1.6.2 # via aiohttp # via aiosignal -h11==0.14.0 +h11==0.16.0 # via httpcore -httpcore==1.0.2 +httpcore==1.0.9 # via httpx httpx==0.28.1 # via cloudflare From 0028874f9f09318147478b3b766a59fe05889021 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:53:12 +0000 Subject: [PATCH 248/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1e721564934..0c66ee57bf3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1808c87874336dc94c3a56c44a1817623312d1c6193bdeb0d23033eb008d8a96.yml -openapi_spec_hash: 120985e048bb5be7a3c96033ed492a55 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b16b6fd14c298ce240af63787e58cfe408162308e898213c2be8769f463c6c3e.yml +openapi_spec_hash: b9422392be6e311bc0a37f3efaabd48e config_hash: 18e6b76de8b719dd7c9c28614ac32643 From c7d7dc192020819a155a4d39e6f5ed69cf8daaa5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:09:18 +0000 Subject: [PATCH 249/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0c66ee57bf3..bb23b835d90 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b16b6fd14c298ce240af63787e58cfe408162308e898213c2be8769f463c6c3e.yml -openapi_spec_hash: b9422392be6e311bc0a37f3efaabd48e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-22bd279cee32addc645f421ef52b9cc207ec998f883e77e580f7be79950833b4.yml +openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 config_hash: 18e6b76de8b719dd7c9c28614ac32643 From 9e18f39e933b396a425b0a3f6976a1130e7218c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:30:35 +0000 Subject: [PATCH 250/392] chore(package): mark python 3.13 as supported --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 3806b408b06..4cca5c816dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", From 9e6eb8890842b715b91c029ed3ad46b52d6fa9b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 10:21:00 +0000 Subject: [PATCH 251/392] fix(parsing): correctly handle nested discriminated unions --- src/cloudflare/_models.py | 13 ++++++----- tests/test_models.py | 45 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py index 7bf82bb0bde..2292f8864b0 100644 --- a/src/cloudflare/_models.py +++ b/src/cloudflare/_models.py @@ -2,9 +2,10 @@ import os import inspect -from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast +from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast from datetime import date, datetime from typing_extensions import ( + List, Unpack, Literal, ClassVar, @@ -367,7 +368,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: if type_ is None: raise RuntimeError(f"Unexpected field type is None for {key}") - return construct_type(value=value, type_=type_) + return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None)) def is_basemodel(type_: type) -> bool: @@ -421,7 +422,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T: return cast(_T, construct_type(value=value, type_=type_)) -def construct_type(*, value: object, type_: object) -> object: +def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object: """Loose coercion to the expected type with construction of nested values. If the given value does not match the expected type then it is returned as-is. @@ -439,8 +440,10 @@ def construct_type(*, value: object, type_: object) -> object: type_ = type_.__value__ # type: ignore[unreachable] # unwrap `Annotated[T, ...]` -> `T` - if is_annotated_type(type_): - meta: tuple[Any, ...] = get_args(type_)[1:] + if metadata is not None: + meta: tuple[Any, ...] = tuple(metadata) + elif is_annotated_type(type_): + meta = get_args(type_)[1:] type_ = extract_type_arg(type_, 0) else: meta = tuple() diff --git a/tests/test_models.py b/tests/test_models.py index 62aff02359d..a3db766596e 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -889,3 +889,48 @@ class ModelB(BaseModel): ) assert isinstance(m, ModelB) + + +def test_nested_discriminated_union() -> None: + class InnerType1(BaseModel): + type: Literal["type_1"] + + class InnerModel(BaseModel): + inner_value: str + + class InnerType2(BaseModel): + type: Literal["type_2"] + some_inner_model: InnerModel + + class Type1(BaseModel): + base_type: Literal["base_type_1"] + value: Annotated[ + Union[ + InnerType1, + InnerType2, + ], + PropertyInfo(discriminator="type"), + ] + + class Type2(BaseModel): + base_type: Literal["base_type_2"] + + T = Annotated[ + Union[ + Type1, + Type2, + ], + PropertyInfo(discriminator="base_type"), + ] + + model = construct_type( + type_=T, + value={ + "base_type": "base_type_1", + "value": { + "type": "type_2", + }, + }, + ) + assert isinstance(model, Type1) + assert isinstance(model.value, InnerType2) From c87b53618d2d3fde0d9f76e910bd9166d52b3b9a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 00:31:48 +0000 Subject: [PATCH 252/392] chore(api): skip broken prism tests Skips codegen'd tests that aren't working right. - connector tests need an schema tweak to express mutually exclusive properties - cf-one is referencing an invalid security scheme, will also need a schema update --- .stats.yml | 2 +- .../threat_events/datasets/test_health.py | 8 +++++ .../magic_transit/test_connectors.py | 30 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bb23b835d90..b999dfb1066 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-22bd279cee32addc645f421ef52b9cc207ec998f883e77e580f7be79950833b4.yml openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 -config_hash: 18e6b76de8b719dd7c9c28614ac32643 +config_hash: 70c445587de6c1089e4d0eadb6eb9d9a diff --git a/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py b/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py index f95e9fa4950..e1914985e33 100644 --- a/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py +++ b/tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py @@ -17,6 +17,7 @@ class TestHealth: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_get(self, client: Cloudflare) -> None: health = client.cloudforce_one.threat_events.datasets.health.get( @@ -25,6 +26,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(HealthGetResponse, health, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.datasets.health.with_raw_response.get( @@ -37,6 +39,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: health = response.parse() assert_matches_type(HealthGetResponse, health, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.datasets.health.with_streaming_response.get( @@ -51,6 +54,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -71,6 +75,7 @@ class TestAsyncHealth: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: health = await async_client.cloudforce_one.threat_events.datasets.health.get( @@ -79,6 +84,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(HealthGetResponse, health, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.datasets.health.with_raw_response.get( @@ -91,6 +97,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: health = await response.parse() assert_matches_type(HealthGetResponse, health, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.datasets.health.with_streaming_response.get( @@ -105,6 +112,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/magic_transit/test_connectors.py b/tests/api_resources/magic_transit/test_connectors.py index f87ed4dfdbd..832813e3fae 100644 --- a/tests/api_resources/magic_transit/test_connectors.py +++ b/tests/api_resources/magic_transit/test_connectors.py @@ -25,6 +25,9 @@ class TestConnectors: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize def test_method_create(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.create( @@ -33,6 +36,9 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.create( @@ -49,6 +55,9 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.connectors.with_raw_response.create( @@ -61,6 +70,9 @@ def test_raw_response_create(self, client: Cloudflare) -> None: connector = response.parse() assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.connectors.with_streaming_response.create( @@ -75,6 +87,9 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize 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 ''"): @@ -345,6 +360,9 @@ class TestAsyncConnectors: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.create( @@ -353,6 +371,9 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.create( @@ -369,6 +390,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.connectors.with_raw_response.create( @@ -381,6 +405,9 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: connector = await response.parse() assert_matches_type(ConnectorCreateResponse, connector, path=["response"]) + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.connectors.with_streaming_response.create( @@ -395,6 +422,9 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip( + reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number" + ) @parametrize 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 ''"): From 371845cca805cc6fa3bb84680d4e5d698c38235e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 16:12:01 +0000 Subject: [PATCH 253/392] chore(internal): codegen related update --- src/cloudflare/resources/kv/namespaces/values.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cloudflare/resources/kv/namespaces/values.py b/src/cloudflare/resources/kv/namespaces/values.py index 34160c54f80..dcf75b5d847 100644 --- a/src/cloudflare/resources/kv/namespaces/values.py +++ b/src/cloudflare/resources/kv/namespaces/values.py @@ -110,6 +110,10 @@ def update( raise ValueError(f"Expected a non-empty value for `namespace_id` but received {namespace_id!r}") if not key_name: raise ValueError(f"Expected a non-empty value for `key_name` but received {key_name!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", body=maybe_transform( @@ -318,6 +322,10 @@ async def update( raise ValueError(f"Expected a non-empty value for `namespace_id` but received {namespace_id!r}") if not key_name: raise ValueError(f"Expected a non-empty value for `key_name` but received {key_name!r}") + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}", body=await async_maybe_transform( From 063c76c17b14e2d452cb386bc244dd9f0b643c67 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 17:17:38 +0000 Subject: [PATCH 254/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b999dfb1066..86eef88a7cb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-22bd279cee32addc645f421ef52b9cc207ec998f883e77e580f7be79950833b4.yml openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 -config_hash: 70c445587de6c1089e4d0eadb6eb9d9a +config_hash: e5cc3a68b9877422f1dc315213163f6e From d3d7dd61af8899c760d066d53c69e5b0e4e99fe8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 17:46:48 +0000 Subject: [PATCH 255/392] chore(readme): fix version rendering on pypi --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 821cf8d0340..73c69f54673 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Cloudflare Python API library -[![PyPI version]()](https://pypi.org/project/cloudflare/) + +[![PyPI version](https://img.shields.io/pypi/v/cloudflare.svg?label=pypi%20(stable))](https://pypi.org/project/cloudflare/) The Cloudflare Python library provides convenient access to the Cloudflare REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, From f1eda003cec7a593680d7e58106fad0e029cf5ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 21:04:38 +0000 Subject: [PATCH 256/392] fix(api): add missing `items` param `/accounts/{account_id}/rules/lists/{list_id}/items` takes a request body. --- .stats.yml | 4 ++-- api.md | 2 +- src/cloudflare/resources/rules/lists/items.py | 6 +++++- src/cloudflare/types/rules/lists/__init__.py | 1 + .../types/rules/lists/item_delete_params.py | 19 +++++++++++++++++++ tests/api_resources/rules/lists/test_items.py | 18 ++++++++++++++++++ 6 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 src/cloudflare/types/rules/lists/item_delete_params.py diff --git a/.stats.yml b/.stats.yml index 86eef88a7cb..bd4e2adc5fc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-22bd279cee32addc645f421ef52b9cc207ec998f883e77e580f7be79950833b4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a2195f6a1ef92721db6c845b4d864ab688295623c8c88d71698087a17dca4fc7.yml openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 -config_hash: e5cc3a68b9877422f1dc315213163f6e +config_hash: 6a2779d0015054eac7082cca3c4e72bf diff --git a/api.md b/api.md index b1d8f1cf518..49109905c42 100644 --- a/api.md +++ b/api.md @@ -4488,7 +4488,7 @@ Methods: - client.rules.lists.items.create(list_id, \*, account_id, \*\*params) -> ItemCreateResponse - client.rules.lists.items.update(list_id, \*, account_id, \*\*params) -> ItemUpdateResponse - client.rules.lists.items.list(list_id, \*, account_id, \*\*params) -> SyncCursorPagination[ItemListResponse] -- client.rules.lists.items.delete(list_id, \*, account_id) -> ItemDeleteResponse +- client.rules.lists.items.delete(list_id, \*, account_id, \*\*params) -> ItemDeleteResponse - client.rules.lists.items.get(item_id, \*, account_id, list_id) -> ItemGetResponse # Stream diff --git a/src/cloudflare/resources/rules/lists/items.py b/src/cloudflare/resources/rules/lists/items.py index 0921d989871..90fcb204aeb 100644 --- a/src/cloudflare/resources/rules/lists/items.py +++ b/src/cloudflare/resources/rules/lists/items.py @@ -19,7 +19,7 @@ from ...._wrappers import ResultWrapper from ....pagination import SyncCursorPagination, AsyncCursorPagination from ...._base_client import AsyncPaginator, make_request_options -from ....types.rules.lists import item_list_params, item_create_params, item_update_params +from ....types.rules.lists import item_list_params, item_create_params, item_delete_params, item_update_params from ....types.rules.lists.item_get_response import ItemGetResponse from ....types.rules.lists.item_list_response import ItemListResponse from ....types.rules.lists.item_create_response import ItemCreateResponse @@ -222,6 +222,7 @@ def delete( list_id: str, *, account_id: str, + items: Iterable[item_delete_params.Item] | 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, @@ -255,6 +256,7 @@ def delete( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") return self._delete( f"/accounts/{account_id}/rules/lists/{list_id}/items", + body=maybe_transform({"items": items}, item_delete_params.ItemDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -508,6 +510,7 @@ async def delete( list_id: str, *, account_id: str, + items: Iterable[item_delete_params.Item] | 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, @@ -541,6 +544,7 @@ async def delete( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") return await self._delete( f"/accounts/{account_id}/rules/lists/{list_id}/items", + body=await async_maybe_transform({"items": items}, item_delete_params.ItemDeleteParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/types/rules/lists/__init__.py b/src/cloudflare/types/rules/lists/__init__.py index dfaf9a6adcf..0208e605acf 100644 --- a/src/cloudflare/types/rules/lists/__init__.py +++ b/src/cloudflare/types/rules/lists/__init__.py @@ -6,6 +6,7 @@ from .item_list_params import ItemListParams as ItemListParams from .item_get_response import ItemGetResponse as ItemGetResponse from .item_create_params import ItemCreateParams as ItemCreateParams +from .item_delete_params import ItemDeleteParams as ItemDeleteParams from .item_list_response import ItemListResponse as ItemListResponse from .item_update_params import ItemUpdateParams as ItemUpdateParams from .item_create_response import ItemCreateResponse as ItemCreateResponse diff --git a/src/cloudflare/types/rules/lists/item_delete_params.py b/src/cloudflare/types/rules/lists/item_delete_params.py new file mode 100644 index 00000000000..09a67bc3935 --- /dev/null +++ b/src/cloudflare/types/rules/lists/item_delete_params.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Required, TypedDict + +__all__ = ["ItemDeleteParams", "Item"] + + +class ItemDeleteParams(TypedDict, total=False): + account_id: Required[str] + """Defines an identifier.""" + + items: Iterable[Item] + + +class Item(TypedDict, total=False): + pass diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py index 8ebfd8765ed..34746213a5c 100644 --- a/tests/api_resources/rules/lists/test_items.py +++ b/tests/api_resources/rules/lists/test_items.py @@ -197,6 +197,15 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(ItemDeleteResponse, item, path=["response"]) + @parametrize + def test_method_delete_with_all_params(self, client: Cloudflare) -> None: + item = client.rules.lists.items.delete( + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + items=[{}], + ) + assert_matches_type(ItemDeleteResponse, item, path=["response"]) + @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.delete( @@ -476,6 +485,15 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ItemDeleteResponse, item, path=["response"]) + @parametrize + async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: + item = await async_client.rules.lists.items.delete( + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + items=[{}], + ) + assert_matches_type(ItemDeleteResponse, item, path=["response"]) + @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.delete( From 43041fba5e43c7e8022c5ece6d98d055e150a47b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:16:19 +0000 Subject: [PATCH 257/392] fix(client): don't send Content-Type header on GET requests --- pyproject.toml | 2 +- src/cloudflare/_base_client.py | 11 +++++++++-- tests/test_client.py | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4cca5c816dc..3b57b0e2800 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ Homepage = "https://github.com/cloudflare/cloudflare-python" Repository = "https://github.com/cloudflare/cloudflare-python" [project.optional-dependencies] -aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"] [tool.rye] managed = true diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index 206b0b459d1..d48389826e8 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -553,6 +553,15 @@ def _build_request( # work around https://github.com/encode/httpx/discussions/2880 kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")} + is_body_allowed = options.method.lower() != "get" + + if is_body_allowed: + kwargs["json"] = json_data if is_given(json_data) else None + kwargs["files"] = files + else: + headers.pop("Content-Type", None) + kwargs.pop("data", None) + # TODO: report this error to httpx return self._client.build_request( # pyright: ignore[reportUnknownMemberType] headers=headers, @@ -564,8 +573,6 @@ def _build_request( # so that passing a `TypedDict` doesn't cause an error. # https://github.com/microsoft/pyright/issues/3526#event-6715453066 params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None, - json=json_data if is_given(json_data) else None, - files=files, **kwargs, ) diff --git a/tests/test_client.py b/tests/test_client.py index 672c968e18f..ec0f1378fee 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -521,7 +521,7 @@ def test_request_extra_query(self) -> None: def test_multipart_repeating_array(self, client: Cloudflare) -> None: request = client._build_request( FinalRequestOptions.construct( - method="get", + method="post", url="/foo", headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"}, json_data={"array": ["foo", "bar"]}, @@ -1505,7 +1505,7 @@ def test_request_extra_query(self) -> None: def test_multipart_repeating_array(self, async_client: AsyncCloudflare) -> None: request = async_client._build_request( FinalRequestOptions.construct( - method="get", + method="post", url="/foo", headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"}, json_data={"array": ["foo", "bar"]}, From 0cce581834fd2de713131bd6b558d2b9fa46a4a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 19:59:59 +0000 Subject: [PATCH 258/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bd4e2adc5fc..7229cbe1b8e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a2195f6a1ef92721db6c845b4d864ab688295623c8c88d71698087a17dca4fc7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-64386694cfc0ee9d354e15bb6398ccbdc66e4bd51c1af0d0d531e4b938e5930b.yml openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 -config_hash: 6a2779d0015054eac7082cca3c4e72bf +config_hash: eb5c619d50d6dd1b8cc66f03d5649c28 From 087d706c8531f3a188f719316685554ff945d48a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 21:00:33 +0000 Subject: [PATCH 259/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7229cbe1b8e..1f8d647be7d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-64386694cfc0ee9d354e15bb6398ccbdc66e4bd51c1af0d0d531e4b938e5930b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e53659eea1b4f1fb11addaddb82880c177d8fa3e7a93f0d664a65e43ac526f4.yml openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 -config_hash: eb5c619d50d6dd1b8cc66f03d5649c28 +config_hash: fba73e92c75cff1909420025367fd0c0 From f24f43d8132d0efc31d49954209549932bba6f75 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:32:00 +0000 Subject: [PATCH 260/392] feat: clean up environment call outs --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 73c69f54673..4e08fb20437 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,6 @@ pip install cloudflare[aiohttp] Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: ```python -import os import asyncio from cloudflare import DefaultAioHttpClient from cloudflare import AsyncCloudflare @@ -93,7 +92,7 @@ from cloudflare import AsyncCloudflare async def main() -> None: async with AsyncCloudflare( - api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted + api_token="Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY", http_client=DefaultAioHttpClient(), ) as client: zone = await client.zones.create( From b99a5f3687bb90b19a4988332bbbc8c23ef6244b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:37:22 +0000 Subject: [PATCH 261/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1f8d647be7d..6952b8f7826 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e53659eea1b4f1fb11addaddb82880c177d8fa3e7a93f0d664a65e43ac526f4.yml openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 -config_hash: fba73e92c75cff1909420025367fd0c0 +config_hash: 7d141842aab5959e694a41aa0025b663 From c553c743f628c277aa2c14c56518df283ed93c0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 20:23:53 +0000 Subject: [PATCH 262/392] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6952b8f7826..6732386033f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e53659eea1b4f1fb11addaddb82880c177d8fa3e7a93f0d664a65e43ac526f4.yml openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 -config_hash: 7d141842aab5959e694a41aa0025b663 +config_hash: 6ab6ea94d2c0d06720ca6fb731637307 From 71baeb0e4ca8145723f85233fa05cc42958a92e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 17:53:59 +0000 Subject: [PATCH 263/392] chore(api): Skip broken prism test for updating custom DLP entries --- .stats.yml | 2 +- .../zero_trust/dlp/entries/test_custom.py | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6732386033f..8839c77cc5c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1769 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e53659eea1b4f1fb11addaddb82880c177d8fa3e7a93f0d664a65e43ac526f4.yml openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 -config_hash: 6ab6ea94d2c0d06720ca6fb731637307 +config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 diff --git a/tests/api_resources/zero_trust/dlp/entries/test_custom.py b/tests/api_resources/zero_trust/dlp/entries/test_custom.py index c289e4c17b2..8b0f13b9860 100644 --- a/tests/api_resources/zero_trust/dlp/entries/test_custom.py +++ b/tests/api_resources/zero_trust/dlp/entries/test_custom.py @@ -88,6 +88,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.entries.custom.update( @@ -99,6 +100,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.entries.custom.update( @@ -114,6 +116,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.entries.custom.with_raw_response.update( @@ -129,6 +132,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: custom = response.parse() assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.dlp.entries.custom.with_streaming_response.update( @@ -146,6 +150,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -166,6 +171,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: type="custom", ) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.entries.custom.update( @@ -175,6 +181,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.entries.custom.update( @@ -185,6 +192,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.entries.custom.with_raw_response.update( @@ -198,6 +206,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: custom = response.parse() assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.dlp.entries.custom.with_streaming_response.update( @@ -213,6 +222,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -229,6 +239,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: type="predefined", ) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.entries.custom.update( @@ -238,6 +249,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.entries.custom.update( @@ -248,6 +260,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.entries.custom.with_raw_response.update( @@ -261,6 +274,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: custom = response.parse() assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.dlp.entries.custom.with_streaming_response.update( @@ -276,6 +290,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -414,6 +429,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.entries.custom.update( @@ -425,6 +441,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.entries.custom.update( @@ -440,6 +457,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( @@ -455,6 +473,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar custom = await response.parse() assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update( @@ -472,6 +491,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -492,6 +512,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare type="custom", ) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.entries.custom.update( @@ -501,6 +522,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.entries.custom.update( @@ -511,6 +533,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( @@ -524,6 +547,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar custom = await response.parse() assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update( @@ -539,6 +563,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -555,6 +580,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare type="predefined", ) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.entries.custom.update( @@ -564,6 +590,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.entries.custom.update( @@ -574,6 +601,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn ) assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.entries.custom.with_raw_response.update( @@ -587,6 +615,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar custom = await response.parse() assert_matches_type(Optional[CustomUpdateResponse], custom, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.entries.custom.with_streaming_response.update( @@ -602,6 +631,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate 422 error in prism test") @parametrize async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): From 234b609b77d476c89f92fb289d02a1aaf6decf01 Mon Sep 17 00:00:00 2001 From: Nora Sandler Date: Wed, 16 Jul 2025 15:56:45 -0700 Subject: [PATCH 264/392] fix: radar types --- src/cloudflare/types/radar/as112_timeseries_response.py | 3 +-- .../types/radar/attacks/layer3_timeseries_response.py | 3 +-- src/cloudflare/types/radar/bot_timeseries_response.py | 3 +-- src/cloudflare/types/radar/dns_timeseries_response.py | 3 +-- src/cloudflare/types/radar/http_timeseries_response.py | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/cloudflare/types/radar/as112_timeseries_response.py b/src/cloudflare/types/radar/as112_timeseries_response.py index 46a96f7dd7e..b9a7db6fe95 100644 --- a/src/cloudflare/types/radar/as112_timeseries_response.py +++ b/src/cloudflare/types/radar/as112_timeseries_response.py @@ -7,7 +7,6 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .as112_timeseries_response import UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item __all__ = [ "AS112TimeseriesResponse", @@ -102,4 +101,4 @@ class AS112TimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent2UnnamedTypeWithobjectParent2Item: ... + def __getattr__(self, attr: str) -> object: ... diff --git a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py index d689c8fbc51..f8ef59bba7f 100644 --- a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py +++ b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py @@ -7,7 +7,6 @@ from pydantic import Field as FieldInfo from ...._models import BaseModel -from .layer3_timeseries_response import UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item __all__ = [ "Layer3TimeseriesResponse", @@ -102,4 +101,4 @@ class Layer3TimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent3UnnamedTypeWithobjectParent3Item: ... + def __getattr__(self, attr: str) -> object: ... diff --git a/src/cloudflare/types/radar/bot_timeseries_response.py b/src/cloudflare/types/radar/bot_timeseries_response.py index f08aadea698..6bafbb670b0 100644 --- a/src/cloudflare/types/radar/bot_timeseries_response.py +++ b/src/cloudflare/types/radar/bot_timeseries_response.py @@ -7,7 +7,6 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .bot_timeseries_response import UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item __all__ = [ "BotTimeseriesResponse", @@ -102,4 +101,4 @@ class BotTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent0UnnamedTypeWithobjectParent0Item: ... + def __getattr__(self, attr: str) -> object: ... diff --git a/src/cloudflare/types/radar/dns_timeseries_response.py b/src/cloudflare/types/radar/dns_timeseries_response.py index 7c58dd700fd..e813f59861c 100644 --- a/src/cloudflare/types/radar/dns_timeseries_response.py +++ b/src/cloudflare/types/radar/dns_timeseries_response.py @@ -7,7 +7,6 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .dns_timeseries_response import UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item __all__ = [ "DNSTimeseriesResponse", @@ -102,4 +101,4 @@ class DNSTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent1UnnamedTypeWithobjectParent1Item: ... + def __getattr__(self, attr: str) -> object: ... diff --git a/src/cloudflare/types/radar/http_timeseries_response.py b/src/cloudflare/types/radar/http_timeseries_response.py index 2d5c7494112..40aa6d1f683 100644 --- a/src/cloudflare/types/radar/http_timeseries_response.py +++ b/src/cloudflare/types/radar/http_timeseries_response.py @@ -7,7 +7,6 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel -from .http_timeseries_response import UnnamedTypeWithobjectParent4UnnamedTypeWithobjectParent4Item __all__ = [ "HTTPTimeseriesResponse", @@ -102,4 +101,4 @@ class HTTPTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> UnnamedTypeWithobjectParent4UnnamedTypeWithobjectParent4Item: ... + def __getattr__(self, attr: str) -> object: ... From 908534756a4f8321407ced2dea94531e895989b8 Mon Sep 17 00:00:00 2001 From: Nora Sandler Date: Wed, 16 Jul 2025 16:05:22 -0700 Subject: [PATCH 265/392] fix: dns record example --- examples/dns/record.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/dns/record.py b/examples/dns/record.py index 72b89316a58..87b3d4fd17a 100644 --- a/examples/dns/record.py +++ b/examples/dns/record.py @@ -14,6 +14,7 @@ type="A", name="www.mydns.com", content="198.51.100.1", + ttl=1, proxied=True, ) assert record is not None From 4ec7e833fd5ee4250b96231366343131d0008b72 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:36:19 +0000 Subject: [PATCH 266/392] feat(api): api update --- .stats.yml | 6 +- api.md | 77 +- src/cloudflare/resources/abuse_reports.py | 1856 +++++------------ .../resources/argo/smart_routing.py | 124 +- .../resources/brand_protection/__init__.py | 56 + .../brand_protection/brand_protection.py | 227 +- .../brand_protection/logo_matches.py | 302 +++ .../resources/brand_protection/logos.py | 283 +++ .../resources/brand_protection/matches.py | 308 +++ .../resources/brand_protection/queries.py | 335 +++ src/cloudflare/resources/dns/records.py | 252 +-- .../email_security/investigate/investigate.py | 4 + .../email_security/settings/allow_policies.py | 4 + .../email_security/settings/block_senders.py | 4 + .../settings/trusted_domains.py | 4 + .../magic_transit/connectors/events/events.py | 8 + .../resources/radar/attacks/layer7/top/top.py | 10 - src/cloudflare/resources/radar/search.py | 22 +- .../resources/rules/lists/bulk_operations.py | 4 +- src/cloudflare/resources/rules/lists/items.py | 20 +- src/cloudflare/resources/rules/lists/lists.py | 24 +- .../resources/ssl/recommendations.py | 45 +- src/cloudflare/resources/stream/stream.py | 4 +- .../resources/workers/scripts/content.py | 53 +- .../resources/workers/scripts/deployments.py | 39 +- .../resources/workers/scripts/scripts.py | 62 +- .../resources/workers/scripts/versions.py | 42 +- .../dispatch/namespaces/scripts/content.py | 48 +- .../dispatch/namespaces/scripts/scripts.py | 62 +- .../access/applications/applications.py | 4 + .../zero_trust/dlp/entries/integration.py | 6 +- .../zero_trust/dlp/entries/predefined.py | 6 +- .../abuse_report_create_params.py | 1270 +++-------- src/cloudflare/types/argo/__init__.py | 2 - .../types/argo/smart_routing_edit_params.py | 2 +- .../types/argo/smart_routing_edit_response.py | 8 - .../types/argo/smart_routing_get_response.py | 8 - .../types/brand_protection/__init__.py | 21 +- .../brand_protection_submit_response.py | 21 + .../brand_protection_url_info_params.py | 19 - .../brand_protection_url_info_response.py | 21 + src/cloudflare/types/brand_protection/info.py | 46 - .../brand_protection/logo_create_params.py | 21 + .../brand_protection/logo_create_response.py | 15 + ...arams.py => logo_match_download_params.py} | 13 +- .../logo_match_download_response.py | 13 + .../brand_protection/logo_match_get_params.py | 18 + .../logo_match_get_response.py | 13 + .../brand_protection/match_download_params.py | 19 + .../match_download_response.py | 13 + .../brand_protection/match_get_params.py | 19 + .../brand_protection/match_get_response.py | 13 + .../brand_protection/query_create_params.py | 31 + .../brand_protection/query_delete_params.py | 17 + .../types/brand_protection/rule_match.py | 21 - .../types/brand_protection/scan_status.py | 21 - .../types/brand_protection/submit.py | 42 - .../url_info_model_results.py | 17 - .../types/cache/cache_purge_response.py | 1 - src/cloudflare/types/dns/a_record.py | 2 +- src/cloudflare/types/dns/a_record_param.py | 2 +- src/cloudflare/types/dns/aaaa_record.py | 2 +- src/cloudflare/types/dns/aaaa_record_param.py | 2 +- src/cloudflare/types/dns/batch_patch_param.py | 2 +- src/cloudflare/types/dns/batch_put_param.py | 2 +- src/cloudflare/types/dns/caa_record.py | 2 +- src/cloudflare/types/dns/caa_record_param.py | 2 +- src/cloudflare/types/dns/cert_record.py | 2 +- src/cloudflare/types/dns/cert_record_param.py | 2 +- src/cloudflare/types/dns/cname_record.py | 2 +- .../types/dns/cname_record_param.py | 2 +- src/cloudflare/types/dns/dnskey_record.py | 2 +- .../types/dns/dnskey_record_param.py | 2 +- src/cloudflare/types/dns/ds_record.py | 2 +- src/cloudflare/types/dns/ds_record_param.py | 2 +- src/cloudflare/types/dns/https_record.py | 2 +- .../types/dns/https_record_param.py | 2 +- src/cloudflare/types/dns/loc_record.py | 2 +- src/cloudflare/types/dns/loc_record_param.py | 2 +- src/cloudflare/types/dns/mx_record.py | 2 +- src/cloudflare/types/dns/mx_record_param.py | 2 +- src/cloudflare/types/dns/naptr_record.py | 2 +- .../types/dns/naptr_record_param.py | 2 +- src/cloudflare/types/dns/ns_record.py | 2 +- src/cloudflare/types/dns/ns_record_param.py | 2 +- src/cloudflare/types/dns/ptr_record.py | 2 +- src/cloudflare/types/dns/ptr_record_param.py | 2 +- .../types/dns/record_batch_params.py | 2 +- .../types/dns/record_create_params.py | 42 +- .../types/dns/record_edit_params.py | 42 +- src/cloudflare/types/dns/record_response.py | 2 +- .../types/dns/record_update_params.py | 42 +- src/cloudflare/types/dns/smimea_record.py | 2 +- .../types/dns/smimea_record_param.py | 2 +- src/cloudflare/types/dns/srv_record.py | 2 +- src/cloudflare/types/dns/srv_record_param.py | 2 +- src/cloudflare/types/dns/sshfp_record.py | 2 +- .../types/dns/sshfp_record_param.py | 2 +- src/cloudflare/types/dns/svcb_record.py | 2 +- src/cloudflare/types/dns/svcb_record_param.py | 2 +- src/cloudflare/types/dns/tlsa_record.py | 2 +- src/cloudflare/types/dns/tlsa_record_param.py | 2 +- src/cloudflare/types/dns/txt_record.py | 2 +- src/cloudflare/types/dns/txt_record_param.py | 2 +- src/cloudflare/types/dns/uri_record.py | 2 +- src/cloudflare/types/dns/uri_record_param.py | 2 +- .../investigate/trace_get_response.py | 4 + .../investigate_get_response.py | 44 +- .../email_security/investigate_list_params.py | 2 + .../investigate_list_response.py | 44 +- .../settings/allow_policy_list_params.py | 2 + .../settings/block_sender_list_params.py | 2 + .../settings/trusted_domain_list_params.py | 2 + .../connectors/event_list_params.py | 3 + .../ai/bots/summary_user_agent_response.py | 4 +- .../ai/inference/summary_model_response.py | 4 +- .../ai/inference/summary_task_response.py | 4 +- .../radar/as112/summary_dnssec_response.py | 4 +- .../radar/as112/summary_edns_response.py | 4 +- .../as112/summary_ip_version_response.py | 4 +- .../radar/as112/summary_protocol_response.py | 4 +- .../as112/summary_query_type_response.py | 4 +- .../as112/summary_response_codes_response.py | 4 +- .../layer3/summary_bitrate_response.py | 4 +- .../layer3/summary_duration_response.py | 4 +- .../layer3/summary_industry_response.py | 4 +- .../layer3/summary_ip_version_response.py | 4 +- .../layer3/summary_protocol_response.py | 4 +- .../attacks/layer3/summary_vector_response.py | 4 +- .../layer3/summary_vertical_response.py | 4 +- .../layer7/summary_http_method_response.py | 4 +- .../layer7/summary_http_version_response.py | 4 +- .../layer7/summary_industry_response.py | 4 +- .../layer7/summary_ip_version_response.py | 4 +- .../layer7/summary_managed_rules_response.py | 4 +- .../summary_mitigation_product_response.py | 4 +- .../layer7/summary_vertical_response.py | 4 +- .../attacks/layer7/top_attacks_params.py | 7 - .../types/radar/bot_summary_response.py | 4 +- .../bots/web_crawler_summary_response.py | 4 +- .../radar/dns/summary_cache_hit_response.py | 4 +- .../dns/summary_dnssec_aware_response.py | 4 +- .../radar/dns/summary_dnssec_e2e_response.py | 4 +- .../radar/dns/summary_dnssec_response.py | 4 +- .../radar/dns/summary_ip_version_response.py | 4 +- .../dns/summary_matching_answer_response.py | 4 +- .../radar/dns/summary_protocol_response.py | 4 +- .../radar/dns/summary_query_type_response.py | 4 +- .../dns/summary_response_code_response.py | 4 +- .../dns/summary_response_ttl_response.py | 4 +- .../email/routing/summary_arc_response.py | 4 +- .../email/routing/summary_dkim_response.py | 4 +- .../email/routing/summary_dmarc_response.py | 4 +- .../routing/summary_encrypted_response.py | 4 +- .../routing/summary_ip_version_response.py | 4 +- .../email/routing/summary_spf_response.py | 4 +- .../email/security/summary_arc_response.py | 4 +- .../email/security/summary_dkim_response.py | 4 +- .../email/security/summary_dmarc_response.py | 4 +- .../security/summary_malicious_response.py | 4 +- .../email/security/summary_spam_response.py | 4 +- .../email/security/summary_spf_response.py | 4 +- .../email/security/summary_spoof_response.py | 4 +- .../summary_threat_category_response.py | 4 +- .../security/summary_tls_version_response.py | 4 +- .../radar/http/summary_bot_class_response.py | 4 +- .../http/summary_device_type_response.py | 4 +- .../http/summary_http_protocol_response.py | 4 +- .../http/summary_http_version_response.py | 4 +- .../radar/http/summary_ip_version_response.py | 4 +- .../types/radar/http/summary_os_response.py | 4 +- .../http/summary_post_quantum_response.py | 4 +- .../http/summary_tls_version_response.py | 4 +- .../summary_bot_class_response.py | 4 +- .../summary_compromised_response.py | 4 +- .../types/radar/netflow_summary_response.py | 4 +- .../radar/quality/iqi_summary_response.py | 4 +- .../radar/quality/speed_histogram_response.py | 4 +- .../radar/quality/speed_summary_response.py | 4 +- .../types/radar/search_global_params.py | 6 +- .../tcp_resets_timeout_summary_response.py | 4 +- src/cloudflare/types/rules/hostname.py | 9 + src/cloudflare/types/rules/hostname_param.py | 7 + .../types/rules/list_create_params.py | 2 +- .../types/rules/list_delete_response.py | 2 +- .../types/rules/list_update_params.py | 2 +- .../types/rules/lists/item_create_params.py | 2 +- .../types/rules/lists/item_delete_params.py | 2 +- .../types/rules/lists/item_list_params.py | 2 +- .../types/rules/lists/item_update_params.py | 2 +- src/cloudflare/types/shared/token_policy.py | 16 +- .../types/shared_params/token_policy.py | 16 +- .../types/ssl/recommendation_get_response.py | 15 +- src/cloudflare/types/stream/clip.py | 4 +- .../types/stream/stream_list_params.py | 2 +- src/cloudflare/types/stream/video.py | 4 +- .../types/workers/script_update_params.py | 11 + .../types/workers/scripts/__init__.py | 2 - .../workers/scripts/content_update_params.py | 32 +- .../types/workers/scripts/deployment.py | 14 - .../scripts/deployment_create_params.py | 13 +- .../scripts/deployment_create_response.py | 25 +- .../scripts/deployment_get_response.py | 27 +- .../types/workers/scripts/deployment_param.py | 14 - ...cript_and_version_setting_edit_response.py | 3 - ...script_and_version_setting_get_response.py | 3 - .../workers/scripts/version_create_params.py | 13 +- .../scripts/version_create_response.py | 171 +- .../workers/scripts/version_get_response.py | 171 +- .../namespaces/script_update_params.py | 11 + .../scripts/content_update_params.py | 12 + .../scripts/setting_edit_response.py | 3 - .../scripts/setting_get_response.py | 3 - .../access/application_create_params.py | 2 +- .../access/application_create_response.py | 2 +- .../access/application_get_response.py | 2 +- .../access/application_list_response.py | 2 +- .../access/application_update_params.py | 2 +- .../access/application_update_response.py | 2 +- .../access/applications/access_rule.py | 12 + .../access/applications/access_rule_param.py | 12 + .../types/zero_trust/dlp/profile.py | 12 +- .../types/zero_trust/gateway/gateway_rule.py | 11 + tests/api_resources/accounts/test_tokens.py | 72 +- .../api_resources/argo/test_smart_routing.py | 25 +- .../brand_protection/test_logo_matches.py | 219 ++ .../brand_protection/test_logos.py | 218 ++ .../brand_protection/test_matches.py | 223 ++ .../brand_protection/test_queries.py | 225 ++ .../settings/test_allow_policies.py | 2 + .../settings/test_block_senders.py | 2 + .../settings/test_trusted_domains.py | 2 + .../email_security/test_investigate.py | 2 + .../magic_transit/connectors/test_events.py | 2 + .../radar/attacks/layer7/test_top.py | 2 - .../api_resources/ssl/test_recommendations.py | 90 +- tests/api_resources/test_abuse_reports.py | 758 +++---- tests/api_resources/test_brand_protection.py | 89 +- tests/api_resources/test_cache.py | 96 +- tests/api_resources/user/test_tokens.py | 64 +- .../workers/scripts/test_content.py | 2 + .../workers/scripts/test_deployments.py | 59 +- .../workers/scripts/test_versions.py | 2 + tests/api_resources/workers/test_scripts.py | 2 + .../namespaces/scripts/test_content.py | 2 + .../dispatch/namespaces/test_scripts.py | 2 + .../zero_trust/access/test_applications.py | 52 +- .../dlp/profiles/test_predefined.py | 8 +- 248 files changed, 5411 insertions(+), 4099 deletions(-) create mode 100644 src/cloudflare/resources/brand_protection/logo_matches.py create mode 100644 src/cloudflare/resources/brand_protection/logos.py create mode 100644 src/cloudflare/resources/brand_protection/matches.py create mode 100644 src/cloudflare/resources/brand_protection/queries.py delete mode 100644 src/cloudflare/types/argo/smart_routing_edit_response.py delete mode 100644 src/cloudflare/types/argo/smart_routing_get_response.py create mode 100644 src/cloudflare/types/brand_protection/brand_protection_submit_response.py delete mode 100644 src/cloudflare/types/brand_protection/brand_protection_url_info_params.py create mode 100644 src/cloudflare/types/brand_protection/brand_protection_url_info_response.py delete mode 100644 src/cloudflare/types/brand_protection/info.py create mode 100644 src/cloudflare/types/brand_protection/logo_create_params.py create mode 100644 src/cloudflare/types/brand_protection/logo_create_response.py rename src/cloudflare/types/brand_protection/{brand_protection_submit_params.py => logo_match_download_params.py} (52%) create mode 100644 src/cloudflare/types/brand_protection/logo_match_download_response.py create mode 100644 src/cloudflare/types/brand_protection/logo_match_get_params.py create mode 100644 src/cloudflare/types/brand_protection/logo_match_get_response.py create mode 100644 src/cloudflare/types/brand_protection/match_download_params.py create mode 100644 src/cloudflare/types/brand_protection/match_download_response.py create mode 100644 src/cloudflare/types/brand_protection/match_get_params.py create mode 100644 src/cloudflare/types/brand_protection/match_get_response.py create mode 100644 src/cloudflare/types/brand_protection/query_create_params.py create mode 100644 src/cloudflare/types/brand_protection/query_delete_params.py delete mode 100644 src/cloudflare/types/brand_protection/rule_match.py delete mode 100644 src/cloudflare/types/brand_protection/scan_status.py delete mode 100644 src/cloudflare/types/brand_protection/submit.py delete mode 100644 src/cloudflare/types/brand_protection/url_info_model_results.py delete mode 100644 src/cloudflare/types/workers/scripts/deployment.py delete mode 100644 src/cloudflare/types/workers/scripts/deployment_param.py create mode 100644 tests/api_resources/brand_protection/test_logo_matches.py create mode 100644 tests/api_resources/brand_protection/test_logos.py create mode 100644 tests/api_resources/brand_protection/test_matches.py create mode 100644 tests/api_resources/brand_protection/test_queries.py diff --git a/.stats.yml b/.stats.yml index 8839c77cc5c..be9d04e5759 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1769 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e53659eea1b4f1fb11addaddb82880c177d8fa3e7a93f0d664a65e43ac526f4.yml -openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849 +configured_endpoints: 1777 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9629020f23f4c564925a52c46cdf5a93581a3f6bf35bf8050b0792467f642d33.yml +openapi_spec_hash: 58db5ad168eaa03ed1c9a028636c58f6 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 diff --git a/api.md b/api.md index 49109905c42..2159bbd8d60 100644 --- a/api.md +++ b/api.md @@ -760,7 +760,7 @@ from cloudflare.types.ssl import RecommendationGetResponse Methods: -- client.ssl.recommendations.get(\*, zone_id) -> Optional[RecommendationGetResponse] +- client.ssl.recommendations.get(\*, zone_id) -> RecommendationGetResponse ## Universal @@ -809,16 +809,10 @@ Methods: ## SmartRouting -Types: - -```python -from cloudflare.types.argo import SmartRoutingEditResponse, SmartRoutingGetResponse -``` - Methods: -- client.argo.smart_routing.edit(\*, zone_id, \*\*params) -> SmartRoutingEditResponse -- client.argo.smart_routing.get(\*, zone_id) -> SmartRoutingGetResponse +- client.argo.smart_routing.edit(\*, zone_id, \*\*params) -> object +- client.argo.smart_routing.get(\*, zone_id) -> object ## TieredCaching @@ -2395,17 +2389,13 @@ Methods: Types: ```python -from cloudflare.types.workers.scripts import ( - Deployment, - DeploymentCreateResponse, - DeploymentGetResponse, -) +from cloudflare.types.workers.scripts import DeploymentCreateResponse, DeploymentGetResponse ``` Methods: -- client.workers.scripts.deployments.create(script_name, \*, account_id, \*\*params) -> Optional[DeploymentCreateResponse] -- client.workers.scripts.deployments.get(script_name, \*, account_id) -> Optional[DeploymentGetResponse] +- client.workers.scripts.deployments.create(script_name, \*, account_id, \*\*params) -> DeploymentCreateResponse +- client.workers.scripts.deployments.get(script_name, \*, account_id) -> DeploymentGetResponse ### Versions @@ -3362,17 +3352,62 @@ Types: ```python from cloudflare.types.brand_protection import ( Info, - RuleMatch, - ScanStatus, Submit, - URLInfoModelResults, + BrandProtectionSubmitResponse, + BrandProtectionURLInfoResponse, ) ``` Methods: -- client.brand_protection.submit(\*, account_id, \*\*params) -> Optional[Submit] -- client.brand_protection.url_info(\*, account_id, \*\*params) -> Optional[Info] +- client.brand_protection.submit(\*, account_id) -> BrandProtectionSubmitResponse +- client.brand_protection.url_info(\*, account_id) -> BrandProtectionURLInfoResponse + +## Queries + +Methods: + +- client.brand_protection.queries.create(\*, account_id, \*\*params) -> None +- client.brand_protection.queries.delete(\*, account_id, \*\*params) -> None + +## Matches + +Types: + +```python +from cloudflare.types.brand_protection import MatchDownloadResponse, MatchGetResponse +``` + +Methods: + +- client.brand_protection.matches.download(\*, account_id, \*\*params) -> MatchDownloadResponse +- client.brand_protection.matches.get(\*, account_id, \*\*params) -> MatchGetResponse + +## Logos + +Types: + +```python +from cloudflare.types.brand_protection import LogoCreateResponse +``` + +Methods: + +- client.brand_protection.logos.create(\*, account_id, \*\*params) -> LogoCreateResponse +- client.brand_protection.logos.delete(logo_id, \*, account_id) -> None + +## LogoMatches + +Types: + +```python +from cloudflare.types.brand_protection import LogoMatchDownloadResponse, LogoMatchGetResponse +``` + +Methods: + +- client.brand_protection.logo_matches.download(\*, account_id, \*\*params) -> LogoMatchDownloadResponse +- client.brand_protection.logo_matches.get(\*, account_id, \*\*params) -> LogoMatchGetResponse # Diagnostics diff --git a/src/cloudflare/resources/abuse_reports.py b/src/cloudflare/resources/abuse_reports.py index e3e3af888d9..8dccd449850 100644 --- a/src/cloudflare/resources/abuse_reports.py +++ b/src/cloudflare/resources/abuse_reports.py @@ -70,35 +70,26 @@ def create( "abuse_registrar_whois", "abuse_ncsei", ], + address1: str, + agent_name: str, + agree: Literal[1], + city: str, + country: str, email: str, email2: str, + host_notification: Literal["send"], name: str, + original_work: str, + owner_notification: Literal["send"], + signature: str, + state: str, urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -110,22 +101,7 @@ def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type - - email: A valid email of the abuse reporter. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - email2: Should match the value provided in `email` - - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + report_type: The abuse report type. address1: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -139,29 +115,19 @@ def create( city: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - comments: Any additional comments about the infringement not exceeding 2000 characters - - company: Text not exceeding 100 characters. This field may be released by Cloudflare to + country: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique + email2: Should match the value provided in `email` host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. + name: Text not exceeding 255 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -169,36 +135,31 @@ def create( owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - - reported_country: Text containing 2 characters - - reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - state: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). + + comments: Any additional comments about the infringement not exceeding 2000 characters + + company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - title: Text not exceeding 255 characters + reported_country: Text containing 2 characters - trademark_number: Text not exceeding 1000 characters + reported_user_agent: Text not exceeding 255 characters - trademark_office: Text not exceeding 1000 characters + tele: Text not exceeding 20 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). - trademark_symbol: Text not exceeding 1000 characters + title: Text not exceeding 255 characters extra_headers: Send extra headers @@ -226,8 +187,8 @@ def create( *, account_id: str, act: Literal[ - "abuse_dmca", "abuse_trademark", + "abuse_dmca", "abuse_general", "abuse_phishing", "abuse_children", @@ -237,33 +198,20 @@ def create( ], email: str, email2: str, + host_notification: Literal["send"], + justification: str, name: str, + owner_notification: Literal["send"], + trademark_number: str, + trademark_office: str, + trademark_symbol: str, urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -275,96 +223,51 @@ def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). - - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports - - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - comments: Any additional comments about the infringement not exceeding 2000 characters - - company: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. justification: A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. + characters. - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. + trademark_number: Text not exceeding 1000 characters - reported_country: Text containing 2 characters + trademark_office: Text not exceeding 1000 characters - reported_user_agent: Text not exceeding 255 characters + trademark_symbol: Text not exceeding 1000 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique + comments: Any additional comments about the infringement not exceeding 2000 characters - state: Text not exceeding 255 characters. This field may be released by Cloudflare to + company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + reported_country: Text containing 2 characters + + reported_user_agent: Text not exceeding 255 characters + tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -391,9 +294,9 @@ def create( *, account_id: str, act: Literal[ + "abuse_general", "abuse_dmca", "abuse_trademark", - "abuse_general", "abuse_phishing", "abuse_children", "abuse_threat", @@ -402,33 +305,20 @@ def create( ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], + justification: str, name: str, + owner_notification: Literal["send", "send-anon", "none"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -440,64 +330,39 @@ def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + justification: A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of + destination_ips: A list of IP addresses separated by ‘\n’ (new line character). The list of destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. + ought to be unique. ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. Each individual @@ -508,28 +373,15 @@ def create( reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + source_ips: A list of IP addresses separated by ‘\n’ (new line character). The list of + source IPs should not exceed 30 IP addresses. Each one of the IP addresses ought + to be unique. tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -556,10 +408,10 @@ def create( *, account_id: str, act: Literal[ + "abuse_phishing", "abuse_dmca", "abuse_trademark", "abuse_general", - "abuse_phishing", "abuse_children", "abuse_threat", "abuse_registrar_whois", @@ -567,33 +419,18 @@ def create( ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], + justification: str, name: str, + owner_notification: Literal["send", "send-anon"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -605,95 +442,47 @@ def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + justification: A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to + original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique + reported_country: Text containing 2 characters - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. + reported_user_agent: Text not exceeding 255 characters - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters + tele: Text not exceeding 20 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - - reported_country: Text containing 2 characters - - reported_user_agent: Text not exceeding 255 characters - - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - title: Text not exceeding 255 characters - - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters + title: Text not exceeding 255 characters extra_headers: Send extra headers @@ -721,44 +510,30 @@ def create( *, account_id: str, act: Literal[ + "abuse_children", "abuse_dmca", "abuse_trademark", "abuse_general", "abuse_phishing", - "abuse_children", "abuse_threat", "abuse_registrar_whois", "abuse_ncsei", ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], + justification: str, name: str, + ncmec_notification: Literal["send", "send-anon"], + owner_notification: Literal["send", "send-anon", "none"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -770,34 +545,33 @@ def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + justification: A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). + ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters @@ -807,59 +581,15 @@ def create( country: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - reported_country: Text containing 2 characters reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -886,44 +616,28 @@ def create( *, account_id: str, act: Literal[ + "abuse_threat", "abuse_dmca", "abuse_trademark", "abuse_general", "abuse_phishing", "abuse_children", - "abuse_threat", "abuse_registrar_whois", "abuse_ncsei", ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], + justification: str, name: str, + owner_notification: Literal["send", "send-anon"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -935,96 +649,45 @@ def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). - - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports - - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - comments: Any additional comments about the infringement not exceeding 2000 characters - - company: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. justification: A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 - characters + characters. - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - - reported_country: Text containing 2 characters + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). - reported_user_agent: Text not exceeding 255 characters + comments: Any additional comments about the infringement not exceeding 2000 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports + company: Text not exceeding 100 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique + reported_country: Text containing 2 characters - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + reported_user_agent: Text not exceeding 255 characters tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1051,44 +714,26 @@ def create( *, account_id: str, act: Literal[ + "abuse_registrar_whois", "abuse_dmca", "abuse_trademark", "abuse_general", "abuse_phishing", "abuse_children", "abuse_threat", - "abuse_registrar_whois", "abuse_ncsei", ], email: str, email2: str, name: str, + owner_notification: Literal["send", "send-anon", "none"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -1100,9 +745,7 @@ def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1112,84 +755,28 @@ def create( name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). - - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - reported_country: Text containing 2 characters reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1216,6 +803,7 @@ def create( *, account_id: str, act: Literal[ + "abuse_ncsei", "abuse_dmca", "abuse_trademark", "abuse_general", @@ -1223,37 +811,21 @@ def create( "abuse_children", "abuse_threat", "abuse_registrar_whois", - "abuse_ncsei", ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], name: str, + ncsei_subject_representation: bool, + owner_notification: Literal["send", "send-anon", "none"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -1265,34 +837,28 @@ def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). + ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters @@ -1302,59 +868,15 @@ def create( country: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - reported_country: Text containing 2 characters reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1365,7 +887,75 @@ def create( """ ... - @required_args(["account_id", "act", "email", "email2", "name", "urls"]) + @required_args( + [ + "account_id", + "act", + "address1", + "agent_name", + "agree", + "city", + "country", + "email", + "email2", + "host_notification", + "name", + "original_work", + "owner_notification", + "signature", + "state", + "urls", + ], + [ + "account_id", + "act", + "email", + "email2", + "host_notification", + "justification", + "name", + "owner_notification", + "trademark_number", + "trademark_office", + "trademark_symbol", + "urls", + ], + [ + "account_id", + "act", + "email", + "email2", + "host_notification", + "justification", + "name", + "owner_notification", + "urls", + ], + [ + "account_id", + "act", + "email", + "email2", + "host_notification", + "justification", + "name", + "ncmec_notification", + "owner_notification", + "urls", + ], + ["account_id", "act", "email", "email2", "name", "owner_notification", "urls"], + [ + "account_id", + "act", + "email", + "email2", + "host_notification", + "name", + "ncsei_subject_representation", + "owner_notification", + "urls", + ], + ) def create( self, report_type: Literal[ @@ -1390,35 +980,35 @@ def create( "abuse_registrar_whois", "abuse_ncsei", ], + address1: str | NotGiven = NOT_GIVEN, + agent_name: str | NotGiven = NOT_GIVEN, + agree: Literal[1] | NotGiven = NOT_GIVEN, + city: str | NotGiven = NOT_GIVEN, + country: str | NotGiven = NOT_GIVEN, email: str, email2: str, + host_notification: Literal["send"] | Literal["send", "send-anon"] | NotGiven = NOT_GIVEN, name: str, + original_work: str | NotGiven = NOT_GIVEN, + owner_notification: Literal["send"] | Literal["send", "send-anon", "none"] | Literal["send", "send-anon"], + signature: str | NotGiven = NOT_GIVEN, + state: str | NotGiven = NOT_GIVEN, urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, + justification: str | NotGiven = NOT_GIVEN, trademark_number: str | NotGiven = NOT_GIVEN, trademark_office: str | NotGiven = NOT_GIVEN, trademark_symbol: str | NotGiven = NOT_GIVEN, + destination_ips: str | NotGiven = NOT_GIVEN, + ports_protocols: str | NotGiven = NOT_GIVEN, + source_ips: str | NotGiven = NOT_GIVEN, + ncmec_notification: Literal["send", "send-anon"] | NotGiven = NOT_GIVEN, + ncsei_subject_representation: bool | 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, @@ -1435,35 +1025,35 @@ def create( body=maybe_transform( { "act": act, - "email": email, - "email2": email2, - "name": name, - "urls": urls, "address1": address1, "agent_name": agent_name, "agree": agree, "city": city, - "comments": comments, - "company": company, "country": country, - "destination_ips": destination_ips, + "email": email, + "email2": email2, "host_notification": host_notification, - "justification": justification, - "ncmec_notification": ncmec_notification, - "ncsei_subject_representation": ncsei_subject_representation, + "name": name, "original_work": original_work, "owner_notification": owner_notification, - "ports_protocols": ports_protocols, - "reported_country": reported_country, - "reported_user_agent": reported_user_agent, "signature": signature, - "source_ips": source_ips, "state": state, + "urls": urls, + "comments": comments, + "company": company, + "reported_country": reported_country, + "reported_user_agent": reported_user_agent, "tele": tele, "title": title, + "justification": justification, "trademark_number": trademark_number, "trademark_office": trademark_office, "trademark_symbol": trademark_symbol, + "destination_ips": destination_ips, + "ports_protocols": ports_protocols, + "source_ips": source_ips, + "ncmec_notification": ncmec_notification, + "ncsei_subject_representation": ncsei_subject_representation, }, abuse_report_create_params.AbuseReportCreateParams, ), @@ -1523,35 +1113,26 @@ async def create( "abuse_registrar_whois", "abuse_ncsei", ], + address1: str, + agent_name: str, + agree: Literal[1], + city: str, + country: str, email: str, email2: str, + host_notification: Literal["send"], name: str, + original_work: str, + owner_notification: Literal["send"], + signature: str, + state: str, urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -1563,22 +1144,7 @@ async def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type - - email: A valid email of the abuse reporter. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - email2: Should match the value provided in `email` - - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + report_type: The abuse report type. address1: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1592,29 +1158,19 @@ async def create( city: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - comments: Any additional comments about the infringement not exceeding 2000 characters - - company: Text not exceeding 100 characters. This field may be released by Cloudflare to + country: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique + email2: Should match the value provided in `email` host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. + name: Text not exceeding 255 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1622,36 +1178,31 @@ async def create( owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - - reported_country: Text containing 2 characters - - reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - state: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). + + comments: Any additional comments about the infringement not exceeding 2000 characters + + company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - title: Text not exceeding 255 characters + reported_country: Text containing 2 characters - trademark_number: Text not exceeding 1000 characters + reported_user_agent: Text not exceeding 255 characters - trademark_office: Text not exceeding 1000 characters + tele: Text not exceeding 20 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). - trademark_symbol: Text not exceeding 1000 characters + title: Text not exceeding 255 characters extra_headers: Send extra headers @@ -1679,8 +1230,8 @@ async def create( *, account_id: str, act: Literal[ - "abuse_dmca", "abuse_trademark", + "abuse_dmca", "abuse_general", "abuse_phishing", "abuse_children", @@ -1690,33 +1241,20 @@ async def create( ], email: str, email2: str, + host_notification: Literal["send"], + justification: str, name: str, + owner_notification: Literal["send"], + trademark_number: str, + trademark_office: str, + trademark_symbol: str, urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -1728,105 +1266,60 @@ async def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + justification: A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + trademark_number: Text not exceeding 1000 characters - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). + trademark_office: Text not exceeding 1000 characters - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + trademark_symbol: Text not exceeding 1000 characters - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + reported_country: Text containing 2 characters - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique + reported_user_agent: Text not exceeding 255 characters - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. + tele: Text not exceeding 20 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters + title: Text not exceeding 255 characters - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. + extra_headers: Send extra headers - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. + extra_query: Add additional query parameters to the request - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + extra_body: Add additional JSON properties to the request - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - - reported_country: Text containing 2 characters - - reported_user_agent: Text not exceeding 255 characters - - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - title: Text not exceeding 255 characters - - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - ... + timeout: Override the client-level default timeout for this request, in seconds + """ + ... @overload async def create( @@ -1844,9 +1337,9 @@ async def create( *, account_id: str, act: Literal[ + "abuse_general", "abuse_dmca", "abuse_trademark", - "abuse_general", "abuse_phishing", "abuse_children", "abuse_threat", @@ -1855,33 +1348,20 @@ async def create( ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], + justification: str, name: str, + owner_notification: Literal["send", "send-anon", "none"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -1893,64 +1373,39 @@ async def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + justification: A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of + destination_ips: A list of IP addresses separated by ‘\n’ (new line character). The list of destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. + ought to be unique. ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. Each individual @@ -1961,28 +1416,15 @@ async def create( reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + source_ips: A list of IP addresses separated by ‘\n’ (new line character). The list of + source IPs should not exceed 30 IP addresses. Each one of the IP addresses ought + to be unique. tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2009,10 +1451,10 @@ async def create( *, account_id: str, act: Literal[ + "abuse_phishing", "abuse_dmca", "abuse_trademark", "abuse_general", - "abuse_phishing", "abuse_children", "abuse_threat", "abuse_registrar_whois", @@ -2020,33 +1462,18 @@ async def create( ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], + justification: str, name: str, + owner_notification: Literal["send", "send-anon"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -2058,96 +1485,48 @@ async def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + justification: A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - reported_country: Text containing 2 characters reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2174,44 +1553,30 @@ async def create( *, account_id: str, act: Literal[ + "abuse_children", "abuse_dmca", "abuse_trademark", "abuse_general", "abuse_phishing", - "abuse_children", "abuse_threat", "abuse_registrar_whois", "abuse_ncsei", ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], + justification: str, name: str, + ncmec_notification: Literal["send", "send-anon"], + owner_notification: Literal["send", "send-anon", "none"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -2223,34 +1588,33 @@ async def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + justification: A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). + ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters @@ -2260,59 +1624,15 @@ async def create( country: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - reported_country: Text containing 2 characters reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2339,44 +1659,28 @@ async def create( *, account_id: str, act: Literal[ + "abuse_threat", "abuse_dmca", "abuse_trademark", "abuse_general", "abuse_phishing", "abuse_children", - "abuse_threat", "abuse_registrar_whois", "abuse_ncsei", ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], + justification: str, name: str, + owner_notification: Literal["send", "send-anon"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -2388,96 +1692,45 @@ async def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). - - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports - - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - comments: Any additional comments about the infringement not exceeding 2000 characters - - company: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. justification: A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 - characters + characters. - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - - reported_country: Text containing 2 characters + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). - reported_user_agent: Text not exceeding 255 characters + comments: Any additional comments about the infringement not exceeding 2000 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports + company: Text not exceeding 100 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique + reported_country: Text containing 2 characters - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + reported_user_agent: Text not exceeding 255 characters tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2504,44 +1757,26 @@ async def create( *, account_id: str, act: Literal[ + "abuse_registrar_whois", "abuse_dmca", "abuse_trademark", "abuse_general", "abuse_phishing", "abuse_children", "abuse_threat", - "abuse_registrar_whois", "abuse_ncsei", ], email: str, email2: str, name: str, + owner_notification: Literal["send", "send-anon", "none"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -2553,9 +1788,7 @@ async def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -2565,84 +1798,28 @@ async def create( name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). - - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters company: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - country: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - reported_country: Text containing 2 characters reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2669,6 +1846,7 @@ async def create( *, account_id: str, act: Literal[ + "abuse_ncsei", "abuse_dmca", "abuse_trademark", "abuse_general", @@ -2676,37 +1854,21 @@ async def create( "abuse_children", "abuse_threat", "abuse_registrar_whois", - "abuse_ncsei", ], email: str, email2: str, + host_notification: Literal["send", "send-anon"], name: str, + ncsei_subject_representation: bool, + owner_notification: Literal["send", "send-anon", "none"], urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, - trademark_number: str | NotGiven = NOT_GIVEN, - trademark_office: str | NotGiven = NOT_GIVEN, - trademark_symbol: 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, @@ -2718,34 +1880,28 @@ async def create( Submit the Abuse Report of a particular type Args: - report_type: The abuse report type - - act: The abuse report type + report_type: The abuse report type. email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). email2: Should match the value provided in `email` - name: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs - should not exceed 250 URLs. All URLs should have the same hostname. Each URL - should be unique. This field may be released by Cloudflare to third parties such - as the Lumen Database (https://lumendatabase.org/). + host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - address1: Text not exceeding 100 characters. This field may be released by Cloudflare to + name: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field - may be released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). + ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. - city: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + urls: A list of valid URLs separated by ‘\n’ (new line character). The list of the + URLs should not exceed 250 URLs. All URLs should have the same hostname. Each + URL should be unique. This field may be released by Cloudflare to third parties + such as the Lumen Database (https://lumendatabase.org/). comments: Any additional comments about the infringement not exceeding 2000 characters @@ -2755,59 +1911,15 @@ async def create( country: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). - destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of - destination IPs should not exceed 30 IP addresses. Each one of the IP addresses - ought to be unique - - host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - justification: A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report. - - original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - - owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - - ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total - size of the field should not exceed 2000 characters. Each individual - port/protocol should not exceed 100 characters. The list should not have more - than 30 unique ports and protocols. - reported_country: Text containing 2 characters reported_user_agent: Text not exceeding 255 characters - signature: Required for DMCA reports, should be same as Name. An affirmation that all - information in the report is true and accurate while agreeing to the policies of - Cloudflare's abuse reports - - source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source - IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be - unique - - state: Text not exceeding 255 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - tele: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). title: Text not exceeding 255 characters - trademark_number: Text not exceeding 1000 characters - - trademark_office: Text not exceeding 1000 characters - - trademark_symbol: Text not exceeding 1000 characters - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2818,7 +1930,75 @@ async def create( """ ... - @required_args(["account_id", "act", "email", "email2", "name", "urls"]) + @required_args( + [ + "account_id", + "act", + "address1", + "agent_name", + "agree", + "city", + "country", + "email", + "email2", + "host_notification", + "name", + "original_work", + "owner_notification", + "signature", + "state", + "urls", + ], + [ + "account_id", + "act", + "email", + "email2", + "host_notification", + "justification", + "name", + "owner_notification", + "trademark_number", + "trademark_office", + "trademark_symbol", + "urls", + ], + [ + "account_id", + "act", + "email", + "email2", + "host_notification", + "justification", + "name", + "owner_notification", + "urls", + ], + [ + "account_id", + "act", + "email", + "email2", + "host_notification", + "justification", + "name", + "ncmec_notification", + "owner_notification", + "urls", + ], + ["account_id", "act", "email", "email2", "name", "owner_notification", "urls"], + [ + "account_id", + "act", + "email", + "email2", + "host_notification", + "name", + "ncsei_subject_representation", + "owner_notification", + "urls", + ], + ) async def create( self, report_type: Literal[ @@ -2843,35 +2023,35 @@ async def create( "abuse_registrar_whois", "abuse_ncsei", ], + address1: str | NotGiven = NOT_GIVEN, + agent_name: str | NotGiven = NOT_GIVEN, + agree: Literal[1] | NotGiven = NOT_GIVEN, + city: str | NotGiven = NOT_GIVEN, + country: str | NotGiven = NOT_GIVEN, email: str, email2: str, + host_notification: Literal["send"] | Literal["send", "send-anon"] | NotGiven = NOT_GIVEN, name: str, + original_work: str | NotGiven = NOT_GIVEN, + owner_notification: Literal["send"] | Literal["send", "send-anon", "none"] | Literal["send", "send-anon"], + signature: str | NotGiven = NOT_GIVEN, + state: str | NotGiven = NOT_GIVEN, urls: str, - address1: str | NotGiven = NOT_GIVEN, - agent_name: str | NotGiven = NOT_GIVEN, - agree: Literal[0, 1] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, comments: str | NotGiven = NOT_GIVEN, company: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - destination_ips: str | NotGiven = NOT_GIVEN, - host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - justification: str | NotGiven = NOT_GIVEN, - ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, - original_work: str | NotGiven = NOT_GIVEN, - owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, - ports_protocols: str | NotGiven = NOT_GIVEN, reported_country: str | NotGiven = NOT_GIVEN, reported_user_agent: str | NotGiven = NOT_GIVEN, - signature: str | NotGiven = NOT_GIVEN, - source_ips: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, tele: str | NotGiven = NOT_GIVEN, title: str | NotGiven = NOT_GIVEN, + justification: str | NotGiven = NOT_GIVEN, trademark_number: str | NotGiven = NOT_GIVEN, trademark_office: str | NotGiven = NOT_GIVEN, trademark_symbol: str | NotGiven = NOT_GIVEN, + destination_ips: str | NotGiven = NOT_GIVEN, + ports_protocols: str | NotGiven = NOT_GIVEN, + source_ips: str | NotGiven = NOT_GIVEN, + ncmec_notification: Literal["send", "send-anon"] | NotGiven = NOT_GIVEN, + ncsei_subject_representation: bool | 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, @@ -2888,35 +2068,35 @@ async def create( body=await async_maybe_transform( { "act": act, - "email": email, - "email2": email2, - "name": name, - "urls": urls, "address1": address1, "agent_name": agent_name, "agree": agree, "city": city, - "comments": comments, - "company": company, "country": country, - "destination_ips": destination_ips, + "email": email, + "email2": email2, "host_notification": host_notification, - "justification": justification, - "ncmec_notification": ncmec_notification, - "ncsei_subject_representation": ncsei_subject_representation, + "name": name, "original_work": original_work, "owner_notification": owner_notification, - "ports_protocols": ports_protocols, - "reported_country": reported_country, - "reported_user_agent": reported_user_agent, "signature": signature, - "source_ips": source_ips, "state": state, + "urls": urls, + "comments": comments, + "company": company, + "reported_country": reported_country, + "reported_user_agent": reported_user_agent, "tele": tele, "title": title, + "justification": justification, "trademark_number": trademark_number, "trademark_office": trademark_office, "trademark_symbol": trademark_symbol, + "destination_ips": destination_ips, + "ports_protocols": ports_protocols, + "source_ips": source_ips, + "ncmec_notification": ncmec_notification, + "ncsei_subject_representation": ncsei_subject_representation, }, abuse_report_create_params.AbuseReportCreateParams, ), diff --git a/src/cloudflare/resources/argo/smart_routing.py b/src/cloudflare/resources/argo/smart_routing.py index 28c30e54c30..b30c361b30b 100644 --- a/src/cloudflare/resources/argo/smart_routing.py +++ b/src/cloudflare/resources/argo/smart_routing.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, cast +from typing import Type, Optional, cast from typing_extensions import Literal import httpx @@ -20,8 +20,6 @@ from ..._wrappers import ResultWrapper from ...types.argo import smart_routing_edit_params from ..._base_client import make_request_options -from ...types.argo.smart_routing_get_response import SmartRoutingGetResponse -from ...types.argo.smart_routing_edit_response import SmartRoutingEditResponse __all__ = ["SmartRoutingResource", "AsyncSmartRoutingResource"] @@ -57,12 +55,12 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SmartRoutingEditResponse: + ) -> object: """ - Updates enablement of Argo Smart Routing. + Configures the value of the Argo Smart Routing enablement setting. Args: - zone_id: Identifier + zone_id: Specifies the zone associated with the API call. value: Enables Argo Smart Routing. @@ -76,22 +74,17 @@ def edit( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - SmartRoutingEditResponse, - self._patch( - f"/zones/{zone_id}/argo/smart_routing", - body=maybe_transform({"value": value}, smart_routing_edit_params.SmartRoutingEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[SmartRoutingEditResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[SmartRoutingEditResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._patch( + f"/zones/{zone_id}/argo/smart_routing", + body=maybe_transform({"value": value}, smart_routing_edit_params.SmartRoutingEditParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, ), + cast_to=cast(Type[object], ResultWrapper[object]), ) def get( @@ -104,12 +97,12 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SmartRoutingGetResponse: + ) -> object: """ - Get Argo Smart Routing setting + Retrieves the value of Argo Smart Routing enablement setting. Args: - zone_id: Identifier + zone_id: Specifies the zone associated with the API call. extra_headers: Send extra headers @@ -121,21 +114,16 @@ def get( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - SmartRoutingGetResponse, - self._get( - f"/zones/{zone_id}/argo/smart_routing", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[SmartRoutingGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[SmartRoutingGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return self._get( + f"/zones/{zone_id}/argo/smart_routing", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, ), + cast_to=cast(Type[object], ResultWrapper[object]), ) @@ -170,12 +158,12 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SmartRoutingEditResponse: + ) -> object: """ - Updates enablement of Argo Smart Routing. + Configures the value of the Argo Smart Routing enablement setting. Args: - zone_id: Identifier + zone_id: Specifies the zone associated with the API call. value: Enables Argo Smart Routing. @@ -189,22 +177,17 @@ async def edit( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - SmartRoutingEditResponse, - await self._patch( - f"/zones/{zone_id}/argo/smart_routing", - body=await async_maybe_transform({"value": value}, smart_routing_edit_params.SmartRoutingEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[SmartRoutingEditResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[SmartRoutingEditResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._patch( + f"/zones/{zone_id}/argo/smart_routing", + body=await async_maybe_transform({"value": value}, smart_routing_edit_params.SmartRoutingEditParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, ), + cast_to=cast(Type[object], ResultWrapper[object]), ) async def get( @@ -217,12 +200,12 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SmartRoutingGetResponse: + ) -> object: """ - Get Argo Smart Routing setting + Retrieves the value of Argo Smart Routing enablement setting. Args: - zone_id: Identifier + zone_id: Specifies the zone associated with the API call. extra_headers: Send extra headers @@ -234,21 +217,16 @@ async def get( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return cast( - SmartRoutingGetResponse, - await self._get( - f"/zones/{zone_id}/argo/smart_routing", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[SmartRoutingGetResponse]._unwrapper, - ), - cast_to=cast( - Any, ResultWrapper[SmartRoutingGetResponse] - ), # Union types cannot be passed in as arguments in the type system + return await self._get( + f"/zones/{zone_id}/argo/smart_routing", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[object]]._unwrapper, ), + cast_to=cast(Type[object], ResultWrapper[object]), ) diff --git a/src/cloudflare/resources/brand_protection/__init__.py b/src/cloudflare/resources/brand_protection/__init__.py index 11906c084fe..1660f110c9b 100644 --- a/src/cloudflare/resources/brand_protection/__init__.py +++ b/src/cloudflare/resources/brand_protection/__init__.py @@ -1,5 +1,37 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .logos import ( + LogosResource, + AsyncLogosResource, + LogosResourceWithRawResponse, + AsyncLogosResourceWithRawResponse, + LogosResourceWithStreamingResponse, + AsyncLogosResourceWithStreamingResponse, +) +from .matches import ( + MatchesResource, + AsyncMatchesResource, + MatchesResourceWithRawResponse, + AsyncMatchesResourceWithRawResponse, + MatchesResourceWithStreamingResponse, + AsyncMatchesResourceWithStreamingResponse, +) +from .queries import ( + QueriesResource, + AsyncQueriesResource, + QueriesResourceWithRawResponse, + AsyncQueriesResourceWithRawResponse, + QueriesResourceWithStreamingResponse, + AsyncQueriesResourceWithStreamingResponse, +) +from .logo_matches import ( + LogoMatchesResource, + AsyncLogoMatchesResource, + LogoMatchesResourceWithRawResponse, + AsyncLogoMatchesResourceWithRawResponse, + LogoMatchesResourceWithStreamingResponse, + AsyncLogoMatchesResourceWithStreamingResponse, +) from .brand_protection import ( BrandProtectionResource, AsyncBrandProtectionResource, @@ -10,6 +42,30 @@ ) __all__ = [ + "QueriesResource", + "AsyncQueriesResource", + "QueriesResourceWithRawResponse", + "AsyncQueriesResourceWithRawResponse", + "QueriesResourceWithStreamingResponse", + "AsyncQueriesResourceWithStreamingResponse", + "MatchesResource", + "AsyncMatchesResource", + "MatchesResourceWithRawResponse", + "AsyncMatchesResourceWithRawResponse", + "MatchesResourceWithStreamingResponse", + "AsyncMatchesResourceWithStreamingResponse", + "LogosResource", + "AsyncLogosResource", + "LogosResourceWithRawResponse", + "AsyncLogosResourceWithRawResponse", + "LogosResourceWithStreamingResponse", + "AsyncLogosResourceWithStreamingResponse", + "LogoMatchesResource", + "AsyncLogoMatchesResource", + "LogoMatchesResourceWithRawResponse", + "AsyncLogoMatchesResourceWithRawResponse", + "LogoMatchesResourceWithStreamingResponse", + "AsyncLogoMatchesResourceWithStreamingResponse", "BrandProtectionResource", "AsyncBrandProtectionResource", "BrandProtectionResourceWithRawResponse", diff --git a/src/cloudflare/resources/brand_protection/brand_protection.py b/src/cloudflare/resources/brand_protection/brand_protection.py index 2f4981451a5..ce10de6fc53 100644 --- a/src/cloudflare/resources/brand_protection/brand_protection.py +++ b/src/cloudflare/resources/brand_protection/brand_protection.py @@ -2,12 +2,33 @@ from __future__ import annotations -from typing import List, Type, Iterable, Optional, cast - import httpx +from .logos import ( + LogosResource, + AsyncLogosResource, + LogosResourceWithRawResponse, + AsyncLogosResourceWithRawResponse, + LogosResourceWithStreamingResponse, + AsyncLogosResourceWithStreamingResponse, +) +from .matches import ( + MatchesResource, + AsyncMatchesResource, + MatchesResourceWithRawResponse, + AsyncMatchesResourceWithRawResponse, + MatchesResourceWithStreamingResponse, + AsyncMatchesResourceWithStreamingResponse, +) +from .queries import ( + QueriesResource, + AsyncQueriesResource, + QueriesResourceWithRawResponse, + AsyncQueriesResourceWithRawResponse, + QueriesResourceWithStreamingResponse, + AsyncQueriesResourceWithStreamingResponse, +) from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -16,16 +37,38 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper +from .logo_matches import ( + LogoMatchesResource, + AsyncLogoMatchesResource, + LogoMatchesResourceWithRawResponse, + AsyncLogoMatchesResourceWithRawResponse, + LogoMatchesResourceWithStreamingResponse, + AsyncLogoMatchesResourceWithStreamingResponse, +) from ..._base_client import make_request_options -from ...types.brand_protection import brand_protection_submit_params, brand_protection_url_info_params -from ...types.brand_protection.info import Info -from ...types.brand_protection.submit import Submit +from ...types.brand_protection.brand_protection_submit_response import BrandProtectionSubmitResponse +from ...types.brand_protection.brand_protection_url_info_response import BrandProtectionURLInfoResponse __all__ = ["BrandProtectionResource", "AsyncBrandProtectionResource"] class BrandProtectionResource(SyncAPIResource): + @cached_property + def queries(self) -> QueriesResource: + return QueriesResource(self._client) + + @cached_property + def matches(self) -> MatchesResource: + return MatchesResource(self._client) + + @cached_property + def logos(self) -> LogosResource: + return LogosResource(self._client) + + @cached_property + def logo_matches(self) -> LogoMatchesResource: + return LogoMatchesResource(self._client) + @cached_property def with_raw_response(self) -> BrandProtectionResourceWithRawResponse: """ @@ -49,22 +92,17 @@ def submit( self, *, account_id: str, - url: 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Submit]: + ) -> BrandProtectionSubmitResponse: """ - Submit suspicious URL for scanning. + Return new URL submissions Args: - account_id: Identifier. - - url: URL(s) to filter submissions results by. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -77,40 +115,27 @@ def submit( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._post( f"/accounts/{account_id}/brand-protection/submit", - body=maybe_transform({"url": url}, brand_protection_submit_params.BrandProtectionSubmitParams), options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Submit]]._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[Submit]], ResultWrapper[Submit]), + cast_to=BrandProtectionSubmitResponse, ) def url_info( self, *, account_id: str, - url: List[str] | NotGiven = NOT_GIVEN, - url_id: Iterable[int] | 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Info]: + ) -> BrandProtectionURLInfoResponse: """ - Gets phishing details about a URL. + Return submitted URLs based on ID Args: - account_id: Identifier. - - url: Submission URL(s) to filter submission results by. - - url_id: Submission ID(s) to filter submission results by. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -124,24 +149,29 @@ def url_info( return self._get( f"/accounts/{account_id}/brand-protection/url-info", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "url": url, - "url_id": url_id, - }, - brand_protection_url_info_params.BrandProtectionURLInfoParams, - ), - post_parser=ResultWrapper[Optional[Info]]._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[Info]], ResultWrapper[Info]), + cast_to=BrandProtectionURLInfoResponse, ) class AsyncBrandProtectionResource(AsyncAPIResource): + @cached_property + def queries(self) -> AsyncQueriesResource: + return AsyncQueriesResource(self._client) + + @cached_property + def matches(self) -> AsyncMatchesResource: + return AsyncMatchesResource(self._client) + + @cached_property + def logos(self) -> AsyncLogosResource: + return AsyncLogosResource(self._client) + + @cached_property + def logo_matches(self) -> AsyncLogoMatchesResource: + return AsyncLogoMatchesResource(self._client) + @cached_property def with_raw_response(self) -> AsyncBrandProtectionResourceWithRawResponse: """ @@ -165,22 +195,17 @@ async def submit( self, *, account_id: str, - url: 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Submit]: + ) -> BrandProtectionSubmitResponse: """ - Submit suspicious URL for scanning. + Return new URL submissions Args: - account_id: Identifier. - - url: URL(s) to filter submissions results by. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -193,40 +218,27 @@ async def submit( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._post( f"/accounts/{account_id}/brand-protection/submit", - body=await async_maybe_transform({"url": url}, brand_protection_submit_params.BrandProtectionSubmitParams), options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[Optional[Submit]]._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[Submit]], ResultWrapper[Submit]), + cast_to=BrandProtectionSubmitResponse, ) async def url_info( self, *, account_id: str, - url: List[str] | NotGiven = NOT_GIVEN, - url_id: Iterable[int] | 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Info]: + ) -> BrandProtectionURLInfoResponse: """ - Gets phishing details about a URL. + Return submitted URLs based on ID Args: - account_id: Identifier. - - url: Submission URL(s) to filter submission results by. - - url_id: Submission ID(s) to filter submission results by. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -240,20 +252,9 @@ async def url_info( return await self._get( f"/accounts/{account_id}/brand-protection/url-info", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "url": url, - "url_id": url_id, - }, - brand_protection_url_info_params.BrandProtectionURLInfoParams, - ), - post_parser=ResultWrapper[Optional[Info]]._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[Info]], ResultWrapper[Info]), + cast_to=BrandProtectionURLInfoResponse, ) @@ -268,6 +269,22 @@ def __init__(self, brand_protection: BrandProtectionResource) -> None: brand_protection.url_info, ) + @cached_property + def queries(self) -> QueriesResourceWithRawResponse: + return QueriesResourceWithRawResponse(self._brand_protection.queries) + + @cached_property + def matches(self) -> MatchesResourceWithRawResponse: + return MatchesResourceWithRawResponse(self._brand_protection.matches) + + @cached_property + def logos(self) -> LogosResourceWithRawResponse: + return LogosResourceWithRawResponse(self._brand_protection.logos) + + @cached_property + def logo_matches(self) -> LogoMatchesResourceWithRawResponse: + return LogoMatchesResourceWithRawResponse(self._brand_protection.logo_matches) + class AsyncBrandProtectionResourceWithRawResponse: def __init__(self, brand_protection: AsyncBrandProtectionResource) -> None: @@ -280,6 +297,22 @@ def __init__(self, brand_protection: AsyncBrandProtectionResource) -> None: brand_protection.url_info, ) + @cached_property + def queries(self) -> AsyncQueriesResourceWithRawResponse: + return AsyncQueriesResourceWithRawResponse(self._brand_protection.queries) + + @cached_property + def matches(self) -> AsyncMatchesResourceWithRawResponse: + return AsyncMatchesResourceWithRawResponse(self._brand_protection.matches) + + @cached_property + def logos(self) -> AsyncLogosResourceWithRawResponse: + return AsyncLogosResourceWithRawResponse(self._brand_protection.logos) + + @cached_property + def logo_matches(self) -> AsyncLogoMatchesResourceWithRawResponse: + return AsyncLogoMatchesResourceWithRawResponse(self._brand_protection.logo_matches) + class BrandProtectionResourceWithStreamingResponse: def __init__(self, brand_protection: BrandProtectionResource) -> None: @@ -292,6 +325,22 @@ def __init__(self, brand_protection: BrandProtectionResource) -> None: brand_protection.url_info, ) + @cached_property + def queries(self) -> QueriesResourceWithStreamingResponse: + return QueriesResourceWithStreamingResponse(self._brand_protection.queries) + + @cached_property + def matches(self) -> MatchesResourceWithStreamingResponse: + return MatchesResourceWithStreamingResponse(self._brand_protection.matches) + + @cached_property + def logos(self) -> LogosResourceWithStreamingResponse: + return LogosResourceWithStreamingResponse(self._brand_protection.logos) + + @cached_property + def logo_matches(self) -> LogoMatchesResourceWithStreamingResponse: + return LogoMatchesResourceWithStreamingResponse(self._brand_protection.logo_matches) + class AsyncBrandProtectionResourceWithStreamingResponse: def __init__(self, brand_protection: AsyncBrandProtectionResource) -> None: @@ -303,3 +352,19 @@ def __init__(self, brand_protection: AsyncBrandProtectionResource) -> None: self.url_info = async_to_streamed_response_wrapper( brand_protection.url_info, ) + + @cached_property + def queries(self) -> AsyncQueriesResourceWithStreamingResponse: + return AsyncQueriesResourceWithStreamingResponse(self._brand_protection.queries) + + @cached_property + def matches(self) -> AsyncMatchesResourceWithStreamingResponse: + return AsyncMatchesResourceWithStreamingResponse(self._brand_protection.matches) + + @cached_property + def logos(self) -> AsyncLogosResourceWithStreamingResponse: + return AsyncLogosResourceWithStreamingResponse(self._brand_protection.logos) + + @cached_property + def logo_matches(self) -> AsyncLogoMatchesResourceWithStreamingResponse: + return AsyncLogoMatchesResourceWithStreamingResponse(self._brand_protection.logo_matches) diff --git a/src/cloudflare/resources/brand_protection/logo_matches.py b/src/cloudflare/resources/brand_protection/logo_matches.py new file mode 100644 index 00000000000..06acaf78175 --- /dev/null +++ b/src/cloudflare/resources/brand_protection/logo_matches.py @@ -0,0 +1,302 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.brand_protection import logo_match_get_params, logo_match_download_params +from ...types.brand_protection.logo_match_get_response import LogoMatchGetResponse +from ...types.brand_protection.logo_match_download_response import LogoMatchDownloadResponse + +__all__ = ["LogoMatchesResource", "AsyncLogoMatchesResource"] + + +class LogoMatchesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> LogoMatchesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return LogoMatchesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> LogoMatchesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return LogoMatchesResourceWithStreamingResponse(self) + + def download( + self, + *, + account_id: str, + limit: str | NotGiven = NOT_GIVEN, + logo_id: List[str] | NotGiven = NOT_GIVEN, + offset: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogoMatchDownloadResponse: + """ + Return matches as CSV for logo queries based on ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get( + f"/accounts/{account_id}/brand-protection/logo-matches/download", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "limit": limit, + "logo_id": logo_id, + "offset": offset, + }, + logo_match_download_params.LogoMatchDownloadParams, + ), + ), + cast_to=LogoMatchDownloadResponse, + ) + + def get( + self, + *, + account_id: str, + limit: str | NotGiven = NOT_GIVEN, + logo_id: List[str] | NotGiven = NOT_GIVEN, + offset: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogoMatchGetResponse: + """ + Return matches for logo queries based on ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get( + f"/accounts/{account_id}/brand-protection/logo-matches", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "limit": limit, + "logo_id": logo_id, + "offset": offset, + }, + logo_match_get_params.LogoMatchGetParams, + ), + ), + cast_to=LogoMatchGetResponse, + ) + + +class AsyncLogoMatchesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncLogoMatchesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncLogoMatchesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncLogoMatchesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncLogoMatchesResourceWithStreamingResponse(self) + + async def download( + self, + *, + account_id: str, + limit: str | NotGiven = NOT_GIVEN, + logo_id: List[str] | NotGiven = NOT_GIVEN, + offset: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogoMatchDownloadResponse: + """ + Return matches as CSV for logo queries based on ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._get( + f"/accounts/{account_id}/brand-protection/logo-matches/download", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "limit": limit, + "logo_id": logo_id, + "offset": offset, + }, + logo_match_download_params.LogoMatchDownloadParams, + ), + ), + cast_to=LogoMatchDownloadResponse, + ) + + async def get( + self, + *, + account_id: str, + limit: str | NotGiven = NOT_GIVEN, + logo_id: List[str] | NotGiven = NOT_GIVEN, + offset: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogoMatchGetResponse: + """ + Return matches for logo queries based on ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._get( + f"/accounts/{account_id}/brand-protection/logo-matches", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "limit": limit, + "logo_id": logo_id, + "offset": offset, + }, + logo_match_get_params.LogoMatchGetParams, + ), + ), + cast_to=LogoMatchGetResponse, + ) + + +class LogoMatchesResourceWithRawResponse: + def __init__(self, logo_matches: LogoMatchesResource) -> None: + self._logo_matches = logo_matches + + self.download = to_raw_response_wrapper( + logo_matches.download, + ) + self.get = to_raw_response_wrapper( + logo_matches.get, + ) + + +class AsyncLogoMatchesResourceWithRawResponse: + def __init__(self, logo_matches: AsyncLogoMatchesResource) -> None: + self._logo_matches = logo_matches + + self.download = async_to_raw_response_wrapper( + logo_matches.download, + ) + self.get = async_to_raw_response_wrapper( + logo_matches.get, + ) + + +class LogoMatchesResourceWithStreamingResponse: + def __init__(self, logo_matches: LogoMatchesResource) -> None: + self._logo_matches = logo_matches + + self.download = to_streamed_response_wrapper( + logo_matches.download, + ) + self.get = to_streamed_response_wrapper( + logo_matches.get, + ) + + +class AsyncLogoMatchesResourceWithStreamingResponse: + def __init__(self, logo_matches: AsyncLogoMatchesResource) -> None: + self._logo_matches = logo_matches + + self.download = async_to_streamed_response_wrapper( + logo_matches.download, + ) + self.get = async_to_streamed_response_wrapper( + logo_matches.get, + ) diff --git a/src/cloudflare/resources/brand_protection/logos.py b/src/cloudflare/resources/brand_protection/logos.py new file mode 100644 index 00000000000..501c867f185 --- /dev/null +++ b/src/cloudflare/resources/brand_protection/logos.py @@ -0,0 +1,283 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, FileTypes +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.brand_protection import logo_create_params +from ...types.brand_protection.logo_create_response import LogoCreateResponse + +__all__ = ["LogosResource", "AsyncLogosResource"] + + +class LogosResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> LogosResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return LogosResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> LogosResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return LogosResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + match_type: str | NotGiven = NOT_GIVEN, + tag: str | NotGiven = NOT_GIVEN, + threshold: float | NotGiven = NOT_GIVEN, + image: FileTypes | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogoCreateResponse: + """ + Return new saved logo queries created from image files + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._post( + f"/accounts/{account_id}/brand-protection/logos", + body=maybe_transform({"image": image}, logo_create_params.LogoCreateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "match_type": match_type, + "tag": tag, + "threshold": threshold, + }, + logo_create_params.LogoCreateParams, + ), + ), + cast_to=LogoCreateResponse, + ) + + def delete( + self, + logo_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> None: + """ + Return a success message after deleting saved logo queries by ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not logo_id: + raise ValueError(f"Expected a non-empty value for `logo_id` but received {logo_id!r}") + extra_headers = {"Accept": "*/*", **(extra_headers or {})} + return self._delete( + f"/accounts/{account_id}/brand-protection/logos/{logo_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=NoneType, + ) + + +class AsyncLogosResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncLogosResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncLogosResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncLogosResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncLogosResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + match_type: str | NotGiven = NOT_GIVEN, + tag: str | NotGiven = NOT_GIVEN, + threshold: float | NotGiven = NOT_GIVEN, + image: FileTypes | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> LogoCreateResponse: + """ + Return new saved logo queries created from image files + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._post( + f"/accounts/{account_id}/brand-protection/logos", + body=await async_maybe_transform({"image": image}, logo_create_params.LogoCreateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "match_type": match_type, + "tag": tag, + "threshold": threshold, + }, + logo_create_params.LogoCreateParams, + ), + ), + cast_to=LogoCreateResponse, + ) + + async def delete( + self, + logo_id: str, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> None: + """ + Return a success message after deleting saved logo queries by ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not logo_id: + raise ValueError(f"Expected a non-empty value for `logo_id` but received {logo_id!r}") + extra_headers = {"Accept": "*/*", **(extra_headers or {})} + return await self._delete( + f"/accounts/{account_id}/brand-protection/logos/{logo_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=NoneType, + ) + + +class LogosResourceWithRawResponse: + def __init__(self, logos: LogosResource) -> None: + self._logos = logos + + self.create = to_raw_response_wrapper( + logos.create, + ) + self.delete = to_raw_response_wrapper( + logos.delete, + ) + + +class AsyncLogosResourceWithRawResponse: + def __init__(self, logos: AsyncLogosResource) -> None: + self._logos = logos + + self.create = async_to_raw_response_wrapper( + logos.create, + ) + self.delete = async_to_raw_response_wrapper( + logos.delete, + ) + + +class LogosResourceWithStreamingResponse: + def __init__(self, logos: LogosResource) -> None: + self._logos = logos + + self.create = to_streamed_response_wrapper( + logos.create, + ) + self.delete = to_streamed_response_wrapper( + logos.delete, + ) + + +class AsyncLogosResourceWithStreamingResponse: + def __init__(self, logos: AsyncLogosResource) -> None: + self._logos = logos + + self.create = async_to_streamed_response_wrapper( + logos.create, + ) + self.delete = async_to_streamed_response_wrapper( + logos.delete, + ) diff --git a/src/cloudflare/resources/brand_protection/matches.py b/src/cloudflare/resources/brand_protection/matches.py new file mode 100644 index 00000000000..2161d09e260 --- /dev/null +++ b/src/cloudflare/resources/brand_protection/matches.py @@ -0,0 +1,308 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.brand_protection import match_get_params, match_download_params +from ...types.brand_protection.match_get_response import MatchGetResponse +from ...types.brand_protection.match_download_response import MatchDownloadResponse + +__all__ = ["MatchesResource", "AsyncMatchesResource"] + + +class MatchesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> MatchesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return MatchesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> MatchesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return MatchesResourceWithStreamingResponse(self) + + def download( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + include_domain_id: bool | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + offset: int | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> MatchDownloadResponse: + """ + Return matches as CSV for string queries based on ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get( + f"/accounts/{account_id}/brand-protection/matches/download", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "id": id, + "include_domain_id": include_domain_id, + "limit": limit, + "offset": offset, + }, + match_download_params.MatchDownloadParams, + ), + ), + cast_to=MatchDownloadResponse, + ) + + def get( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + include_domain_id: bool | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + offset: int | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> MatchGetResponse: + """ + Return matches for string queries based on ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get( + f"/accounts/{account_id}/brand-protection/matches", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "id": id, + "include_domain_id": include_domain_id, + "limit": limit, + "offset": offset, + }, + match_get_params.MatchGetParams, + ), + ), + cast_to=MatchGetResponse, + ) + + +class AsyncMatchesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncMatchesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncMatchesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncMatchesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncMatchesResourceWithStreamingResponse(self) + + async def download( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + include_domain_id: bool | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + offset: int | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> MatchDownloadResponse: + """ + Return matches as CSV for string queries based on ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._get( + f"/accounts/{account_id}/brand-protection/matches/download", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "id": id, + "include_domain_id": include_domain_id, + "limit": limit, + "offset": offset, + }, + match_download_params.MatchDownloadParams, + ), + ), + cast_to=MatchDownloadResponse, + ) + + async def get( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + include_domain_id: bool | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + offset: int | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> MatchGetResponse: + """ + Return matches for string queries based on ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._get( + f"/accounts/{account_id}/brand-protection/matches", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "id": id, + "include_domain_id": include_domain_id, + "limit": limit, + "offset": offset, + }, + match_get_params.MatchGetParams, + ), + ), + cast_to=MatchGetResponse, + ) + + +class MatchesResourceWithRawResponse: + def __init__(self, matches: MatchesResource) -> None: + self._matches = matches + + self.download = to_raw_response_wrapper( + matches.download, + ) + self.get = to_raw_response_wrapper( + matches.get, + ) + + +class AsyncMatchesResourceWithRawResponse: + def __init__(self, matches: AsyncMatchesResource) -> None: + self._matches = matches + + self.download = async_to_raw_response_wrapper( + matches.download, + ) + self.get = async_to_raw_response_wrapper( + matches.get, + ) + + +class MatchesResourceWithStreamingResponse: + def __init__(self, matches: MatchesResource) -> None: + self._matches = matches + + self.download = to_streamed_response_wrapper( + matches.download, + ) + self.get = to_streamed_response_wrapper( + matches.get, + ) + + +class AsyncMatchesResourceWithStreamingResponse: + def __init__(self, matches: AsyncMatchesResource) -> None: + self._matches = matches + + self.download = async_to_streamed_response_wrapper( + matches.download, + ) + self.get = async_to_streamed_response_wrapper( + matches.get, + ) diff --git a/src/cloudflare/resources/brand_protection/queries.py b/src/cloudflare/resources/brand_protection/queries.py new file mode 100644 index 00000000000..185534191d0 --- /dev/null +++ b/src/cloudflare/resources/brand_protection/queries.py @@ -0,0 +1,335 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.brand_protection import query_create_params, query_delete_params + +__all__ = ["QueriesResource", "AsyncQueriesResource"] + + +class QueriesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> QueriesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return QueriesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> QueriesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return QueriesResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + query_scan: bool | NotGiven = NOT_GIVEN, + query_tag: str | NotGiven = NOT_GIVEN, + max_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + min_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + body_scan: bool | NotGiven = NOT_GIVEN, + string_matches: object | NotGiven = NOT_GIVEN, + body_tag: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> None: + """ + Return a success message after creating new saved string queries + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + extra_headers = {"Accept": "*/*", **(extra_headers or {})} + return self._post( + f"/accounts/{account_id}/brand-protection/queries", + body=maybe_transform( + { + "max_time": max_time, + "min_time": min_time, + "body_scan": body_scan, + "string_matches": string_matches, + "body_tag": body_tag, + }, + query_create_params.QueryCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "id": id, + "query_scan": query_scan, + "query_tag": query_tag, + }, + query_create_params.QueryCreateParams, + ), + ), + cast_to=NoneType, + ) + + def delete( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + scan: bool | NotGiven = NOT_GIVEN, + tag: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> None: + """ + Return a success message after deleting saved string queries by ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + extra_headers = {"Accept": "*/*", **(extra_headers or {})} + return self._delete( + f"/accounts/{account_id}/brand-protection/queries", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "id": id, + "scan": scan, + "tag": tag, + }, + query_delete_params.QueryDeleteParams, + ), + ), + cast_to=NoneType, + ) + + +class AsyncQueriesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncQueriesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncQueriesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncQueriesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncQueriesResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + query_scan: bool | NotGiven = NOT_GIVEN, + query_tag: str | NotGiven = NOT_GIVEN, + max_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + min_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + body_scan: bool | NotGiven = NOT_GIVEN, + string_matches: object | NotGiven = NOT_GIVEN, + body_tag: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> None: + """ + Return a success message after creating new saved string queries + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + extra_headers = {"Accept": "*/*", **(extra_headers or {})} + return await self._post( + f"/accounts/{account_id}/brand-protection/queries", + body=await async_maybe_transform( + { + "max_time": max_time, + "min_time": min_time, + "body_scan": body_scan, + "string_matches": string_matches, + "body_tag": body_tag, + }, + query_create_params.QueryCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "id": id, + "query_scan": query_scan, + "query_tag": query_tag, + }, + query_create_params.QueryCreateParams, + ), + ), + cast_to=NoneType, + ) + + async def delete( + self, + *, + account_id: str, + id: str | NotGiven = NOT_GIVEN, + scan: bool | NotGiven = NOT_GIVEN, + tag: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> None: + """ + Return a success message after deleting saved string queries by ID + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + extra_headers = {"Accept": "*/*", **(extra_headers or {})} + return await self._delete( + f"/accounts/{account_id}/brand-protection/queries", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "id": id, + "scan": scan, + "tag": tag, + }, + query_delete_params.QueryDeleteParams, + ), + ), + cast_to=NoneType, + ) + + +class QueriesResourceWithRawResponse: + def __init__(self, queries: QueriesResource) -> None: + self._queries = queries + + self.create = to_raw_response_wrapper( + queries.create, + ) + self.delete = to_raw_response_wrapper( + queries.delete, + ) + + +class AsyncQueriesResourceWithRawResponse: + def __init__(self, queries: AsyncQueriesResource) -> None: + self._queries = queries + + self.create = async_to_raw_response_wrapper( + queries.create, + ) + self.delete = async_to_raw_response_wrapper( + queries.delete, + ) + + +class QueriesResourceWithStreamingResponse: + def __init__(self, queries: QueriesResource) -> None: + self._queries = queries + + self.create = to_streamed_response_wrapper( + queries.create, + ) + self.delete = to_streamed_response_wrapper( + queries.delete, + ) + + +class AsyncQueriesResourceWithStreamingResponse: + def __init__(self, queries: AsyncQueriesResource) -> None: + self._queries = queries + + self.create = async_to_streamed_response_wrapper( + queries.create, + ) + self.delete = async_to_streamed_response_wrapper( + queries.delete, + ) diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index d45b2de1d78..b55cf3ae3eb 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -96,7 +96,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -159,7 +159,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -222,7 +222,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -286,7 +286,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -352,7 +352,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -415,7 +415,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -478,7 +478,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -541,7 +541,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -609,7 +609,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -672,7 +672,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -735,7 +735,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -798,7 +798,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -861,7 +861,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -924,7 +924,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -987,7 +987,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1050,7 +1050,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1113,7 +1113,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1176,7 +1176,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1239,7 +1239,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1302,7 +1302,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1366,7 +1366,7 @@ def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1524,7 +1524,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1590,7 +1590,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1656,7 +1656,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1723,7 +1723,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1792,7 +1792,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1858,7 +1858,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1924,7 +1924,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -1990,7 +1990,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2061,7 +2061,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2127,7 +2127,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2193,7 +2193,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2259,7 +2259,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2325,7 +2325,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2391,7 +2391,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2457,7 +2457,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2523,7 +2523,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2589,7 +2589,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2655,7 +2655,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2721,7 +2721,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2787,7 +2787,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -2854,7 +2854,7 @@ def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3249,7 +3249,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3315,7 +3315,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3381,7 +3381,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3448,7 +3448,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3517,7 +3517,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3583,7 +3583,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3649,7 +3649,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3715,7 +3715,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3786,7 +3786,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3852,7 +3852,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3918,7 +3918,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -3984,7 +3984,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4050,7 +4050,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4116,7 +4116,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4182,7 +4182,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4248,7 +4248,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4314,7 +4314,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4380,7 +4380,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4446,7 +4446,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4512,7 +4512,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4579,7 +4579,7 @@ def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -4958,7 +4958,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5021,7 +5021,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5084,7 +5084,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5148,7 +5148,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5214,7 +5214,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5277,7 +5277,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5340,7 +5340,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5403,7 +5403,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5471,7 +5471,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5534,7 +5534,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5597,7 +5597,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5660,7 +5660,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5723,7 +5723,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5786,7 +5786,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5849,7 +5849,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5912,7 +5912,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -5975,7 +5975,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6038,7 +6038,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6101,7 +6101,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6164,7 +6164,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6228,7 +6228,7 @@ async def create( Args: zone_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6386,7 +6386,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6452,7 +6452,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6518,7 +6518,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6585,7 +6585,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6654,7 +6654,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6720,7 +6720,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6786,7 +6786,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6852,7 +6852,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6923,7 +6923,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -6989,7 +6989,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7055,7 +7055,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7121,7 +7121,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7187,7 +7187,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7253,7 +7253,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7319,7 +7319,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7385,7 +7385,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7451,7 +7451,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7517,7 +7517,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7583,7 +7583,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7649,7 +7649,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -7716,7 +7716,7 @@ async def update( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8111,7 +8111,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8177,7 +8177,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8243,7 +8243,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8310,7 +8310,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8379,7 +8379,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8445,7 +8445,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8511,7 +8511,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8577,7 +8577,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8648,7 +8648,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8714,7 +8714,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8780,7 +8780,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8846,7 +8846,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8912,7 +8912,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -8978,7 +8978,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -9044,7 +9044,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -9110,7 +9110,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -9176,7 +9176,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -9242,7 +9242,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -9308,7 +9308,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -9374,7 +9374,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for @@ -9441,7 +9441,7 @@ async def edit( dns_record_id: Identifier. - name: DNS record name (or @ for the zone apex) in Punycode. + name: Complete DNS record name, including the zone name, in Punycode. ttl: Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for diff --git a/src/cloudflare/resources/email_security/investigate/investigate.py b/src/cloudflare/resources/email_security/investigate/investigate.py index 519073eca2a..f1474cc5c03 100644 --- a/src/cloudflare/resources/email_security/investigate/investigate.py +++ b/src/cloudflare/resources/email_security/investigate/investigate.py @@ -151,6 +151,7 @@ def list( recipient: str | NotGiven = NOT_GIVEN, sender: str | NotGiven = NOT_GIVEN, start: Union[str, datetime] | NotGiven = NOT_GIVEN, + subject: 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, @@ -242,6 +243,7 @@ def list( "recipient": recipient, "sender": sender, "start": start, + "subject": subject, }, investigate_list_params.InvestigateListParams, ), @@ -361,6 +363,7 @@ def list( recipient: str | NotGiven = NOT_GIVEN, sender: str | NotGiven = NOT_GIVEN, start: Union[str, datetime] | NotGiven = NOT_GIVEN, + subject: 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, @@ -452,6 +455,7 @@ def list( "recipient": recipient, "sender": sender, "start": start, + "subject": subject, }, investigate_list_params.InvestigateListParams, ), diff --git a/src/cloudflare/resources/email_security/settings/allow_policies.py b/src/cloudflare/resources/email_security/settings/allow_policies.py index 2b89d18d014..c59c3ec3396 100644 --- a/src/cloudflare/resources/email_security/settings/allow_policies.py +++ b/src/cloudflare/resources/email_security/settings/allow_policies.py @@ -144,6 +144,7 @@ def list( is_trusted_sender: bool | NotGiven = NOT_GIVEN, order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, + pattern: str | NotGiven = NOT_GIVEN, pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, @@ -202,6 +203,7 @@ def list( "is_trusted_sender": is_trusted_sender, "order": order, "page": page, + "pattern": pattern, "pattern_type": pattern_type, "per_page": per_page, "search": search, @@ -482,6 +484,7 @@ def list( is_trusted_sender: bool | NotGiven = NOT_GIVEN, order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, + pattern: str | NotGiven = NOT_GIVEN, pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, @@ -540,6 +543,7 @@ def list( "is_trusted_sender": is_trusted_sender, "order": order, "page": page, + "pattern": pattern, "pattern_type": pattern_type, "per_page": per_page, "search": search, diff --git a/src/cloudflare/resources/email_security/settings/block_senders.py b/src/cloudflare/resources/email_security/settings/block_senders.py index 3bc10baf9d2..1e59f0e81f1 100644 --- a/src/cloudflare/resources/email_security/settings/block_senders.py +++ b/src/cloudflare/resources/email_security/settings/block_senders.py @@ -113,6 +113,7 @@ def list( direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, + pattern: str | NotGiven = NOT_GIVEN, pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, @@ -164,6 +165,7 @@ def list( "direction": direction, "order": order, "page": page, + "pattern": pattern, "pattern_type": pattern_type, "per_page": per_page, "search": search, @@ -393,6 +395,7 @@ def list( direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, + pattern: str | NotGiven = NOT_GIVEN, pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, @@ -444,6 +447,7 @@ def list( "direction": direction, "order": order, "page": page, + "pattern": pattern, "pattern_type": pattern_type, "per_page": per_page, "search": search, diff --git a/src/cloudflare/resources/email_security/settings/trusted_domains.py b/src/cloudflare/resources/email_security/settings/trusted_domains.py index 7300201b8ac..2b23859db01 100644 --- a/src/cloudflare/resources/email_security/settings/trusted_domains.py +++ b/src/cloudflare/resources/email_security/settings/trusted_domains.py @@ -179,6 +179,7 @@ def list( is_similarity: bool | NotGiven = NOT_GIVEN, order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, + pattern: str | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -231,6 +232,7 @@ def list( "is_similarity": is_similarity, "order": order, "page": page, + "pattern": pattern, "per_page": per_page, "search": search, }, @@ -533,6 +535,7 @@ def list( is_similarity: bool | NotGiven = NOT_GIVEN, order: Literal["pattern", "created_at"] | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, + pattern: str | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -585,6 +588,7 @@ def list( "is_similarity": is_similarity, "order": order, "page": page, + "pattern": pattern, "per_page": per_page, "search": search, }, diff --git a/src/cloudflare/resources/magic_transit/connectors/events/events.py b/src/cloudflare/resources/magic_transit/connectors/events/events.py index e549050a08e..d4f35f65215 100644 --- a/src/cloudflare/resources/magic_transit/connectors/events/events.py +++ b/src/cloudflare/resources/magic_transit/connectors/events/events.py @@ -65,6 +65,7 @@ def list( from_: float, to: float, cursor: str | NotGiven = NOT_GIVEN, + k: str | NotGiven = NOT_GIVEN, 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. @@ -79,6 +80,8 @@ def list( Args: account_id: Account identifier + k: Filter by event kind + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -103,6 +106,7 @@ def list( "from_": from_, "to": to, "cursor": cursor, + "k": k, "limit": limit, }, event_list_params.EventListParams, @@ -189,6 +193,7 @@ async def list( from_: float, to: float, cursor: str | NotGiven = NOT_GIVEN, + k: str | NotGiven = NOT_GIVEN, 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. @@ -203,6 +208,8 @@ async def list( Args: account_id: Account identifier + k: Filter by event kind + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -227,6 +234,7 @@ async def list( "from_": from_, "to": to, "cursor": cursor, + "k": k, "limit": limit, }, event_list_params.EventListParams, diff --git a/src/cloudflare/resources/radar/attacks/layer7/top/top.py b/src/cloudflare/resources/radar/attacks/layer7/top/top.py index 30db6b97c5d..3915bbbbb48 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/top/top.py +++ b/src/cloudflare/resources/radar/attacks/layer7/top/top.py @@ -86,7 +86,6 @@ def attacks( limit_direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, limit_per_location: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, - magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" @@ -142,9 +141,6 @@ def attacks( Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT. - magnitude: Deprecated parameter. Future support includes only attack magnitude defined by - total mitigated requests (MITIGATED_REQUESTS). - mitigation_product: Filters the results by layer 7 mitigation product. name: Array of names used to label the series in the response. @@ -179,7 +175,6 @@ def attacks( "limit_direction": limit_direction, "limit_per_location": limit_per_location, "location": location, - "magnitude": magnitude, "mitigation_product": mitigation_product, "name": name, "normalization": normalization, @@ -549,7 +544,6 @@ async def attacks( limit_direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, limit_per_location: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, - magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ "DDOS", "WAF", "BOT_MANAGEMENT", "ACCESS_RULES", "IP_REPUTATION", "API_SHIELD", "DATA_LOSS_PREVENTION" @@ -605,9 +599,6 @@ async def attacks( Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT. - magnitude: Deprecated parameter. Future support includes only attack magnitude defined by - total mitigated requests (MITIGATED_REQUESTS). - mitigation_product: Filters the results by layer 7 mitigation product. name: Array of names used to label the series in the response. @@ -642,7 +633,6 @@ async def attacks( "limit_direction": limit_direction, "limit_per_location": limit_per_location, "location": location, - "magnitude": magnitude, "mitigation_product": mitigation_product, "name": name, "normalization": normalization, diff --git a/src/cloudflare/resources/radar/search.py b/src/cloudflare/resources/radar/search.py index 629f5ad0215..24d1df57e4c 100644 --- a/src/cloudflare/resources/radar/search.py +++ b/src/cloudflare/resources/radar/search.py @@ -49,9 +49,11 @@ def global_( self, *, query: str, - exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + exclude: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]] + | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + include: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]] + | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, limit_per_group: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -62,10 +64,11 @@ def global_( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SearchGlobalResponse: """ - Searches for locations, autonomous systems, reports, and bots. + Searches for locations, autonomous systems, reports, bots, certificate logs, and + certificate authorities. Args: - query: Search for locations, autonomous systems and reports. + query: String used to perform the search operation. exclude: Search types excluded from results. @@ -133,9 +136,11 @@ async def global_( self, *, query: str, - exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + exclude: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]] + | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, - include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] | NotGiven = NOT_GIVEN, + include: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]] + | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, limit_per_group: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -146,10 +151,11 @@ async def global_( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SearchGlobalResponse: """ - Searches for locations, autonomous systems, reports, and bots. + Searches for locations, autonomous systems, reports, bots, certificate logs, and + certificate authorities. Args: - query: Search for locations, autonomous systems and reports. + query: String used to perform the search operation. exclude: Search types excluded from results. diff --git a/src/cloudflare/resources/rules/lists/bulk_operations.py b/src/cloudflare/resources/rules/lists/bulk_operations.py index 8e7184794a0..a0c473eb47c 100644 --- a/src/cloudflare/resources/rules/lists/bulk_operations.py +++ b/src/cloudflare/resources/rules/lists/bulk_operations.py @@ -62,7 +62,7 @@ def get( property will contain a message describing the error. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. operation_id: The unique operation ID of the asynchronous action. @@ -131,7 +131,7 @@ async def get( property will contain a message describing the error. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. operation_id: The unique operation ID of the asynchronous action. diff --git a/src/cloudflare/resources/rules/lists/items.py b/src/cloudflare/resources/rules/lists/items.py index 90fcb204aeb..993efc22a13 100644 --- a/src/cloudflare/resources/rules/lists/items.py +++ b/src/cloudflare/resources/rules/lists/items.py @@ -70,7 +70,7 @@ def create( `Get bulk operation status` endpoint with the returned `operation_id`. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -120,7 +120,7 @@ def update( `Get bulk operation status` endpoint with the returned `operation_id`. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -168,7 +168,7 @@ def list( Fetches all the items in the list. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -238,7 +238,7 @@ def delete( `Get bulk operation status` endpoint with the returned `operation_id`. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -284,7 +284,7 @@ def get( Fetches a list item in the list. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -358,7 +358,7 @@ async def create( `Get bulk operation status` endpoint with the returned `operation_id`. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -408,7 +408,7 @@ async def update( `Get bulk operation status` endpoint with the returned `operation_id`. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -456,7 +456,7 @@ def list( Fetches all the items in the list. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -526,7 +526,7 @@ async def delete( `Get bulk operation status` endpoint with the returned `operation_id`. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -572,7 +572,7 @@ async def get( Fetches a list item in the list. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. diff --git a/src/cloudflare/resources/rules/lists/lists.py b/src/cloudflare/resources/rules/lists/lists.py index c2b635e87a2..a14fc8fc174 100644 --- a/src/cloudflare/resources/rules/lists/lists.py +++ b/src/cloudflare/resources/rules/lists/lists.py @@ -89,10 +89,10 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ListCreateResponse: """ - Creates a new list of the specified type. + Creates a new list of the specified kind. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. kind: The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). @@ -148,7 +148,7 @@ def update( Updates the description of a list. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -194,7 +194,7 @@ def list( Fetches all lists in the account. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. extra_headers: Send extra headers @@ -231,7 +231,7 @@ def delete( Deletes a specific list and all its items. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -275,7 +275,7 @@ def get( Fetches the details of a list. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -347,10 +347,10 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ListCreateResponse: """ - Creates a new list of the specified type. + Creates a new list of the specified kind. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. kind: The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). @@ -406,7 +406,7 @@ async def update( Updates the description of a list. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -452,7 +452,7 @@ def list( Fetches all lists in the account. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. extra_headers: Send extra headers @@ -489,7 +489,7 @@ async def delete( Deletes a specific list and all its items. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. @@ -533,7 +533,7 @@ async def get( Fetches the details of a list. Args: - account_id: Defines an identifier. + account_id: The Account ID for this resource. list_id: The unique ID of the list. diff --git a/src/cloudflare/resources/ssl/recommendations.py b/src/cloudflare/resources/ssl/recommendations.py index 512e55ba1b3..4efd89cb294 100644 --- a/src/cloudflare/resources/ssl/recommendations.py +++ b/src/cloudflare/resources/ssl/recommendations.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import Type, Optional, cast +import typing_extensions +from typing import Type, cast import httpx @@ -42,6 +43,7 @@ def with_streaming_response(self) -> RecommendationsResourceWithStreamingRespons """ return RecommendationsResourceWithStreamingResponse(self) + @typing_extensions.deprecated("SSL/TLS Recommender has been decommissioned in favor of Automatic SSL/TLS") def get( self, *, @@ -52,13 +54,11 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RecommendationGetResponse]: + ) -> RecommendationGetResponse: """ Retrieve the SSL/TLS Recommender's recommendation for a zone. Args: - zone_id: Identifier. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -76,9 +76,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[RecommendationGetResponse]]._unwrapper, + post_parser=ResultWrapper[RecommendationGetResponse]._unwrapper, ), - cast_to=cast(Type[Optional[RecommendationGetResponse]], ResultWrapper[RecommendationGetResponse]), + cast_to=cast(Type[RecommendationGetResponse], ResultWrapper[RecommendationGetResponse]), ) @@ -102,6 +102,7 @@ def with_streaming_response(self) -> AsyncRecommendationsResourceWithStreamingRe """ return AsyncRecommendationsResourceWithStreamingResponse(self) + @typing_extensions.deprecated("SSL/TLS Recommender has been decommissioned in favor of Automatic SSL/TLS") async def get( self, *, @@ -112,13 +113,11 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RecommendationGetResponse]: + ) -> RecommendationGetResponse: """ Retrieve the SSL/TLS Recommender's recommendation for a zone. Args: - zone_id: Identifier. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -136,9 +135,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[RecommendationGetResponse]]._unwrapper, + post_parser=ResultWrapper[RecommendationGetResponse]._unwrapper, ), - cast_to=cast(Type[Optional[RecommendationGetResponse]], ResultWrapper[RecommendationGetResponse]), + cast_to=cast(Type[RecommendationGetResponse], ResultWrapper[RecommendationGetResponse]), ) @@ -146,8 +145,10 @@ class RecommendationsResourceWithRawResponse: def __init__(self, recommendations: RecommendationsResource) -> None: self._recommendations = recommendations - self.get = to_raw_response_wrapper( - recommendations.get, + self.get = ( # pyright: ignore[reportDeprecated] + to_raw_response_wrapper( + recommendations.get # pyright: ignore[reportDeprecated], + ) ) @@ -155,8 +156,10 @@ class AsyncRecommendationsResourceWithRawResponse: def __init__(self, recommendations: AsyncRecommendationsResource) -> None: self._recommendations = recommendations - self.get = async_to_raw_response_wrapper( - recommendations.get, + self.get = ( # pyright: ignore[reportDeprecated] + async_to_raw_response_wrapper( + recommendations.get # pyright: ignore[reportDeprecated], + ) ) @@ -164,8 +167,10 @@ class RecommendationsResourceWithStreamingResponse: def __init__(self, recommendations: RecommendationsResource) -> None: self._recommendations = recommendations - self.get = to_streamed_response_wrapper( - recommendations.get, + self.get = ( # pyright: ignore[reportDeprecated] + to_streamed_response_wrapper( + recommendations.get # pyright: ignore[reportDeprecated], + ) ) @@ -173,6 +178,8 @@ class AsyncRecommendationsResourceWithStreamingResponse: def __init__(self, recommendations: AsyncRecommendationsResource) -> None: self._recommendations = recommendations - self.get = async_to_streamed_response_wrapper( - recommendations.get, + self.get = ( # pyright: ignore[reportDeprecated] + async_to_streamed_response_wrapper( + recommendations.get # pyright: ignore[reportDeprecated], + ) ) diff --git a/src/cloudflare/resources/stream/stream.py b/src/cloudflare/resources/stream/stream.py index f818bb943bd..23c1b57dc2b 100644 --- a/src/cloudflare/resources/stream/stream.py +++ b/src/cloudflare/resources/stream/stream.py @@ -292,7 +292,7 @@ def list( include_counts: bool | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, start: Union[str, datetime] | NotGiven = NOT_GIVEN, - status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"] + status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"] | 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. @@ -705,7 +705,7 @@ def list( include_counts: bool | NotGiven = NOT_GIVEN, search: str | NotGiven = NOT_GIVEN, start: Union[str, datetime] | NotGiven = NOT_GIVEN, - status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"] + status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"] | 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. diff --git a/src/cloudflare/resources/workers/scripts/content.py b/src/cloudflare/resources/workers/scripts/content.py index 56c3d0f6686..0f1887fc437 100644 --- a/src/cloudflare/resources/workers/scripts/content.py +++ b/src/cloudflare/resources/workers/scripts/content.py @@ -2,12 +2,18 @@ from __future__ import annotations -from typing import Type, cast +from typing import List, Type, Mapping, cast import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import maybe_transform, strip_not_given, async_maybe_transform +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes +from ...._utils import ( + extract_files, + maybe_transform, + strip_not_given, + deepcopy_minimal, + async_maybe_transform, +) from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -28,7 +34,6 @@ from ...._base_client import make_request_options from ....types.workers.script import Script from ....types.workers.scripts import content_update_params -from ....types.workers.worker_metadata_param import WorkerMetadataParam __all__ = ["ContentResource", "AsyncContentResource"] @@ -58,7 +63,8 @@ def update( script_name: str, *, account_id: str, - metadata: WorkerMetadataParam, + metadata: content_update_params.Metadata, + files: List[FileTypes] | NotGiven = NOT_GIVEN, cf_worker_body_part: str | NotGiven = NOT_GIVEN, cf_worker_main_module_part: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -78,6 +84,13 @@ def update( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -99,13 +112,21 @@ def update( ), **(extra_headers or {}), } + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/workers/scripts/{script_name}/content", - body=maybe_transform({"metadata": metadata}, content_update_params.ContentUpdateParams), + body=maybe_transform(body, content_update_params.ContentUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -183,7 +204,8 @@ async def update( script_name: str, *, account_id: str, - metadata: WorkerMetadataParam, + metadata: content_update_params.Metadata, + files: List[FileTypes] | NotGiven = NOT_GIVEN, cf_worker_body_part: str | NotGiven = NOT_GIVEN, cf_worker_main_module_part: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -203,6 +225,13 @@ async def update( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -224,13 +253,21 @@ async def update( ), **(extra_headers or {}), } + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/workers/scripts/{script_name}/content", - body=await async_maybe_transform({"metadata": metadata}, content_update_params.ContentUpdateParams), + body=await async_maybe_transform(body, content_update_params.ContentUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/workers/scripts/deployments.py b/src/cloudflare/resources/workers/scripts/deployments.py index 906cc4caf10..0f2550f6203 100644 --- a/src/cloudflare/resources/workers/scripts/deployments.py +++ b/src/cloudflare/resources/workers/scripts/deployments.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, Optional, cast +from typing import Type, Iterable, cast from typing_extensions import Literal import httpx @@ -20,7 +20,6 @@ from ...._wrappers import ResultWrapper from ...._base_client import make_request_options from ....types.workers.scripts import deployment_create_params -from ....types.workers.scripts.deployment_param import DeploymentParam from ....types.workers.scripts.deployment_get_response import DeploymentGetResponse from ....types.workers.scripts.deployment_create_response import DeploymentCreateResponse @@ -55,14 +54,14 @@ def create( strategy: Literal["percentage"], versions: Iterable[deployment_create_params.Version], force: bool | NotGiven = NOT_GIVEN, - annotations: DeploymentParam | NotGiven = NOT_GIVEN, + annotations: deployment_create_params.Annotations | 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DeploymentCreateResponse]: + ) -> DeploymentCreateResponse: """ Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) @@ -72,7 +71,7 @@ def create( Args: account_id: Identifier. - script_name: Name of the script. + script_name: Name of the script, used in URLs and route configuration. force: If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed. @@ -105,9 +104,9 @@ def create( extra_body=extra_body, timeout=timeout, query=maybe_transform({"force": force}, deployment_create_params.DeploymentCreateParams), - post_parser=ResultWrapper[Optional[DeploymentCreateResponse]]._unwrapper, + post_parser=ResultWrapper[DeploymentCreateResponse]._unwrapper, ), - cast_to=cast(Type[Optional[DeploymentCreateResponse]], ResultWrapper[DeploymentCreateResponse]), + cast_to=cast(Type[DeploymentCreateResponse], ResultWrapper[DeploymentCreateResponse]), ) def get( @@ -121,7 +120,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DeploymentGetResponse]: + ) -> DeploymentGetResponse: """List of Worker Deployments. The first deployment in the list is the latest @@ -130,7 +129,7 @@ def get( Args: account_id: Identifier. - script_name: Name of the script. + script_name: Name of the script, used in URLs and route configuration. extra_headers: Send extra headers @@ -151,9 +150,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[DeploymentGetResponse]]._unwrapper, + post_parser=ResultWrapper[DeploymentGetResponse]._unwrapper, ), - cast_to=cast(Type[Optional[DeploymentGetResponse]], ResultWrapper[DeploymentGetResponse]), + cast_to=cast(Type[DeploymentGetResponse], ResultWrapper[DeploymentGetResponse]), ) @@ -185,14 +184,14 @@ async def create( strategy: Literal["percentage"], versions: Iterable[deployment_create_params.Version], force: bool | NotGiven = NOT_GIVEN, - annotations: DeploymentParam | NotGiven = NOT_GIVEN, + annotations: deployment_create_params.Annotations | 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DeploymentCreateResponse]: + ) -> DeploymentCreateResponse: """ Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) @@ -202,7 +201,7 @@ async def create( Args: account_id: Identifier. - script_name: Name of the script. + script_name: Name of the script, used in URLs and route configuration. force: If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed. @@ -235,9 +234,9 @@ async def create( extra_body=extra_body, timeout=timeout, query=await async_maybe_transform({"force": force}, deployment_create_params.DeploymentCreateParams), - post_parser=ResultWrapper[Optional[DeploymentCreateResponse]]._unwrapper, + post_parser=ResultWrapper[DeploymentCreateResponse]._unwrapper, ), - cast_to=cast(Type[Optional[DeploymentCreateResponse]], ResultWrapper[DeploymentCreateResponse]), + cast_to=cast(Type[DeploymentCreateResponse], ResultWrapper[DeploymentCreateResponse]), ) async def get( @@ -251,7 +250,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DeploymentGetResponse]: + ) -> DeploymentGetResponse: """List of Worker Deployments. The first deployment in the list is the latest @@ -260,7 +259,7 @@ async def get( Args: account_id: Identifier. - script_name: Name of the script. + script_name: Name of the script, used in URLs and route configuration. extra_headers: Send extra headers @@ -281,9 +280,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[DeploymentGetResponse]]._unwrapper, + post_parser=ResultWrapper[DeploymentGetResponse]._unwrapper, ), - cast_to=cast(Type[Optional[DeploymentGetResponse]], ResultWrapper[DeploymentGetResponse]), + cast_to=cast(Type[DeploymentGetResponse], ResultWrapper[DeploymentGetResponse]), ) diff --git a/src/cloudflare/resources/workers/scripts/scripts.py b/src/cloudflare/resources/workers/scripts/scripts.py index e4937fa83ae..0435322d516 100644 --- a/src/cloudflare/resources/workers/scripts/scripts.py +++ b/src/cloudflare/resources/workers/scripts/scripts.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Type, Optional, cast +from typing import List, Type, Mapping, Optional, cast import httpx @@ -47,7 +47,7 @@ AsyncVersionsResourceWithStreamingResponse, ) from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes -from ...._utils import maybe_transform, async_maybe_transform +from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from .schedules import ( SchedulesResource, AsyncSchedulesResource, @@ -172,7 +172,7 @@ def update( *, account_id: str, metadata: script_update_params.Metadata, - files: Dict[str, FileTypes] = {}, + files: List[FileTypes] | 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, @@ -193,6 +193,13 @@ def update( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -205,14 +212,22 @@ def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) + if extracted_files: + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/workers/scripts/{script_name}", - body=maybe_transform({"metadata": metadata}, script_update_params.ScriptUpdateParams), - files=files, + body=maybe_transform(body, script_update_params.ScriptUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -421,7 +436,7 @@ async def update( *, account_id: str, metadata: script_update_params.Metadata, - files: Dict[str, FileTypes] = {}, + files: List[FileTypes] | 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, @@ -442,6 +457,13 @@ async def update( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -454,14 +476,22 @@ async def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) + if extracted_files: + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/workers/scripts/{script_name}", - body=await async_maybe_transform({"metadata": metadata}, script_update_params.ScriptUpdateParams), - files=files, + body=await async_maybe_transform(body, script_update_params.ScriptUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/workers/scripts/versions.py b/src/cloudflare/resources/workers/scripts/versions.py index e4755f21f7c..f9e3cc9a1b6 100644 --- a/src/cloudflare/resources/workers/scripts/versions.py +++ b/src/cloudflare/resources/workers/scripts/versions.py @@ -2,12 +2,12 @@ from __future__ import annotations -from typing import Type, cast +from typing import List, Type, Mapping, cast import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import maybe_transform, async_maybe_transform +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes +from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -53,6 +53,7 @@ def create( *, account_id: str, metadata: version_create_params.Metadata, + files: List[FileTypes] | 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, @@ -73,6 +74,13 @@ def create( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -85,13 +93,21 @@ def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( f"/accounts/{account_id}/workers/scripts/{script_name}/versions", - body=maybe_transform({"metadata": metadata}, version_create_params.VersionCreateParams), + body=maybe_transform(body, version_create_params.VersionCreateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -238,6 +254,7 @@ async def create( *, account_id: str, metadata: version_create_params.Metadata, + files: List[FileTypes] | 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, @@ -258,6 +275,13 @@ async def create( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -270,13 +294,21 @@ async def create( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( f"/accounts/{account_id}/workers/scripts/{script_name}/versions", - body=await async_maybe_transform({"metadata": metadata}, version_create_params.VersionCreateParams), + body=await async_maybe_transform(body, version_create_params.VersionCreateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py index fec2b2495b0..50b761d58a9 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py @@ -2,12 +2,18 @@ from __future__ import annotations -from typing import Type, cast +from typing import List, Type, Mapping, cast import httpx -from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ......_utils import maybe_transform, strip_not_given, async_maybe_transform +from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes +from ......_utils import ( + extract_files, + maybe_transform, + strip_not_given, + deepcopy_minimal, + async_maybe_transform, +) from ......_compat import cached_property from ......_resource import SyncAPIResource, AsyncAPIResource from ......_response import ( @@ -60,6 +66,7 @@ def update( account_id: str, dispatch_namespace: str, metadata: WorkerMetadataParam, + files: List[FileTypes] | NotGiven = NOT_GIVEN, cf_worker_body_part: str | NotGiven = NOT_GIVEN, cf_worker_main_module_part: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -81,6 +88,13 @@ def update( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -104,13 +118,21 @@ def update( ), **(extra_headers or {}), } + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content", - body=maybe_transform({"metadata": metadata}, content_update_params.ContentUpdateParams), + body=maybe_transform(body, content_update_params.ContentUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -196,6 +218,7 @@ async def update( account_id: str, dispatch_namespace: str, metadata: WorkerMetadataParam, + files: List[FileTypes] | NotGiven = NOT_GIVEN, cf_worker_body_part: str | NotGiven = NOT_GIVEN, cf_worker_main_module_part: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -217,6 +240,13 @@ async def update( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -240,13 +270,21 @@ async def update( ), **(extra_headers or {}), } + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content", - body=await async_maybe_transform({"metadata": metadata}, content_update_params.ContentUpdateParams), + body=await async_maybe_transform(body, content_update_params.ContentUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py index 6212535ade3..293f9b391a4 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Type, Optional, cast +from typing import List, Type, Mapping, Optional, cast import httpx @@ -47,7 +47,7 @@ AsyncSettingsResourceWithStreamingResponse, ) from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes -from ......_utils import maybe_transform, async_maybe_transform +from ......_utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from ......_compat import cached_property from .asset_upload import ( AssetUploadResource, @@ -124,7 +124,7 @@ def update( account_id: str, dispatch_namespace: str, metadata: script_update_params.Metadata, - files: Dict[str, FileTypes] = {}, + files: List[FileTypes] | 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, @@ -147,6 +147,13 @@ def update( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -161,14 +168,22 @@ def update( raise ValueError(f"Expected a non-empty value for `dispatch_namespace` but received {dispatch_namespace!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) + if extracted_files: + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}", - body=maybe_transform({"metadata": metadata}, script_update_params.ScriptUpdateParams), - files=files, + body=maybe_transform(body, script_update_params.ScriptUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -338,7 +353,7 @@ async def update( account_id: str, dispatch_namespace: str, metadata: script_update_params.Metadata, - files: Dict[str, FileTypes] = {}, + files: List[FileTypes] | 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, @@ -361,6 +376,13 @@ async def update( metadata: JSON encoded metadata about the uploaded parts and Worker configuration. + files: An array of modules (often JavaScript files) comprising a Worker script. At + least one module must be present and referenced in the metadata as `main_module` + or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -375,14 +397,22 @@ async def update( raise ValueError(f"Expected a non-empty value for `dispatch_namespace` but received {dispatch_namespace!r}") if not script_name: raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + body = deepcopy_minimal( + { + "metadata": metadata, + "files": files, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) + if extracted_files: + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}", - body=await async_maybe_transform({"metadata": metadata}, script_update_params.ScriptUpdateParams), - files=files, + body=await async_maybe_transform(body, script_update_params.ScriptUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index 726acda86ad..00e7bff9f3f 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -1162,6 +1162,7 @@ def create( landing_page_design: application_create_params.AppLauncherApplicationLandingPageDesign | NotGiven = NOT_GIVEN, skip_app_launcher_login_page: bool | NotGiven = NOT_GIVEN, target_criteria: Iterable[application_create_params.InfrastructureApplicationTargetCriterion] + | Iterable[application_create_params.BrowserRdpApplicationTargetCriterion] | 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. @@ -2312,6 +2313,7 @@ def update( landing_page_design: application_update_params.AppLauncherApplicationLandingPageDesign | NotGiven = NOT_GIVEN, skip_app_launcher_login_page: bool | NotGiven = NOT_GIVEN, target_criteria: Iterable[application_update_params.InfrastructureApplicationTargetCriterion] + | Iterable[application_update_params.BrowserRdpApplicationTargetCriterion] | 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. @@ -3727,6 +3729,7 @@ async def create( landing_page_design: application_create_params.AppLauncherApplicationLandingPageDesign | NotGiven = NOT_GIVEN, skip_app_launcher_login_page: bool | NotGiven = NOT_GIVEN, target_criteria: Iterable[application_create_params.InfrastructureApplicationTargetCriterion] + | Iterable[application_create_params.BrowserRdpApplicationTargetCriterion] | 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. @@ -4877,6 +4880,7 @@ async def update( landing_page_design: application_update_params.AppLauncherApplicationLandingPageDesign | NotGiven = NOT_GIVEN, skip_app_launcher_login_page: bool | NotGiven = NOT_GIVEN, target_criteria: Iterable[application_update_params.InfrastructureApplicationTargetCriterion] + | Iterable[application_update_params.BrowserRdpApplicationTargetCriterion] | 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. diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/integration.py b/src/cloudflare/resources/zero_trust/dlp/entries/integration.py index 57b4b3a6507..baf9414999d 100644 --- a/src/cloudflare/resources/zero_trust/dlp/entries/integration.py +++ b/src/cloudflare/resources/zero_trust/dlp/entries/integration.py @@ -60,7 +60,8 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[IntegrationCreateResponse]: """ - This will update an existing integration entry + Integration entries can't be created, this will update an existing integration + entry This is needed for our generated terraform API Args: profile_id: This field is not actually used as the owning profile for a predefined entry is @@ -215,7 +216,8 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[IntegrationCreateResponse]: """ - This will update an existing integration entry + Integration entries can't be created, this will update an existing integration + entry This is needed for our generated terraform API Args: profile_id: This field is not actually used as the owning profile for a predefined entry is diff --git a/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py b/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py index b5cf2fcd9a5..c5890e76fbe 100644 --- a/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py +++ b/src/cloudflare/resources/zero_trust/dlp/entries/predefined.py @@ -60,7 +60,8 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[PredefinedCreateResponse]: """ - This will update an existing predefined entry + Predefined entries can't be created, this will update an existing predefined + entry This is needed for our generated terraform API Args: profile_id: This field is not actually used as the owning profile for a predefined entry is @@ -215,7 +216,8 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Optional[PredefinedCreateResponse]: """ - This will update an existing predefined entry + Predefined entries can't be created, this will update an existing predefined + entry This is needed for our generated terraform API Args: profile_id: This field is not actually used as the owning profile for a predefined entry is diff --git a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py b/src/cloudflare/types/abuse_reports/abuse_report_create_params.py index f80f35d4b9e..080ca385cc8 100644 --- a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py +++ b/src/cloudflare/types/abuse_reports/abuse_report_create_params.py @@ -11,7 +11,7 @@ "AbuseReportsTrademarkReport", "AbuseReportsGeneralReport", "AbuseReportsPhishingReport", - "AbuseReportsChildrenAbuseReport", + "AbuseReportsCsamReport", "AbuseReportsThreatReport", "AbuseReportsRegistrarWhoisReport", "AbuseReportsNcseiReport", @@ -33,151 +33,112 @@ class AbuseReportsDmcaReport(TypedDict, total=False): "abuse_ncsei", ] ] - """The abuse report type""" - email: Required[str] - """A valid email of the abuse reporter. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - email2: Required[str] - """Should match the value provided in `email`""" - - name: Required[str] - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). - - The list of the URLs should not exceed 250 URLs. All URLs should have the same - hostname. Each URL should be unique. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ - - address1: str + address1: Required[str] """Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - agent_name: str + agent_name: Required[str] """The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - agree: Literal[0, 1] + agree: Required[Literal[1]] """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" - city: str + city: Required[str] """Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - comments: str - """Any additional comments about the infringement not exceeding 2000 characters""" - - company: str - """Text not exceeding 100 characters. + country: Required[str] + """Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - country: str - """Text not exceeding 255 characters. + email: Required[str] + """A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ + email2: Required[str] + """Should match the value provided in `email`""" - host_notification: Literal["send", "send-anon", "none"] + host_notification: Required[Literal["send"]] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - justification: str - """ - A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - """ - - ncmec_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. + name: Required[str] + """Text not exceeding 255 characters. - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + This field may be released by Cloudflare to third parties such as the Lumen + Database (https://lumendatabase.org/). """ - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report.""" - - original_work: str + original_work: Required[str] """Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - owner_notification: Literal["send", "send-anon", "none"] + owner_notification: Required[Literal["send"]] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - ports_protocols: str - """A comma separated list of ports and protocols e.g. - - 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. - Each individual port/protocol should not exceed 100 characters. The list should - not have more than 30 unique ports and protocols. - """ - - reported_country: str - """Text containing 2 characters""" - - reported_user_agent: str - """Text not exceeding 255 characters""" - - signature: str + signature: Required[str] """Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports """ - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). + state: Required[str] + """Text not exceeding 255 characters. - The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique + This field may be released by Cloudflare to third parties such as the Lumen + Database (https://lumendatabase.org/). """ - state: str - """Text not exceeding 255 characters. + urls: Required[str] + """A list of valid URLs separated by ‘\n’ (new line character). + + The list of the URLs should not exceed 250 URLs. All URLs should have the same + hostname. Each URL should be unique. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). + """ + + comments: str + """Any additional comments about the infringement not exceeding 2000 characters""" + + company: str + """Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ + reported_country: str + """Text containing 2 characters""" + + reported_user_agent: str + """Text not exceeding 255 characters""" + tele: str """Text not exceeding 20 characters. @@ -188,23 +149,14 @@ class AbuseReportsDmcaReport(TypedDict, total=False): title: str """Text not exceeding 255 characters""" - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" - class AbuseReportsTrademarkReport(TypedDict, total=False): account_id: Required[str] act: Required[ Literal[ - "abuse_dmca", "abuse_trademark", + "abuse_dmca", "abuse_general", "abuse_phishing", "abuse_children", @@ -213,7 +165,6 @@ class AbuseReportsTrademarkReport(TypedDict, total=False): "abuse_ncsei", ] ] - """The abuse report type""" email: Required[str] """A valid email of the abuse reporter. @@ -225,6 +176,19 @@ class AbuseReportsTrademarkReport(TypedDict, total=False): email2: Required[str] """Should match the value provided in `email`""" + host_notification: Required[Literal["send"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + justification: Required[str] + """ + A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. + """ + name: Required[str] """Text not exceeding 255 characters. @@ -232,95 +196,131 @@ class AbuseReportsTrademarkReport(TypedDict, total=False): Database (https://lumendatabase.org/). """ + owner_notification: Required[Literal["send"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + trademark_number: Required[str] + """Text not exceeding 1000 characters""" + + trademark_office: Required[str] + """Text not exceeding 1000 characters""" + + trademark_symbol: Required[str] + """Text not exceeding 1000 characters""" + urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). + """A list of valid URLs separated by ‘\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - address1: str + comments: str + """Any additional comments about the infringement not exceeding 2000 characters""" + + company: str """Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - agent_name: str - """The name of the copyright holder. - - Text not exceeding 60 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ + reported_country: str + """Text containing 2 characters""" - agree: Literal[0, 1] - """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" + reported_user_agent: str + """Text not exceeding 255 characters""" - city: str - """Text not exceeding 255 characters. + tele: str + """Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - comments: str - """Any additional comments about the infringement not exceeding 2000 characters""" + title: str + """Text not exceeding 255 characters""" - company: str - """Text not exceeding 100 characters. - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ +class AbuseReportsGeneralReport(TypedDict, total=False): + account_id: Required[str] - country: str - """Text not exceeding 255 characters. + act: Required[ + Literal[ + "abuse_general", + "abuse_dmca", + "abuse_trademark", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + ] + + email: Required[str] + """A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ + email2: Required[str] + """Should match the value provided in `email`""" - host_notification: Literal["send", "send-anon", "none"] + host_notification: Required[Literal["send", "send-anon"]] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - justification: str + justification: Required[str] """ A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 - characters + characters. + """ + + name: Required[str] + """Text not exceeding 255 characters. + + This field may be released by Cloudflare to third parties such as the Lumen + Database (https://lumendatabase.org/). """ - ncmec_notification: Literal["send", "send-anon", "none"] + owner_notification: Required[Literal["send", "send-anon", "none"]] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report.""" + urls: Required[str] + """A list of valid URLs separated by ‘\n’ (new line character). - original_work: str - """Text not exceeding 255 characters. + The list of the URLs should not exceed 250 URLs. All URLs should have the same + hostname. Each URL should be unique. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). + """ + + comments: str + """Any additional comments about the infringement not exceeding 2000 characters""" + + company: str + """Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - owner_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. + destination_ips: str + """A list of IP addresses separated by ‘\n’ (new line character). - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + The list of destination IPs should not exceed 30 IP addresses. Each one of the + IP addresses ought to be unique. """ ports_protocols: str @@ -337,25 +337,11 @@ class AbuseReportsTrademarkReport(TypedDict, total=False): reported_user_agent: str """Text not exceeding 255 characters""" - signature: str - """Required for DMCA reports, should be same as Name. - - An affirmation that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports - """ - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). + """A list of IP addresses separated by ‘\n’ (new line character). The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique - """ - - state: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). + addresses ought to be unique. """ tele: str @@ -368,32 +354,22 @@ class AbuseReportsTrademarkReport(TypedDict, total=False): title: str """Text not exceeding 255 characters""" - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" - -class AbuseReportsGeneralReport(TypedDict, total=False): +class AbuseReportsPhishingReport(TypedDict, total=False): account_id: Required[str] act: Required[ Literal[ + "abuse_phishing", "abuse_dmca", "abuse_trademark", "abuse_general", - "abuse_phishing", "abuse_children", "abuse_threat", "abuse_registrar_whois", "abuse_ncsei", ] ] - """The abuse report type""" email: Required[str] """A valid email of the abuse reporter. @@ -405,43 +381,38 @@ class AbuseReportsGeneralReport(TypedDict, total=False): email2: Required[str] """Should match the value provided in `email`""" - name: Required[str] - """Text not exceeding 255 characters. + host_notification: Required[Literal["send", "send-anon"]] + """Notification type based on the abuse type. - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). - - The list of the URLs should not exceed 250 URLs. All URLs should have the same - hostname. Each URL should be unique. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + justification: Required[str] + """ + A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. """ - address1: str - """Text not exceeding 100 characters. + name: Required[str] + """Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - agent_name: str - """The name of the copyright holder. + owner_notification: Required[Literal["send", "send-anon"]] + """Notification type based on the abuse type. - Text not exceeding 60 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - agree: Literal[0, 1] - """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" - - city: str - """Text not exceeding 255 characters. + urls: Required[str] + """A list of valid URLs separated by ‘\n’ (new line character). - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). + The list of the URLs should not exceed 250 URLs. All URLs should have the same + hostname. Each URL should be unique. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). """ comments: str @@ -454,629 +425,18 @@ class AbuseReportsGeneralReport(TypedDict, total=False): Database (https://lumendatabase.org/). """ - country: str + original_work: str """Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). + reported_country: str + """Text containing 2 characters""" - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ - - host_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - justification: str - """ - A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - """ - - ncmec_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report.""" - - original_work: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - owner_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ports_protocols: str - """A comma separated list of ports and protocols e.g. - - 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. - Each individual port/protocol should not exceed 100 characters. The list should - not have more than 30 unique ports and protocols. - """ - - reported_country: str - """Text containing 2 characters""" - - reported_user_agent: str - """Text not exceeding 255 characters""" - - signature: str - """Required for DMCA reports, should be same as Name. - - An affirmation that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports - """ - - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique - """ - - state: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - tele: str - """Text not exceeding 20 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - title: str - """Text not exceeding 255 characters""" - - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" - - -class AbuseReportsPhishingReport(TypedDict, total=False): - account_id: Required[str] - - act: Required[ - Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] - """The abuse report type""" - - email: Required[str] - """A valid email of the abuse reporter. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - email2: Required[str] - """Should match the value provided in `email`""" - - name: Required[str] - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). - - The list of the URLs should not exceed 250 URLs. All URLs should have the same - hostname. Each URL should be unique. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ - - address1: str - """Text not exceeding 100 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - agent_name: str - """The name of the copyright holder. - - Text not exceeding 60 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ - - agree: Literal[0, 1] - """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" - - city: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - comments: str - """Any additional comments about the infringement not exceeding 2000 characters""" - - company: str - """Text not exceeding 100 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - country: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ - - host_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - justification: str - """ - A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - """ - - ncmec_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report.""" - - original_work: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - owner_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ports_protocols: str - """A comma separated list of ports and protocols e.g. - - 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. - Each individual port/protocol should not exceed 100 characters. The list should - not have more than 30 unique ports and protocols. - """ - - reported_country: str - """Text containing 2 characters""" - - reported_user_agent: str - """Text not exceeding 255 characters""" - - signature: str - """Required for DMCA reports, should be same as Name. - - An affirmation that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports - """ - - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique - """ - - state: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - tele: str - """Text not exceeding 20 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - title: str - """Text not exceeding 255 characters""" - - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" - - -class AbuseReportsChildrenAbuseReport(TypedDict, total=False): - account_id: Required[str] - - act: Required[ - Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] - """The abuse report type""" - - email: Required[str] - """A valid email of the abuse reporter. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - email2: Required[str] - """Should match the value provided in `email`""" - - name: Required[str] - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). - - The list of the URLs should not exceed 250 URLs. All URLs should have the same - hostname. Each URL should be unique. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ - - address1: str - """Text not exceeding 100 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - agent_name: str - """The name of the copyright holder. - - Text not exceeding 60 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ - - agree: Literal[0, 1] - """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" - - city: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - comments: str - """Any additional comments about the infringement not exceeding 2000 characters""" - - company: str - """Text not exceeding 100 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - country: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ - - host_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - justification: str - """ - A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - """ - - ncmec_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report.""" - - original_work: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - owner_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ports_protocols: str - """A comma separated list of ports and protocols e.g. - - 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. - Each individual port/protocol should not exceed 100 characters. The list should - not have more than 30 unique ports and protocols. - """ - - reported_country: str - """Text containing 2 characters""" - - reported_user_agent: str - """Text not exceeding 255 characters""" - - signature: str - """Required for DMCA reports, should be same as Name. - - An affirmation that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports - """ - - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique - """ - - state: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - tele: str - """Text not exceeding 20 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - title: str - """Text not exceeding 255 characters""" - - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" - - -class AbuseReportsThreatReport(TypedDict, total=False): - account_id: Required[str] - - act: Required[ - Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] - """The abuse report type""" - - email: Required[str] - """A valid email of the abuse reporter. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - email2: Required[str] - """Should match the value provided in `email`""" - - name: Required[str] - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). - - The list of the URLs should not exceed 250 URLs. All URLs should have the same - hostname. Each URL should be unique. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ - - address1: str - """Text not exceeding 100 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - agent_name: str - """The name of the copyright holder. - - Text not exceeding 60 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ - - agree: Literal[0, 1] - """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" - - city: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - comments: str - """Any additional comments about the infringement not exceeding 2000 characters""" - - company: str - """Text not exceeding 100 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - country: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ - - host_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - justification: str - """ - A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - """ - - ncmec_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report.""" - - original_work: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ - - owner_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - ports_protocols: str - """A comma separated list of ports and protocols e.g. - - 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. - Each individual port/protocol should not exceed 100 characters. The list should - not have more than 30 unique ports and protocols. - """ - - reported_country: str - """Text containing 2 characters""" - - reported_user_agent: str - """Text not exceeding 255 characters""" - - signature: str - """Required for DMCA reports, should be same as Name. - - An affirmation that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports - """ - - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique - """ - - state: str - """Text not exceeding 255 characters. - - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ + reported_user_agent: str + """Text not exceeding 255 characters""" tele: str """Text not exceeding 20 characters. @@ -1088,32 +448,22 @@ class AbuseReportsThreatReport(TypedDict, total=False): title: str """Text not exceeding 255 characters""" - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" - -class AbuseReportsRegistrarWhoisReport(TypedDict, total=False): +class AbuseReportsCsamReport(TypedDict, total=False): account_id: Required[str] act: Required[ Literal[ + "abuse_children", "abuse_dmca", "abuse_trademark", "abuse_general", "abuse_phishing", - "abuse_children", "abuse_threat", "abuse_registrar_whois", "abuse_ncsei", ] ] - """The abuse report type""" email: Required[str] """A valid email of the abuse reporter. @@ -1125,43 +475,44 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False): email2: Required[str] """Should match the value provided in `email`""" - name: Required[str] - """Text not exceeding 255 characters. + host_notification: Required[Literal["send", "send-anon"]] + """Notification type based on the abuse type. - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). - - The list of the URLs should not exceed 250 URLs. All URLs should have the same - hostname. Each URL should be unique. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + justification: Required[str] + """ + A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. """ - address1: str - """Text not exceeding 100 characters. + name: Required[str] + """Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - agent_name: str - """The name of the copyright holder. + ncmec_notification: Required[Literal["send", "send-anon"]] + """Notification type based on the abuse type. - Text not exceeding 60 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - agree: Literal[0, 1] - """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" + owner_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. - city: str - """Text not exceeding 255 characters. + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). + urls: Required[str] + """A list of valid URLs separated by ‘\n’ (new line character). + + The list of the URLs should not exceed 250 URLs. All URLs should have the same + hostname. Each URL should be unique. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). """ comments: str @@ -1181,83 +532,99 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False): Database (https://lumendatabase.org/). """ - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). + reported_country: str + """Text containing 2 characters""" - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ + reported_user_agent: str + """Text not exceeding 255 characters""" - host_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. + tele: str + """Text not exceeding 20 characters. - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + This field may be released by Cloudflare to third parties such as the Lumen + Database (https://lumendatabase.org/). """ - justification: str - """ - A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - """ + title: str + """Text not exceeding 255 characters""" - ncmec_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ +class AbuseReportsThreatReport(TypedDict, total=False): + account_id: Required[str] - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report.""" + act: Required[ + Literal[ + "abuse_threat", + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_registrar_whois", + "abuse_ncsei", + ] + ] - original_work: str - """Text not exceeding 255 characters. + email: Required[str] + """A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - owner_notification: Literal["send", "send-anon", "none"] + email2: Required[str] + """Should match the value provided in `email`""" + + host_notification: Required[Literal["send", "send-anon"]] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - ports_protocols: str - """A comma separated list of ports and protocols e.g. - - 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. - Each individual port/protocol should not exceed 100 characters. The list should - not have more than 30 unique ports and protocols. + justification: Required[str] + """ + A detailed description of the infringement, including any necessary access + details and the exact steps needed to view the content, not exceeding 5000 + characters. """ - reported_country: str - """Text containing 2 characters""" + name: Required[str] + """Text not exceeding 255 characters. - reported_user_agent: str - """Text not exceeding 255 characters""" + This field may be released by Cloudflare to third parties such as the Lumen + Database (https://lumendatabase.org/). + """ - signature: str - """Required for DMCA reports, should be same as Name. + owner_notification: Required[Literal["send", "send-anon"]] + """Notification type based on the abuse type. - An affirmation that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). + urls: Required[str] + """A list of valid URLs separated by ‘\n’ (new line character). - The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique + The list of the URLs should not exceed 250 URLs. All URLs should have the same + hostname. Each URL should be unique. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). """ - state: str - """Text not exceeding 255 characters. + comments: str + """Any additional comments about the infringement not exceeding 2000 characters""" + + company: str + """Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ + reported_country: str + """Text containing 2 characters""" + + reported_user_agent: str + """Text not exceeding 255 characters""" + tele: str """Text not exceeding 20 characters. @@ -1268,32 +635,22 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False): title: str """Text not exceeding 255 characters""" - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" - -class AbuseReportsNcseiReport(TypedDict, total=False): +class AbuseReportsRegistrarWhoisReport(TypedDict, total=False): account_id: Required[str] act: Required[ Literal[ + "abuse_registrar_whois", "abuse_dmca", "abuse_trademark", "abuse_general", "abuse_phishing", "abuse_children", "abuse_threat", - "abuse_registrar_whois", "abuse_ncsei", ] ] - """The abuse report type""" email: Required[str] """A valid email of the abuse reporter. @@ -1312,132 +669,126 @@ class AbuseReportsNcseiReport(TypedDict, total=False): Database (https://lumendatabase.org/). """ + owner_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + urls: Required[str] - """A list of valid URLs separated by ‘ ’ (new line character). + """A list of valid URLs separated by ‘\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - address1: str + comments: str + """Any additional comments about the infringement not exceeding 2000 characters""" + + company: str """Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - agent_name: str - """The name of the copyright holder. - - Text not exceeding 60 characters. This field may be released by Cloudflare to - third parties such as the Lumen Database (https://lumendatabase.org/). - """ + reported_country: str + """Text containing 2 characters""" - agree: Literal[0, 1] - """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" + reported_user_agent: str + """Text not exceeding 255 characters""" - city: str - """Text not exceeding 255 characters. + tele: str + """Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - comments: str - """Any additional comments about the infringement not exceeding 2000 characters""" + title: str + """Text not exceeding 255 characters""" - company: str - """Text not exceeding 100 characters. - This field may be released by Cloudflare to third parties such as the Lumen - Database (https://lumendatabase.org/). - """ +class AbuseReportsNcseiReport(TypedDict, total=False): + account_id: Required[str] - country: str - """Text not exceeding 255 characters. + act: Required[ + Literal[ + "abuse_ncsei", + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + ] + ] + + email: Required[str] + """A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - destination_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). - - The list of destination IPs should not exceed 30 IP addresses. Each one of the - IP addresses ought to be unique - """ - - host_notification: Literal["send", "send-anon", "none"] - """Notification type based on the abuse type. - - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - """ - - justification: str - """ - A detailed description of the infringement, including any necessary access - details and the exact steps needed to view the content, not exceeding 5000 - characters - """ + email2: Required[str] + """Should match the value provided in `email`""" - ncmec_notification: Literal["send", "send-anon", "none"] + host_notification: Required[Literal["send", "send-anon"]] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report.""" - - original_work: str + name: Required[str] """Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ - owner_notification: Literal["send", "send-anon", "none"] + ncsei_subject_representation: Required[bool] + """If the submitter is the target of NCSEI in the URLs of the abuse report.""" + + owner_notification: Required[Literal["send", "send-anon", "none"]] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - ports_protocols: str - """A comma separated list of ports and protocols e.g. + urls: Required[str] + """A list of valid URLs separated by ‘\n’ (new line character). - 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. - Each individual port/protocol should not exceed 100 characters. The list should - not have more than 30 unique ports and protocols. + The list of the URLs should not exceed 250 URLs. All URLs should have the same + hostname. Each URL should be unique. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). """ - reported_country: str - """Text containing 2 characters""" - - reported_user_agent: str - """Text not exceeding 255 characters""" - - signature: str - """Required for DMCA reports, should be same as Name. - - An affirmation that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports - """ + comments: str + """Any additional comments about the infringement not exceeding 2000 characters""" - source_ips: str - """A list of IP addresses separated by ‘ ’ (new line character). + company: str + """Text not exceeding 100 characters. - The list of source IPs should not exceed 30 IP addresses. Each one of the IP - addresses ought to be unique + This field may be released by Cloudflare to third parties such as the Lumen + Database (https://lumendatabase.org/). """ - state: str + country: str """Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). """ + reported_country: str + """Text containing 2 characters""" + + reported_user_agent: str + """Text not exceeding 255 characters""" + tele: str """Text not exceeding 20 characters. @@ -1448,22 +799,13 @@ class AbuseReportsNcseiReport(TypedDict, total=False): title: str """Text not exceeding 255 characters""" - trademark_number: str - """Text not exceeding 1000 characters""" - - trademark_office: str - """Text not exceeding 1000 characters""" - - trademark_symbol: str - """Text not exceeding 1000 characters""" - AbuseReportCreateParams: TypeAlias = Union[ AbuseReportsDmcaReport, AbuseReportsTrademarkReport, AbuseReportsGeneralReport, AbuseReportsPhishingReport, - AbuseReportsChildrenAbuseReport, + AbuseReportsCsamReport, AbuseReportsThreatReport, AbuseReportsRegistrarWhoisReport, AbuseReportsNcseiReport, diff --git a/src/cloudflare/types/argo/__init__.py b/src/cloudflare/types/argo/__init__.py index 5ba8527803d..a1776f6ed1c 100644 --- a/src/cloudflare/types/argo/__init__.py +++ b/src/cloudflare/types/argo/__init__.py @@ -3,8 +3,6 @@ from __future__ import annotations from .smart_routing_edit_params import SmartRoutingEditParams as SmartRoutingEditParams -from .smart_routing_get_response import SmartRoutingGetResponse as SmartRoutingGetResponse from .tiered_caching_edit_params import TieredCachingEditParams as TieredCachingEditParams -from .smart_routing_edit_response import SmartRoutingEditResponse as SmartRoutingEditResponse from .tiered_caching_get_response import TieredCachingGetResponse as TieredCachingGetResponse from .tiered_caching_edit_response import TieredCachingEditResponse as TieredCachingEditResponse diff --git a/src/cloudflare/types/argo/smart_routing_edit_params.py b/src/cloudflare/types/argo/smart_routing_edit_params.py index 44d5123b878..bc03aaab65f 100644 --- a/src/cloudflare/types/argo/smart_routing_edit_params.py +++ b/src/cloudflare/types/argo/smart_routing_edit_params.py @@ -9,7 +9,7 @@ class SmartRoutingEditParams(TypedDict, total=False): zone_id: Required[str] - """Identifier""" + """Specifies the zone associated with the API call.""" value: Required[Literal["on", "off"]] """Enables Argo Smart Routing.""" diff --git a/src/cloudflare/types/argo/smart_routing_edit_response.py b/src/cloudflare/types/argo/smart_routing_edit_response.py deleted file mode 100644 index 7fa39d8d0ca..00000000000 --- a/src/cloudflare/types/argo/smart_routing_edit_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Union, Optional -from typing_extensions import TypeAlias - -__all__ = ["SmartRoutingEditResponse"] - -SmartRoutingEditResponse: TypeAlias = Union[Optional[str], Optional[object]] diff --git a/src/cloudflare/types/argo/smart_routing_get_response.py b/src/cloudflare/types/argo/smart_routing_get_response.py deleted file mode 100644 index f65642d31d3..00000000000 --- a/src/cloudflare/types/argo/smart_routing_get_response.py +++ /dev/null @@ -1,8 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Union, Optional -from typing_extensions import TypeAlias - -__all__ = ["SmartRoutingGetResponse"] - -SmartRoutingGetResponse: TypeAlias = Union[Optional[str], Optional[object]] diff --git a/src/cloudflare/types/brand_protection/__init__.py b/src/cloudflare/types/brand_protection/__init__.py index 3fa7ed724bd..f3e3feffbce 100644 --- a/src/cloudflare/types/brand_protection/__init__.py +++ b/src/cloudflare/types/brand_protection/__init__.py @@ -2,10 +2,17 @@ from __future__ import annotations -from .info import Info as Info -from .submit import Submit as Submit -from .rule_match import RuleMatch as RuleMatch -from .scan_status import ScanStatus as ScanStatus -from .url_info_model_results import URLInfoModelResults as URLInfoModelResults -from .brand_protection_submit_params import BrandProtectionSubmitParams as BrandProtectionSubmitParams -from .brand_protection_url_info_params import BrandProtectionURLInfoParams as BrandProtectionURLInfoParams +from .match_get_params import MatchGetParams as MatchGetParams +from .logo_create_params import LogoCreateParams as LogoCreateParams +from .match_get_response import MatchGetResponse as MatchGetResponse +from .query_create_params import QueryCreateParams as QueryCreateParams +from .query_delete_params import QueryDeleteParams as QueryDeleteParams +from .logo_create_response import LogoCreateResponse as LogoCreateResponse +from .logo_match_get_params import LogoMatchGetParams as LogoMatchGetParams +from .match_download_params import MatchDownloadParams as MatchDownloadParams +from .logo_match_get_response import LogoMatchGetResponse as LogoMatchGetResponse +from .match_download_response import MatchDownloadResponse as MatchDownloadResponse +from .logo_match_download_params import LogoMatchDownloadParams as LogoMatchDownloadParams +from .logo_match_download_response import LogoMatchDownloadResponse as LogoMatchDownloadResponse +from .brand_protection_submit_response import BrandProtectionSubmitResponse as BrandProtectionSubmitResponse +from .brand_protection_url_info_response import BrandProtectionURLInfoResponse as BrandProtectionURLInfoResponse diff --git a/src/cloudflare/types/brand_protection/brand_protection_submit_response.py b/src/cloudflare/types/brand_protection/brand_protection_submit_response.py new file mode 100644 index 00000000000..9642cf45c33 --- /dev/null +++ b/src/cloudflare/types/brand_protection/brand_protection_submit_response.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, Optional + +from ..._models import BaseModel + +__all__ = ["BrandProtectionSubmitResponse"] + + +class BrandProtectionSubmitResponse(BaseModel): + code: Optional[int] = None + """Error code""" + + errors: Optional[Dict[str, object]] = None + """Errors""" + + message: Optional[str] = None + """Error message""" + + status: Optional[str] = None + """Error name""" diff --git a/src/cloudflare/types/brand_protection/brand_protection_url_info_params.py b/src/cloudflare/types/brand_protection/brand_protection_url_info_params.py deleted file mode 100644 index 26a4bfa6d9e..00000000000 --- a/src/cloudflare/types/brand_protection/brand_protection_url_info_params.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List, Iterable -from typing_extensions import Required, TypedDict - -__all__ = ["BrandProtectionURLInfoParams"] - - -class BrandProtectionURLInfoParams(TypedDict, total=False): - account_id: Required[str] - """Identifier.""" - - url: List[str] - """Submission URL(s) to filter submission results by.""" - - url_id: Iterable[int] - """Submission ID(s) to filter submission results by.""" diff --git a/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py b/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py new file mode 100644 index 00000000000..e81a7751b72 --- /dev/null +++ b/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, Optional + +from ..._models import BaseModel + +__all__ = ["BrandProtectionURLInfoResponse"] + + +class BrandProtectionURLInfoResponse(BaseModel): + code: Optional[int] = None + """Error code""" + + errors: Optional[Dict[str, object]] = None + """Errors""" + + message: Optional[str] = None + """Error message""" + + status: Optional[str] = None + """Error name""" diff --git a/src/cloudflare/types/brand_protection/info.py b/src/cloudflare/types/brand_protection/info.py deleted file mode 100644 index ecc27c62f00..00000000000 --- a/src/cloudflare/types/brand_protection/info.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel -from .rule_match import RuleMatch -from .scan_status import ScanStatus -from .url_info_model_results import URLInfoModelResults - -__all__ = ["Info", "Categorization"] - - -class Categorization(BaseModel): - category: Optional[str] = None - """Name of the category applied.""" - - verification_status: Optional[str] = None - """Result of human review for this categorization.""" - - -class Info(BaseModel): - categorizations: Optional[List[Categorization]] = None - """List of categorizations applied to this submission.""" - - ai_model_results: Optional[List[URLInfoModelResults]] = FieldInfo(alias="model_results", default=None) - """List of model results for completed scans.""" - - rule_matches: Optional[List[RuleMatch]] = None - """ - List of signatures that matched against site content found when crawling the - URL. - """ - - scan_status: Optional[ScanStatus] = None - """Status of the most recent scan found.""" - - screenshot_download_signature: Optional[str] = None - """For internal use.""" - - screenshot_path: Optional[str] = None - """For internal use.""" - - url: Optional[str] = None - """URL that was submitted.""" diff --git a/src/cloudflare/types/brand_protection/logo_create_params.py b/src/cloudflare/types/brand_protection/logo_create_params.py new file mode 100644 index 00000000000..2fd40da7f6b --- /dev/null +++ b/src/cloudflare/types/brand_protection/logo_create_params.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +from ..._types import FileTypes + +__all__ = ["LogoCreateParams"] + + +class LogoCreateParams(TypedDict, total=False): + account_id: Required[str] + + match_type: str + + tag: str + + threshold: float + + image: FileTypes diff --git a/src/cloudflare/types/brand_protection/logo_create_response.py b/src/cloudflare/types/brand_protection/logo_create_response.py new file mode 100644 index 00000000000..d6a6055502f --- /dev/null +++ b/src/cloudflare/types/brand_protection/logo_create_response.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["LogoCreateResponse"] + + +class LogoCreateResponse(BaseModel): + id: Optional[int] = None + + tag: Optional[str] = None + + upload_path: Optional[str] = None diff --git a/src/cloudflare/types/brand_protection/brand_protection_submit_params.py b/src/cloudflare/types/brand_protection/logo_match_download_params.py similarity index 52% rename from src/cloudflare/types/brand_protection/brand_protection_submit_params.py rename to src/cloudflare/types/brand_protection/logo_match_download_params.py index 589a5fc1074..51dd3a9eba7 100644 --- a/src/cloudflare/types/brand_protection/brand_protection_submit_params.py +++ b/src/cloudflare/types/brand_protection/logo_match_download_params.py @@ -2,14 +2,17 @@ from __future__ import annotations +from typing import List from typing_extensions import Required, TypedDict -__all__ = ["BrandProtectionSubmitParams"] +__all__ = ["LogoMatchDownloadParams"] -class BrandProtectionSubmitParams(TypedDict, total=False): +class LogoMatchDownloadParams(TypedDict, total=False): account_id: Required[str] - """Identifier.""" - url: str - """URL(s) to filter submissions results by.""" + limit: str + + logo_id: List[str] + + offset: str diff --git a/src/cloudflare/types/brand_protection/logo_match_download_response.py b/src/cloudflare/types/brand_protection/logo_match_download_response.py new file mode 100644 index 00000000000..494aeefcdd5 --- /dev/null +++ b/src/cloudflare/types/brand_protection/logo_match_download_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional + +from ..._models import BaseModel + +__all__ = ["LogoMatchDownloadResponse"] + + +class LogoMatchDownloadResponse(BaseModel): + matches: Optional[List[Dict[str, object]]] = None + + total: Optional[int] = None diff --git a/src/cloudflare/types/brand_protection/logo_match_get_params.py b/src/cloudflare/types/brand_protection/logo_match_get_params.py new file mode 100644 index 00000000000..f91e3001a97 --- /dev/null +++ b/src/cloudflare/types/brand_protection/logo_match_get_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import Required, TypedDict + +__all__ = ["LogoMatchGetParams"] + + +class LogoMatchGetParams(TypedDict, total=False): + account_id: Required[str] + + limit: str + + logo_id: List[str] + + offset: str diff --git a/src/cloudflare/types/brand_protection/logo_match_get_response.py b/src/cloudflare/types/brand_protection/logo_match_get_response.py new file mode 100644 index 00000000000..b61e431ad09 --- /dev/null +++ b/src/cloudflare/types/brand_protection/logo_match_get_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional + +from ..._models import BaseModel + +__all__ = ["LogoMatchGetResponse"] + + +class LogoMatchGetResponse(BaseModel): + matches: Optional[List[Dict[str, object]]] = None + + total: Optional[int] = None diff --git a/src/cloudflare/types/brand_protection/match_download_params.py b/src/cloudflare/types/brand_protection/match_download_params.py new file mode 100644 index 00000000000..c9c1474e874 --- /dev/null +++ b/src/cloudflare/types/brand_protection/match_download_params.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["MatchDownloadParams"] + + +class MatchDownloadParams(TypedDict, total=False): + account_id: Required[str] + + id: str + + include_domain_id: bool + + limit: int + + offset: int diff --git a/src/cloudflare/types/brand_protection/match_download_response.py b/src/cloudflare/types/brand_protection/match_download_response.py new file mode 100644 index 00000000000..8f19d4deab4 --- /dev/null +++ b/src/cloudflare/types/brand_protection/match_download_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional + +from ..._models import BaseModel + +__all__ = ["MatchDownloadResponse"] + + +class MatchDownloadResponse(BaseModel): + matches: Optional[List[Dict[str, object]]] = None + + total: Optional[int] = None diff --git a/src/cloudflare/types/brand_protection/match_get_params.py b/src/cloudflare/types/brand_protection/match_get_params.py new file mode 100644 index 00000000000..e328903a3ec --- /dev/null +++ b/src/cloudflare/types/brand_protection/match_get_params.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["MatchGetParams"] + + +class MatchGetParams(TypedDict, total=False): + account_id: Required[str] + + id: str + + include_domain_id: bool + + limit: int + + offset: int diff --git a/src/cloudflare/types/brand_protection/match_get_response.py b/src/cloudflare/types/brand_protection/match_get_response.py new file mode 100644 index 00000000000..bdf7bfdcb6d --- /dev/null +++ b/src/cloudflare/types/brand_protection/match_get_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional + +from ..._models import BaseModel + +__all__ = ["MatchGetResponse"] + + +class MatchGetResponse(BaseModel): + matches: Optional[List[Dict[str, object]]] = None + + total: Optional[int] = None diff --git a/src/cloudflare/types/brand_protection/query_create_params.py b/src/cloudflare/types/brand_protection/query_create_params.py new file mode 100644 index 00000000000..543c7bbbc71 --- /dev/null +++ b/src/cloudflare/types/brand_protection/query_create_params.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["QueryCreateParams"] + + +class QueryCreateParams(TypedDict, total=False): + account_id: Required[str] + + id: str + + query_scan: Annotated[bool, PropertyInfo(alias="scan")] + + query_tag: Annotated[str, PropertyInfo(alias="tag")] + + max_time: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] + + min_time: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] + + body_scan: Annotated[bool, PropertyInfo(alias="scan")] + + string_matches: object + + body_tag: Annotated[str, PropertyInfo(alias="tag")] diff --git a/src/cloudflare/types/brand_protection/query_delete_params.py b/src/cloudflare/types/brand_protection/query_delete_params.py new file mode 100644 index 00000000000..d4a095e924d --- /dev/null +++ b/src/cloudflare/types/brand_protection/query_delete_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["QueryDeleteParams"] + + +class QueryDeleteParams(TypedDict, total=False): + account_id: Required[str] + + id: str + + scan: bool + + tag: str diff --git a/src/cloudflare/types/brand_protection/rule_match.py b/src/cloudflare/types/brand_protection/rule_match.py deleted file mode 100644 index 00452de5674..00000000000 --- a/src/cloudflare/types/brand_protection/rule_match.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["RuleMatch"] - - -class RuleMatch(BaseModel): - banning: Optional[bool] = None - """For internal use.""" - - blocking: Optional[bool] = None - """For internal use.""" - - description: Optional[str] = None - """Description of the signature that matched.""" - - name: Optional[str] = None - """Name of the signature that matched.""" diff --git a/src/cloudflare/types/brand_protection/scan_status.py b/src/cloudflare/types/brand_protection/scan_status.py deleted file mode 100644 index 711de0b5ed6..00000000000 --- a/src/cloudflare/types/brand_protection/scan_status.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["ScanStatus"] - - -class ScanStatus(BaseModel): - last_processed: Optional[str] = None - """Timestamp of when the submission was processed.""" - - scan_complete: Optional[bool] = None - """For internal use.""" - - status_code: Optional[int] = None - """Status code that the crawler received when loading the submitted URL.""" - - submission_id: Optional[int] = None - """ID of the most recent submission.""" diff --git a/src/cloudflare/types/brand_protection/submit.py b/src/cloudflare/types/brand_protection/submit.py deleted file mode 100644 index e8d8ce9c0d1..00000000000 --- a/src/cloudflare/types/brand_protection/submit.py +++ /dev/null @@ -1,42 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from ..._models import BaseModel - -__all__ = ["Submit", "ExcludedURL", "SkippedURL", "SubmittedURL"] - - -class ExcludedURL(BaseModel): - url: Optional[str] = None - """URL that was excluded.""" - - -class SkippedURL(BaseModel): - url: Optional[str] = None - """URL that was skipped.""" - - url_id: Optional[int] = None - """ID of the submission of that URL that is currently scanning.""" - - -class SubmittedURL(BaseModel): - url: Optional[str] = None - """URL that was submitted.""" - - url_id: Optional[int] = None - """ID assigned to this URL submission. Used to retrieve scanning results.""" - - -class Submit(BaseModel): - excluded_urls: Optional[List[ExcludedURL]] = None - """ - URLs that were excluded from scanning because their domain is in our no-scan - list. - """ - - skipped_urls: Optional[List[SkippedURL]] = None - """URLs that were skipped because the same URL is currently being scanned.""" - - submitted_urls: Optional[List[SubmittedURL]] = None - """URLs that were successfully submitted for scanning.""" diff --git a/src/cloudflare/types/brand_protection/url_info_model_results.py b/src/cloudflare/types/brand_protection/url_info_model_results.py deleted file mode 100644 index 009d47d14ca..00000000000 --- a/src/cloudflare/types/brand_protection/url_info_model_results.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["URLInfoModelResults"] - - -class URLInfoModelResults(BaseModel): - ai_model_name: Optional[str] = FieldInfo(alias="model_name", default=None) - """Name of the model.""" - - ai_model_score: Optional[float] = FieldInfo(alias="model_score", default=None) - """This is the score that is outputted by the model for this submission.""" diff --git a/src/cloudflare/types/cache/cache_purge_response.py b/src/cloudflare/types/cache/cache_purge_response.py index 0fd0bab3225..b273a296fbc 100644 --- a/src/cloudflare/types/cache/cache_purge_response.py +++ b/src/cloudflare/types/cache/cache_purge_response.py @@ -7,4 +7,3 @@ class CachePurgeResponse(BaseModel): id: str - """Identifier.""" diff --git a/src/cloudflare/types/dns/a_record.py b/src/cloudflare/types/dns/a_record.py index 13dcaacf6c3..648463bed2e 100644 --- a/src/cloudflare/types/dns/a_record.py +++ b/src/cloudflare/types/dns/a_record.py @@ -30,7 +30,7 @@ class Settings(BaseModel): class ARecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/a_record_param.py b/src/cloudflare/types/dns/a_record_param.py index be295ee88e8..b573575d8c7 100644 --- a/src/cloudflare/types/dns/a_record_param.py +++ b/src/cloudflare/types/dns/a_record_param.py @@ -31,7 +31,7 @@ class Settings(TypedDict, total=False): class ARecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/aaaa_record.py b/src/cloudflare/types/dns/aaaa_record.py index 2522f83b058..3b21661b7df 100644 --- a/src/cloudflare/types/dns/aaaa_record.py +++ b/src/cloudflare/types/dns/aaaa_record.py @@ -30,7 +30,7 @@ class Settings(BaseModel): class AAAARecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/aaaa_record_param.py b/src/cloudflare/types/dns/aaaa_record_param.py index f7b9414c26d..74734faac24 100644 --- a/src/cloudflare/types/dns/aaaa_record_param.py +++ b/src/cloudflare/types/dns/aaaa_record_param.py @@ -31,7 +31,7 @@ class Settings(TypedDict, total=False): class AAAARecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/batch_patch_param.py b/src/cloudflare/types/dns/batch_patch_param.py index 1e60a7fff8f..0fb447a867c 100644 --- a/src/cloudflare/types/dns/batch_patch_param.py +++ b/src/cloudflare/types/dns/batch_patch_param.py @@ -103,7 +103,7 @@ class OpenpgpkeyRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/batch_put_param.py b/src/cloudflare/types/dns/batch_put_param.py index a22924e1f0b..3f946486188 100644 --- a/src/cloudflare/types/dns/batch_put_param.py +++ b/src/cloudflare/types/dns/batch_put_param.py @@ -103,7 +103,7 @@ class OpenpgpkeyRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/caa_record.py b/src/cloudflare/types/dns/caa_record.py index db8b2a63f5d..d45413ee844 100644 --- a/src/cloudflare/types/dns/caa_record.py +++ b/src/cloudflare/types/dns/caa_record.py @@ -41,7 +41,7 @@ class Settings(BaseModel): class CAARecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/caa_record_param.py b/src/cloudflare/types/dns/caa_record_param.py index d0e824f7999..5bef8b9175f 100644 --- a/src/cloudflare/types/dns/caa_record_param.py +++ b/src/cloudflare/types/dns/caa_record_param.py @@ -42,7 +42,7 @@ class Settings(TypedDict, total=False): class CAARecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/cert_record.py b/src/cloudflare/types/dns/cert_record.py index 6067b815486..956293b6be1 100644 --- a/src/cloudflare/types/dns/cert_record.py +++ b/src/cloudflare/types/dns/cert_record.py @@ -44,7 +44,7 @@ class Settings(BaseModel): class CERTRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/cert_record_param.py b/src/cloudflare/types/dns/cert_record_param.py index c4daeaa730f..7e812ae2b85 100644 --- a/src/cloudflare/types/dns/cert_record_param.py +++ b/src/cloudflare/types/dns/cert_record_param.py @@ -45,7 +45,7 @@ class Settings(TypedDict, total=False): class CERTRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/cname_record.py b/src/cloudflare/types/dns/cname_record.py index 62a38a2d048..0aaa0cc58fa 100644 --- a/src/cloudflare/types/dns/cname_record.py +++ b/src/cloudflare/types/dns/cname_record.py @@ -38,7 +38,7 @@ class Settings(BaseModel): class CNAMERecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/cname_record_param.py b/src/cloudflare/types/dns/cname_record_param.py index 5219a5de954..48a37f20899 100644 --- a/src/cloudflare/types/dns/cname_record_param.py +++ b/src/cloudflare/types/dns/cname_record_param.py @@ -39,7 +39,7 @@ class Settings(TypedDict, total=False): class CNAMERecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/dnskey_record.py b/src/cloudflare/types/dns/dnskey_record.py index 9f60483fe31..ca31e8b77e1 100644 --- a/src/cloudflare/types/dns/dnskey_record.py +++ b/src/cloudflare/types/dns/dnskey_record.py @@ -44,7 +44,7 @@ class Settings(BaseModel): class DNSKEYRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/dnskey_record_param.py b/src/cloudflare/types/dns/dnskey_record_param.py index 74a888e5f15..7c98cdebff5 100644 --- a/src/cloudflare/types/dns/dnskey_record_param.py +++ b/src/cloudflare/types/dns/dnskey_record_param.py @@ -45,7 +45,7 @@ class Settings(TypedDict, total=False): class DNSKEYRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/ds_record.py b/src/cloudflare/types/dns/ds_record.py index 94efd3137aa..c8f467973ac 100644 --- a/src/cloudflare/types/dns/ds_record.py +++ b/src/cloudflare/types/dns/ds_record.py @@ -44,7 +44,7 @@ class Settings(BaseModel): class DSRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/ds_record_param.py b/src/cloudflare/types/dns/ds_record_param.py index f50b033e0f1..f44fbe4d209 100644 --- a/src/cloudflare/types/dns/ds_record_param.py +++ b/src/cloudflare/types/dns/ds_record_param.py @@ -45,7 +45,7 @@ class Settings(TypedDict, total=False): class DSRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/https_record.py b/src/cloudflare/types/dns/https_record.py index d7cda11cfba..e71ad06df51 100644 --- a/src/cloudflare/types/dns/https_record.py +++ b/src/cloudflare/types/dns/https_record.py @@ -41,7 +41,7 @@ class Settings(BaseModel): class HTTPSRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/https_record_param.py b/src/cloudflare/types/dns/https_record_param.py index aa4befa7c73..070a27973ae 100644 --- a/src/cloudflare/types/dns/https_record_param.py +++ b/src/cloudflare/types/dns/https_record_param.py @@ -42,7 +42,7 @@ class Settings(TypedDict, total=False): class HTTPSRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/loc_record.py b/src/cloudflare/types/dns/loc_record.py index a714377b683..995566a2d79 100644 --- a/src/cloudflare/types/dns/loc_record.py +++ b/src/cloudflare/types/dns/loc_record.py @@ -68,7 +68,7 @@ class Settings(BaseModel): class LOCRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/loc_record_param.py b/src/cloudflare/types/dns/loc_record_param.py index 8dec7099270..8d885e15e2e 100644 --- a/src/cloudflare/types/dns/loc_record_param.py +++ b/src/cloudflare/types/dns/loc_record_param.py @@ -69,7 +69,7 @@ class Settings(TypedDict, total=False): class LOCRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/mx_record.py b/src/cloudflare/types/dns/mx_record.py index dd26678ac5b..6251f393869 100644 --- a/src/cloudflare/types/dns/mx_record.py +++ b/src/cloudflare/types/dns/mx_record.py @@ -30,7 +30,7 @@ class Settings(BaseModel): class MXRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/mx_record_param.py b/src/cloudflare/types/dns/mx_record_param.py index 98c3b1fbd01..2ab786404d0 100644 --- a/src/cloudflare/types/dns/mx_record_param.py +++ b/src/cloudflare/types/dns/mx_record_param.py @@ -31,7 +31,7 @@ class Settings(TypedDict, total=False): class MXRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/naptr_record.py b/src/cloudflare/types/dns/naptr_record.py index b35ae50aa85..b0a8c82192f 100644 --- a/src/cloudflare/types/dns/naptr_record.py +++ b/src/cloudflare/types/dns/naptr_record.py @@ -50,7 +50,7 @@ class Settings(BaseModel): class NAPTRRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/naptr_record_param.py b/src/cloudflare/types/dns/naptr_record_param.py index 7890bb5123a..0e1c982430a 100644 --- a/src/cloudflare/types/dns/naptr_record_param.py +++ b/src/cloudflare/types/dns/naptr_record_param.py @@ -51,7 +51,7 @@ class Settings(TypedDict, total=False): class NAPTRRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/ns_record.py b/src/cloudflare/types/dns/ns_record.py index 8331850a7de..cb141f1e0d1 100644 --- a/src/cloudflare/types/dns/ns_record.py +++ b/src/cloudflare/types/dns/ns_record.py @@ -30,7 +30,7 @@ class Settings(BaseModel): class NSRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/ns_record_param.py b/src/cloudflare/types/dns/ns_record_param.py index 84b238d47f5..60175ef9708 100644 --- a/src/cloudflare/types/dns/ns_record_param.py +++ b/src/cloudflare/types/dns/ns_record_param.py @@ -31,7 +31,7 @@ class Settings(TypedDict, total=False): class NSRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/ptr_record.py b/src/cloudflare/types/dns/ptr_record.py index 55720adceb7..52afea56a93 100644 --- a/src/cloudflare/types/dns/ptr_record.py +++ b/src/cloudflare/types/dns/ptr_record.py @@ -30,7 +30,7 @@ class Settings(BaseModel): class PTRRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/ptr_record_param.py b/src/cloudflare/types/dns/ptr_record_param.py index fdb731e9a55..24c09628fdb 100644 --- a/src/cloudflare/types/dns/ptr_record_param.py +++ b/src/cloudflare/types/dns/ptr_record_param.py @@ -31,7 +31,7 @@ class Settings(TypedDict, total=False): class PTRRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/record_batch_params.py b/src/cloudflare/types/dns/record_batch_params.py index 03aac908b56..f5aaecb1c56 100644 --- a/src/cloudflare/types/dns/record_batch_params.py +++ b/src/cloudflare/types/dns/record_batch_params.py @@ -77,7 +77,7 @@ class PostDNSRecordsOpenpgpkeyRecordSettings(TypedDict, total=False): class PostDNSRecordsOpenpgpkeyRecord(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/record_create_params.py b/src/cloudflare/types/dns/record_create_params.py index b452260454a..a807296816e 100644 --- a/src/cloudflare/types/dns/record_create_params.py +++ b/src/cloudflare/types/dns/record_create_params.py @@ -73,7 +73,7 @@ class ARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -130,7 +130,7 @@ class AAAARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -187,7 +187,7 @@ class CNAMERecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -252,7 +252,7 @@ class MXRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -315,7 +315,7 @@ class NSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -372,7 +372,7 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -429,7 +429,7 @@ class PTRRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -486,7 +486,7 @@ class TXTRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -551,7 +551,7 @@ class CAARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -619,7 +619,7 @@ class CERTRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -690,7 +690,7 @@ class DNSKEYRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -761,7 +761,7 @@ class DSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -832,7 +832,7 @@ class HTTPSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -900,7 +900,7 @@ class LOCRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -995,7 +995,7 @@ class NAPTRRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1072,7 +1072,7 @@ class SMIMEARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1143,7 +1143,7 @@ class SRVRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1217,7 +1217,7 @@ class SSHFPRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1285,7 +1285,7 @@ class SVCBRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1353,7 +1353,7 @@ class TLSARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1424,7 +1424,7 @@ class URIRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/record_edit_params.py b/src/cloudflare/types/dns/record_edit_params.py index a1fbaf5c7fa..cc8414148d1 100644 --- a/src/cloudflare/types/dns/record_edit_params.py +++ b/src/cloudflare/types/dns/record_edit_params.py @@ -73,7 +73,7 @@ class ARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -130,7 +130,7 @@ class AAAARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -187,7 +187,7 @@ class CNAMERecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -252,7 +252,7 @@ class MXRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -315,7 +315,7 @@ class NSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -372,7 +372,7 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -429,7 +429,7 @@ class PTRRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -486,7 +486,7 @@ class TXTRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -551,7 +551,7 @@ class CAARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -619,7 +619,7 @@ class CERTRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -690,7 +690,7 @@ class DNSKEYRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -761,7 +761,7 @@ class DSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -832,7 +832,7 @@ class HTTPSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -900,7 +900,7 @@ class LOCRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -995,7 +995,7 @@ class NAPTRRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1072,7 +1072,7 @@ class SMIMEARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1143,7 +1143,7 @@ class SRVRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1217,7 +1217,7 @@ class SSHFPRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1285,7 +1285,7 @@ class SVCBRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1353,7 +1353,7 @@ class TLSARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1424,7 +1424,7 @@ class URIRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/record_response.py b/src/cloudflare/types/dns/record_response.py index b9a3de7c9c3..3e162a929fb 100644 --- a/src/cloudflare/types/dns/record_response.py +++ b/src/cloudflare/types/dns/record_response.py @@ -213,7 +213,7 @@ class OpenpgpkeyRecord(BaseModel): """When the record was last modified.""" name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" proxiable: bool """Whether the record can be proxied by Cloudflare or not.""" diff --git a/src/cloudflare/types/dns/record_update_params.py b/src/cloudflare/types/dns/record_update_params.py index c89e4dd6efd..bff2f13b8c0 100644 --- a/src/cloudflare/types/dns/record_update_params.py +++ b/src/cloudflare/types/dns/record_update_params.py @@ -73,7 +73,7 @@ class ARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -130,7 +130,7 @@ class AAAARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -187,7 +187,7 @@ class CNAMERecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -252,7 +252,7 @@ class MXRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -315,7 +315,7 @@ class NSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -372,7 +372,7 @@ class DNSRecordsOpenpgpkeyRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -429,7 +429,7 @@ class PTRRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -486,7 +486,7 @@ class TXTRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -551,7 +551,7 @@ class CAARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -619,7 +619,7 @@ class CERTRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -690,7 +690,7 @@ class DNSKEYRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -761,7 +761,7 @@ class DSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -832,7 +832,7 @@ class HTTPSRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -900,7 +900,7 @@ class LOCRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -995,7 +995,7 @@ class NAPTRRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1072,7 +1072,7 @@ class SMIMEARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1143,7 +1143,7 @@ class SRVRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1217,7 +1217,7 @@ class SSHFPRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1285,7 +1285,7 @@ class SVCBRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1353,7 +1353,7 @@ class TLSARecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. @@ -1424,7 +1424,7 @@ class URIRecord(TypedDict, total=False): """Identifier.""" name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/smimea_record.py b/src/cloudflare/types/dns/smimea_record.py index 4b36fac03e8..1b6ed65dd62 100644 --- a/src/cloudflare/types/dns/smimea_record.py +++ b/src/cloudflare/types/dns/smimea_record.py @@ -44,7 +44,7 @@ class Settings(BaseModel): class SMIMEARecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/smimea_record_param.py b/src/cloudflare/types/dns/smimea_record_param.py index 13cf50183c7..072f3bf36c0 100644 --- a/src/cloudflare/types/dns/smimea_record_param.py +++ b/src/cloudflare/types/dns/smimea_record_param.py @@ -45,7 +45,7 @@ class Settings(TypedDict, total=False): class SMIMEARecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/srv_record.py b/src/cloudflare/types/dns/srv_record.py index 13d5335ff63..cecbe2dfbf9 100644 --- a/src/cloudflare/types/dns/srv_record.py +++ b/src/cloudflare/types/dns/srv_record.py @@ -47,7 +47,7 @@ class Settings(BaseModel): class SRVRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/srv_record_param.py b/src/cloudflare/types/dns/srv_record_param.py index 0f1720dff42..208ca041ea3 100644 --- a/src/cloudflare/types/dns/srv_record_param.py +++ b/src/cloudflare/types/dns/srv_record_param.py @@ -48,7 +48,7 @@ class Settings(TypedDict, total=False): class SRVRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/sshfp_record.py b/src/cloudflare/types/dns/sshfp_record.py index a782b0fd0e7..8e2f059d8f7 100644 --- a/src/cloudflare/types/dns/sshfp_record.py +++ b/src/cloudflare/types/dns/sshfp_record.py @@ -41,7 +41,7 @@ class Settings(BaseModel): class SSHFPRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/sshfp_record_param.py b/src/cloudflare/types/dns/sshfp_record_param.py index f3eedcd2c71..458b6b1c8a7 100644 --- a/src/cloudflare/types/dns/sshfp_record_param.py +++ b/src/cloudflare/types/dns/sshfp_record_param.py @@ -42,7 +42,7 @@ class Settings(TypedDict, total=False): class SSHFPRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/svcb_record.py b/src/cloudflare/types/dns/svcb_record.py index 65512c5a265..c07f87e2465 100644 --- a/src/cloudflare/types/dns/svcb_record.py +++ b/src/cloudflare/types/dns/svcb_record.py @@ -41,7 +41,7 @@ class Settings(BaseModel): class SVCBRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/svcb_record_param.py b/src/cloudflare/types/dns/svcb_record_param.py index e0813ddaeac..aabef93487c 100644 --- a/src/cloudflare/types/dns/svcb_record_param.py +++ b/src/cloudflare/types/dns/svcb_record_param.py @@ -42,7 +42,7 @@ class Settings(TypedDict, total=False): class SVCBRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/tlsa_record.py b/src/cloudflare/types/dns/tlsa_record.py index b2b49eed3b7..e7518c4ce09 100644 --- a/src/cloudflare/types/dns/tlsa_record.py +++ b/src/cloudflare/types/dns/tlsa_record.py @@ -44,7 +44,7 @@ class Settings(BaseModel): class TLSARecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/tlsa_record_param.py b/src/cloudflare/types/dns/tlsa_record_param.py index b77b7e5c0bc..30885ef1374 100644 --- a/src/cloudflare/types/dns/tlsa_record_param.py +++ b/src/cloudflare/types/dns/tlsa_record_param.py @@ -45,7 +45,7 @@ class Settings(TypedDict, total=False): class TLSARecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/txt_record.py b/src/cloudflare/types/dns/txt_record.py index 97a556c49f1..86f1ecc1085 100644 --- a/src/cloudflare/types/dns/txt_record.py +++ b/src/cloudflare/types/dns/txt_record.py @@ -30,7 +30,7 @@ class Settings(BaseModel): class TXTRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/txt_record_param.py b/src/cloudflare/types/dns/txt_record_param.py index 54320f7874c..b7f6ceb4ec1 100644 --- a/src/cloudflare/types/dns/txt_record_param.py +++ b/src/cloudflare/types/dns/txt_record_param.py @@ -31,7 +31,7 @@ class Settings(TypedDict, total=False): class TXTRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/uri_record.py b/src/cloudflare/types/dns/uri_record.py index 12cf4a19589..669c1bcb068 100644 --- a/src/cloudflare/types/dns/uri_record.py +++ b/src/cloudflare/types/dns/uri_record.py @@ -38,7 +38,7 @@ class Settings(BaseModel): class URIRecord(BaseModel): name: str - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: TTL """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/dns/uri_record_param.py b/src/cloudflare/types/dns/uri_record_param.py index c0c2b3a47bf..45df00a0504 100644 --- a/src/cloudflare/types/dns/uri_record_param.py +++ b/src/cloudflare/types/dns/uri_record_param.py @@ -39,7 +39,7 @@ class Settings(TypedDict, total=False): class URIRecordParam(TypedDict, total=False): name: Required[str] - """DNS record name (or @ for the zone apex) in Punycode.""" + """Complete DNS record name, including the zone name, in Punycode.""" ttl: Required[TTLParam] """Time To Live (TTL) of the DNS record in seconds. diff --git a/src/cloudflare/types/email_security/investigate/trace_get_response.py b/src/cloudflare/types/email_security/investigate/trace_get_response.py index 58ab898d0ed..98bce7e2bd2 100644 --- a/src/cloudflare/types/email_security/investigate/trace_get_response.py +++ b/src/cloudflare/types/email_security/investigate/trace_get_response.py @@ -19,6 +19,8 @@ class InboundLine(BaseModel): class Inbound(BaseModel): lines: Optional[List[InboundLine]] = None + pending: Optional[bool] = None + class OutboundLine(BaseModel): lineno: int @@ -31,6 +33,8 @@ class OutboundLine(BaseModel): class Outbound(BaseModel): lines: Optional[List[OutboundLine]] = None + pending: Optional[bool] = None + class TraceGetResponse(BaseModel): inbound: Inbound diff --git a/src/cloudflare/types/email_security/investigate_get_response.py b/src/cloudflare/types/email_security/investigate_get_response.py index d0bb1ee5a9c..dec7d995871 100644 --- a/src/cloudflare/types/email_security/investigate_get_response.py +++ b/src/cloudflare/types/email_security/investigate_get_response.py @@ -7,13 +7,49 @@ from ..._models import BaseModel -__all__ = ["InvestigateGetResponse", "Properties", "Validation"] +__all__ = ["InvestigateGetResponse", "Properties", "Finding", "Validation"] class Properties(BaseModel): - allowlisted_pattern_type: Optional[str] = None + allowlisted_pattern: Optional[str] = None - whitelisted_pattern_type: Optional[str] = None + allowlisted_pattern_type: Optional[ + Literal[ + "quarantine_release", + "blocked_sender", + "acceptable_sender", + "allowed_sender", + "allowed_recipient", + "domain_similarity", + "domain_recency", + "managed_acceptable_sender", + ] + ] = None + + blocklisted_message: Optional[bool] = None + + blocklisted_pattern: Optional[str] = None + + whitelisted_pattern_type: Optional[ + Literal[ + "quarantine_release", + "blocked_sender", + "acceptable_sender", + "allowed_sender", + "allowed_recipient", + "domain_similarity", + "domain_recency", + "managed_acceptable_sender", + ] + ] = None + + +class Finding(BaseModel): + detail: Optional[str] = None + + name: Optional[str] = None + + value: Optional[str] = None class Validation(BaseModel): @@ -81,6 +117,8 @@ class InvestigateGetResponse(BaseModel): ] ] = None + findings: Optional[List[Finding]] = None + from_: Optional[str] = FieldInfo(alias="from", default=None) from_name: Optional[str] = None diff --git a/src/cloudflare/types/email_security/investigate_list_params.py b/src/cloudflare/types/email_security/investigate_list_params.py index b8a3a98db14..080657abe9a 100644 --- a/src/cloudflare/types/email_security/investigate_list_params.py +++ b/src/cloudflare/types/email_security/investigate_list_params.py @@ -78,3 +78,5 @@ class InvestigateListParams(TypedDict, total=False): start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """The beginning of the search date range. Defaults to `now - 30 days`.""" + + subject: str diff --git a/src/cloudflare/types/email_security/investigate_list_response.py b/src/cloudflare/types/email_security/investigate_list_response.py index 045fef68549..d5967f1563f 100644 --- a/src/cloudflare/types/email_security/investigate_list_response.py +++ b/src/cloudflare/types/email_security/investigate_list_response.py @@ -7,13 +7,49 @@ from ..._models import BaseModel -__all__ = ["InvestigateListResponse", "Properties", "Validation"] +__all__ = ["InvestigateListResponse", "Properties", "Finding", "Validation"] class Properties(BaseModel): - allowlisted_pattern_type: Optional[str] = None + allowlisted_pattern: Optional[str] = None - whitelisted_pattern_type: Optional[str] = None + allowlisted_pattern_type: Optional[ + Literal[ + "quarantine_release", + "blocked_sender", + "acceptable_sender", + "allowed_sender", + "allowed_recipient", + "domain_similarity", + "domain_recency", + "managed_acceptable_sender", + ] + ] = None + + blocklisted_message: Optional[bool] = None + + blocklisted_pattern: Optional[str] = None + + whitelisted_pattern_type: Optional[ + Literal[ + "quarantine_release", + "blocked_sender", + "acceptable_sender", + "allowed_sender", + "allowed_recipient", + "domain_similarity", + "domain_recency", + "managed_acceptable_sender", + ] + ] = None + + +class Finding(BaseModel): + detail: Optional[str] = None + + name: Optional[str] = None + + value: Optional[str] = None class Validation(BaseModel): @@ -81,6 +117,8 @@ class InvestigateListResponse(BaseModel): ] ] = None + findings: Optional[List[Finding]] = None + from_: Optional[str] = FieldInfo(alias="from", default=None) from_name: Optional[str] = None diff --git a/src/cloudflare/types/email_security/settings/allow_policy_list_params.py b/src/cloudflare/types/email_security/settings/allow_policy_list_params.py index 20b3901d97e..85380271064 100644 --- a/src/cloudflare/types/email_security/settings/allow_policy_list_params.py +++ b/src/cloudflare/types/email_security/settings/allow_policy_list_params.py @@ -32,6 +32,8 @@ class AllowPolicyListParams(TypedDict, total=False): page: int """The page number of paginated results.""" + pattern: str + pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] per_page: int diff --git a/src/cloudflare/types/email_security/settings/block_sender_list_params.py b/src/cloudflare/types/email_security/settings/block_sender_list_params.py index 714e6955316..712ad5932dd 100644 --- a/src/cloudflare/types/email_security/settings/block_sender_list_params.py +++ b/src/cloudflare/types/email_security/settings/block_sender_list_params.py @@ -20,6 +20,8 @@ class BlockSenderListParams(TypedDict, total=False): page: int """The page number of paginated results.""" + pattern: str + pattern_type: Literal["EMAIL", "DOMAIN", "IP", "UNKNOWN"] per_page: int diff --git a/src/cloudflare/types/email_security/settings/trusted_domain_list_params.py b/src/cloudflare/types/email_security/settings/trusted_domain_list_params.py index a273ce83e95..b9446971853 100644 --- a/src/cloudflare/types/email_security/settings/trusted_domain_list_params.py +++ b/src/cloudflare/types/email_security/settings/trusted_domain_list_params.py @@ -24,6 +24,8 @@ class TrustedDomainListParams(TypedDict, total=False): page: int """The page number of paginated results.""" + pattern: str + per_page: int """The number of results per page.""" diff --git a/src/cloudflare/types/magic_transit/connectors/event_list_params.py b/src/cloudflare/types/magic_transit/connectors/event_list_params.py index 7ffc819ab42..b8ba2917823 100644 --- a/src/cloudflare/types/magic_transit/connectors/event_list_params.py +++ b/src/cloudflare/types/magic_transit/connectors/event_list_params.py @@ -19,4 +19,7 @@ class EventListParams(TypedDict, total=False): cursor: str + k: str + """Filter by event kind""" + limit: float diff --git a/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py b/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py index 109a493fd38..3743f7c7e9f 100644 --- a/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py +++ b/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/ai/inference/summary_model_response.py b/src/cloudflare/types/radar/ai/inference/summary_model_response.py index 16b300edfda..8ba6e577a28 100644 --- a/src/cloudflare/types/radar/ai/inference/summary_model_response.py +++ b/src/cloudflare/types/radar/ai/inference/summary_model_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/ai/inference/summary_task_response.py b/src/cloudflare/types/radar/ai/inference/summary_task_response.py index d4dd193c2a0..a79a345dd90 100644 --- a/src/cloudflare/types/radar/ai/inference/summary_task_response.py +++ b/src/cloudflare/types/radar/ai/inference/summary_task_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/as112/summary_dnssec_response.py b/src/cloudflare/types/radar/as112/summary_dnssec_response.py index 5d904b19e2f..28225eea271 100644 --- a/src/cloudflare/types/radar/as112/summary_dnssec_response.py +++ b/src/cloudflare/types/radar/as112/summary_dnssec_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/as112/summary_edns_response.py b/src/cloudflare/types/radar/as112/summary_edns_response.py index a288f6df83b..ba51dba7a87 100644 --- a/src/cloudflare/types/radar/as112/summary_edns_response.py +++ b/src/cloudflare/types/radar/as112/summary_edns_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/as112/summary_ip_version_response.py b/src/cloudflare/types/radar/as112/summary_ip_version_response.py index 5ade97ddc23..a27d807be2a 100644 --- a/src/cloudflare/types/radar/as112/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/as112/summary_ip_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/as112/summary_protocol_response.py b/src/cloudflare/types/radar/as112/summary_protocol_response.py index da6b44a7151..ccbbb014efa 100644 --- a/src/cloudflare/types/radar/as112/summary_protocol_response.py +++ b/src/cloudflare/types/radar/as112/summary_protocol_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/as112/summary_query_type_response.py b/src/cloudflare/types/radar/as112/summary_query_type_response.py index b1515b5fada..aa517e5d4e4 100644 --- a/src/cloudflare/types/radar/as112/summary_query_type_response.py +++ b/src/cloudflare/types/radar/as112/summary_query_type_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/as112/summary_response_codes_response.py b/src/cloudflare/types/radar/as112/summary_response_codes_response.py index 60887a68417..faa1b5297b2 100644 --- a/src/cloudflare/types/radar/as112/summary_response_codes_response.py +++ b/src/cloudflare/types/radar/as112/summary_response_codes_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py index 2fe19bba6fb..4f348e206ef 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py index de757ec4676..83aad5b60e2 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_industry_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_industry_response.py index a33a0aec474..50d4199f76c 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_industry_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_industry_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py index b121482480f..fd840c4213d 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py index db6dad30a05..86588aba267 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_protocol_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py index bd97d43964d..19f23890a63 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_vertical_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_vertical_response.py index a5e0a1fde39..6fb79d768e0 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_vertical_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_vertical_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py index 0874d807cd5..7d613a93aaa 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py index 1417cb71058..ecff932930f 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_industry_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_industry_response.py index a33a0aec474..50d4199f76c 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_industry_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_industry_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py index 8eca8811ec5..81de1ad187d 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_ip_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py index f0eb8ac27fe..f71087e19b3 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py index eb5e429d477..e4e86461be1 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_vertical_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_vertical_response.py index a5e0a1fde39..6fb79d768e0 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_vertical_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_vertical_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py b/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py index 4faebabab6e..a633711087e 100644 --- a/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/top_attacks_params.py @@ -68,13 +68,6 @@ class TopAttacksParams(TypedDict, total=False): includes results from PT. """ - magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] - """Deprecated parameter. - - Future support includes only attack magnitude defined by total mitigated - requests (MITIGATED_REQUESTS). - """ - mitigation_product: Annotated[ List[ Literal[ diff --git a/src/cloudflare/types/radar/bot_summary_response.py b/src/cloudflare/types/radar/bot_summary_response.py index a3d33a4143a..41e89dd6fa0 100644 --- a/src/cloudflare/types/radar/bot_summary_response.py +++ b/src/cloudflare/types/radar/bot_summary_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/bots/web_crawler_summary_response.py b/src/cloudflare/types/radar/bots/web_crawler_summary_response.py index 5076d68d8b3..fe5e221edfc 100644 --- a/src/cloudflare/types/radar/bots/web_crawler_summary_response.py +++ b/src/cloudflare/types/radar/bots/web_crawler_summary_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_cache_hit_response.py b/src/cloudflare/types/radar/dns/summary_cache_hit_response.py index 8be64b8e267..1ff38d51bff 100644 --- a/src/cloudflare/types/radar/dns/summary_cache_hit_response.py +++ b/src/cloudflare/types/radar/dns/summary_cache_hit_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_dnssec_aware_response.py b/src/cloudflare/types/radar/dns/summary_dnssec_aware_response.py index ab107386ba2..3e2121d5baf 100644 --- a/src/cloudflare/types/radar/dns/summary_dnssec_aware_response.py +++ b/src/cloudflare/types/radar/dns/summary_dnssec_aware_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_dnssec_e2e_response.py b/src/cloudflare/types/radar/dns/summary_dnssec_e2e_response.py index 4eac2ea6945..fe20b783db2 100644 --- a/src/cloudflare/types/radar/dns/summary_dnssec_e2e_response.py +++ b/src/cloudflare/types/radar/dns/summary_dnssec_e2e_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_dnssec_response.py b/src/cloudflare/types/radar/dns/summary_dnssec_response.py index a902284fbbb..d00570c37bd 100644 --- a/src/cloudflare/types/radar/dns/summary_dnssec_response.py +++ b/src/cloudflare/types/radar/dns/summary_dnssec_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_ip_version_response.py b/src/cloudflare/types/radar/dns/summary_ip_version_response.py index 5ade97ddc23..a27d807be2a 100644 --- a/src/cloudflare/types/radar/dns/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/dns/summary_ip_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_matching_answer_response.py b/src/cloudflare/types/radar/dns/summary_matching_answer_response.py index 9b88202cfa9..e672e23907b 100644 --- a/src/cloudflare/types/radar/dns/summary_matching_answer_response.py +++ b/src/cloudflare/types/radar/dns/summary_matching_answer_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_protocol_response.py b/src/cloudflare/types/radar/dns/summary_protocol_response.py index da6b44a7151..ccbbb014efa 100644 --- a/src/cloudflare/types/radar/dns/summary_protocol_response.py +++ b/src/cloudflare/types/radar/dns/summary_protocol_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_query_type_response.py b/src/cloudflare/types/radar/dns/summary_query_type_response.py index b1515b5fada..aa517e5d4e4 100644 --- a/src/cloudflare/types/radar/dns/summary_query_type_response.py +++ b/src/cloudflare/types/radar/dns/summary_query_type_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_response_code_response.py b/src/cloudflare/types/radar/dns/summary_response_code_response.py index 6062b9f7cf7..a18d3d27514 100644 --- a/src/cloudflare/types/radar/dns/summary_response_code_response.py +++ b/src/cloudflare/types/radar/dns/summary_response_code_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -57,7 +57,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/dns/summary_response_ttl_response.py b/src/cloudflare/types/radar/dns/summary_response_ttl_response.py index 41994cccc65..5fca1ceb680 100644 --- a/src/cloudflare/types/radar/dns/summary_response_ttl_response.py +++ b/src/cloudflare/types/radar/dns/summary_response_ttl_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/routing/summary_arc_response.py b/src/cloudflare/types/radar/email/routing/summary_arc_response.py index 3ae3cd48245..270d0c51980 100644 --- a/src/cloudflare/types/radar/email/routing/summary_arc_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_arc_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/routing/summary_dkim_response.py b/src/cloudflare/types/radar/email/routing/summary_dkim_response.py index b5f22259c95..0aaf43bb7e6 100644 --- a/src/cloudflare/types/radar/email/routing/summary_dkim_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_dkim_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py b/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py index ca4ac4a0d00..f563b39160f 100644 --- a/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_dmarc_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py b/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py index e9fb924c13c..69729f37233 100644 --- a/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_encrypted_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py b/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py index b121482480f..fd840c4213d 100644 --- a/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_ip_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/routing/summary_spf_response.py b/src/cloudflare/types/radar/email/routing/summary_spf_response.py index 3ad9edc35f5..e4224eb9e3c 100644 --- a/src/cloudflare/types/radar/email/routing/summary_spf_response.py +++ b/src/cloudflare/types/radar/email/routing/summary_spf_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_arc_response.py b/src/cloudflare/types/radar/email/security/summary_arc_response.py index 3ae3cd48245..270d0c51980 100644 --- a/src/cloudflare/types/radar/email/security/summary_arc_response.py +++ b/src/cloudflare/types/radar/email/security/summary_arc_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_dkim_response.py b/src/cloudflare/types/radar/email/security/summary_dkim_response.py index b5f22259c95..0aaf43bb7e6 100644 --- a/src/cloudflare/types/radar/email/security/summary_dkim_response.py +++ b/src/cloudflare/types/radar/email/security/summary_dkim_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_dmarc_response.py b/src/cloudflare/types/radar/email/security/summary_dmarc_response.py index ca4ac4a0d00..f563b39160f 100644 --- a/src/cloudflare/types/radar/email/security/summary_dmarc_response.py +++ b/src/cloudflare/types/radar/email/security/summary_dmarc_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_malicious_response.py b/src/cloudflare/types/radar/email/security/summary_malicious_response.py index 2015166596d..89de9fb0d03 100644 --- a/src/cloudflare/types/radar/email/security/summary_malicious_response.py +++ b/src/cloudflare/types/radar/email/security/summary_malicious_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_spam_response.py b/src/cloudflare/types/radar/email/security/summary_spam_response.py index ca258d7eea1..2f7fe8474f9 100644 --- a/src/cloudflare/types/radar/email/security/summary_spam_response.py +++ b/src/cloudflare/types/radar/email/security/summary_spam_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_spf_response.py b/src/cloudflare/types/radar/email/security/summary_spf_response.py index 3ad9edc35f5..e4224eb9e3c 100644 --- a/src/cloudflare/types/radar/email/security/summary_spf_response.py +++ b/src/cloudflare/types/radar/email/security/summary_spf_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_spoof_response.py b/src/cloudflare/types/radar/email/security/summary_spoof_response.py index 76799ed3118..042ac26e0ee 100644 --- a/src/cloudflare/types/radar/email/security/summary_spoof_response.py +++ b/src/cloudflare/types/radar/email/security/summary_spoof_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_threat_category_response.py b/src/cloudflare/types/radar/email/security/summary_threat_category_response.py index 713b5e20eaf..f61c24afe60 100644 --- a/src/cloudflare/types/radar/email/security/summary_threat_category_response.py +++ b/src/cloudflare/types/radar/email/security/summary_threat_category_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/email/security/summary_tls_version_response.py b/src/cloudflare/types/radar/email/security/summary_tls_version_response.py index c722089d9ab..d3d2fc268b6 100644 --- a/src/cloudflare/types/radar/email/security/summary_tls_version_response.py +++ b/src/cloudflare/types/radar/email/security/summary_tls_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/http/summary_bot_class_response.py b/src/cloudflare/types/radar/http/summary_bot_class_response.py index 558d9f18035..a693a205958 100644 --- a/src/cloudflare/types/radar/http/summary_bot_class_response.py +++ b/src/cloudflare/types/radar/http/summary_bot_class_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/http/summary_device_type_response.py b/src/cloudflare/types/radar/http/summary_device_type_response.py index 61310a25d7b..7a7fc1abbb7 100644 --- a/src/cloudflare/types/radar/http/summary_device_type_response.py +++ b/src/cloudflare/types/radar/http/summary_device_type_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/http/summary_http_protocol_response.py b/src/cloudflare/types/radar/http/summary_http_protocol_response.py index 0e24e5c999d..13864ee1c85 100644 --- a/src/cloudflare/types/radar/http/summary_http_protocol_response.py +++ b/src/cloudflare/types/radar/http/summary_http_protocol_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/http/summary_http_version_response.py b/src/cloudflare/types/radar/http/summary_http_version_response.py index 1a9b81e4d6c..457a6443071 100644 --- a/src/cloudflare/types/radar/http/summary_http_version_response.py +++ b/src/cloudflare/types/radar/http/summary_http_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/http/summary_ip_version_response.py b/src/cloudflare/types/radar/http/summary_ip_version_response.py index 5ade97ddc23..a27d807be2a 100644 --- a/src/cloudflare/types/radar/http/summary_ip_version_response.py +++ b/src/cloudflare/types/radar/http/summary_ip_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/http/summary_os_response.py b/src/cloudflare/types/radar/http/summary_os_response.py index e3a74c1cd32..3f4d5f7845d 100644 --- a/src/cloudflare/types/radar/http/summary_os_response.py +++ b/src/cloudflare/types/radar/http/summary_os_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/http/summary_post_quantum_response.py b/src/cloudflare/types/radar/http/summary_post_quantum_response.py index f34f5dbae04..b6151411032 100644 --- a/src/cloudflare/types/radar/http/summary_post_quantum_response.py +++ b/src/cloudflare/types/radar/http/summary_post_quantum_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/http/summary_tls_version_response.py b/src/cloudflare/types/radar/http/summary_tls_version_response.py index 97e9f0b27cb..f253c47cf92 100644 --- a/src/cloudflare/types/radar/http/summary_tls_version_response.py +++ b/src/cloudflare/types/radar/http/summary_tls_version_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py b/src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py index 558d9f18035..a693a205958 100644 --- a/src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py +++ b/src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py b/src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py index 6ff324a28d8..e940ff9c2c3 100644 --- a/src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py +++ b/src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/netflow_summary_response.py b/src/cloudflare/types/radar/netflow_summary_response.py index 0daf646347e..d17b5019482 100644 --- a/src/cloudflare/types/radar/netflow_summary_response.py +++ b/src/cloudflare/types/radar/netflow_summary_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/quality/iqi_summary_response.py b/src/cloudflare/types/radar/quality/iqi_summary_response.py index 05764affc48..3c6cbfbee30 100644 --- a/src/cloudflare/types/radar/quality/iqi_summary_response.py +++ b/src/cloudflare/types/radar/quality/iqi_summary_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/quality/speed_histogram_response.py b/src/cloudflare/types/radar/quality/speed_histogram_response.py index 620208648bc..421a328f4f8 100644 --- a/src/cloudflare/types/radar/quality/speed_histogram_response.py +++ b/src/cloudflare/types/radar/quality/speed_histogram_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -69,7 +69,7 @@ class Meta(BaseModel): bucket_size: int = FieldInfo(alias="bucketSize") """The width for every bucket in the histogram.""" - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/quality/speed_summary_response.py b/src/cloudflare/types/radar/quality/speed_summary_response.py index 51704e28746..72c8ca48882 100644 --- a/src/cloudflare/types/radar/quality/speed_summary_response.py +++ b/src/cloudflare/types/radar/quality/speed_summary_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/radar/search_global_params.py b/src/cloudflare/types/radar/search_global_params.py index 2c6cc534162..2fb60289a14 100644 --- a/src/cloudflare/types/radar/search_global_params.py +++ b/src/cloudflare/types/radar/search_global_params.py @@ -12,15 +12,15 @@ class SearchGlobalParams(TypedDict, total=False): query: Required[str] - """Search for locations, autonomous systems and reports.""" + """String used to perform the search operation.""" - exclude: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] + exclude: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]] """Search types excluded from results.""" format: Literal["JSON", "CSV"] """Format in which results will be returned.""" - include: List[Literal["ASNS", "BOTS", "LOCATIONS", "NOTEBOOKS", "SPECIAL_EVENTS"]] + include: List[Literal["ASNS", "BOTS", "CERTIFICATE_AUTHORITIES", "CERTIFICATE_LOGS", "LOCATIONS", "NOTEBOOKS"]] """Search types included in results.""" limit: int diff --git a/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py b/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py index a0fc24ac0a5..818c1fb5491 100644 --- a/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py +++ b/src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from datetime import datetime from typing_extensions import Literal @@ -58,7 +58,7 @@ class MetaUnit(BaseModel): class Meta(BaseModel): - confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) + confidence_info: MetaConfidenceInfo = FieldInfo(alias="confidenceInfo") date_range: List[MetaDateRange] = FieldInfo(alias="dateRange") diff --git a/src/cloudflare/types/rules/hostname.py b/src/cloudflare/types/rules/hostname.py index 32d7ce459a9..d95b3278ec5 100644 --- a/src/cloudflare/types/rules/hostname.py +++ b/src/cloudflare/types/rules/hostname.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional + from ..._models import BaseModel __all__ = ["Hostname"] @@ -7,3 +9,10 @@ class Hostname(BaseModel): url_hostname: str + + exclude_exact_hostname: Optional[bool] = None + """Only applies to wildcard hostnames (e.g., \\**.example.com). + + When true (default), only subdomains are blocked. When false, both the root + domain and subdomains are blocked. + """ diff --git a/src/cloudflare/types/rules/hostname_param.py b/src/cloudflare/types/rules/hostname_param.py index 280651700b2..8ce946d11f1 100644 --- a/src/cloudflare/types/rules/hostname_param.py +++ b/src/cloudflare/types/rules/hostname_param.py @@ -9,3 +9,10 @@ class HostnameParam(TypedDict, total=False): url_hostname: Required[str] + + exclude_exact_hostname: bool + """Only applies to wildcard hostnames (e.g., \\**.example.com). + + When true (default), only subdomains are blocked. When false, both the root + domain and subdomains are blocked. + """ diff --git a/src/cloudflare/types/rules/list_create_params.py b/src/cloudflare/types/rules/list_create_params.py index ce63cae4783..a0ecda97394 100644 --- a/src/cloudflare/types/rules/list_create_params.py +++ b/src/cloudflare/types/rules/list_create_params.py @@ -9,7 +9,7 @@ class ListCreateParams(TypedDict, total=False): account_id: Required[str] - """Defines an identifier.""" + """The Account ID for this resource.""" kind: Required[Literal["ip", "redirect", "hostname", "asn"]] """The type of the list. diff --git a/src/cloudflare/types/rules/list_delete_response.py b/src/cloudflare/types/rules/list_delete_response.py index 37284568716..bcc22efbc8f 100644 --- a/src/cloudflare/types/rules/list_delete_response.py +++ b/src/cloudflare/types/rules/list_delete_response.py @@ -9,4 +9,4 @@ class ListDeleteResponse(BaseModel): id: Optional[str] = None - """Defines the unique ID of the item in the List.""" + """The unique ID of the list.""" diff --git a/src/cloudflare/types/rules/list_update_params.py b/src/cloudflare/types/rules/list_update_params.py index e680941bec2..1b37842360b 100644 --- a/src/cloudflare/types/rules/list_update_params.py +++ b/src/cloudflare/types/rules/list_update_params.py @@ -9,7 +9,7 @@ class ListUpdateParams(TypedDict, total=False): account_id: Required[str] - """Defines an identifier.""" + """The Account ID for this resource.""" description: str """An informative summary of the list.""" diff --git a/src/cloudflare/types/rules/lists/item_create_params.py b/src/cloudflare/types/rules/lists/item_create_params.py index 77d5d60b76e..167cb570c27 100644 --- a/src/cloudflare/types/rules/lists/item_create_params.py +++ b/src/cloudflare/types/rules/lists/item_create_params.py @@ -13,7 +13,7 @@ class ItemCreateParams(TypedDict, total=False): account_id: Required[str] - """Defines an identifier.""" + """The Account ID for this resource.""" body: Required[Iterable[Body]] diff --git a/src/cloudflare/types/rules/lists/item_delete_params.py b/src/cloudflare/types/rules/lists/item_delete_params.py index 09a67bc3935..7557f63a868 100644 --- a/src/cloudflare/types/rules/lists/item_delete_params.py +++ b/src/cloudflare/types/rules/lists/item_delete_params.py @@ -10,7 +10,7 @@ class ItemDeleteParams(TypedDict, total=False): account_id: Required[str] - """Defines an identifier.""" + """The Account ID for this resource.""" items: Iterable[Item] diff --git a/src/cloudflare/types/rules/lists/item_list_params.py b/src/cloudflare/types/rules/lists/item_list_params.py index 3f63317a5c6..55374a19c0b 100644 --- a/src/cloudflare/types/rules/lists/item_list_params.py +++ b/src/cloudflare/types/rules/lists/item_list_params.py @@ -9,7 +9,7 @@ class ItemListParams(TypedDict, total=False): account_id: Required[str] - """Defines an identifier.""" + """The Account ID for this resource.""" cursor: str """The pagination cursor. diff --git a/src/cloudflare/types/rules/lists/item_update_params.py b/src/cloudflare/types/rules/lists/item_update_params.py index a0bd53080ff..659c4138f77 100644 --- a/src/cloudflare/types/rules/lists/item_update_params.py +++ b/src/cloudflare/types/rules/lists/item_update_params.py @@ -13,7 +13,7 @@ class ItemUpdateParams(TypedDict, total=False): account_id: Required[str] - """Defines an identifier.""" + """The Account ID for this resource.""" body: Required[Iterable[Body]] diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index 6674df67455..0940054b1c9 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -1,11 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Optional from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] +__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta", "Resources"] class PermissionGroupMeta(BaseModel): @@ -25,6 +25,14 @@ class PermissionGroup(BaseModel): """Name of the permission group.""" +class Resources(BaseModel): + nested: Optional[Dict[str, Dict[str, str]]] = None + """Nested resource permissions for hierarchical scoping.""" + + simple: Optional[Dict[str, str]] = None + """Simple resource permissions where each resource maps to a permission string.""" + + class TokenPolicy(BaseModel): id: str """Policy identifier.""" @@ -35,5 +43,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Dict[str, Union[str, Dict[str, str]]] - """A list of resource names that the policy applies to.""" + resources: Resources + """Resource permissions for the policy. Use either simple or nested permissions.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index d1f663c2d40..f373963a579 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -2,10 +2,10 @@ from __future__ import annotations -from typing import Dict, Union, Iterable +from typing import Dict, Iterable from typing_extensions import Literal, Required, TypedDict -__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] +__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta", "Resources"] class PermissionGroupMeta(TypedDict, total=False): @@ -22,6 +22,14 @@ class PermissionGroup(TypedDict, total=False): """Attributes associated to the permission group.""" +class Resources(TypedDict, total=False): + nested: Dict[str, Dict[str, str]] + """Nested resource permissions for hierarchical scoping.""" + + simple: Dict[str, str] + """Simple resource permissions where each resource maps to a permission string.""" + + class TokenPolicy(TypedDict, total=False): effect: Required[Literal["allow", "deny"]] """Allow or deny operations against the resources.""" @@ -29,5 +37,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Dict[str, Union[str, Dict[str, str]]]] - """A list of resource names that the policy applies to.""" + resources: Required[Resources] + """Resource permissions for the policy. Use either simple or nested permissions.""" diff --git a/src/cloudflare/types/ssl/recommendation_get_response.py b/src/cloudflare/types/ssl/recommendation_get_response.py index bf29f2b7368..9a9d74b7e27 100644 --- a/src/cloudflare/types/ssl/recommendation_get_response.py +++ b/src/cloudflare/types/ssl/recommendation_get_response.py @@ -10,9 +10,16 @@ class RecommendationGetResponse(BaseModel): - id: Optional[str] = None - """Identifier of a recommendation result.""" + id: str - modified_on: Optional[datetime] = None + editable: bool + """Whether this setting can be updated or not.""" - value: Optional[Literal["flexible", "full", "strict"]] = None + modified_on: datetime + """Last time this setting was modified.""" + + value: Literal["auto", "custom"] + """Current setting of the automatic SSL/TLS.""" + + next_scheduled_scan: Optional[datetime] = None + """Next time this zone will be scanned by the Automatic SSL/TLS.""" diff --git a/src/cloudflare/types/stream/clip.py b/src/cloudflare/types/stream/clip.py index 9c6197aec52..4f3ef0f4fd0 100644 --- a/src/cloudflare/types/stream/clip.py +++ b/src/cloudflare/types/stream/clip.py @@ -77,7 +77,9 @@ class Clip(BaseModel): start_time_seconds: Optional[int] = FieldInfo(alias="startTimeSeconds", default=None) """Specifies the start time for the video clip in seconds.""" - status: Optional[Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]] = None + status: Optional[ + Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"] + ] = None """Specifies the processing status for all quality levels for a video.""" thumbnail_timestamp_pct: Optional[float] = FieldInfo(alias="thumbnailTimestampPct", default=None) diff --git a/src/cloudflare/types/stream/stream_list_params.py b/src/cloudflare/types/stream/stream_list_params.py index 5d9ed520774..9de295acba8 100644 --- a/src/cloudflare/types/stream/stream_list_params.py +++ b/src/cloudflare/types/stream/stream_list_params.py @@ -39,7 +39,7 @@ class StreamListParams(TypedDict, total=False): start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Lists videos created after the specified date.""" - status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"] + status: Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"] """Specifies the processing status for all quality levels for a video.""" type: str diff --git a/src/cloudflare/types/stream/video.py b/src/cloudflare/types/stream/video.py index d53fad7387f..e57d26fc09c 100644 --- a/src/cloudflare/types/stream/video.py +++ b/src/cloudflare/types/stream/video.py @@ -57,7 +57,9 @@ class Status(BaseModel): The value must be a non-negative integer. """ - state: Optional[Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error"]] = None + state: Optional[ + Literal["pendingupload", "downloading", "queued", "inprogress", "ready", "error", "live-inprogress"] + ] = None """Specifies the processing status for all quality levels for a video.""" diff --git a/src/cloudflare/types/workers/script_update_params.py b/src/cloudflare/types/workers/script_update_params.py index 0e0f6448f72..f051e104fed 100644 --- a/src/cloudflare/types/workers/script_update_params.py +++ b/src/cloudflare/types/workers/script_update_params.py @@ -5,6 +5,7 @@ from typing import List, Union, Iterable, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict +from ..._types import FileTypes from .migration_step_param import MigrationStepParam from .single_step_migration_param import SingleStepMigrationParam from .scripts.consumer_script_param import ConsumerScriptParam @@ -55,6 +56,16 @@ class ScriptUpdateParams(TypedDict, total=False): metadata: Required[Metadata] """JSON encoded metadata about the uploaded parts and Worker configuration.""" + files: List[FileTypes] + """An array of modules (often JavaScript files) comprising a Worker script. + + At least one module must be present and referenced in the metadata as + `main_module` or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + """ + class MetadataAssetsConfig(TypedDict, total=False): _headers: str diff --git a/src/cloudflare/types/workers/scripts/__init__.py b/src/cloudflare/types/workers/scripts/__init__.py index f72748894c8..9b667960aa6 100644 --- a/src/cloudflare/types/workers/scripts/__init__.py +++ b/src/cloudflare/types/workers/scripts/__init__.py @@ -2,9 +2,7 @@ from __future__ import annotations -from .deployment import Deployment as Deployment from .consumer_script import ConsumerScript as ConsumerScript -from .deployment_param import DeploymentParam as DeploymentParam from .tail_get_response import TailGetResponse as TailGetResponse from .tail_create_params import TailCreateParams as TailCreateParams from .secret_get_response import SecretGetResponse as SecretGetResponse diff --git a/src/cloudflare/types/workers/scripts/content_update_params.py b/src/cloudflare/types/workers/scripts/content_update_params.py index 52465360ec6..ac1164da463 100644 --- a/src/cloudflare/types/workers/scripts/content_update_params.py +++ b/src/cloudflare/types/workers/scripts/content_update_params.py @@ -2,21 +2,47 @@ from __future__ import annotations +from typing import List from typing_extensions import Required, Annotated, TypedDict +from ...._types import FileTypes from ...._utils import PropertyInfo -from ..worker_metadata_param import WorkerMetadataParam -__all__ = ["ContentUpdateParams"] +__all__ = ["ContentUpdateParams", "Metadata"] class ContentUpdateParams(TypedDict, total=False): account_id: Required[str] """Identifier.""" - metadata: Required[WorkerMetadataParam] + metadata: Required[Metadata] """JSON encoded metadata about the uploaded parts and Worker configuration.""" + files: List[FileTypes] + """An array of modules (often JavaScript files) comprising a Worker script. + + At least one module must be present and referenced in the metadata as + `main_module` or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + """ + cf_worker_body_part: Annotated[str, PropertyInfo(alias="CF-WORKER-BODY-PART")] cf_worker_main_module_part: Annotated[str, PropertyInfo(alias="CF-WORKER-MAIN-MODULE-PART")] + + +class Metadata(TypedDict, total=False): + body_part: str + """Name of the uploaded file that contains the Worker script (e.g. + + the file adding a listener to the `fetch` event). Indicates a + `service worker syntax` Worker. + """ + + main_module: str + """Name of the uploaded file that contains the main module (e.g. + + the file exporting a `fetch` handler). Indicates a `module syntax` Worker. + """ diff --git a/src/cloudflare/types/workers/scripts/deployment.py b/src/cloudflare/types/workers/scripts/deployment.py deleted file mode 100644 index 5de4c8e53c5..00000000000 --- a/src/cloudflare/types/workers/scripts/deployment.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from ...._models import BaseModel - -__all__ = ["Deployment"] - - -class Deployment(BaseModel): - workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None) - """Human-readable message about the deployment. Truncated to 100 bytes.""" diff --git a/src/cloudflare/types/workers/scripts/deployment_create_params.py b/src/cloudflare/types/workers/scripts/deployment_create_params.py index a9f7bb5d763..24b8431b0b9 100644 --- a/src/cloudflare/types/workers/scripts/deployment_create_params.py +++ b/src/cloudflare/types/workers/scripts/deployment_create_params.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import Iterable -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict -from .deployment_param import DeploymentParam +from ...._utils import PropertyInfo -__all__ = ["DeploymentCreateParams", "Version"] +__all__ = ["DeploymentCreateParams", "Version", "Annotations"] class DeploymentCreateParams(TypedDict, total=False): @@ -24,10 +24,15 @@ class DeploymentCreateParams(TypedDict, total=False): something such rolling back to an older version when a secret has changed. """ - annotations: DeploymentParam + annotations: Annotations class Version(TypedDict, total=False): percentage: Required[float] version_id: Required[str] + + +class Annotations(TypedDict, total=False): + workers_message: Annotated[str, PropertyInfo(alias="workers/message")] + """Human-readable message about the deployment. Truncated to 100 bytes.""" diff --git a/src/cloudflare/types/workers/scripts/deployment_create_response.py b/src/cloudflare/types/workers/scripts/deployment_create_response.py index 89f71d76378..7850b450ef3 100644 --- a/src/cloudflare/types/workers/scripts/deployment_create_response.py +++ b/src/cloudflare/types/workers/scripts/deployment_create_response.py @@ -1,12 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional +from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from ...._models import BaseModel -from .deployment import Deployment -__all__ = ["DeploymentCreateResponse", "Version"] +__all__ = ["DeploymentCreateResponse", "Version", "Annotations"] class Version(BaseModel): @@ -15,17 +17,22 @@ class Version(BaseModel): version_id: str +class Annotations(BaseModel): + workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None) + """Human-readable message about the deployment. Truncated to 100 bytes.""" + + class DeploymentCreateResponse(BaseModel): - strategy: Literal["percentage"] + id: str - versions: List[Version] + created_on: datetime - id: Optional[str] = None + source: str - annotations: Optional[Deployment] = None + strategy: Literal["percentage"] - author_email: Optional[str] = None + versions: List[Version] - created_on: Optional[str] = None + annotations: Optional[Annotations] = None - source: Optional[str] = None + author_email: Optional[str] = None diff --git a/src/cloudflare/types/workers/scripts/deployment_get_response.py b/src/cloudflare/types/workers/scripts/deployment_get_response.py index ac49947bfe5..6d3c01bd99f 100644 --- a/src/cloudflare/types/workers/scripts/deployment_get_response.py +++ b/src/cloudflare/types/workers/scripts/deployment_get_response.py @@ -1,12 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional +from datetime import datetime from typing_extensions import Literal -from . import deployment +from pydantic import Field as FieldInfo + from ...._models import BaseModel -__all__ = ["DeploymentGetResponse", "Deployment", "DeploymentVersion"] +__all__ = ["DeploymentGetResponse", "Deployment", "DeploymentVersion", "DeploymentAnnotations"] class DeploymentVersion(BaseModel): @@ -15,21 +17,26 @@ class DeploymentVersion(BaseModel): version_id: str +class DeploymentAnnotations(BaseModel): + workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None) + """Human-readable message about the deployment. Truncated to 100 bytes.""" + + class Deployment(BaseModel): - strategy: Literal["percentage"] + id: str - versions: List[DeploymentVersion] + created_on: datetime - id: Optional[str] = None + source: str - annotations: Optional[deployment.Deployment] = None + strategy: Literal["percentage"] - author_email: Optional[str] = None + versions: List[DeploymentVersion] - created_on: Optional[str] = None + annotations: Optional[DeploymentAnnotations] = None - source: Optional[str] = None + author_email: Optional[str] = None class DeploymentGetResponse(BaseModel): - deployments: Optional[List[Deployment]] = None + deployments: List[Deployment] diff --git a/src/cloudflare/types/workers/scripts/deployment_param.py b/src/cloudflare/types/workers/scripts/deployment_param.py deleted file mode 100644 index caee9701c51..00000000000 --- a/src/cloudflare/types/workers/scripts/deployment_param.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Annotated, TypedDict - -from ...._utils import PropertyInfo - -__all__ = ["DeploymentParam"] - - -class DeploymentParam(TypedDict, total=False): - workers_message: Annotated[str, PropertyInfo(alias="workers/message")] - """Human-readable message about the deployment. Truncated to 100 bytes.""" diff --git a/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py b/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py index e1ae8d3a0aa..ecf566e77ad 100644 --- a/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py +++ b/src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py @@ -470,9 +470,6 @@ class ScriptAndVersionSettingEditResponse(BaseModel): logpush: Optional[bool] = None """Whether Logpush is turned on for the Worker.""" - migrations: Optional[Migrations] = None - """Migrations to apply for Durable Objects associated with this Worker.""" - observability: Optional[Observability] = None """Observability settings for the Worker.""" diff --git a/src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py b/src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py index faa3d1d72c2..2547ace2ab7 100644 --- a/src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py +++ b/src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py @@ -470,9 +470,6 @@ class ScriptAndVersionSettingGetResponse(BaseModel): logpush: Optional[bool] = None """Whether Logpush is turned on for the Worker.""" - migrations: Optional[Migrations] = None - """Migrations to apply for Durable Objects associated with this Worker.""" - observability: Optional[Observability] = None """Observability settings for the Worker.""" diff --git a/src/cloudflare/types/workers/scripts/version_create_params.py b/src/cloudflare/types/workers/scripts/version_create_params.py index 7f81427661f..640024b901f 100644 --- a/src/cloudflare/types/workers/scripts/version_create_params.py +++ b/src/cloudflare/types/workers/scripts/version_create_params.py @@ -5,6 +5,7 @@ from typing import List, Union, Iterable from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from ...._types import FileTypes from ...._utils import PropertyInfo __all__ = [ @@ -47,6 +48,16 @@ class VersionCreateParams(TypedDict, total=False): metadata: Required[Metadata] """JSON encoded metadata about the uploaded parts and Worker configuration.""" + files: List[FileTypes] + """An array of modules (often JavaScript files) comprising a Worker script. + + At least one module must be present and referenced in the metadata as + `main_module` or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + """ + class MetadataAnnotations(TypedDict, total=False): workers_message: Annotated[str, PropertyInfo(alias="workers/message")] @@ -405,7 +416,7 @@ class MetadataBindingWorkersBindingKindWorkflow(TypedDict, total=False): class Metadata(TypedDict, total=False): main_module: Required[str] - """Name of the part in the multipart request that contains the main module (e.g. + """Name of the uploaded file that contains the main module (e.g. the file exporting a `fetch` handler). Indicates a `module syntax` Worker, which is required for Version Upload. diff --git a/src/cloudflare/types/workers/scripts/version_create_response.py b/src/cloudflare/types/workers/scripts/version_create_response.py index 117ad7b82ab..e7f3e869d2d 100644 --- a/src/cloudflare/types/workers/scripts/version_create_response.py +++ b/src/cloudflare/types/workers/scripts/version_create_response.py @@ -11,33 +11,32 @@ __all__ = [ "VersionCreateResponse", "Resources", - "ResourcesBindings", - "ResourcesBindingsResult", - "ResourcesBindingsResultWorkersBindingKindAI", - "ResourcesBindingsResultWorkersBindingKindAnalyticsEngine", - "ResourcesBindingsResultWorkersBindingKindAssets", - "ResourcesBindingsResultWorkersBindingKindBrowser", - "ResourcesBindingsResultWorkersBindingKindD1", - "ResourcesBindingsResultWorkersBindingKindDispatchNamespace", - "ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound", - "ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker", - "ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace", - "ResourcesBindingsResultWorkersBindingKindHyperdrive", - "ResourcesBindingsResultWorkersBindingKindJson", - "ResourcesBindingsResultWorkersBindingKindKVNamespace", - "ResourcesBindingsResultWorkersBindingKindMTLSCertificate", - "ResourcesBindingsResultWorkersBindingKindPlainText", - "ResourcesBindingsResultWorkersBindingKindPipelines", - "ResourcesBindingsResultWorkersBindingKindQueue", - "ResourcesBindingsResultWorkersBindingKindR2Bucket", - "ResourcesBindingsResultWorkersBindingKindSecretText", - "ResourcesBindingsResultWorkersBindingKindService", - "ResourcesBindingsResultWorkersBindingKindTailConsumer", - "ResourcesBindingsResultWorkersBindingKindVectorize", - "ResourcesBindingsResultWorkersBindingKindVersionMetadata", - "ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret", - "ResourcesBindingsResultWorkersBindingKindSecretKey", - "ResourcesBindingsResultWorkersBindingKindWorkflow", + "ResourcesBinding", + "ResourcesBindingWorkersBindingKindAI", + "ResourcesBindingWorkersBindingKindAnalyticsEngine", + "ResourcesBindingWorkersBindingKindAssets", + "ResourcesBindingWorkersBindingKindBrowser", + "ResourcesBindingWorkersBindingKindD1", + "ResourcesBindingWorkersBindingKindDispatchNamespace", + "ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound", + "ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker", + "ResourcesBindingWorkersBindingKindDurableObjectNamespace", + "ResourcesBindingWorkersBindingKindHyperdrive", + "ResourcesBindingWorkersBindingKindJson", + "ResourcesBindingWorkersBindingKindKVNamespace", + "ResourcesBindingWorkersBindingKindMTLSCertificate", + "ResourcesBindingWorkersBindingKindPlainText", + "ResourcesBindingWorkersBindingKindPipelines", + "ResourcesBindingWorkersBindingKindQueue", + "ResourcesBindingWorkersBindingKindR2Bucket", + "ResourcesBindingWorkersBindingKindSecretText", + "ResourcesBindingWorkersBindingKindService", + "ResourcesBindingWorkersBindingKindTailConsumer", + "ResourcesBindingWorkersBindingKindVectorize", + "ResourcesBindingWorkersBindingKindVersionMetadata", + "ResourcesBindingWorkersBindingKindSecretsStoreSecret", + "ResourcesBindingWorkersBindingKindSecretKey", + "ResourcesBindingWorkersBindingKindWorkflow", "ResourcesScript", "ResourcesScriptNamedHandler", "ResourcesScriptRuntime", @@ -46,7 +45,7 @@ ] -class ResourcesBindingsResultWorkersBindingKindAI(BaseModel): +class ResourcesBindingWorkersBindingKindAI(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -54,7 +53,7 @@ class ResourcesBindingsResultWorkersBindingKindAI(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindAnalyticsEngine(BaseModel): +class ResourcesBindingWorkersBindingKindAnalyticsEngine(BaseModel): dataset: str """The name of the dataset to bind to.""" @@ -65,7 +64,7 @@ class ResourcesBindingsResultWorkersBindingKindAnalyticsEngine(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindAssets(BaseModel): +class ResourcesBindingWorkersBindingKindAssets(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -73,7 +72,7 @@ class ResourcesBindingsResultWorkersBindingKindAssets(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindBrowser(BaseModel): +class ResourcesBindingWorkersBindingKindBrowser(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -81,7 +80,7 @@ class ResourcesBindingsResultWorkersBindingKindBrowser(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindD1(BaseModel): +class ResourcesBindingWorkersBindingKindD1(BaseModel): id: str """Identifier of the D1 database to bind to.""" @@ -92,7 +91,7 @@ class ResourcesBindingsResultWorkersBindingKindD1(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker(BaseModel): +class ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker(BaseModel): environment: Optional[str] = None """Environment of the outbound worker.""" @@ -100,18 +99,18 @@ class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker(B """Name of the outbound worker.""" -class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound(BaseModel): +class ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound(BaseModel): params: Optional[List[str]] = None """ Pass information from the Dispatch Worker to the Outbound Worker through the parameters. """ - worker: Optional[ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker] = None + worker: Optional[ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker] = None """Outbound worker.""" -class ResourcesBindingsResultWorkersBindingKindDispatchNamespace(BaseModel): +class ResourcesBindingWorkersBindingKindDispatchNamespace(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -121,11 +120,11 @@ class ResourcesBindingsResultWorkersBindingKindDispatchNamespace(BaseModel): type: Literal["dispatch_namespace"] """The kind of resource that the binding provides.""" - outbound: Optional[ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound] = None + outbound: Optional[ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound] = None """Outbound worker.""" -class ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace(BaseModel): +class ResourcesBindingWorkersBindingKindDurableObjectNamespace(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -148,7 +147,7 @@ class ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace(BaseModel) """ -class ResourcesBindingsResultWorkersBindingKindHyperdrive(BaseModel): +class ResourcesBindingWorkersBindingKindHyperdrive(BaseModel): id: str """Identifier of the Hyperdrive connection to bind to.""" @@ -159,7 +158,7 @@ class ResourcesBindingsResultWorkersBindingKindHyperdrive(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindJson(BaseModel): +class ResourcesBindingWorkersBindingKindJson(BaseModel): json_: str = FieldInfo(alias="json") """JSON data to use.""" @@ -170,7 +169,7 @@ class ResourcesBindingsResultWorkersBindingKindJson(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindKVNamespace(BaseModel): +class ResourcesBindingWorkersBindingKindKVNamespace(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -181,7 +180,7 @@ class ResourcesBindingsResultWorkersBindingKindKVNamespace(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindMTLSCertificate(BaseModel): +class ResourcesBindingWorkersBindingKindMTLSCertificate(BaseModel): certificate_id: str """Identifier of the certificate to bind to.""" @@ -192,7 +191,7 @@ class ResourcesBindingsResultWorkersBindingKindMTLSCertificate(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindPlainText(BaseModel): +class ResourcesBindingWorkersBindingKindPlainText(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -203,7 +202,7 @@ class ResourcesBindingsResultWorkersBindingKindPlainText(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindPipelines(BaseModel): +class ResourcesBindingWorkersBindingKindPipelines(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -214,7 +213,7 @@ class ResourcesBindingsResultWorkersBindingKindPipelines(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindQueue(BaseModel): +class ResourcesBindingWorkersBindingKindQueue(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -225,7 +224,7 @@ class ResourcesBindingsResultWorkersBindingKindQueue(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindR2Bucket(BaseModel): +class ResourcesBindingWorkersBindingKindR2Bucket(BaseModel): bucket_name: str """R2 bucket to bind to.""" @@ -236,7 +235,7 @@ class ResourcesBindingsResultWorkersBindingKindR2Bucket(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindSecretText(BaseModel): +class ResourcesBindingWorkersBindingKindSecretText(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -244,7 +243,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretText(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindService(BaseModel): +class ResourcesBindingWorkersBindingKindService(BaseModel): environment: str """Optional environment if the Worker utilizes one.""" @@ -258,7 +257,7 @@ class ResourcesBindingsResultWorkersBindingKindService(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindTailConsumer(BaseModel): +class ResourcesBindingWorkersBindingKindTailConsumer(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -269,7 +268,7 @@ class ResourcesBindingsResultWorkersBindingKindTailConsumer(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindVectorize(BaseModel): +class ResourcesBindingWorkersBindingKindVectorize(BaseModel): index_name: str """Name of the Vectorize index to bind to.""" @@ -280,7 +279,7 @@ class ResourcesBindingsResultWorkersBindingKindVectorize(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindVersionMetadata(BaseModel): +class ResourcesBindingWorkersBindingKindVersionMetadata(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -288,7 +287,7 @@ class ResourcesBindingsResultWorkersBindingKindVersionMetadata(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret(BaseModel): +class ResourcesBindingWorkersBindingKindSecretsStoreSecret(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -302,7 +301,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindSecretKey(BaseModel): +class ResourcesBindingWorkersBindingKindSecretKey(BaseModel): algorithm: object """Algorithm-specific key parameters. @@ -328,7 +327,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretKey(BaseModel): """ -class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel): +class ResourcesBindingWorkersBindingKindWorkflow(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -351,45 +350,36 @@ class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel): """ -ResourcesBindingsResult: TypeAlias = Annotated[ +ResourcesBinding: TypeAlias = Annotated[ Union[ - ResourcesBindingsResultWorkersBindingKindAI, - ResourcesBindingsResultWorkersBindingKindAnalyticsEngine, - ResourcesBindingsResultWorkersBindingKindAssets, - ResourcesBindingsResultWorkersBindingKindBrowser, - ResourcesBindingsResultWorkersBindingKindD1, - ResourcesBindingsResultWorkersBindingKindDispatchNamespace, - ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace, - ResourcesBindingsResultWorkersBindingKindHyperdrive, - ResourcesBindingsResultWorkersBindingKindJson, - ResourcesBindingsResultWorkersBindingKindKVNamespace, - ResourcesBindingsResultWorkersBindingKindMTLSCertificate, - ResourcesBindingsResultWorkersBindingKindPlainText, - ResourcesBindingsResultWorkersBindingKindPipelines, - ResourcesBindingsResultWorkersBindingKindQueue, - ResourcesBindingsResultWorkersBindingKindR2Bucket, - ResourcesBindingsResultWorkersBindingKindSecretText, - ResourcesBindingsResultWorkersBindingKindService, - ResourcesBindingsResultWorkersBindingKindTailConsumer, - ResourcesBindingsResultWorkersBindingKindVectorize, - ResourcesBindingsResultWorkersBindingKindVersionMetadata, - ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret, - ResourcesBindingsResultWorkersBindingKindSecretKey, - ResourcesBindingsResultWorkersBindingKindWorkflow, + ResourcesBindingWorkersBindingKindAI, + ResourcesBindingWorkersBindingKindAnalyticsEngine, + ResourcesBindingWorkersBindingKindAssets, + ResourcesBindingWorkersBindingKindBrowser, + ResourcesBindingWorkersBindingKindD1, + ResourcesBindingWorkersBindingKindDispatchNamespace, + ResourcesBindingWorkersBindingKindDurableObjectNamespace, + ResourcesBindingWorkersBindingKindHyperdrive, + ResourcesBindingWorkersBindingKindJson, + ResourcesBindingWorkersBindingKindKVNamespace, + ResourcesBindingWorkersBindingKindMTLSCertificate, + ResourcesBindingWorkersBindingKindPlainText, + ResourcesBindingWorkersBindingKindPipelines, + ResourcesBindingWorkersBindingKindQueue, + ResourcesBindingWorkersBindingKindR2Bucket, + ResourcesBindingWorkersBindingKindSecretText, + ResourcesBindingWorkersBindingKindService, + ResourcesBindingWorkersBindingKindTailConsumer, + ResourcesBindingWorkersBindingKindVectorize, + ResourcesBindingWorkersBindingKindVersionMetadata, + ResourcesBindingWorkersBindingKindSecretsStoreSecret, + ResourcesBindingWorkersBindingKindSecretKey, + ResourcesBindingWorkersBindingKindWorkflow, ], PropertyInfo(discriminator="type"), ] -class ResourcesBindings(BaseModel): - result: Optional[List[ResourcesBindingsResult]] = None - """List of bindings attached to a Worker. - - You can find more about bindings on our docs: - https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. - """ - - class ResourcesScriptNamedHandler(BaseModel): handlers: Optional[List[str]] = None @@ -423,7 +413,12 @@ class ResourcesScriptRuntime(BaseModel): class Resources(BaseModel): - bindings: Optional[ResourcesBindings] = None + bindings: Optional[List[ResourcesBinding]] = None + """List of bindings attached to a Worker. + + You can find more about bindings on our docs: + https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. + """ script: Optional[ResourcesScript] = None diff --git a/src/cloudflare/types/workers/scripts/version_get_response.py b/src/cloudflare/types/workers/scripts/version_get_response.py index 739189bd1ac..25aea4aa771 100644 --- a/src/cloudflare/types/workers/scripts/version_get_response.py +++ b/src/cloudflare/types/workers/scripts/version_get_response.py @@ -11,33 +11,32 @@ __all__ = [ "VersionGetResponse", "Resources", - "ResourcesBindings", - "ResourcesBindingsResult", - "ResourcesBindingsResultWorkersBindingKindAI", - "ResourcesBindingsResultWorkersBindingKindAnalyticsEngine", - "ResourcesBindingsResultWorkersBindingKindAssets", - "ResourcesBindingsResultWorkersBindingKindBrowser", - "ResourcesBindingsResultWorkersBindingKindD1", - "ResourcesBindingsResultWorkersBindingKindDispatchNamespace", - "ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound", - "ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker", - "ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace", - "ResourcesBindingsResultWorkersBindingKindHyperdrive", - "ResourcesBindingsResultWorkersBindingKindJson", - "ResourcesBindingsResultWorkersBindingKindKVNamespace", - "ResourcesBindingsResultWorkersBindingKindMTLSCertificate", - "ResourcesBindingsResultWorkersBindingKindPlainText", - "ResourcesBindingsResultWorkersBindingKindPipelines", - "ResourcesBindingsResultWorkersBindingKindQueue", - "ResourcesBindingsResultWorkersBindingKindR2Bucket", - "ResourcesBindingsResultWorkersBindingKindSecretText", - "ResourcesBindingsResultWorkersBindingKindService", - "ResourcesBindingsResultWorkersBindingKindTailConsumer", - "ResourcesBindingsResultWorkersBindingKindVectorize", - "ResourcesBindingsResultWorkersBindingKindVersionMetadata", - "ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret", - "ResourcesBindingsResultWorkersBindingKindSecretKey", - "ResourcesBindingsResultWorkersBindingKindWorkflow", + "ResourcesBinding", + "ResourcesBindingWorkersBindingKindAI", + "ResourcesBindingWorkersBindingKindAnalyticsEngine", + "ResourcesBindingWorkersBindingKindAssets", + "ResourcesBindingWorkersBindingKindBrowser", + "ResourcesBindingWorkersBindingKindD1", + "ResourcesBindingWorkersBindingKindDispatchNamespace", + "ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound", + "ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker", + "ResourcesBindingWorkersBindingKindDurableObjectNamespace", + "ResourcesBindingWorkersBindingKindHyperdrive", + "ResourcesBindingWorkersBindingKindJson", + "ResourcesBindingWorkersBindingKindKVNamespace", + "ResourcesBindingWorkersBindingKindMTLSCertificate", + "ResourcesBindingWorkersBindingKindPlainText", + "ResourcesBindingWorkersBindingKindPipelines", + "ResourcesBindingWorkersBindingKindQueue", + "ResourcesBindingWorkersBindingKindR2Bucket", + "ResourcesBindingWorkersBindingKindSecretText", + "ResourcesBindingWorkersBindingKindService", + "ResourcesBindingWorkersBindingKindTailConsumer", + "ResourcesBindingWorkersBindingKindVectorize", + "ResourcesBindingWorkersBindingKindVersionMetadata", + "ResourcesBindingWorkersBindingKindSecretsStoreSecret", + "ResourcesBindingWorkersBindingKindSecretKey", + "ResourcesBindingWorkersBindingKindWorkflow", "ResourcesScript", "ResourcesScriptNamedHandler", "ResourcesScriptRuntime", @@ -46,7 +45,7 @@ ] -class ResourcesBindingsResultWorkersBindingKindAI(BaseModel): +class ResourcesBindingWorkersBindingKindAI(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -54,7 +53,7 @@ class ResourcesBindingsResultWorkersBindingKindAI(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindAnalyticsEngine(BaseModel): +class ResourcesBindingWorkersBindingKindAnalyticsEngine(BaseModel): dataset: str """The name of the dataset to bind to.""" @@ -65,7 +64,7 @@ class ResourcesBindingsResultWorkersBindingKindAnalyticsEngine(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindAssets(BaseModel): +class ResourcesBindingWorkersBindingKindAssets(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -73,7 +72,7 @@ class ResourcesBindingsResultWorkersBindingKindAssets(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindBrowser(BaseModel): +class ResourcesBindingWorkersBindingKindBrowser(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -81,7 +80,7 @@ class ResourcesBindingsResultWorkersBindingKindBrowser(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindD1(BaseModel): +class ResourcesBindingWorkersBindingKindD1(BaseModel): id: str """Identifier of the D1 database to bind to.""" @@ -92,7 +91,7 @@ class ResourcesBindingsResultWorkersBindingKindD1(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker(BaseModel): +class ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker(BaseModel): environment: Optional[str] = None """Environment of the outbound worker.""" @@ -100,18 +99,18 @@ class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker(B """Name of the outbound worker.""" -class ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound(BaseModel): +class ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound(BaseModel): params: Optional[List[str]] = None """ Pass information from the Dispatch Worker to the Outbound Worker through the parameters. """ - worker: Optional[ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutboundWorker] = None + worker: Optional[ResourcesBindingWorkersBindingKindDispatchNamespaceOutboundWorker] = None """Outbound worker.""" -class ResourcesBindingsResultWorkersBindingKindDispatchNamespace(BaseModel): +class ResourcesBindingWorkersBindingKindDispatchNamespace(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -121,11 +120,11 @@ class ResourcesBindingsResultWorkersBindingKindDispatchNamespace(BaseModel): type: Literal["dispatch_namespace"] """The kind of resource that the binding provides.""" - outbound: Optional[ResourcesBindingsResultWorkersBindingKindDispatchNamespaceOutbound] = None + outbound: Optional[ResourcesBindingWorkersBindingKindDispatchNamespaceOutbound] = None """Outbound worker.""" -class ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace(BaseModel): +class ResourcesBindingWorkersBindingKindDurableObjectNamespace(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -148,7 +147,7 @@ class ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace(BaseModel) """ -class ResourcesBindingsResultWorkersBindingKindHyperdrive(BaseModel): +class ResourcesBindingWorkersBindingKindHyperdrive(BaseModel): id: str """Identifier of the Hyperdrive connection to bind to.""" @@ -159,7 +158,7 @@ class ResourcesBindingsResultWorkersBindingKindHyperdrive(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindJson(BaseModel): +class ResourcesBindingWorkersBindingKindJson(BaseModel): json_: str = FieldInfo(alias="json") """JSON data to use.""" @@ -170,7 +169,7 @@ class ResourcesBindingsResultWorkersBindingKindJson(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindKVNamespace(BaseModel): +class ResourcesBindingWorkersBindingKindKVNamespace(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -181,7 +180,7 @@ class ResourcesBindingsResultWorkersBindingKindKVNamespace(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindMTLSCertificate(BaseModel): +class ResourcesBindingWorkersBindingKindMTLSCertificate(BaseModel): certificate_id: str """Identifier of the certificate to bind to.""" @@ -192,7 +191,7 @@ class ResourcesBindingsResultWorkersBindingKindMTLSCertificate(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindPlainText(BaseModel): +class ResourcesBindingWorkersBindingKindPlainText(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -203,7 +202,7 @@ class ResourcesBindingsResultWorkersBindingKindPlainText(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindPipelines(BaseModel): +class ResourcesBindingWorkersBindingKindPipelines(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -214,7 +213,7 @@ class ResourcesBindingsResultWorkersBindingKindPipelines(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindQueue(BaseModel): +class ResourcesBindingWorkersBindingKindQueue(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -225,7 +224,7 @@ class ResourcesBindingsResultWorkersBindingKindQueue(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindR2Bucket(BaseModel): +class ResourcesBindingWorkersBindingKindR2Bucket(BaseModel): bucket_name: str """R2 bucket to bind to.""" @@ -236,7 +235,7 @@ class ResourcesBindingsResultWorkersBindingKindR2Bucket(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindSecretText(BaseModel): +class ResourcesBindingWorkersBindingKindSecretText(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -244,7 +243,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretText(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindService(BaseModel): +class ResourcesBindingWorkersBindingKindService(BaseModel): environment: str """Optional environment if the Worker utilizes one.""" @@ -258,7 +257,7 @@ class ResourcesBindingsResultWorkersBindingKindService(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindTailConsumer(BaseModel): +class ResourcesBindingWorkersBindingKindTailConsumer(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -269,7 +268,7 @@ class ResourcesBindingsResultWorkersBindingKindTailConsumer(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindVectorize(BaseModel): +class ResourcesBindingWorkersBindingKindVectorize(BaseModel): index_name: str """Name of the Vectorize index to bind to.""" @@ -280,7 +279,7 @@ class ResourcesBindingsResultWorkersBindingKindVectorize(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindVersionMetadata(BaseModel): +class ResourcesBindingWorkersBindingKindVersionMetadata(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -288,7 +287,7 @@ class ResourcesBindingsResultWorkersBindingKindVersionMetadata(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret(BaseModel): +class ResourcesBindingWorkersBindingKindSecretsStoreSecret(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -302,7 +301,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret(BaseModel): """The kind of resource that the binding provides.""" -class ResourcesBindingsResultWorkersBindingKindSecretKey(BaseModel): +class ResourcesBindingWorkersBindingKindSecretKey(BaseModel): algorithm: object """Algorithm-specific key parameters. @@ -328,7 +327,7 @@ class ResourcesBindingsResultWorkersBindingKindSecretKey(BaseModel): """ -class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel): +class ResourcesBindingWorkersBindingKindWorkflow(BaseModel): name: str """A JavaScript variable name for the binding.""" @@ -351,45 +350,36 @@ class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel): """ -ResourcesBindingsResult: TypeAlias = Annotated[ +ResourcesBinding: TypeAlias = Annotated[ Union[ - ResourcesBindingsResultWorkersBindingKindAI, - ResourcesBindingsResultWorkersBindingKindAnalyticsEngine, - ResourcesBindingsResultWorkersBindingKindAssets, - ResourcesBindingsResultWorkersBindingKindBrowser, - ResourcesBindingsResultWorkersBindingKindD1, - ResourcesBindingsResultWorkersBindingKindDispatchNamespace, - ResourcesBindingsResultWorkersBindingKindDurableObjectNamespace, - ResourcesBindingsResultWorkersBindingKindHyperdrive, - ResourcesBindingsResultWorkersBindingKindJson, - ResourcesBindingsResultWorkersBindingKindKVNamespace, - ResourcesBindingsResultWorkersBindingKindMTLSCertificate, - ResourcesBindingsResultWorkersBindingKindPlainText, - ResourcesBindingsResultWorkersBindingKindPipelines, - ResourcesBindingsResultWorkersBindingKindQueue, - ResourcesBindingsResultWorkersBindingKindR2Bucket, - ResourcesBindingsResultWorkersBindingKindSecretText, - ResourcesBindingsResultWorkersBindingKindService, - ResourcesBindingsResultWorkersBindingKindTailConsumer, - ResourcesBindingsResultWorkersBindingKindVectorize, - ResourcesBindingsResultWorkersBindingKindVersionMetadata, - ResourcesBindingsResultWorkersBindingKindSecretsStoreSecret, - ResourcesBindingsResultWorkersBindingKindSecretKey, - ResourcesBindingsResultWorkersBindingKindWorkflow, + ResourcesBindingWorkersBindingKindAI, + ResourcesBindingWorkersBindingKindAnalyticsEngine, + ResourcesBindingWorkersBindingKindAssets, + ResourcesBindingWorkersBindingKindBrowser, + ResourcesBindingWorkersBindingKindD1, + ResourcesBindingWorkersBindingKindDispatchNamespace, + ResourcesBindingWorkersBindingKindDurableObjectNamespace, + ResourcesBindingWorkersBindingKindHyperdrive, + ResourcesBindingWorkersBindingKindJson, + ResourcesBindingWorkersBindingKindKVNamespace, + ResourcesBindingWorkersBindingKindMTLSCertificate, + ResourcesBindingWorkersBindingKindPlainText, + ResourcesBindingWorkersBindingKindPipelines, + ResourcesBindingWorkersBindingKindQueue, + ResourcesBindingWorkersBindingKindR2Bucket, + ResourcesBindingWorkersBindingKindSecretText, + ResourcesBindingWorkersBindingKindService, + ResourcesBindingWorkersBindingKindTailConsumer, + ResourcesBindingWorkersBindingKindVectorize, + ResourcesBindingWorkersBindingKindVersionMetadata, + ResourcesBindingWorkersBindingKindSecretsStoreSecret, + ResourcesBindingWorkersBindingKindSecretKey, + ResourcesBindingWorkersBindingKindWorkflow, ], PropertyInfo(discriminator="type"), ] -class ResourcesBindings(BaseModel): - result: Optional[List[ResourcesBindingsResult]] = None - """List of bindings attached to a Worker. - - You can find more about bindings on our docs: - https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. - """ - - class ResourcesScriptNamedHandler(BaseModel): handlers: Optional[List[str]] = None @@ -423,7 +413,12 @@ class ResourcesScriptRuntime(BaseModel): class Resources(BaseModel): - bindings: Optional[ResourcesBindings] = None + bindings: Optional[List[ResourcesBinding]] = None + """List of bindings attached to a Worker. + + You can find more about bindings on our docs: + https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. + """ script: Optional[ResourcesScript] = None diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py index 3fc25ca73fd..69a960f334f 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py @@ -5,6 +5,7 @@ from typing import List, Union, Iterable, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict +from ....._types import FileTypes from ....workers.migration_step_param import MigrationStepParam from ....workers.single_step_migration_param import SingleStepMigrationParam from ....workers.scripts.consumer_script_param import ConsumerScriptParam @@ -58,6 +59,16 @@ class ScriptUpdateParams(TypedDict, total=False): metadata: Required[Metadata] """JSON encoded metadata about the uploaded parts and Worker configuration.""" + files: List[FileTypes] + """An array of modules (often JavaScript files) comprising a Worker script. + + At least one module must be present and referenced in the metadata as + `main_module` or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + """ + class MetadataAssetsConfig(TypedDict, total=False): _headers: str diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py index d78c5640b49..39827df1f88 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py @@ -2,8 +2,10 @@ from __future__ import annotations +from typing import List from typing_extensions import Required, Annotated, TypedDict +from ......_types import FileTypes from ......_utils import PropertyInfo from .....workers.worker_metadata_param import WorkerMetadataParam @@ -20,6 +22,16 @@ class ContentUpdateParams(TypedDict, total=False): metadata: Required[WorkerMetadataParam] """JSON encoded metadata about the uploaded parts and Worker configuration.""" + files: List[FileTypes] + """An array of modules (often JavaScript files) comprising a Worker script. + + At least one module must be present and referenced in the metadata as + `main_module` or `body_part` by filename.
Possible Content-Type(s) are: + `application/javascript+module`, `text/javascript+module`, + `application/javascript`, `text/javascript`, `application/wasm`, `text/plain`, + `application/octet-stream`, `application/source-map`. + """ + cf_worker_body_part: Annotated[str, PropertyInfo(alias="CF-WORKER-BODY-PART")] cf_worker_main_module_part: Annotated[str, PropertyInfo(alias="CF-WORKER-MAIN-MODULE-PART")] diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py index ef0ea53dbf9..3c944b01c55 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py @@ -470,9 +470,6 @@ class SettingEditResponse(BaseModel): logpush: Optional[bool] = None """Whether Logpush is turned on for the Worker.""" - migrations: Optional[Migrations] = None - """Migrations to apply for Durable Objects associated with this Worker.""" - observability: Optional[Observability] = None """Observability settings for the Worker.""" diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py index f82f3b0ae97..61ea0bdd1b2 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py @@ -470,9 +470,6 @@ class SettingGetResponse(BaseModel): logpush: Optional[bool] = None """Whether Logpush is turned on for the Worker.""" - migrations: Optional[Migrations] = None - """Migrations to apply for Durable Objects associated with this Worker.""" - observability: Optional[Observability] = None """Observability settings for the Worker.""" 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 a77d4a12744..6450098a8f7 100644 --- a/src/cloudflare/types/zero_trust/access/application_create_params.py +++ b/src/cloudflare/types/zero_trust/access/application_create_params.py @@ -2486,7 +2486,7 @@ class BrowserRdpApplicationTargetCriterion(TypedDict, total=False): A port cannot be assigned to multiple protocols. """ - protocol: Required[Literal["SSH"]] + protocol: Required[Literal["RDP"]] """The communication protocol your application secures.""" target_attributes: Required[Dict[str, List[str]]] diff --git a/src/cloudflare/types/zero_trust/access/application_create_response.py b/src/cloudflare/types/zero_trust/access/application_create_response.py index 61463c42b09..e91924f4726 100644 --- a/src/cloudflare/types/zero_trust/access/application_create_response.py +++ b/src/cloudflare/types/zero_trust/access/application_create_response.py @@ -2521,7 +2521,7 @@ class BrowserRdpApplicationTargetCriterion(BaseModel): A port cannot be assigned to multiple protocols. """ - protocol: Literal["SSH"] + protocol: Literal["RDP"] """The communication protocol your application secures.""" target_attributes: Dict[str, List[str]] diff --git a/src/cloudflare/types/zero_trust/access/application_get_response.py b/src/cloudflare/types/zero_trust/access/application_get_response.py index 5daecc65e9e..68fe5308dae 100644 --- a/src/cloudflare/types/zero_trust/access/application_get_response.py +++ b/src/cloudflare/types/zero_trust/access/application_get_response.py @@ -2521,7 +2521,7 @@ class BrowserRdpApplicationTargetCriterion(BaseModel): A port cannot be assigned to multiple protocols. """ - protocol: Literal["SSH"] + protocol: Literal["RDP"] """The communication protocol your application secures.""" target_attributes: Dict[str, List[str]] diff --git a/src/cloudflare/types/zero_trust/access/application_list_response.py b/src/cloudflare/types/zero_trust/access/application_list_response.py index bccb59ec4fb..1f903dc1240 100644 --- a/src/cloudflare/types/zero_trust/access/application_list_response.py +++ b/src/cloudflare/types/zero_trust/access/application_list_response.py @@ -2521,7 +2521,7 @@ class BrowserRdpApplicationTargetCriterion(BaseModel): A port cannot be assigned to multiple protocols. """ - protocol: Literal["SSH"] + protocol: Literal["RDP"] """The communication protocol your application secures.""" target_attributes: Dict[str, List[str]] 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 4cfd0257427..1f5808d2ad4 100644 --- a/src/cloudflare/types/zero_trust/access/application_update_params.py +++ b/src/cloudflare/types/zero_trust/access/application_update_params.py @@ -2486,7 +2486,7 @@ class BrowserRdpApplicationTargetCriterion(TypedDict, total=False): A port cannot be assigned to multiple protocols. """ - protocol: Required[Literal["SSH"]] + protocol: Required[Literal["RDP"]] """The communication protocol your application secures.""" target_attributes: Required[Dict[str, List[str]]] diff --git a/src/cloudflare/types/zero_trust/access/application_update_response.py b/src/cloudflare/types/zero_trust/access/application_update_response.py index 7ec6b8c8187..9ad6e7684c8 100644 --- a/src/cloudflare/types/zero_trust/access/application_update_response.py +++ b/src/cloudflare/types/zero_trust/access/application_update_response.py @@ -2521,7 +2521,7 @@ class BrowserRdpApplicationTargetCriterion(BaseModel): A port cannot be assigned to multiple protocols. """ - protocol: Literal["SSH"] + protocol: Literal["RDP"] """The communication protocol your application secures.""" target_attributes: Dict[str, List[str]] diff --git a/src/cloudflare/types/zero_trust/access/applications/access_rule.py b/src/cloudflare/types/zero_trust/access/applications/access_rule.py index 2f80cd6f4de..dfd9cd0dba7 100644 --- a/src/cloudflare/types/zero_trust/access/applications/access_rule.py +++ b/src/cloudflare/types/zero_trust/access/applications/access_rule.py @@ -34,6 +34,8 @@ "AccessLoginMethodRuleLoginMethod", "AccessOIDCClaimRule", "AccessOIDCClaimRuleOIDC", + "AccessLinkedAppTokenRule", + "AccessLinkedAppTokenRuleLinkedAppToken", ] @@ -85,6 +87,15 @@ class AccessOIDCClaimRule(BaseModel): oidc: AccessOIDCClaimRuleOIDC +class AccessLinkedAppTokenRuleLinkedAppToken(BaseModel): + app_uid: str + """The ID of an Access OIDC SaaS application""" + + +class AccessLinkedAppTokenRule(BaseModel): + linked_app_token: AccessLinkedAppTokenRuleLinkedAppToken + + AccessRule: TypeAlias = Union[ GroupRule, AnyValidServiceTokenRule, @@ -109,4 +120,5 @@ class AccessOIDCClaimRule(BaseModel): SAMLGroupRule, AccessOIDCClaimRule, ServiceTokenRule, + AccessLinkedAppTokenRule, ] diff --git a/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py b/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py index 377206a0903..a11f29dd265 100644 --- a/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py +++ b/src/cloudflare/types/zero_trust/access/applications/access_rule_param.py @@ -35,6 +35,8 @@ "AccessLoginMethodRuleLoginMethod", "AccessOIDCClaimRule", "AccessOIDCClaimRuleOIDC", + "AccessLinkedAppTokenRule", + "AccessLinkedAppTokenRuleLinkedAppToken", ] @@ -86,6 +88,15 @@ class AccessOIDCClaimRule(TypedDict, total=False): oidc: Required[AccessOIDCClaimRuleOIDC] +class AccessLinkedAppTokenRuleLinkedAppToken(TypedDict, total=False): + app_uid: Required[str] + """The ID of an Access OIDC SaaS application""" + + +class AccessLinkedAppTokenRule(TypedDict, total=False): + linked_app_token: Required[AccessLinkedAppTokenRuleLinkedAppToken] + + AccessRuleParam: TypeAlias = Union[ GroupRuleParam, AnyValidServiceTokenRuleParam, @@ -110,4 +121,5 @@ class AccessOIDCClaimRule(TypedDict, total=False): SAMLGroupRuleParam, AccessOIDCClaimRule, ServiceTokenRuleParam, + AccessLinkedAppTokenRule, ] diff --git a/src/cloudflare/types/zero_trust/dlp/profile.py b/src/cloudflare/types/zero_trust/dlp/profile.py index 6afc94992f3..aea8fcc7069 100644 --- a/src/cloudflare/types/zero_trust/dlp/profile.py +++ b/src/cloudflare/types/zero_trust/dlp/profile.py @@ -171,12 +171,6 @@ class CustomProfile(BaseModel): allowed_match_count: int """Related DLP policies will trigger when the match count exceeds the number set.""" - context_awareness: ContextAwareness - """ - Scan the context of predefined entries to only return matches surrounded by - keywords. - """ - created_at: datetime """When the profile was created.""" @@ -196,6 +190,12 @@ class CustomProfile(BaseModel): confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]] = None + context_awareness: Optional[ContextAwareness] = None + """ + Scan the context of predefined entries to only return matches surrounded by + keywords. + """ + description: Optional[str] = None """The description of the profile.""" diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_rule.py b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py index 411a06e4c77..a04ce62a706 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_rule.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py @@ -98,6 +98,9 @@ class GatewayRule(BaseModel): name: Optional[str] = None """The name of the rule.""" + not_sharable: Optional[bool] = None + """The rule cannot be shared via the Orgs API""" + precedence: Optional[int] = None """Precedence sets the order of your rules. @@ -107,6 +110,11 @@ class GatewayRule(BaseModel): docs on how to manage precedence via Terraform. """ + read_only: Optional[bool] = None + """ + The rule was shared via the Orgs API and cannot be edited by the current account + """ + rule_settings: Optional[RuleSetting] = None """Additional settings that modify the rule's action.""" @@ -116,6 +124,9 @@ class GatewayRule(BaseModel): This does not apply to HTTP or network policies. """ + source_account: Optional[str] = None + """account tag of account that created the rule""" + traffic: Optional[str] = None """The wirefilter expression used for traffic matching.""" diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index a936ded5e33..eb25709c6c7 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -68,7 +68,14 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": { + "nested": { + "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { + "com.cloudflare.api.account.zone.*": "*" + } + }, + "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, + }, } ], condition={ @@ -95,7 +102,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -118,7 +125,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) as response: @@ -144,7 +151,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -163,7 +170,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -195,7 +202,14 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": { + "nested": { + "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { + "com.cloudflare.api.account.zone.*": "*" + } + }, + "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, + }, } ], condition={ @@ -224,7 +238,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -248,7 +262,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) as response: @@ -275,7 +289,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -292,7 +306,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -515,7 +529,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -546,7 +560,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": { + "nested": { + "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { + "com.cloudflare.api.account.zone.*": "*" + } + }, + "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, + }, } ], condition={ @@ -573,7 +594,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -596,7 +617,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) as response: @@ -622,7 +643,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -641,7 +662,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -673,7 +694,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": { + "nested": { + "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { + "com.cloudflare.api.account.zone.*": "*" + } + }, + "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, + }, } ], condition={ @@ -702,7 +730,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -726,7 +754,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) as response: @@ -753,7 +781,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -770,7 +798,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) diff --git a/tests/api_resources/argo/test_smart_routing.py b/tests/api_resources/argo/test_smart_routing.py index b568bb4fbb1..e89824e855a 100644 --- a/tests/api_resources/argo/test_smart_routing.py +++ b/tests/api_resources/argo/test_smart_routing.py @@ -9,7 +9,6 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.argo import SmartRoutingGetResponse, SmartRoutingEditResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +22,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: @@ -35,7 +34,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" smart_routing = response.parse() - assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: @@ -47,7 +46,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" smart_routing = response.parse() - assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -64,7 +63,7 @@ def test_method_get(self, client: Cloudflare) -> None: smart_routing = client.argo.smart_routing.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: @@ -75,7 +74,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" smart_routing = response.parse() - assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: @@ -86,7 +85,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" smart_routing = response.parse() - assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -109,7 +108,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @@ -121,7 +120,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" smart_routing = await response.parse() - assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: @@ -133,7 +132,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" smart_routing = await response.parse() - assert_matches_type(SmartRoutingEditResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -150,7 +149,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: smart_routing = await async_client.argo.smart_routing.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @@ -161,7 +160,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" smart_routing = await response.parse() - assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: @@ -172,7 +171,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" smart_routing = await response.parse() - assert_matches_type(SmartRoutingGetResponse, smart_routing, path=["response"]) + assert_matches_type(object, smart_routing, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/brand_protection/test_logo_matches.py b/tests/api_resources/brand_protection/test_logo_matches.py new file mode 100644 index 00000000000..a9aeb048133 --- /dev/null +++ b/tests/api_resources/brand_protection/test_logo_matches.py @@ -0,0 +1,219 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.brand_protection import ( + LogoMatchGetResponse, + LogoMatchDownloadResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestLogoMatches: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_download(self, client: Cloudflare) -> None: + logo_match = client.brand_protection.logo_matches.download( + account_id="x", + ) + assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"]) + + @parametrize + def test_method_download_with_all_params(self, client: Cloudflare) -> None: + logo_match = client.brand_protection.logo_matches.download( + account_id="x", + limit="limit", + logo_id=["string"], + offset="offset", + ) + assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"]) + + @parametrize + def test_raw_response_download(self, client: Cloudflare) -> None: + response = client.brand_protection.logo_matches.with_raw_response.download( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + logo_match = response.parse() + assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"]) + + @parametrize + def test_streaming_response_download(self, client: Cloudflare) -> None: + with client.brand_protection.logo_matches.with_streaming_response.download( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + logo_match = response.parse() + assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_download(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.brand_protection.logo_matches.with_raw_response.download( + account_id="", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + logo_match = client.brand_protection.logo_matches.get( + account_id="x", + ) + assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"]) + + @parametrize + def test_method_get_with_all_params(self, client: Cloudflare) -> None: + logo_match = client.brand_protection.logo_matches.get( + account_id="x", + limit="limit", + logo_id=["string"], + offset="offset", + ) + assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.brand_protection.logo_matches.with_raw_response.get( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + logo_match = response.parse() + assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.brand_protection.logo_matches.with_streaming_response.get( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + logo_match = response.parse() + assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.brand_protection.logo_matches.with_raw_response.get( + account_id="", + ) + + +class TestAsyncLogoMatches: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_download(self, async_client: AsyncCloudflare) -> None: + logo_match = await async_client.brand_protection.logo_matches.download( + account_id="x", + ) + assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"]) + + @parametrize + async def test_method_download_with_all_params(self, async_client: AsyncCloudflare) -> None: + logo_match = await async_client.brand_protection.logo_matches.download( + account_id="x", + limit="limit", + logo_id=["string"], + offset="offset", + ) + assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"]) + + @parametrize + async def test_raw_response_download(self, async_client: AsyncCloudflare) -> None: + response = await async_client.brand_protection.logo_matches.with_raw_response.download( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + logo_match = await response.parse() + assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"]) + + @parametrize + async def test_streaming_response_download(self, async_client: AsyncCloudflare) -> None: + async with async_client.brand_protection.logo_matches.with_streaming_response.download( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + logo_match = await response.parse() + assert_matches_type(LogoMatchDownloadResponse, logo_match, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_download(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.brand_protection.logo_matches.with_raw_response.download( + account_id="", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + logo_match = await async_client.brand_protection.logo_matches.get( + account_id="x", + ) + assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"]) + + @parametrize + async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: + logo_match = await async_client.brand_protection.logo_matches.get( + account_id="x", + limit="limit", + logo_id=["string"], + offset="offset", + ) + assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.brand_protection.logo_matches.with_raw_response.get( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + logo_match = await response.parse() + assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.brand_protection.logo_matches.with_streaming_response.get( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + logo_match = await response.parse() + assert_matches_type(LogoMatchGetResponse, logo_match, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.brand_protection.logo_matches.with_raw_response.get( + account_id="", + ) diff --git a/tests/api_resources/brand_protection/test_logos.py b/tests/api_resources/brand_protection/test_logos.py new file mode 100644 index 00000000000..b67b092b57c --- /dev/null +++ b/tests/api_resources/brand_protection/test_logos.py @@ -0,0 +1,218 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.brand_protection import LogoCreateResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestLogos: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + logo = client.brand_protection.logos.create( + account_id="x", + ) + assert_matches_type(LogoCreateResponse, logo, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + logo = client.brand_protection.logos.create( + account_id="x", + match_type="match_type", + tag="tag", + threshold=0, + image=b"raw file contents", + ) + assert_matches_type(LogoCreateResponse, logo, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.brand_protection.logos.with_raw_response.create( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + logo = response.parse() + assert_matches_type(LogoCreateResponse, logo, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.brand_protection.logos.with_streaming_response.create( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + logo = response.parse() + assert_matches_type(LogoCreateResponse, logo, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.brand_protection.logos.with_raw_response.create( + account_id="", + ) + + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + logo = client.brand_protection.logos.delete( + logo_id="x", + account_id="x", + ) + assert logo is None + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.brand_protection.logos.with_raw_response.delete( + logo_id="x", + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + logo = response.parse() + assert logo is None + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.brand_protection.logos.with_streaming_response.delete( + logo_id="x", + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + logo = response.parse() + assert logo is None + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.brand_protection.logos.with_raw_response.delete( + logo_id="x", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `logo_id` but received ''"): + client.brand_protection.logos.with_raw_response.delete( + logo_id="", + account_id="x", + ) + + +class TestAsyncLogos: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + logo = await async_client.brand_protection.logos.create( + account_id="x", + ) + assert_matches_type(LogoCreateResponse, logo, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + logo = await async_client.brand_protection.logos.create( + account_id="x", + match_type="match_type", + tag="tag", + threshold=0, + image=b"raw file contents", + ) + assert_matches_type(LogoCreateResponse, logo, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.brand_protection.logos.with_raw_response.create( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + logo = await response.parse() + assert_matches_type(LogoCreateResponse, logo, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.brand_protection.logos.with_streaming_response.create( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + logo = await response.parse() + assert_matches_type(LogoCreateResponse, logo, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.brand_protection.logos.with_raw_response.create( + account_id="", + ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + logo = await async_client.brand_protection.logos.delete( + logo_id="x", + account_id="x", + ) + assert logo is None + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.brand_protection.logos.with_raw_response.delete( + logo_id="x", + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + logo = await response.parse() + assert logo is None + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.brand_protection.logos.with_streaming_response.delete( + logo_id="x", + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + logo = await response.parse() + assert logo is None + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.brand_protection.logos.with_raw_response.delete( + logo_id="x", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `logo_id` but received ''"): + await async_client.brand_protection.logos.with_raw_response.delete( + logo_id="", + account_id="x", + ) diff --git a/tests/api_resources/brand_protection/test_matches.py b/tests/api_resources/brand_protection/test_matches.py new file mode 100644 index 00000000000..cd0dca8a0b0 --- /dev/null +++ b/tests/api_resources/brand_protection/test_matches.py @@ -0,0 +1,223 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.brand_protection import ( + MatchGetResponse, + MatchDownloadResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestMatches: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_download(self, client: Cloudflare) -> None: + match = client.brand_protection.matches.download( + account_id="x", + ) + assert_matches_type(MatchDownloadResponse, match, path=["response"]) + + @parametrize + def test_method_download_with_all_params(self, client: Cloudflare) -> None: + match = client.brand_protection.matches.download( + account_id="x", + id="id", + include_domain_id=True, + limit=0, + offset=0, + ) + assert_matches_type(MatchDownloadResponse, match, path=["response"]) + + @parametrize + def test_raw_response_download(self, client: Cloudflare) -> None: + response = client.brand_protection.matches.with_raw_response.download( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + match = response.parse() + assert_matches_type(MatchDownloadResponse, match, path=["response"]) + + @parametrize + def test_streaming_response_download(self, client: Cloudflare) -> None: + with client.brand_protection.matches.with_streaming_response.download( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + match = response.parse() + assert_matches_type(MatchDownloadResponse, match, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_download(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.brand_protection.matches.with_raw_response.download( + account_id="", + ) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + match = client.brand_protection.matches.get( + account_id="x", + ) + assert_matches_type(MatchGetResponse, match, path=["response"]) + + @parametrize + def test_method_get_with_all_params(self, client: Cloudflare) -> None: + match = client.brand_protection.matches.get( + account_id="x", + id="id", + include_domain_id=True, + limit=0, + offset=0, + ) + assert_matches_type(MatchGetResponse, match, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.brand_protection.matches.with_raw_response.get( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + match = response.parse() + assert_matches_type(MatchGetResponse, match, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.brand_protection.matches.with_streaming_response.get( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + match = response.parse() + assert_matches_type(MatchGetResponse, match, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_get(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.brand_protection.matches.with_raw_response.get( + account_id="", + ) + + +class TestAsyncMatches: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_download(self, async_client: AsyncCloudflare) -> None: + match = await async_client.brand_protection.matches.download( + account_id="x", + ) + assert_matches_type(MatchDownloadResponse, match, path=["response"]) + + @parametrize + async def test_method_download_with_all_params(self, async_client: AsyncCloudflare) -> None: + match = await async_client.brand_protection.matches.download( + account_id="x", + id="id", + include_domain_id=True, + limit=0, + offset=0, + ) + assert_matches_type(MatchDownloadResponse, match, path=["response"]) + + @parametrize + async def test_raw_response_download(self, async_client: AsyncCloudflare) -> None: + response = await async_client.brand_protection.matches.with_raw_response.download( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + match = await response.parse() + assert_matches_type(MatchDownloadResponse, match, path=["response"]) + + @parametrize + async def test_streaming_response_download(self, async_client: AsyncCloudflare) -> None: + async with async_client.brand_protection.matches.with_streaming_response.download( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + match = await response.parse() + assert_matches_type(MatchDownloadResponse, match, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_download(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.brand_protection.matches.with_raw_response.download( + account_id="", + ) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + match = await async_client.brand_protection.matches.get( + account_id="x", + ) + assert_matches_type(MatchGetResponse, match, path=["response"]) + + @parametrize + async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: + match = await async_client.brand_protection.matches.get( + account_id="x", + id="id", + include_domain_id=True, + limit=0, + offset=0, + ) + assert_matches_type(MatchGetResponse, match, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.brand_protection.matches.with_raw_response.get( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + match = await response.parse() + assert_matches_type(MatchGetResponse, match, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.brand_protection.matches.with_streaming_response.get( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + match = await response.parse() + assert_matches_type(MatchGetResponse, match, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.brand_protection.matches.with_raw_response.get( + account_id="", + ) diff --git a/tests/api_resources/brand_protection/test_queries.py b/tests/api_resources/brand_protection/test_queries.py new file mode 100644 index 00000000000..b5cbce6acdb --- /dev/null +++ b/tests/api_resources/brand_protection/test_queries.py @@ -0,0 +1,225 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from cloudflare._utils import parse_datetime + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestQueries: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + query = client.brand_protection.queries.create( + account_id="x", + ) + assert query is None + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + query = client.brand_protection.queries.create( + account_id="x", + id="id", + query_scan=True, + query_tag="tag", + max_time=parse_datetime("2019-12-27T18:11:19.117Z"), + min_time=parse_datetime("2019-12-27T18:11:19.117Z"), + body_scan=True, + string_matches={}, + body_tag="tag", + ) + assert query is None + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.brand_protection.queries.with_raw_response.create( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + query = response.parse() + assert query is None + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.brand_protection.queries.with_streaming_response.create( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + query = response.parse() + assert query is None + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.brand_protection.queries.with_raw_response.create( + account_id="", + ) + + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + query = client.brand_protection.queries.delete( + account_id="x", + ) + assert query is None + + @parametrize + def test_method_delete_with_all_params(self, client: Cloudflare) -> None: + query = client.brand_protection.queries.delete( + account_id="x", + id="id", + scan=True, + tag="tag", + ) + assert query is None + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.brand_protection.queries.with_raw_response.delete( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + query = response.parse() + assert query is None + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.brand_protection.queries.with_streaming_response.delete( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + query = response.parse() + assert query is None + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.brand_protection.queries.with_raw_response.delete( + account_id="", + ) + + +class TestAsyncQueries: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + query = await async_client.brand_protection.queries.create( + account_id="x", + ) + assert query is None + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + query = await async_client.brand_protection.queries.create( + account_id="x", + id="id", + query_scan=True, + query_tag="tag", + max_time=parse_datetime("2019-12-27T18:11:19.117Z"), + min_time=parse_datetime("2019-12-27T18:11:19.117Z"), + body_scan=True, + string_matches={}, + body_tag="tag", + ) + assert query is None + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.brand_protection.queries.with_raw_response.create( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + query = await response.parse() + assert query is None + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.brand_protection.queries.with_streaming_response.create( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + query = await response.parse() + assert query is None + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.brand_protection.queries.with_raw_response.create( + account_id="", + ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + query = await async_client.brand_protection.queries.delete( + account_id="x", + ) + assert query is None + + @parametrize + async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: + query = await async_client.brand_protection.queries.delete( + account_id="x", + id="id", + scan=True, + tag="tag", + ) + assert query is None + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.brand_protection.queries.with_raw_response.delete( + account_id="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + query = await response.parse() + assert query is None + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.brand_protection.queries.with_streaming_response.delete( + account_id="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + query = await response.parse() + assert query is None + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.brand_protection.queries.with_raw_response.delete( + account_id="", + ) diff --git a/tests/api_resources/email_security/settings/test_allow_policies.py b/tests/api_resources/email_security/settings/test_allow_policies.py index 3a15809cae5..9957ba139f1 100644 --- a/tests/api_resources/email_security/settings/test_allow_policies.py +++ b/tests/api_resources/email_security/settings/test_allow_policies.py @@ -128,6 +128,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: is_trusted_sender=True, order="pattern", page=1, + pattern="pattern", pattern_type="EMAIL", per_page=1, search="search", @@ -418,6 +419,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) is_trusted_sender=True, order="pattern", page=1, + pattern="pattern", pattern_type="EMAIL", per_page=1, search="search", diff --git a/tests/api_resources/email_security/settings/test_block_senders.py b/tests/api_resources/email_security/settings/test_block_senders.py index b511da8331a..f2611adf7dd 100644 --- a/tests/api_resources/email_security/settings/test_block_senders.py +++ b/tests/api_resources/email_security/settings/test_block_senders.py @@ -99,6 +99,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: direction="asc", order="pattern", page=1, + pattern="pattern", pattern_type="EMAIL", per_page=1, search="search", @@ -355,6 +356,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) direction="asc", order="pattern", page=1, + pattern="pattern", pattern_type="EMAIL", per_page=1, search="search", diff --git a/tests/api_resources/email_security/settings/test_trusted_domains.py b/tests/api_resources/email_security/settings/test_trusted_domains.py index 3829968416e..57aa6fcd50d 100644 --- a/tests/api_resources/email_security/settings/test_trusted_domains.py +++ b/tests/api_resources/email_security/settings/test_trusted_domains.py @@ -185,6 +185,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: is_similarity=True, order="pattern", page=1, + pattern="pattern", per_page=1, search="search", ) @@ -527,6 +528,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) is_similarity=True, order="pattern", page=1, + pattern="pattern", per_page=1, search="search", ) diff --git a/tests/api_resources/email_security/test_investigate.py b/tests/api_resources/email_security/test_investigate.py index 59882722fad..02ee4b98b99 100644 --- a/tests/api_resources/email_security/test_investigate.py +++ b/tests/api_resources/email_security/test_investigate.py @@ -45,6 +45,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: recipient="recipient", sender="sender", start=parse_datetime("2019-12-27T18:11:19.117Z"), + subject="subject", ) assert_matches_type(SyncV4PagePaginationArray[InvestigateListResponse], investigate, path=["response"]) @@ -159,6 +160,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) recipient="recipient", sender="sender", start=parse_datetime("2019-12-27T18:11:19.117Z"), + subject="subject", ) assert_matches_type(AsyncV4PagePaginationArray[InvestigateListResponse], investigate, path=["response"]) diff --git a/tests/api_resources/magic_transit/connectors/test_events.py b/tests/api_resources/magic_transit/connectors/test_events.py index 500f22e5d76..aab24b14fa6 100644 --- a/tests/api_resources/magic_transit/connectors/test_events.py +++ b/tests/api_resources/magic_transit/connectors/test_events.py @@ -35,6 +35,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: from_=0, to=0, cursor="cursor", + k="k", limit=0, ) assert_matches_type(EventListResponse, event, path=["response"]) @@ -169,6 +170,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) from_=0, to=0, cursor="cursor", + k="k", limit=0, ) assert_matches_type(EventListResponse, event, path=["response"]) diff --git a/tests/api_resources/radar/attacks/layer7/test_top.py b/tests/api_resources/radar/attacks/layer7/test_top.py index 8d94572dd0d..206bc01f5dd 100644 --- a/tests/api_resources/radar/attacks/layer7/test_top.py +++ b/tests/api_resources/radar/attacks/layer7/test_top.py @@ -42,7 +42,6 @@ def test_method_attacks_with_all_params(self, client: Cloudflare) -> None: limit_direction="ORIGIN", limit_per_location=10, location=["string"], - magnitude="MITIGATED_REQUESTS", mitigation_product=["DDOS"], name=["main_series"], normalization="PERCENTAGE", @@ -193,7 +192,6 @@ async def test_method_attacks_with_all_params(self, async_client: AsyncCloudflar limit_direction="ORIGIN", limit_per_location=10, location=["string"], - magnitude="MITIGATED_REQUESTS", mitigation_product=["DDOS"], name=["main_series"], normalization="PERCENTAGE", diff --git a/tests/api_resources/ssl/test_recommendations.py b/tests/api_resources/ssl/test_recommendations.py index 3f6abca8c59..972bf1c1ffc 100644 --- a/tests/api_resources/ssl/test_recommendations.py +++ b/tests/api_resources/ssl/test_recommendations.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest @@ -11,6 +11,8 @@ from tests.utils import assert_matches_type from cloudflare.types.ssl import RecommendationGetResponse +# pyright: reportDeprecated=false + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,41 +21,46 @@ class TestRecommendations: @parametrize def test_method_get(self, client: Cloudflare) -> None: - recommendation = client.ssl.recommendations.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) + with pytest.warns(DeprecationWarning): + recommendation = client.ssl.recommendations.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert_matches_type(RecommendationGetResponse, recommendation, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.ssl.recommendations.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = client.ssl.recommendations.with_raw_response.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" recommendation = response.parse() - assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) + assert_matches_type(RecommendationGetResponse, recommendation, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.ssl.recommendations.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + with client.ssl.recommendations.with_streaming_response.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - recommendation = response.parse() - assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) + recommendation = response.parse() + assert_matches_type(RecommendationGetResponse, recommendation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.ssl.recommendations.with_raw_response.get( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + client.ssl.recommendations.with_raw_response.get( + zone_id="", + ) class TestAsyncRecommendations: @@ -63,38 +70,43 @@ class TestAsyncRecommendations: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: - recommendation = await async_client.ssl.recommendations.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) + with pytest.warns(DeprecationWarning): + recommendation = await async_client.ssl.recommendations.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert_matches_type(RecommendationGetResponse, recommendation, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.ssl.recommendations.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) + with pytest.warns(DeprecationWarning): + response = await async_client.ssl.recommendations.with_raw_response.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" recommendation = await response.parse() - assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) + assert_matches_type(RecommendationGetResponse, recommendation, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.ssl.recommendations.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" + with pytest.warns(DeprecationWarning): + async with async_client.ssl.recommendations.with_streaming_response.get( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" - recommendation = await response.parse() - assert_matches_type(Optional[RecommendationGetResponse], recommendation, path=["response"]) + recommendation = await response.parse() + assert_matches_type(RecommendationGetResponse, recommendation, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.ssl.recommendations.with_raw_response.get( - zone_id="", - ) + with pytest.warns(DeprecationWarning): + with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): + await async_client.ssl.recommendations.with_raw_response.get( + zone_id="", + ) diff --git a/tests/api_resources/test_abuse_reports.py b/tests/api_resources/test_abuse_reports.py index f88cf806d63..b6fda22efb8 100644 --- a/tests/api_resources/test_abuse_reports.py +++ b/tests/api_resources/test_abuse_reports.py @@ -22,10 +22,20 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", email="email", email2="email2", + host_notification="send", name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -36,36 +46,27 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", - email="email", - email2="email2", - name="x", - urls="urls", + act="abuse_dmca", address1="x", agent_name="x", - agree=0, + agree=1, city="x", - comments="x", - company="x", country="x", - destination_ips="destination_ips", + email="email", + email2="email2", host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, + name="x", original_work="x", owner_notification="send", - ports_protocols="ports_protocols", - reported_country="xx", - reported_user_agent="x", signature="signature", - source_ips="source_ips", state="x", + urls="urls", + comments="x", + company="x", + reported_country="xx", + reported_user_agent="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -75,10 +76,20 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", email="email", email2="email2", + host_notification="send", name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", urls="urls", ) @@ -93,10 +104,20 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", email="email", email2="email2", + host_notification="send", name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", urls="urls", ) as response: assert not response.is_closed @@ -114,10 +135,20 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", email="email", email2="email2", + host_notification="send", name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", urls="urls", ) @@ -127,10 +158,16 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -141,36 +178,23 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -180,10 +204,16 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) @@ -198,10 +228,16 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) as response: assert not response.is_closed @@ -219,10 +255,16 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) @@ -235,7 +277,10 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -249,33 +294,20 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -288,7 +320,10 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) @@ -306,7 +341,10 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -327,7 +365,10 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) @@ -337,10 +378,13 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -351,36 +395,21 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -390,10 +419,13 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", ) @@ -408,10 +440,13 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -429,10 +464,13 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", ) @@ -442,10 +480,14 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -456,36 +498,22 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -495,10 +523,14 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", ) @@ -513,10 +545,14 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -534,10 +570,14 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", ) @@ -547,10 +587,13 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -561,36 +604,20 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -600,10 +627,13 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) @@ -618,10 +648,13 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -639,10 +672,13 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) @@ -652,10 +688,11 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -666,36 +703,18 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -705,10 +724,11 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", ) @@ -723,10 +743,11 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -744,10 +765,11 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", ) @@ -757,10 +779,13 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -771,36 +796,21 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N abuse_report = client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -810,10 +820,13 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", ) @@ -828,10 +841,13 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -849,10 +865,13 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", ) @@ -868,10 +887,20 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", email="email", email2="email2", + host_notification="send", name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -882,36 +911,27 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", - email="email", - email2="email2", - name="x", - urls="urls", + act="abuse_dmca", address1="x", agent_name="x", - agree=0, + agree=1, city="x", - comments="x", - company="x", country="x", - destination_ips="destination_ips", + email="email", + email2="email2", host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, + name="x", original_work="x", owner_notification="send", - ports_protocols="ports_protocols", - reported_country="xx", - reported_user_agent="x", signature="signature", - source_ips="source_ips", state="x", + urls="urls", + comments="x", + company="x", + reported_country="xx", + reported_user_agent="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -921,10 +941,20 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar response = await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", email="email", email2="email2", + host_notification="send", name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", urls="urls", ) @@ -939,10 +969,20 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo async with async_client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", email="email", email2="email2", + host_notification="send", name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", urls="urls", ) as response: assert not response.is_closed @@ -960,10 +1000,20 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", email="email", email2="email2", + host_notification="send", name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", urls="urls", ) @@ -973,10 +1023,16 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -987,36 +1043,23 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1026,10 +1069,16 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar response = await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) @@ -1044,10 +1093,16 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo async with async_client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) as response: assert not response.is_closed @@ -1065,10 +1120,16 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_trademark", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) @@ -1081,7 +1142,10 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1095,33 +1159,20 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1134,7 +1185,10 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) @@ -1152,7 +1206,10 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -1173,7 +1230,10 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare act="abuse_general", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) @@ -1183,10 +1243,13 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1197,36 +1260,21 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1236,10 +1284,13 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar response = await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", ) @@ -1254,10 +1305,13 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo async with async_client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -1275,10 +1329,13 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_phishing", email="email", email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", name="x", + owner_notification="send", urls="urls", ) @@ -1288,10 +1345,14 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1302,36 +1363,22 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1341,10 +1388,14 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar response = await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", ) @@ -1359,10 +1410,14 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo async with async_client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -1380,10 +1435,14 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_children", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + ncmec_notification="send", + owner_notification="send", urls="urls", ) @@ -1393,10 +1452,13 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1407,36 +1469,20 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1446,10 +1492,13 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar response = await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) @@ -1464,10 +1513,13 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo async with async_client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -1485,10 +1537,13 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_threat", email="email", email2="email2", + host_notification="send", + justification="x", name="x", + owner_notification="send", urls="urls", ) @@ -1498,10 +1553,11 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1512,36 +1568,18 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", - country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1551,10 +1589,11 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar response = await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", ) @@ -1569,10 +1608,11 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo async with async_client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -1590,10 +1630,11 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_registrar_whois", email="email", email2="email2", name="x", + owner_notification="send", urls="urls", ) @@ -1603,10 +1644,13 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1617,36 +1661,21 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn abuse_report = await async_client.abuse_reports.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", - address1="x", - agent_name="x", - agree=0, - city="x", comments="x", company="x", country="x", - destination_ips="destination_ips", - host_notification="send", - justification="x", - ncmec_notification="send", - ncsei_subject_representation=True, - original_work="x", - owner_notification="send", - ports_protocols="ports_protocols", reported_country="xx", reported_user_agent="x", - signature="signature", - source_ips="source_ips", - state="x", tele="x", title="x", - trademark_number="x", - trademark_office="x", - trademark_symbol="x", ) assert_matches_type(str, abuse_report, path=["response"]) @@ -1656,10 +1685,13 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar response = await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", ) @@ -1674,10 +1706,13 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo async with async_client.abuse_reports.with_streaming_response.create( report_type="abuse_general", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", ) as response: assert not response.is_closed @@ -1695,9 +1730,12 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare await async_client.abuse_reports.with_raw_response.create( report_type="abuse_general", account_id="", - act="abuse_general", + act="abuse_ncsei", email="email", email2="email2", + host_notification="send", name="x", + ncsei_subject_representation=True, + owner_notification="send", urls="urls", ) diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py index 56f9d7792ca..4ed8e39c450 100644 --- a/tests/api_resources/test_brand_protection.py +++ b/tests/api_resources/test_brand_protection.py @@ -3,16 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.brand_protection import ( - Info, - Submit, -) +from cloudflare.types.brand_protection import BrandProtectionSubmitResponse, BrandProtectionURLInfoResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,39 +20,31 @@ class TestBrandProtection: @parametrize def test_method_submit(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.submit( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) - assert_matches_type(Optional[Submit], brand_protection, path=["response"]) - - @parametrize - def test_method_submit_with_all_params(self, client: Cloudflare) -> None: - brand_protection = client.brand_protection.submit( - account_id="023e105f4ecef8ad9ca31a8372d0c353", - url="https://www.cloudflare.com", - ) - assert_matches_type(Optional[Submit], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) @parametrize def test_raw_response_submit(self, client: Cloudflare) -> None: response = client.brand_protection.with_raw_response.submit( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(Optional[Submit], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) @parametrize def test_streaming_response_submit(self, client: Cloudflare) -> None: with client.brand_protection.with_streaming_response.submit( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(Optional[Submit], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,40 +58,31 @@ def test_path_params_submit(self, client: Cloudflare) -> None: @parametrize def test_method_url_info(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.url_info( - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Info], brand_protection, path=["response"]) - - @parametrize - def test_method_url_info_with_all_params(self, client: Cloudflare) -> None: - brand_protection = client.brand_protection.url_info( - account_id="023e105f4ecef8ad9ca31a8372d0c353", - url=["string"], - url_id=[0], + account_id="x", ) - assert_matches_type(Optional[Info], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) @parametrize def test_raw_response_url_info(self, client: Cloudflare) -> None: response = client.brand_protection.with_raw_response.url_info( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(Optional[Info], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) @parametrize def test_streaming_response_url_info(self, client: Cloudflare) -> None: with client.brand_protection.with_streaming_response.url_info( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(Optional[Info], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -122,39 +102,31 @@ class TestAsyncBrandProtection: @parametrize async def test_method_submit(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.submit( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) - assert_matches_type(Optional[Submit], brand_protection, path=["response"]) - - @parametrize - async def test_method_submit_with_all_params(self, async_client: AsyncCloudflare) -> None: - brand_protection = await async_client.brand_protection.submit( - account_id="023e105f4ecef8ad9ca31a8372d0c353", - url="https://www.cloudflare.com", - ) - assert_matches_type(Optional[Submit], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) @parametrize async def test_raw_response_submit(self, async_client: AsyncCloudflare) -> None: response = await async_client.brand_protection.with_raw_response.submit( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(Optional[Submit], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) @parametrize async def test_streaming_response_submit(self, async_client: AsyncCloudflare) -> None: async with async_client.brand_protection.with_streaming_response.submit( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(Optional[Submit], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionSubmitResponse, brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -168,40 +140,31 @@ async def test_path_params_submit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_url_info(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.url_info( - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Info], brand_protection, path=["response"]) - - @parametrize - async def test_method_url_info_with_all_params(self, async_client: AsyncCloudflare) -> None: - brand_protection = await async_client.brand_protection.url_info( - account_id="023e105f4ecef8ad9ca31a8372d0c353", - url=["string"], - url_id=[0], + account_id="x", ) - assert_matches_type(Optional[Info], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) @parametrize async def test_raw_response_url_info(self, async_client: AsyncCloudflare) -> None: response = await async_client.brand_protection.with_raw_response.url_info( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(Optional[Info], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) @parametrize async def test_streaming_response_url_info(self, async_client: AsyncCloudflare) -> None: async with async_client.brand_protection.with_streaming_response.url_info( - account_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(Optional[Info], brand_protection, path=["response"]) + assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_cache.py b/tests/api_resources/test_cache.py index e95bbc2dd3c..30ba1b0bf1e 100644 --- a/tests/api_resources/test_cache.py +++ b/tests/api_resources/test_cache.py @@ -20,14 +20,14 @@ class TestCache: @parametrize def test_method_purge_overload_1(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", tags=["a-cache-tag", "another-cache-tag"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -35,7 +35,7 @@ def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_1(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,14 +66,14 @@ def test_path_params_purge_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_2(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", hosts=["www.example.com", "images.example.com"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -81,7 +81,7 @@ def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_2(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -112,14 +112,14 @@ def test_path_params_purge_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_3(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", prefixes=["www.example.com/foo", "images.example.com/bar/baz"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -127,7 +127,7 @@ def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -138,7 +138,7 @@ def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_3(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -158,14 +158,14 @@ def test_path_params_purge_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_4(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", purge_everything=True, ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -173,7 +173,7 @@ def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -184,7 +184,7 @@ def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_4(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,14 +204,14 @@ def test_path_params_purge_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_5(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", files=["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -219,7 +219,7 @@ def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -230,7 +230,7 @@ def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_5(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,14 +250,14 @@ def test_path_params_purge_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_6(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_6(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", files=[ { "headers": { @@ -282,7 +282,7 @@ def test_method_purge_with_all_params_overload_6(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_6(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -293,7 +293,7 @@ def test_raw_response_purge_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_6(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -319,14 +319,14 @@ class TestAsyncCache: @parametrize async def test_method_purge_overload_1(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", tags=["a-cache-tag", "another-cache-tag"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -334,7 +334,7 @@ async def test_method_purge_with_all_params_overload_1(self, async_client: Async @parametrize async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -345,7 +345,7 @@ async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -365,14 +365,14 @@ async def test_path_params_purge_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_2(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", hosts=["www.example.com", "images.example.com"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -380,7 +380,7 @@ async def test_method_purge_with_all_params_overload_2(self, async_client: Async @parametrize async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -391,7 +391,7 @@ async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -411,14 +411,14 @@ async def test_path_params_purge_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_3(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", prefixes=["www.example.com/foo", "images.example.com/bar/baz"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -426,7 +426,7 @@ async def test_method_purge_with_all_params_overload_3(self, async_client: Async @parametrize async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -437,7 +437,7 @@ async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -457,14 +457,14 @@ async def test_path_params_purge_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_4(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", purge_everything=True, ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -472,7 +472,7 @@ async def test_method_purge_with_all_params_overload_4(self, async_client: Async @parametrize async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -483,7 +483,7 @@ async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -503,14 +503,14 @@ async def test_path_params_purge_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_5(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", files=["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -518,7 +518,7 @@ async def test_method_purge_with_all_params_overload_5(self, async_client: Async @parametrize async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -529,7 +529,7 @@ async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -549,14 +549,14 @@ async def test_path_params_purge_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_6(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", files=[ { "headers": { @@ -581,7 +581,7 @@ async def test_method_purge_with_all_params_overload_6(self, async_client: Async @parametrize async def test_raw_response_purge_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -592,7 +592,7 @@ async def test_raw_response_purge_overload_6(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="zone_id", + zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index bcba28f9023..77770971cb8 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -66,7 +66,14 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": { + "nested": { + "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { + "com.cloudflare.api.account.zone.*": "*" + } + }, + "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, + }, } ], condition={ @@ -92,7 +99,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -114,7 +121,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) as response: @@ -139,7 +146,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -170,7 +177,14 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": { + "nested": { + "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { + "com.cloudflare.api.account.zone.*": "*" + } + }, + "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, + }, } ], condition={ @@ -198,7 +212,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -221,7 +235,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) as response: @@ -247,7 +261,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -420,7 +434,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -450,7 +464,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": { + "nested": { + "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { + "com.cloudflare.api.account.zone.*": "*" + } + }, + "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, + }, } ], condition={ @@ -476,7 +497,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -498,7 +519,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) as response: @@ -523,7 +544,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -554,7 +575,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": { + "nested": { + "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { + "com.cloudflare.api.account.zone.*": "*" + } + }, + "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, + }, } ], condition={ @@ -582,7 +610,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) @@ -605,7 +633,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) as response: @@ -631,7 +659,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": {}, } ], ) diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py index 3831e686f57..0b849e9c51a 100644 --- a/tests/api_resources/workers/scripts/test_content.py +++ b/tests/api_resources/workers/scripts/test_content.py @@ -45,6 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "body_part": "worker.js", "main_module": "worker.js", }, + files=[b"raw file contents"], cf_worker_body_part="CF-WORKER-BODY-PART", cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) @@ -189,6 +190,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "body_part": "worker.js", "main_module": "worker.js", }, + files=[b"raw file contents"], cf_worker_body_part="CF-WORKER-BODY-PART", cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) diff --git a/tests/api_resources/workers/scripts/test_deployments.py b/tests/api_resources/workers/scripts/test_deployments.py index e6b2a2e42f7..b49090e136e 100644 --- a/tests/api_resources/workers/scripts/test_deployments.py +++ b/tests/api_resources/workers/scripts/test_deployments.py @@ -3,16 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.scripts import ( - DeploymentGetResponse, - DeploymentCreateResponse, -) +from cloudflare.types.workers.scripts import DeploymentGetResponse, DeploymentCreateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,11 +26,11 @@ def test_method_create(self, client: Cloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) - assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) + assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: @@ -44,13 +41,13 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], force=True, annotations={"workers_message": "Deploy bug fix."}, ) - assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) + assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: @@ -61,7 +58,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) @@ -69,7 +66,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) + assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: @@ -80,7 +77,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) as response: @@ -88,7 +85,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) + assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -102,7 +99,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) @@ -115,7 +112,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) @@ -126,7 +123,7 @@ def test_method_get(self, client: Cloudflare) -> None: script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) + assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: @@ -138,7 +135,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) + assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: @@ -150,7 +147,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) + assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -183,11 +180,11 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) - assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) + assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: @@ -198,13 +195,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], force=True, annotations={"workers_message": "Deploy bug fix."}, ) - assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) + assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @@ -215,7 +212,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) @@ -223,7 +220,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) + assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: @@ -234,7 +231,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) as response: @@ -242,7 +239,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) + assert_matches_type(DeploymentCreateResponse, deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -256,7 +253,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) @@ -269,7 +266,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: versions=[ { "percentage": 100, - "version_id": "bcf48806-b317-4351-9ee7-36e7d557d4de", + "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", } ], ) @@ -280,7 +277,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) + assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @@ -292,7 +289,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) + assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: @@ -304,7 +301,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) + assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/scripts/test_versions.py b/tests/api_resources/workers/scripts/test_versions.py index 38bae61b036..ccd8dc4222e 100644 --- a/tests/api_resources/workers/scripts/test_versions.py +++ b/tests/api_resources/workers/scripts/test_versions.py @@ -56,6 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "keep_bindings": ["string"], "usage_model": "standard", }, + files=[b"raw file contents"], ) assert_matches_type(VersionCreateResponse, version, path=["response"]) @@ -265,6 +266,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "keep_bindings": ["string"], "usage_model": "standard", }, + files=[b"raw file contents"], ) assert_matches_type(VersionCreateResponse, version, path=["response"]) diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index 0ac098a416a..2f1ee244ac5 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -103,6 +103,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ], "usage_model": "standard", }, + files=[b"raw file contents"], ) assert_matches_type(ScriptUpdateResponse, script, path=["response"]) @@ -384,6 +385,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ], "usage_model": "standard", }, + files=[b"raw file contents"], ) assert_matches_type(ScriptUpdateResponse, script, path=["response"]) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py index 6dc0401bada..276ca71f189 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py @@ -47,6 +47,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "body_part": "worker.js", "main_module": "worker.js", }, + files=[b"raw file contents"], cf_worker_body_part="CF-WORKER-BODY-PART", cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) @@ -217,6 +218,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "body_part": "worker.js", "main_module": "worker.js", }, + files=[b"raw file contents"], cf_worker_body_part="CF-WORKER-BODY-PART", cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index 7fd78a6c457..3552382d6bd 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -104,6 +104,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ], "usage_model": "standard", }, + files=[b"raw file contents"], ) assert_matches_type(ScriptUpdateResponse, script, path=["response"]) @@ -386,6 +387,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ], "usage_model": "standard", }, + files=[b"raw file contents"], ) assert_matches_type(ScriptUpdateResponse, script, path=["response"]) diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index deddd4bc9f2..a2e13edb5a9 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -1188,7 +1188,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -1205,7 +1205,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -1319,7 +1319,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -1340,7 +1340,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -1364,7 +1364,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -1378,7 +1378,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -2676,7 +2676,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -2694,7 +2694,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -2809,7 +2809,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -2831,7 +2831,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -2856,7 +2856,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -2871,7 +2871,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -2886,7 +2886,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -4325,7 +4325,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -4342,7 +4342,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -4456,7 +4456,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -4477,7 +4477,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -4501,7 +4501,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -4515,7 +4515,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -5813,7 +5813,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -5831,7 +5831,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -5946,7 +5946,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -5968,7 +5968,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -5993,7 +5993,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -6008,7 +6008,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], @@ -6023,7 +6023,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar target_criteria=[ { "port": 22, - "protocol": "SSH", + "protocol": "RDP", "target_attributes": {"hostname": ["test-server", "production-server"]}, } ], diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py index 63b7206932b..85ae091403c 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py @@ -31,7 +31,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="account_id", profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ai_context_enabled=True, - allowed_match_count=0, + allowed_match_count=5, confidence_threshold="confidence_threshold", context_awareness={ "enabled": True, @@ -95,7 +95,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ai_context_enabled=True, - allowed_match_count=0, + allowed_match_count=5, confidence_threshold="confidence_threshold", context_awareness={ "enabled": True, @@ -267,7 +267,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="account_id", profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ai_context_enabled=True, - allowed_match_count=0, + allowed_match_count=5, confidence_threshold="confidence_threshold", context_awareness={ "enabled": True, @@ -331,7 +331,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ai_context_enabled=True, - allowed_match_count=0, + allowed_match_count=5, confidence_threshold="confidence_threshold", context_awareness={ "enabled": True, From 8a99cf5e25f69079acbef07f32f2b728a0f10849 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 20:43:45 +0000 Subject: [PATCH 267/392] feat(api): api update --- .stats.yml | 4 ++-- api.md | 2 +- .../brand_protection/brand_protection.py | 19 +++++++++++-------- .../brand_protection_submit_response.py | 14 +++----------- .../brand_protection_url_info_response.py | 19 +++---------------- tests/api_resources/test_brand_protection.py | 13 +++++++------ 6 files changed, 27 insertions(+), 44 deletions(-) diff --git a/.stats.yml b/.stats.yml index be9d04e5759..7b7de798144 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9629020f23f4c564925a52c46cdf5a93581a3f6bf35bf8050b0792467f642d33.yml -openapi_spec_hash: 58db5ad168eaa03ed1c9a028636c58f6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4d577be5bc8f4a0303c10df020efdc8823f02867d8f74e414c75e747c10e8e2.yml +openapi_spec_hash: 523313d2ea7487505e7913769ecd7e53 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 diff --git a/api.md b/api.md index 2159bbd8d60..d905c9d7978 100644 --- a/api.md +++ b/api.md @@ -3361,7 +3361,7 @@ from cloudflare.types.brand_protection import ( Methods: - client.brand_protection.submit(\*, account_id) -> BrandProtectionSubmitResponse -- client.brand_protection.url_info(\*, account_id) -> BrandProtectionURLInfoResponse +- client.brand_protection.url_info(\*, account_id) -> SyncSinglePage[BrandProtectionURLInfoResponse] ## Queries diff --git a/src/cloudflare/resources/brand_protection/brand_protection.py b/src/cloudflare/resources/brand_protection/brand_protection.py index ce10de6fc53..d6662b3fbe0 100644 --- a/src/cloudflare/resources/brand_protection/brand_protection.py +++ b/src/cloudflare/resources/brand_protection/brand_protection.py @@ -37,6 +37,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) +from ...pagination import SyncSinglePage, AsyncSinglePage from .logo_matches import ( LogoMatchesResource, AsyncLogoMatchesResource, @@ -45,7 +46,7 @@ LogoMatchesResourceWithStreamingResponse, AsyncLogoMatchesResourceWithStreamingResponse, ) -from ..._base_client import make_request_options +from ..._base_client import AsyncPaginator, make_request_options from ...types.brand_protection.brand_protection_submit_response import BrandProtectionSubmitResponse from ...types.brand_protection.brand_protection_url_info_response import BrandProtectionURLInfoResponse @@ -131,7 +132,7 @@ def url_info( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BrandProtectionURLInfoResponse: + ) -> SyncSinglePage[BrandProtectionURLInfoResponse]: """ Return submitted URLs based on ID @@ -146,12 +147,13 @@ def url_info( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/brand-protection/url-info", + page=SyncSinglePage[BrandProtectionURLInfoResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=BrandProtectionURLInfoResponse, + model=BrandProtectionURLInfoResponse, ) @@ -224,7 +226,7 @@ async def submit( cast_to=BrandProtectionSubmitResponse, ) - async def url_info( + def url_info( self, *, account_id: str, @@ -234,7 +236,7 @@ async def url_info( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BrandProtectionURLInfoResponse: + ) -> AsyncPaginator[BrandProtectionURLInfoResponse, AsyncSinglePage[BrandProtectionURLInfoResponse]]: """ Return submitted URLs based on ID @@ -249,12 +251,13 @@ async def url_info( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/brand-protection/url-info", + page=AsyncSinglePage[BrandProtectionURLInfoResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=BrandProtectionURLInfoResponse, + model=BrandProtectionURLInfoResponse, ) diff --git a/src/cloudflare/types/brand_protection/brand_protection_submit_response.py b/src/cloudflare/types/brand_protection/brand_protection_submit_response.py index 9642cf45c33..3254b97c4d0 100644 --- a/src/cloudflare/types/brand_protection/brand_protection_submit_response.py +++ b/src/cloudflare/types/brand_protection/brand_protection_submit_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Optional +from typing import Dict, List, Optional from ..._models import BaseModel @@ -8,14 +8,6 @@ class BrandProtectionSubmitResponse(BaseModel): - code: Optional[int] = None - """Error code""" + skipped_urls: Optional[List[Dict[str, object]]] = None - errors: Optional[Dict[str, object]] = None - """Errors""" - - message: Optional[str] = None - """Error message""" - - status: Optional[str] = None - """Error name""" + submitted_urls: Optional[List[Dict[str, object]]] = None diff --git a/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py b/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py index e81a7751b72..25dd3de5a58 100644 --- a/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py +++ b/src/cloudflare/types/brand_protection/brand_protection_url_info_response.py @@ -1,21 +1,8 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Optional - -from ..._models import BaseModel +from typing import Dict +from typing_extensions import TypeAlias __all__ = ["BrandProtectionURLInfoResponse"] - -class BrandProtectionURLInfoResponse(BaseModel): - code: Optional[int] = None - """Error code""" - - errors: Optional[Dict[str, object]] = None - """Errors""" - - message: Optional[str] = None - """Error message""" - - status: Optional[str] = None - """Error name""" +BrandProtectionURLInfoResponse: TypeAlias = Dict[str, object] diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py index 4ed8e39c450..9371d774a08 100644 --- a/tests/api_resources/test_brand_protection.py +++ b/tests/api_resources/test_brand_protection.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.brand_protection import BrandProtectionSubmitResponse, BrandProtectionURLInfoResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -60,7 +61,7 @@ def test_method_url_info(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.url_info( account_id="x", ) - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(SyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"]) @parametrize def test_raw_response_url_info(self, client: Cloudflare) -> None: @@ -71,7 +72,7 @@ def test_raw_response_url_info(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(SyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"]) @parametrize def test_streaming_response_url_info(self, client: Cloudflare) -> None: @@ -82,7 +83,7 @@ def test_streaming_response_url_info(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = response.parse() - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(SyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -142,7 +143,7 @@ async def test_method_url_info(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.url_info( account_id="x", ) - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(AsyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"]) @parametrize async def test_raw_response_url_info(self, async_client: AsyncCloudflare) -> None: @@ -153,7 +154,7 @@ async def test_raw_response_url_info(self, async_client: AsyncCloudflare) -> Non assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(AsyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"]) @parametrize async def test_streaming_response_url_info(self, async_client: AsyncCloudflare) -> None: @@ -164,7 +165,7 @@ async def test_streaming_response_url_info(self, async_client: AsyncCloudflare) assert response.http_request.headers.get("X-Stainless-Lang") == "python" brand_protection = await response.parse() - assert_matches_type(BrandProtectionURLInfoResponse, brand_protection, path=["response"]) + assert_matches_type(AsyncSinglePage[BrandProtectionURLInfoResponse], brand_protection, path=["response"]) assert cast(Any, response.is_closed) is True From c85696e39d48267ea2acd57b52ad7dbb4a628d71 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:02:43 +0000 Subject: [PATCH 268/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7b7de798144..b88b6844137 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4d577be5bc8f4a0303c10df020efdc8823f02867d8f74e414c75e747c10e8e2.yml -openapi_spec_hash: 523313d2ea7487505e7913769ecd7e53 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fc4ca695005c107538e98f4f12ca1c1c5bcd1ec9c8fe4be2470c6b55629e2b52.yml +openapi_spec_hash: 1f434b38b55511e7b30bbd3525ed1a03 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 1da41c3ea63dd1fca618678bba80ca741289bebe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:27:59 +0000 Subject: [PATCH 269/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b88b6844137..4f1c27dcf4a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fc4ca695005c107538e98f4f12ca1c1c5bcd1ec9c8fe4be2470c6b55629e2b52.yml -openapi_spec_hash: 1f434b38b55511e7b30bbd3525ed1a03 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c333ff8d45f220336a87548f57f2efa5b8f987ec5b0772176451df1be2df932e.yml +openapi_spec_hash: 67e665ea8047dc51de40f0e650d69746 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From dad119b0b10f00ae105f277d1932fcc3bbc68442 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:42:45 +0000 Subject: [PATCH 270/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4f1c27dcf4a..14177ab4a2f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c333ff8d45f220336a87548f57f2efa5b8f987ec5b0772176451df1be2df932e.yml -openapi_spec_hash: 67e665ea8047dc51de40f0e650d69746 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-53f79bd230feef2bc9db2690bd995391cad1470ea71d36ebce98df3e2d7396b7.yml +openapi_spec_hash: f0cbab37a2d3ea65f07e9c14db9bf272 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 4f3876639fb1690cbc61544e2994a68ce4ce82a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 22:02:55 +0000 Subject: [PATCH 271/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 14177ab4a2f..7d4c188df09 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-53f79bd230feef2bc9db2690bd995391cad1470ea71d36ebce98df3e2d7396b7.yml -openapi_spec_hash: f0cbab37a2d3ea65f07e9c14db9bf272 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f905dc0c7502aae22842c5a1dcc841c06aed265b48ea5448409510d0ca32c915.yml +openapi_spec_hash: 07104157083ad19644610ab473882b89 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 5c1c28132081274ca9a1b5423513b98b59a052f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 22:15:27 +0000 Subject: [PATCH 272/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7d4c188df09..643130b186c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f905dc0c7502aae22842c5a1dcc841c06aed265b48ea5448409510d0ca32c915.yml -openapi_spec_hash: 07104157083ad19644610ab473882b89 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9b887cd7c10651d6035399ac0cac40f37b53b4c9b2e287a23ea7352eca49c052.yml +openapi_spec_hash: 3882002006ca3245b0bfc9dbcc66d0e0 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 0d26a36fbcd6c82968489f22c2db349aeb020878 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:07:46 +0000 Subject: [PATCH 273/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/types/shared/token_policy.py | 16 ++--- .../types/shared_params/token_policy.py | 16 ++--- tests/api_resources/accounts/test_tokens.py | 72 ++++++------------- tests/api_resources/user/test_tokens.py | 64 +++++------------ 5 files changed, 50 insertions(+), 122 deletions(-) diff --git a/.stats.yml b/.stats.yml index 643130b186c..bd90df13541 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9b887cd7c10651d6035399ac0cac40f37b53b4c9b2e287a23ea7352eca49c052.yml -openapi_spec_hash: 3882002006ca3245b0bfc9dbcc66d0e0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-395fd6e5cc7e27dbdb13689d4d35df1ab79a1341ff126182164b06c91cdd5c37.yml +openapi_spec_hash: 0f73e4a572d51862942a5c0342121887 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index 0940054b1c9..6674df67455 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -1,11 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List, Union, Optional from typing_extensions import Literal from ..._models import BaseModel -__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta", "Resources"] +__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] class PermissionGroupMeta(BaseModel): @@ -25,14 +25,6 @@ class PermissionGroup(BaseModel): """Name of the permission group.""" -class Resources(BaseModel): - nested: Optional[Dict[str, Dict[str, str]]] = None - """Nested resource permissions for hierarchical scoping.""" - - simple: Optional[Dict[str, str]] = None - """Simple resource permissions where each resource maps to a permission string.""" - - class TokenPolicy(BaseModel): id: str """Policy identifier.""" @@ -43,5 +35,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Resources - """Resource permissions for the policy. Use either simple or nested permissions.""" + resources: Dict[str, Union[str, Dict[str, str]]] + """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index f373963a579..d1f663c2d40 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -2,10 +2,10 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Dict, Union, Iterable from typing_extensions import Literal, Required, TypedDict -__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta", "Resources"] +__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] class PermissionGroupMeta(TypedDict, total=False): @@ -22,14 +22,6 @@ class PermissionGroup(TypedDict, total=False): """Attributes associated to the permission group.""" -class Resources(TypedDict, total=False): - nested: Dict[str, Dict[str, str]] - """Nested resource permissions for hierarchical scoping.""" - - simple: Dict[str, str] - """Simple resource permissions where each resource maps to a permission string.""" - - class TokenPolicy(TypedDict, total=False): effect: Required[Literal["allow", "deny"]] """Allow or deny operations against the resources.""" @@ -37,5 +29,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Resources] - """Resource permissions for the policy. Use either simple or nested permissions.""" + resources: Required[Dict[str, Union[str, Dict[str, str]]]] + """A list of resource names that the policy applies to.""" diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index eb25709c6c7..a936ded5e33 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -68,14 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "nested": { - "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { - "com.cloudflare.api.account.zone.*": "*" - } - }, - "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, - }, + "resources": {"foo": "string"}, } ], condition={ @@ -102,7 +95,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -125,7 +118,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) as response: @@ -151,7 +144,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -170,7 +163,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -202,14 +195,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "nested": { - "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { - "com.cloudflare.api.account.zone.*": "*" - } - }, - "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, - }, + "resources": {"foo": "string"}, } ], condition={ @@ -238,7 +224,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -262,7 +248,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) as response: @@ -289,7 +275,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -306,7 +292,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -529,7 +515,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -560,14 +546,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "nested": { - "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { - "com.cloudflare.api.account.zone.*": "*" - } - }, - "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, - }, + "resources": {"foo": "string"}, } ], condition={ @@ -594,7 +573,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -617,7 +596,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) as response: @@ -643,7 +622,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -662,7 +641,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -694,14 +673,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "nested": { - "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { - "com.cloudflare.api.account.zone.*": "*" - } - }, - "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, - }, + "resources": {"foo": "string"}, } ], condition={ @@ -730,7 +702,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -754,7 +726,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) as response: @@ -781,7 +753,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -798,7 +770,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index 77770971cb8..bcba28f9023 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -66,14 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "nested": { - "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { - "com.cloudflare.api.account.zone.*": "*" - } - }, - "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, - }, + "resources": {"foo": "string"}, } ], condition={ @@ -99,7 +92,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -121,7 +114,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) as response: @@ -146,7 +139,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -177,14 +170,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "nested": { - "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { - "com.cloudflare.api.account.zone.*": "*" - } - }, - "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, - }, + "resources": {"foo": "string"}, } ], condition={ @@ -212,7 +198,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -235,7 +221,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) as response: @@ -261,7 +247,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -434,7 +420,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -464,14 +450,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "nested": { - "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { - "com.cloudflare.api.account.zone.*": "*" - } - }, - "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, - }, + "resources": {"foo": "string"}, } ], condition={ @@ -497,7 +476,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -519,7 +498,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) as response: @@ -544,7 +523,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -575,14 +554,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "nested": { - "com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": { - "com.cloudflare.api.account.zone.*": "*" - } - }, - "simple": {"com.cloudflare.api.account.472e41d66440f10635de39c7ffaf6080": "*"}, - }, + "resources": {"foo": "string"}, } ], condition={ @@ -610,7 +582,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) @@ -633,7 +605,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) as response: @@ -659,7 +631,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {}, + "resources": {"foo": "string"}, } ], ) From e36d8761d0359a3fbae37e044289c8be5971c219 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 06:16:58 +0000 Subject: [PATCH 274/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bd90df13541..497c82b36f3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-395fd6e5cc7e27dbdb13689d4d35df1ab79a1341ff126182164b06c91cdd5c37.yml -openapi_spec_hash: 0f73e4a572d51862942a5c0342121887 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a5ae323a3ed4fcf76efb43f65dd9ee80169922cda83f7063eae998f8075c947.yml +openapi_spec_hash: 3855b68315bd929a72a3db6a08714a92 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From a4ac65b71e1ee42a61a818f53391eeb1cd8a15e7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 09:02:12 +0000 Subject: [PATCH 275/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 497c82b36f3..bdc06e49855 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a5ae323a3ed4fcf76efb43f65dd9ee80169922cda83f7063eae998f8075c947.yml -openapi_spec_hash: 3855b68315bd929a72a3db6a08714a92 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4edbd8644d06987e2acaf18e4310986664fcb8ec2919574b40280b6b8c96657.yml +openapi_spec_hash: 7ce2a4973cbeff394b2b1e23d2986ed9 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 0d4a823f6e8b46e9693bf83cf96d12374f4be1fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 09:08:44 +0000 Subject: [PATCH 276/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bdc06e49855..497c82b36f3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4edbd8644d06987e2acaf18e4310986664fcb8ec2919574b40280b6b8c96657.yml -openapi_spec_hash: 7ce2a4973cbeff394b2b1e23d2986ed9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a5ae323a3ed4fcf76efb43f65dd9ee80169922cda83f7063eae998f8075c947.yml +openapi_spec_hash: 3855b68315bd929a72a3db6a08714a92 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 215f90a37d575e9081a212aa21d8dab6cb6ed9a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 09:22:30 +0000 Subject: [PATCH 277/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 497c82b36f3..bdc06e49855 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0a5ae323a3ed4fcf76efb43f65dd9ee80169922cda83f7063eae998f8075c947.yml -openapi_spec_hash: 3855b68315bd929a72a3db6a08714a92 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4edbd8644d06987e2acaf18e4310986664fcb8ec2919574b40280b6b8c96657.yml +openapi_spec_hash: 7ce2a4973cbeff394b2b1e23d2986ed9 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From f4164e2a04795b0be1a8e2eeb6800bacbc84b34b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 09:28:56 +0000 Subject: [PATCH 278/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bdc06e49855..bd90df13541 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4edbd8644d06987e2acaf18e4310986664fcb8ec2919574b40280b6b8c96657.yml -openapi_spec_hash: 7ce2a4973cbeff394b2b1e23d2986ed9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-395fd6e5cc7e27dbdb13689d4d35df1ab79a1341ff126182164b06c91cdd5c37.yml +openapi_spec_hash: 0f73e4a572d51862942a5c0342121887 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 60999f24a0ad8e72774ef1c3a0dd5593eda686e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 10:09:17 +0000 Subject: [PATCH 279/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bd90df13541..58bf9d5ce9e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-395fd6e5cc7e27dbdb13689d4d35df1ab79a1341ff126182164b06c91cdd5c37.yml -openapi_spec_hash: 0f73e4a572d51862942a5c0342121887 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-212c971d686d8ed225b692c21487d4a944fd63f33864d182755b84fb8efeeac0.yml +openapi_spec_hash: 8bc75b8e92c2209fc5b7e61ab3298616 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 79b213ae8ca16eb7b1693af145aa1f1fd4ae4893 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 10:30:26 +0000 Subject: [PATCH 280/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 58bf9d5ce9e..22c631e30ea 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-212c971d686d8ed225b692c21487d4a944fd63f33864d182755b84fb8efeeac0.yml -openapi_spec_hash: 8bc75b8e92c2209fc5b7e61ab3298616 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0aa33fe9a0fbfcfe0f002d02b244c20bec9ea7e9fb4e888e74c1014eff483112.yml +openapi_spec_hash: 6bcfcc413bbf50a85a686003d689730a config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From ddff81c6bd68fa00bd148c77c2004c7b0e5597bb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 10:50:50 +0000 Subject: [PATCH 281/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 22c631e30ea..558e32e25a4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0aa33fe9a0fbfcfe0f002d02b244c20bec9ea7e9fb4e888e74c1014eff483112.yml -openapi_spec_hash: 6bcfcc413bbf50a85a686003d689730a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-007d2e2273bd9776155f7ec832035944f49ba82c60b10e8b9a312f36c8b17681.yml +openapi_spec_hash: 1ccb269b7c0299cfe3e0761c681f2cc5 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 1e6e173b8bdc529ab07c650b9557a1eb5c0af0f3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 12:55:47 +0000 Subject: [PATCH 282/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 558e32e25a4..1c48958f3fd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-007d2e2273bd9776155f7ec832035944f49ba82c60b10e8b9a312f36c8b17681.yml -openapi_spec_hash: 1ccb269b7c0299cfe3e0761c681f2cc5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56addac653db601bdb057f4eb625527e1e728d156c9d027fbfa7a74721e9c4eb.yml +openapi_spec_hash: ad146e73c28fd73d14716c166bb7826e config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 2d5f030f8beec5c69250666b3c9422ff86e19bef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 14:20:04 +0000 Subject: [PATCH 283/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1c48958f3fd..b99dfdcd516 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56addac653db601bdb057f4eb625527e1e728d156c9d027fbfa7a74721e9c4eb.yml -openapi_spec_hash: ad146e73c28fd73d14716c166bb7826e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd23c6da477929891e05fa806f39200df7e2bab6d0a8ba5ec254dd0b75fd558d.yml +openapi_spec_hash: 106b9adfecb19d55e8e153a3059a384c config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 0b74e9447a184956656c36c0e8b235e2a7cb71af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 14:22:08 +0000 Subject: [PATCH 284/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b99dfdcd516..1c48958f3fd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd23c6da477929891e05fa806f39200df7e2bab6d0a8ba5ec254dd0b75fd558d.yml -openapi_spec_hash: 106b9adfecb19d55e8e153a3059a384c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56addac653db601bdb057f4eb625527e1e728d156c9d027fbfa7a74721e9c4eb.yml +openapi_spec_hash: ad146e73c28fd73d14716c166bb7826e config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 4f9a53ba6bb63fe92adb921e966df066acf2ca1a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 14:24:45 +0000 Subject: [PATCH 285/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1c48958f3fd..b99dfdcd516 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56addac653db601bdb057f4eb625527e1e728d156c9d027fbfa7a74721e9c4eb.yml -openapi_spec_hash: ad146e73c28fd73d14716c166bb7826e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd23c6da477929891e05fa806f39200df7e2bab6d0a8ba5ec254dd0b75fd558d.yml +openapi_spec_hash: 106b9adfecb19d55e8e153a3059a384c config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From e577fd3efa1147518b9ecc29b2cccc66390f238c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:09:34 +0000 Subject: [PATCH 286/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b99dfdcd516..a04064f462f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd23c6da477929891e05fa806f39200df7e2bab6d0a8ba5ec254dd0b75fd558d.yml -openapi_spec_hash: 106b9adfecb19d55e8e153a3059a384c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4be3a8b15ab01f44e6bb19eb63dd1ce076955967a90bbf341e45d607ab3f8cf5.yml +openapi_spec_hash: af5f85fb035e8d9b597699f80b464dd1 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From f2974f8f3f6aa66c60cbff422bf6940582b9290a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:24:14 +0000 Subject: [PATCH 287/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a04064f462f..692da085e72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4be3a8b15ab01f44e6bb19eb63dd1ce076955967a90bbf341e45d607ab3f8cf5.yml -openapi_spec_hash: af5f85fb035e8d9b597699f80b464dd1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-de77f84c8e0f28014bc74d1d9ddf565df62f9e953580bc3048ce8b0a21903af0.yml +openapi_spec_hash: 3c446f85404de27a915e18591b25c4aa config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 8b2e69b38a3382eb83ce9f7e0aba8138db92e468 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:28:22 +0000 Subject: [PATCH 288/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 692da085e72..a04064f462f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-de77f84c8e0f28014bc74d1d9ddf565df62f9e953580bc3048ce8b0a21903af0.yml -openapi_spec_hash: 3c446f85404de27a915e18591b25c4aa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4be3a8b15ab01f44e6bb19eb63dd1ce076955967a90bbf341e45d607ab3f8cf5.yml +openapi_spec_hash: af5f85fb035e8d9b597699f80b464dd1 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 99f85fda35ee15b21f307f93d1348193fe13faeb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:30:31 +0000 Subject: [PATCH 289/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a04064f462f..692da085e72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4be3a8b15ab01f44e6bb19eb63dd1ce076955967a90bbf341e45d607ab3f8cf5.yml -openapi_spec_hash: af5f85fb035e8d9b597699f80b464dd1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-de77f84c8e0f28014bc74d1d9ddf565df62f9e953580bc3048ce8b0a21903af0.yml +openapi_spec_hash: 3c446f85404de27a915e18591b25c4aa config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 6e3fa7de8f1a9533e6f462f73fab176e41bce264 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:58:41 +0000 Subject: [PATCH 290/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 692da085e72..09c0164a5ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-de77f84c8e0f28014bc74d1d9ddf565df62f9e953580bc3048ce8b0a21903af0.yml -openapi_spec_hash: 3c446f85404de27a915e18591b25c4aa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27bc17bed1e3d1c960116531e779b1548f68e5ec82224b37333be704b6a63e.yml +openapi_spec_hash: f869b17bba7a875b93ff76cf66644bbc config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From e236b25881d5e5c14bd6b6f6ef8fe70ffa4c5d67 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 16:11:42 +0000 Subject: [PATCH 291/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 09c0164a5ce..9162d71e714 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7f27bc17bed1e3d1c960116531e779b1548f68e5ec82224b37333be704b6a63e.yml -openapi_spec_hash: f869b17bba7a875b93ff76cf66644bbc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-331dd5980a50c452913f0761bc28beb0e09f098b8696385a4bc17a286096a342.yml +openapi_spec_hash: 17d991d5c9a11d2df8aa86a3e03ff5e2 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From f56c2b449b7ccb61f884d46c34002a139c4ae71a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 16:33:17 +0000 Subject: [PATCH 292/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9162d71e714..3776429610a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-331dd5980a50c452913f0761bc28beb0e09f098b8696385a4bc17a286096a342.yml -openapi_spec_hash: 17d991d5c9a11d2df8aa86a3e03ff5e2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e67292208399fc218911adb8316e6a6507855a42947cbcf6351036f30c973699.yml +openapi_spec_hash: 2eba0cfb1bd419aca824c4647cd4ef27 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 1b8950c744433d8172239d92ddfa229f26b38990 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 16:39:54 +0000 Subject: [PATCH 293/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3776429610a..48a5631c75f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e67292208399fc218911adb8316e6a6507855a42947cbcf6351036f30c973699.yml -openapi_spec_hash: 2eba0cfb1bd419aca824c4647cd4ef27 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4434a74ce6051a9218724e482ba7e0c6d74da606fd5bee1743f159a8ecd435b2.yml +openapi_spec_hash: d497ef192865415ec2e2f4962e372d92 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 9650869e21b8ee53c247bd95e9651c5cfd87f069 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 16:59:51 +0000 Subject: [PATCH 294/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 48a5631c75f..9967edb6847 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4434a74ce6051a9218724e482ba7e0c6d74da606fd5bee1743f159a8ecd435b2.yml -openapi_spec_hash: d497ef192865415ec2e2f4962e372d92 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca470d3505ce3ea2b0335ed51d6131ee2739ab2eb952b3c23d0be7229035f259.yml +openapi_spec_hash: 9371c0181431755b5111eb0be1602aab config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 288cf47bd0d6a78f26ab93ae1febd3e67e03c43e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 18:23:13 +0000 Subject: [PATCH 295/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9967edb6847..0a17f6714cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca470d3505ce3ea2b0335ed51d6131ee2739ab2eb952b3c23d0be7229035f259.yml -openapi_spec_hash: 9371c0181431755b5111eb0be1602aab +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f909c745f96f132ac959aace2de9fd36d5d9735bc9673ce9fb6560d3f5ef61fc.yml +openapi_spec_hash: 4b6d18d4376ef59eeb0a6263aff94855 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 75df94a36236d5066e87b6d400f55d603e9480aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 18:29:44 +0000 Subject: [PATCH 296/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0a17f6714cf..9967edb6847 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f909c745f96f132ac959aace2de9fd36d5d9735bc9673ce9fb6560d3f5ef61fc.yml -openapi_spec_hash: 4b6d18d4376ef59eeb0a6263aff94855 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca470d3505ce3ea2b0335ed51d6131ee2739ab2eb952b3c23d0be7229035f259.yml +openapi_spec_hash: 9371c0181431755b5111eb0be1602aab config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From ba7833691092e9c5b40589bed5fefd897d421e3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 18:57:40 +0000 Subject: [PATCH 297/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9967edb6847..f72caee3102 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca470d3505ce3ea2b0335ed51d6131ee2739ab2eb952b3c23d0be7229035f259.yml -openapi_spec_hash: 9371c0181431755b5111eb0be1602aab +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c01dca3c6cd7d96f51102258a07f4cad0ea01c762c926f21a6f7e4a2c0d289c0.yml +openapi_spec_hash: cbe45ecfa992fbbd1e2488e5b600e4f7 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 5364bb7fafdd4d85525232ee90c4e7b4dbae4488 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 19:04:25 +0000 Subject: [PATCH 298/392] feat(api): api update --- .stats.yml | 4 ++-- .../resources/ai/finetunes/assets.py | 19 +++++-------------- .../ai/finetunes/asset_create_response.py | 14 +------------- 3 files changed, 8 insertions(+), 29 deletions(-) diff --git a/.stats.yml b/.stats.yml index f72caee3102..ce109a760a2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c01dca3c6cd7d96f51102258a07f4cad0ea01c762c926f21a6f7e4a2c0d289c0.yml -openapi_spec_hash: cbe45ecfa992fbbd1e2488e5b600e4f7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-447723623388aa388d7f61c0481ee7ecfc7300ff3e9824fdec712edc04b3a773.yml +openapi_spec_hash: 2283b188fa369217d0c071720d480e01 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 diff --git a/src/cloudflare/resources/ai/finetunes/assets.py b/src/cloudflare/resources/ai/finetunes/assets.py index f1da603332b..18937f9a7e9 100644 --- a/src/cloudflare/resources/ai/finetunes/assets.py +++ b/src/cloudflare/resources/ai/finetunes/assets.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Mapping, cast +from typing import Mapping, cast import httpx @@ -16,7 +16,6 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper from ...._base_client import make_request_options from ....types.ai.finetunes import asset_create_params from ....types.ai.finetunes.asset_create_response import AssetCreateResponse @@ -90,13 +89,9 @@ def create( body=maybe_transform(body, asset_create_params.AssetCreateParams), files=files, options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[AssetCreateResponse]._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[AssetCreateResponse], ResultWrapper[AssetCreateResponse]), + cast_to=AssetCreateResponse, ) @@ -166,13 +161,9 @@ async def create( body=await async_maybe_transform(body, asset_create_params.AssetCreateParams), files=files, options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[AssetCreateResponse]._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[AssetCreateResponse], ResultWrapper[AssetCreateResponse]), + cast_to=AssetCreateResponse, ) diff --git a/src/cloudflare/types/ai/finetunes/asset_create_response.py b/src/cloudflare/types/ai/finetunes/asset_create_response.py index eef3e2d7d2d..5647b5f222c 100644 --- a/src/cloudflare/types/ai/finetunes/asset_create_response.py +++ b/src/cloudflare/types/ai/finetunes/asset_create_response.py @@ -1,21 +1,9 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from datetime import datetime - from ...._models import BaseModel __all__ = ["AssetCreateResponse"] class AssetCreateResponse(BaseModel): - id: str - - bucket_name: str - - created_at: datetime - - file_name: str - - finetune_id: str - - modified_at: datetime + success: bool From f8e1cedc818f163ab9f305ca421de1d4edcacabb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 20:55:57 +0000 Subject: [PATCH 299/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ce109a760a2..3d5fc42a6ef 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-447723623388aa388d7f61c0481ee7ecfc7300ff3e9824fdec712edc04b3a773.yml -openapi_spec_hash: 2283b188fa369217d0c071720d480e01 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-39b29d31b6b11cfc2edac0217ece0c68aeeb884b7f4b443a0ac1129b395e577f.yml +openapi_spec_hash: 5b8a2397a05161b29e0490b31173028c config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From c2b1d7cd8f24ba9ed115f525bce1997f34acf92a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 21:50:17 +0000 Subject: [PATCH 300/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3d5fc42a6ef..d644fb56707 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-39b29d31b6b11cfc2edac0217ece0c68aeeb884b7f4b443a0ac1129b395e577f.yml -openapi_spec_hash: 5b8a2397a05161b29e0490b31173028c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6e62280570e1f31dd315031fa6fbcaca8e2c3e940b638e75b652f98a6d25e952.yml +openapi_spec_hash: 32aa8798cad51d9833acbc2b2a91dea5 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 3057014fb8d8cd7c50814d28f83412bccbb36bcb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 19 Jul 2025 06:18:39 +0000 Subject: [PATCH 301/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d644fb56707..f865c6650f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6e62280570e1f31dd315031fa6fbcaca8e2c3e940b638e75b652f98a6d25e952.yml -openapi_spec_hash: 32aa8798cad51d9833acbc2b2a91dea5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1d1dccefd8564fd1ea42d264d0f05bf008dd6340fba070f1eaae1c252bcfd3a3.yml +openapi_spec_hash: d80c6947df2d9f0f23d3eec531bc6035 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From ef87eb40d0ffbf032d8b365f4e4fe1b4f9e32744 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 20 Jul 2025 06:16:17 +0000 Subject: [PATCH 302/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f865c6650f0..d79055f0187 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1d1dccefd8564fd1ea42d264d0f05bf008dd6340fba070f1eaae1c252bcfd3a3.yml -openapi_spec_hash: d80c6947df2d9f0f23d3eec531bc6035 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c493698a1cde78df7b38557058847107dcc8041a33b8367b7416cd3dc08324e9.yml +openapi_spec_hash: 3202b0c046cd2617b0f8839c941ff334 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From aa2cefee2b6ee5c31abd92896a57caab5225a905 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 06:06:17 +0000 Subject: [PATCH 303/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d79055f0187..9c25faf4edc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c493698a1cde78df7b38557058847107dcc8041a33b8367b7416cd3dc08324e9.yml -openapi_spec_hash: 3202b0c046cd2617b0f8839c941ff334 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a863dd00c5f938422a24a9c5c17ade7d1269c02e046e2dfa588e77849ae3f55c.yml +openapi_spec_hash: 3b3b1b659f41d3719cc36ce5c4e0142e config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 7b2e32eec520a9376f3a247cf88507d917a53c36 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 07:26:45 +0000 Subject: [PATCH 304/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9c25faf4edc..d0baba980ee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a863dd00c5f938422a24a9c5c17ade7d1269c02e046e2dfa588e77849ae3f55c.yml -openapi_spec_hash: 3b3b1b659f41d3719cc36ce5c4e0142e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-44e33e11e5d0c9ed23bc9d9dfa9e72e5240994bd3efb154ae54902f6dd4d9afd.yml +openapi_spec_hash: 0586874a995e96c9b3520b70ecf53080 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From ac66cd1eacca50b48637bb7a92880ca6e1973904 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 08:39:26 +0000 Subject: [PATCH 305/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d0baba980ee..f865c6650f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-44e33e11e5d0c9ed23bc9d9dfa9e72e5240994bd3efb154ae54902f6dd4d9afd.yml -openapi_spec_hash: 0586874a995e96c9b3520b70ecf53080 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1d1dccefd8564fd1ea42d264d0f05bf008dd6340fba070f1eaae1c252bcfd3a3.yml +openapi_spec_hash: d80c6947df2d9f0f23d3eec531bc6035 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From aef7eb77a0565f001bcef1d28e1adddcbdcda821 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 09:34:45 +0000 Subject: [PATCH 306/392] feat(api): api update --- .stats.yml | 4 +- .../resources/rules/lists/bulk_operations.py | 48 +++++++++++-------- .../types/rules/list_create_response.py | 22 ++++----- .../types/rules/list_delete_response.py | 4 +- .../types/rules/list_get_response.py | 22 ++++----- .../types/rules/list_update_response.py | 22 ++++----- .../lists/bulk_operation_get_response.py | 38 +++++++++++---- .../types/rules/lists/item_create_params.py | 40 +++++++++++----- .../types/rules/lists/item_create_response.py | 4 +- .../types/rules/lists/item_delete_response.py | 4 +- .../types/rules/lists/item_update_params.py | 40 +++++++++++----- .../types/rules/lists/item_update_response.py | 4 +- src/cloudflare/types/rules/lists_list.py | 22 ++++----- tests/api_resources/rules/lists/test_items.py | 40 ++++++++-------- 14 files changed, 187 insertions(+), 127 deletions(-) diff --git a/.stats.yml b/.stats.yml index f865c6650f0..82e7704519b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1d1dccefd8564fd1ea42d264d0f05bf008dd6340fba070f1eaae1c252bcfd3a3.yml -openapi_spec_hash: d80c6947df2d9f0f23d3eec531bc6035 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3267b5a1548af02ecbcaaab9bd5ff5fdeb620f487802af9edbae8e3fc0797932.yml +openapi_spec_hash: 3cef24d9a1589e92e192cb855de613b0 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 diff --git a/src/cloudflare/resources/rules/lists/bulk_operations.py b/src/cloudflare/resources/rules/lists/bulk_operations.py index a0c473eb47c..445e4421798 100644 --- a/src/cloudflare/resources/rules/lists/bulk_operations.py +++ b/src/cloudflare/resources/rules/lists/bulk_operations.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, cast +from typing import Any, cast import httpx @@ -78,16 +78,21 @@ def get( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not operation_id: raise ValueError(f"Expected a non-empty value for `operation_id` but received {operation_id!r}") - return self._get( - f"/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[BulkOperationGetResponse]._unwrapper, + return cast( + BulkOperationGetResponse, + self._get( + f"/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[BulkOperationGetResponse]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[BulkOperationGetResponse] + ), # Union types cannot be passed in as arguments in the type system ), - cast_to=cast(Type[BulkOperationGetResponse], ResultWrapper[BulkOperationGetResponse]), ) @@ -147,16 +152,21 @@ async def get( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not operation_id: raise ValueError(f"Expected a non-empty value for `operation_id` but received {operation_id!r}") - return await self._get( - f"/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[BulkOperationGetResponse]._unwrapper, + return cast( + BulkOperationGetResponse, + await self._get( + f"/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[BulkOperationGetResponse]._unwrapper, + ), + cast_to=cast( + Any, ResultWrapper[BulkOperationGetResponse] + ), # Union types cannot be passed in as arguments in the type system ), - cast_to=cast(Type[BulkOperationGetResponse], ResultWrapper[BulkOperationGetResponse]), ) diff --git a/src/cloudflare/types/rules/list_create_response.py b/src/cloudflare/types/rules/list_create_response.py index d6be7c5af46..de16c3a9099 100644 --- a/src/cloudflare/types/rules/list_create_response.py +++ b/src/cloudflare/types/rules/list_create_response.py @@ -9,30 +9,30 @@ class ListCreateResponse(BaseModel): - id: Optional[str] = None + id: str """The unique ID of the list.""" - created_on: Optional[str] = None + created_on: str """The RFC 3339 timestamp of when the list was created.""" - description: Optional[str] = None - """An informative summary of the list.""" - - kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None + kind: Literal["ip", "redirect", "hostname", "asn"] """The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). """ - modified_on: Optional[str] = None + modified_on: str """The RFC 3339 timestamp of when the list was last modified.""" - name: Optional[str] = None + name: str """An informative name for the list. Use this name in filter and rule expressions.""" - num_items: Optional[float] = None + num_items: float """The number of items in the list.""" - num_referencing_filters: Optional[float] = None - """The number of [filters](/operations/filters-list-filters) referencing the list.""" + num_referencing_filters: float + """The number of [filters](/api/resources/filters/) referencing the list.""" + + description: Optional[str] = None + """An informative summary of the list.""" diff --git a/src/cloudflare/types/rules/list_delete_response.py b/src/cloudflare/types/rules/list_delete_response.py index bcc22efbc8f..eab287e168d 100644 --- a/src/cloudflare/types/rules/list_delete_response.py +++ b/src/cloudflare/types/rules/list_delete_response.py @@ -1,12 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel __all__ = ["ListDeleteResponse"] class ListDeleteResponse(BaseModel): - id: Optional[str] = None + id: str """The unique ID of the list.""" diff --git a/src/cloudflare/types/rules/list_get_response.py b/src/cloudflare/types/rules/list_get_response.py index ad91887548a..7ae2c6a849b 100644 --- a/src/cloudflare/types/rules/list_get_response.py +++ b/src/cloudflare/types/rules/list_get_response.py @@ -9,30 +9,30 @@ class ListGetResponse(BaseModel): - id: Optional[str] = None + id: str """The unique ID of the list.""" - created_on: Optional[str] = None + created_on: str """The RFC 3339 timestamp of when the list was created.""" - description: Optional[str] = None - """An informative summary of the list.""" - - kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None + kind: Literal["ip", "redirect", "hostname", "asn"] """The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). """ - modified_on: Optional[str] = None + modified_on: str """The RFC 3339 timestamp of when the list was last modified.""" - name: Optional[str] = None + name: str """An informative name for the list. Use this name in filter and rule expressions.""" - num_items: Optional[float] = None + num_items: float """The number of items in the list.""" - num_referencing_filters: Optional[float] = None - """The number of [filters](/operations/filters-list-filters) referencing the list.""" + num_referencing_filters: float + """The number of [filters](/api/resources/filters/) referencing the list.""" + + description: Optional[str] = None + """An informative summary of the list.""" diff --git a/src/cloudflare/types/rules/list_update_response.py b/src/cloudflare/types/rules/list_update_response.py index cd77ecb85c2..5339175eb58 100644 --- a/src/cloudflare/types/rules/list_update_response.py +++ b/src/cloudflare/types/rules/list_update_response.py @@ -9,30 +9,30 @@ class ListUpdateResponse(BaseModel): - id: Optional[str] = None + id: str """The unique ID of the list.""" - created_on: Optional[str] = None + created_on: str """The RFC 3339 timestamp of when the list was created.""" - description: Optional[str] = None - """An informative summary of the list.""" - - kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None + kind: Literal["ip", "redirect", "hostname", "asn"] """The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). """ - modified_on: Optional[str] = None + modified_on: str """The RFC 3339 timestamp of when the list was last modified.""" - name: Optional[str] = None + name: str """An informative name for the list. Use this name in filter and rule expressions.""" - num_items: Optional[float] = None + num_items: float """The number of items in the list.""" - num_referencing_filters: Optional[float] = None - """The number of [filters](/operations/filters-list-filters) referencing the list.""" + num_referencing_filters: float + """The number of [filters](/api/resources/filters/) referencing the list.""" + + description: Optional[str] = None + """An informative summary of the list.""" diff --git a/src/cloudflare/types/rules/lists/bulk_operation_get_response.py b/src/cloudflare/types/rules/lists/bulk_operation_get_response.py index 0c2766f72b6..71e19bbdabd 100644 --- a/src/cloudflare/types/rules/lists/bulk_operation_get_response.py +++ b/src/cloudflare/types/rules/lists/bulk_operation_get_response.py @@ -1,22 +1,44 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional -from typing_extensions import Literal +from typing import Union +from typing_extensions import Literal, TypeAlias from ...._models import BaseModel -__all__ = ["BulkOperationGetResponse"] +__all__ = ["BulkOperationGetResponse", "UnionMember0", "UnionMember1", "UnionMember2"] -class BulkOperationGetResponse(BaseModel): +class UnionMember0(BaseModel): id: str """The unique operation ID of the asynchronous action.""" - status: Literal["pending", "running", "completed", "failed"] + completed: str + """The RFC 3339 timestamp of when the operation was completed.""" + + error: str + """A message describing the error when the status is `failed`.""" + + status: Literal["failed"] + """The current status of the asynchronous operation.""" + + +class UnionMember1(BaseModel): + id: str + """The unique operation ID of the asynchronous action.""" + + status: Literal["pending", "running"] """The current status of the asynchronous operation.""" - completed: Optional[str] = None + +class UnionMember2(BaseModel): + id: str + """The unique operation ID of the asynchronous action.""" + + completed: str """The RFC 3339 timestamp of when the operation was completed.""" - error: Optional[str] = None - """A message describing the error when the status is `failed`.""" + status: Literal["completed"] + """The current status of the asynchronous operation.""" + + +BulkOperationGetResponse: TypeAlias = Union[UnionMember0, UnionMember1, UnionMember2] diff --git a/src/cloudflare/types/rules/lists/item_create_params.py b/src/cloudflare/types/rules/lists/item_create_params.py index 167cb570c27..94a4755a3b1 100644 --- a/src/cloudflare/types/rules/lists/item_create_params.py +++ b/src/cloudflare/types/rules/lists/item_create_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Iterable -from typing_extensions import Required, TypedDict +from typing import Union, Iterable +from typing_extensions import Required, TypeAlias, TypedDict from ..hostname_param import HostnameParam from ..redirect_param import RedirectParam -__all__ = ["ItemCreateParams", "Body"] +__all__ = ["ItemCreateParams", "Body", "BodyUnionMember0", "BodyUnionMember1", "BodyUnionMember2", "BodyUnionMember3"] class ItemCreateParams(TypedDict, total=False): @@ -18,21 +18,39 @@ class ItemCreateParams(TypedDict, total=False): body: Required[Iterable[Body]] -class Body(TypedDict, total=False): - asn: int - """Defines a non-negative 32 bit integer.""" +class BodyUnionMember0(TypedDict, total=False): + ip: Required[str] + """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" + + comment: str + """Defines an informative summary of the list item.""" + + +class BodyUnionMember1(TypedDict, total=False): + redirect: Required[RedirectParam] + """The definition of the redirect.""" comment: str """Defines an informative summary of the list item.""" - hostname: HostnameParam + +class BodyUnionMember2(TypedDict, total=False): + hostname: Required[HostnameParam] """ Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (\\**), and the hyphen (-). """ - ip: str - """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" + comment: str + """Defines an informative summary of the list item.""" - redirect: RedirectParam - """The definition of the redirect.""" + +class BodyUnionMember3(TypedDict, total=False): + asn: Required[int] + """Defines a non-negative 32 bit integer.""" + + comment: str + """Defines an informative summary of the list item.""" + + +Body: TypeAlias = Union[BodyUnionMember0, BodyUnionMember1, BodyUnionMember2, BodyUnionMember3] diff --git a/src/cloudflare/types/rules/lists/item_create_response.py b/src/cloudflare/types/rules/lists/item_create_response.py index 4f22d14d393..6598e73dba3 100644 --- a/src/cloudflare/types/rules/lists/item_create_response.py +++ b/src/cloudflare/types/rules/lists/item_create_response.py @@ -1,12 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel __all__ = ["ItemCreateResponse"] class ItemCreateResponse(BaseModel): - operation_id: Optional[str] = None + operation_id: str """The unique operation ID of the asynchronous action.""" diff --git a/src/cloudflare/types/rules/lists/item_delete_response.py b/src/cloudflare/types/rules/lists/item_delete_response.py index 3b0bf9835a9..dd46b738ce3 100644 --- a/src/cloudflare/types/rules/lists/item_delete_response.py +++ b/src/cloudflare/types/rules/lists/item_delete_response.py @@ -1,12 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel __all__ = ["ItemDeleteResponse"] class ItemDeleteResponse(BaseModel): - operation_id: Optional[str] = None + operation_id: str """The unique operation ID of the asynchronous action.""" diff --git a/src/cloudflare/types/rules/lists/item_update_params.py b/src/cloudflare/types/rules/lists/item_update_params.py index 659c4138f77..566c3c73306 100644 --- a/src/cloudflare/types/rules/lists/item_update_params.py +++ b/src/cloudflare/types/rules/lists/item_update_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Iterable -from typing_extensions import Required, TypedDict +from typing import Union, Iterable +from typing_extensions import Required, TypeAlias, TypedDict from ..hostname_param import HostnameParam from ..redirect_param import RedirectParam -__all__ = ["ItemUpdateParams", "Body"] +__all__ = ["ItemUpdateParams", "Body", "BodyUnionMember0", "BodyUnionMember1", "BodyUnionMember2", "BodyUnionMember3"] class ItemUpdateParams(TypedDict, total=False): @@ -18,21 +18,39 @@ class ItemUpdateParams(TypedDict, total=False): body: Required[Iterable[Body]] -class Body(TypedDict, total=False): - asn: int - """Defines a non-negative 32 bit integer.""" +class BodyUnionMember0(TypedDict, total=False): + ip: Required[str] + """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" + + comment: str + """Defines an informative summary of the list item.""" + + +class BodyUnionMember1(TypedDict, total=False): + redirect: Required[RedirectParam] + """The definition of the redirect.""" comment: str """Defines an informative summary of the list item.""" - hostname: HostnameParam + +class BodyUnionMember2(TypedDict, total=False): + hostname: Required[HostnameParam] """ Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (\\**), and the hyphen (-). """ - ip: str - """An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR.""" + comment: str + """Defines an informative summary of the list item.""" - redirect: RedirectParam - """The definition of the redirect.""" + +class BodyUnionMember3(TypedDict, total=False): + asn: Required[int] + """Defines a non-negative 32 bit integer.""" + + comment: str + """Defines an informative summary of the list item.""" + + +Body: TypeAlias = Union[BodyUnionMember0, BodyUnionMember1, BodyUnionMember2, BodyUnionMember3] diff --git a/src/cloudflare/types/rules/lists/item_update_response.py b/src/cloudflare/types/rules/lists/item_update_response.py index afd2fa83b57..9cf29ab1c84 100644 --- a/src/cloudflare/types/rules/lists/item_update_response.py +++ b/src/cloudflare/types/rules/lists/item_update_response.py @@ -1,12 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel __all__ = ["ItemUpdateResponse"] class ItemUpdateResponse(BaseModel): - operation_id: Optional[str] = None + operation_id: str """The unique operation ID of the asynchronous action.""" diff --git a/src/cloudflare/types/rules/lists_list.py b/src/cloudflare/types/rules/lists_list.py index 17255b5fa7d..9c2b7edb8e9 100644 --- a/src/cloudflare/types/rules/lists_list.py +++ b/src/cloudflare/types/rules/lists_list.py @@ -9,30 +9,30 @@ class ListsList(BaseModel): - id: Optional[str] = None + id: str """The unique ID of the list.""" - created_on: Optional[str] = None + created_on: str """The RFC 3339 timestamp of when the list was created.""" - description: Optional[str] = None - """An informative summary of the list.""" - - kind: Optional[Literal["ip", "redirect", "hostname", "asn"]] = None + kind: Literal["ip", "redirect", "hostname", "asn"] """The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). """ - modified_on: Optional[str] = None + modified_on: str """The RFC 3339 timestamp of when the list was last modified.""" - name: Optional[str] = None + name: str """An informative name for the list. Use this name in filter and rule expressions.""" - num_items: Optional[float] = None + num_items: float """The number of items in the list.""" - num_referencing_filters: Optional[float] = None - """The number of [filters](/operations/filters-list-filters) referencing the list.""" + num_referencing_filters: float + """The number of [filters](/api/resources/filters/) referencing the list.""" + + description: Optional[str] = None + """An informative summary of the list.""" diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py index 34746213a5c..3a1dce7abb1 100644 --- a/tests/api_resources/rules/lists/test_items.py +++ b/tests/api_resources/rules/lists/test_items.py @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: item = client.rules.lists.items.create( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) assert_matches_type(ItemCreateResponse, item, path=["response"]) @@ -38,7 +38,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.create( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) assert response.is_closed is True @@ -51,7 +51,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.create( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,14 +67,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.rules.lists.items.with_raw_response.create( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.create( list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) @parametrize @@ -82,7 +82,7 @@ def test_method_update(self, client: Cloudflare) -> None: item = client.rules.lists.items.update( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) assert_matches_type(ItemUpdateResponse, item, path=["response"]) @@ -91,7 +91,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.update( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) assert response.is_closed is True @@ -104,7 +104,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.update( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -120,14 +120,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.rules.lists.items.with_raw_response.update( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.update( list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) @parametrize @@ -317,7 +317,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.create( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) assert_matches_type(ItemCreateResponse, item, path=["response"]) @@ -326,7 +326,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.create( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) assert response.is_closed is True @@ -339,7 +339,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.rules.lists.items.with_streaming_response.create( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -355,14 +355,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.rules.lists.items.with_raw_response.create( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.create( list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) @parametrize @@ -370,7 +370,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.update( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) assert_matches_type(ItemUpdateResponse, item, path=["response"]) @@ -379,7 +379,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.update( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) assert response.is_closed is True @@ -392,7 +392,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async with async_client.rules.lists.items.with_streaming_response.update( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -408,14 +408,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.rules.lists.items.with_raw_response.update( list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.update( list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=[{}], + body=[{"ip": "10.0.0.1"}], ) @parametrize From 258adee7a186bd629f188f9e2de79a59220877ff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:14:58 +0000 Subject: [PATCH 307/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 82e7704519b..22015b37d5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3267b5a1548af02ecbcaaab9bd5ff5fdeb620f487802af9edbae8e3fc0797932.yml -openapi_spec_hash: 3cef24d9a1589e92e192cb855de613b0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f1275a5b14fe1a16209a1b738cd192b75c92cc4b1083acc12b62084b56ab1c5.yml +openapi_spec_hash: c1176e500a0e648929825c85adaaaf8f config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 3ecc276b517157581fdbdc0d141dce41f7fe0d91 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:28:02 +0000 Subject: [PATCH 308/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 22015b37d5a..a0a052c23b8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8f1275a5b14fe1a16209a1b738cd192b75c92cc4b1083acc12b62084b56ab1c5.yml -openapi_spec_hash: c1176e500a0e648929825c85adaaaf8f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56e800b98ba9548092810a7f79d0eef8a28ea184378c75ea2633d4a657c94317.yml +openapi_spec_hash: 920d7fa0e8ec03a4dcc3752cf228edda config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 7569336edf388157a87d85747180c925c9a4227a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:39:23 +0000 Subject: [PATCH 309/392] fix(parsing): ignore empty metadata --- src/cloudflare/_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py index 2292f8864b0..f7cbd38ed72 100644 --- a/src/cloudflare/_models.py +++ b/src/cloudflare/_models.py @@ -440,7 +440,7 @@ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any] type_ = type_.__value__ # type: ignore[unreachable] # unwrap `Annotated[T, ...]` -> `T` - if metadata is not None: + if metadata is not None and len(metadata) > 0: meta: tuple[Any, ...] = tuple(metadata) elif is_annotated_type(type_): meta = get_args(type_)[1:] From 73cff38a708a56e5499b5940999047c82bcb676a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 13:28:28 +0000 Subject: [PATCH 310/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a0a052c23b8..0790c8c5a75 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-56e800b98ba9548092810a7f79d0eef8a28ea184378c75ea2633d4a657c94317.yml -openapi_spec_hash: 920d7fa0e8ec03a4dcc3752cf228edda +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1ca60bc03c8e9a1f116f4918b34b9155b3840c3c0a4c0dd72cb11d8b72dcb92.yml +openapi_spec_hash: 105040435021e7f54eafdbf27b2e7c5f config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 6cc5b2320c2475cafcaae6cf11b7e03e522195e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 13:51:12 +0000 Subject: [PATCH 311/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0790c8c5a75..6c23dbc8f50 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d1ca60bc03c8e9a1f116f4918b34b9155b3840c3c0a4c0dd72cb11d8b72dcb92.yml -openapi_spec_hash: 105040435021e7f54eafdbf27b2e7c5f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-34f2968e2180fc45a124dde1935ef1de79fbe486ee2b70a595b71aa8fb3bd10a.yml +openapi_spec_hash: 784a5793565f98565f0a7d405d0046dc config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 493b2648c751f71bb474d348c29cd48467dd1e93 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 14:26:06 +0000 Subject: [PATCH 312/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6c23dbc8f50..3f669f03b9e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-34f2968e2180fc45a124dde1935ef1de79fbe486ee2b70a595b71aa8fb3bd10a.yml -openapi_spec_hash: 784a5793565f98565f0a7d405d0046dc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba5b3a3391d644fb13b0a81649c1dcadb159e3790e61ea9bed34bcde8be20ee0.yml +openapi_spec_hash: 620fa62003733bd093cedde424b7cbe6 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From ace4cf338dde6940dd21cdd63c4d790fdf2d7b26 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 14:34:53 +0000 Subject: [PATCH 313/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3f669f03b9e..81c80070eb1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ba5b3a3391d644fb13b0a81649c1dcadb159e3790e61ea9bed34bcde8be20ee0.yml -openapi_spec_hash: 620fa62003733bd093cedde424b7cbe6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5587a7b51433f461387fdd6cd83772b9186bbf4420fcd0c82396963fa82322e6.yml +openapi_spec_hash: 9478d1ab7ffa8f07b7732806fce00b53 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 3aa40730da66fbae62f72bac34bb035865a7167a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:03:02 +0000 Subject: [PATCH 314/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 81c80070eb1..201558d55b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5587a7b51433f461387fdd6cd83772b9186bbf4420fcd0c82396963fa82322e6.yml -openapi_spec_hash: 9478d1ab7ffa8f07b7732806fce00b53 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4f1f481569f3b98164f374c61eb81c1d85ee7ac300591dee69716c3508d29831.yml +openapi_spec_hash: 6af747a8c0f6c7863011a8406189d185 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From ff06c87e95b2c6f38f70efe2264c3fa8707fdfb8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:17:23 +0000 Subject: [PATCH 315/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 201558d55b3..6c23dbc8f50 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4f1f481569f3b98164f374c61eb81c1d85ee7ac300591dee69716c3508d29831.yml -openapi_spec_hash: 6af747a8c0f6c7863011a8406189d185 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-34f2968e2180fc45a124dde1935ef1de79fbe486ee2b70a595b71aa8fb3bd10a.yml +openapi_spec_hash: 784a5793565f98565f0a7d405d0046dc config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 20da11a728f7581238769b01e9b6dce525d7e235 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:27:45 +0000 Subject: [PATCH 316/392] feat(api): api update --- .stats.yml | 6 +- api.md | 20 - .../cloudforce_one/threat_events/__init__.py | 14 - .../cloudforce_one/threat_events/insights.py | 531 ----------------- .../threat_events/threat_events.py | 40 +- .../threat_event_edit_params.py | 16 +- .../cloudforce_one/threat_events/__init__.py | 6 - .../threat_events/insight_create_params.py | 14 - .../threat_events/insight_create_response.py | 11 - .../threat_events/insight_delete_response.py | 9 - .../threat_events/insight_edit_params.py | 17 - .../threat_events/insight_edit_response.py | 11 - .../threat_events/insight_get_response.py | 11 - .../cloudforce_one/test_threat_events.py | 12 + .../threat_events/test_insights.py | 539 ------------------ 15 files changed, 37 insertions(+), 1220 deletions(-) delete mode 100644 src/cloudflare/resources/cloudforce_one/threat_events/insights.py delete mode 100644 src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py delete mode 100644 src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py delete mode 100644 src/cloudflare/types/cloudforce_one/threat_events/insight_delete_response.py delete mode 100644 src/cloudflare/types/cloudforce_one/threat_events/insight_edit_params.py delete mode 100644 src/cloudflare/types/cloudforce_one/threat_events/insight_edit_response.py delete mode 100644 src/cloudflare/types/cloudforce_one/threat_events/insight_get_response.py delete mode 100644 tests/api_resources/cloudforce_one/threat_events/test_insights.py diff --git a/.stats.yml b/.stats.yml index 6c23dbc8f50..29a4588e952 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-34f2968e2180fc45a124dde1935ef1de79fbe486ee2b70a595b71aa8fb3bd10a.yml -openapi_spec_hash: 784a5793565f98565f0a7d405d0046dc +configured_endpoints: 1773 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e966b691beb6f28c5d8db69acd25d780a5491ae9dd852027b3b8ba8f07322b50.yml +openapi_spec_hash: 9de7da84cbe53e2fa9833a704dcd1491 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 diff --git a/api.md b/api.md index d905c9d7978..f5f3d54bc27 100644 --- a/api.md +++ b/api.md @@ -9152,26 +9152,6 @@ Methods: - client.cloudforce_one.threat_events.target_industries.list(\*, account_id) -> TargetIndustryListResponse -### Insights - -Types: - -```python -from cloudflare.types.cloudforce_one.threat_events import ( - InsightCreateResponse, - InsightDeleteResponse, - InsightEditResponse, - InsightGetResponse, -) -``` - -Methods: - -- client.cloudforce_one.threat_events.insights.create(event_id, \*, account_id, \*\*params) -> InsightCreateResponse -- client.cloudforce_one.threat_events.insights.delete(insight_id, \*, account_id, event_id) -> InsightDeleteResponse -- client.cloudforce_one.threat_events.insights.edit(insight_id, \*, account_id, event_id, \*\*params) -> InsightEditResponse -- client.cloudforce_one.threat_events.insights.get(insight_id, \*, account_id, event_id) -> InsightGetResponse - # AIGateway Types: diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py b/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py index b25651cac31..66ed45034a8 100644 --- a/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py +++ b/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py @@ -40,14 +40,6 @@ DatasetsResourceWithStreamingResponse, AsyncDatasetsResourceWithStreamingResponse, ) -from .insights import ( - InsightsResource, - AsyncInsightsResource, - InsightsResourceWithRawResponse, - AsyncInsightsResourceWithRawResponse, - InsightsResourceWithStreamingResponse, - AsyncInsightsResourceWithStreamingResponse, -) from .attackers import ( AttackersResource, AsyncAttackersResource, @@ -172,12 +164,6 @@ "AsyncTargetIndustriesResourceWithRawResponse", "TargetIndustriesResourceWithStreamingResponse", "AsyncTargetIndustriesResourceWithStreamingResponse", - "InsightsResource", - "AsyncInsightsResource", - "InsightsResourceWithRawResponse", - "AsyncInsightsResourceWithRawResponse", - "InsightsResourceWithStreamingResponse", - "AsyncInsightsResourceWithStreamingResponse", "ThreatEventsResource", "AsyncThreatEventsResource", "ThreatEventsResourceWithRawResponse", diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/insights.py b/src/cloudflare/resources/cloudforce_one/threat_events/insights.py deleted file mode 100644 index 97373be775d..00000000000 --- a/src/cloudflare/resources/cloudforce_one/threat_events/insights.py +++ /dev/null @@ -1,531 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Type, cast - -import httpx - -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import maybe_transform, async_maybe_transform -from ...._compat import cached_property -from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper -from ...._base_client import make_request_options -from ....types.cloudforce_one.threat_events import insight_edit_params, insight_create_params -from ....types.cloudforce_one.threat_events.insight_get_response import InsightGetResponse -from ....types.cloudforce_one.threat_events.insight_edit_response import InsightEditResponse -from ....types.cloudforce_one.threat_events.insight_create_response import InsightCreateResponse -from ....types.cloudforce_one.threat_events.insight_delete_response import InsightDeleteResponse - -__all__ = ["InsightsResource", "AsyncInsightsResource"] - - -class InsightsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> InsightsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers - """ - return InsightsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> InsightsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response - """ - return InsightsResourceWithStreamingResponse(self) - - def create( - self, - event_id: str, - *, - account_id: str, - content: str, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightCreateResponse: - """ - Adds an insight to an event - - Args: - account_id: Account ID. - - event_id: Event UUID. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not event_id: - raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - return self._post( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/create", - body=maybe_transform({"content": content}, insight_create_params.InsightCreateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[InsightCreateResponse]._unwrapper, - ), - cast_to=cast(Type[InsightCreateResponse], ResultWrapper[InsightCreateResponse]), - ) - - def delete( - self, - insight_id: str, - *, - account_id: str, - event_id: str, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightDeleteResponse: - """ - Deletes an event insight - - Args: - account_id: Account ID. - - event_id: Event UUID. - - insight_id: Insight UUID. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not event_id: - raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - if not insight_id: - raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") - return self._delete( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[InsightDeleteResponse]._unwrapper, - ), - cast_to=cast(Type[InsightDeleteResponse], ResultWrapper[InsightDeleteResponse]), - ) - - def edit( - self, - insight_id: str, - *, - account_id: str, - event_id: str, - content: str, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightEditResponse: - """ - Updates an event insight - - Args: - account_id: Account ID. - - event_id: Event UUID. - - insight_id: Insight UUID. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not event_id: - raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - if not insight_id: - raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") - return self._patch( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", - body=maybe_transform({"content": content}, insight_edit_params.InsightEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[InsightEditResponse]._unwrapper, - ), - cast_to=cast(Type[InsightEditResponse], ResultWrapper[InsightEditResponse]), - ) - - def get( - self, - insight_id: str, - *, - account_id: str, - event_id: str, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightGetResponse: - """ - Reads an event insight - - Args: - account_id: Account ID. - - event_id: Event UUID. - - insight_id: Insight UUID. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not event_id: - raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - if not insight_id: - raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") - return self._get( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[InsightGetResponse]._unwrapper, - ), - cast_to=cast(Type[InsightGetResponse], ResultWrapper[InsightGetResponse]), - ) - - -class AsyncInsightsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncInsightsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers - """ - return AsyncInsightsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncInsightsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response - """ - return AsyncInsightsResourceWithStreamingResponse(self) - - async def create( - self, - event_id: str, - *, - account_id: str, - content: str, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightCreateResponse: - """ - Adds an insight to an event - - Args: - account_id: Account ID. - - event_id: Event UUID. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not event_id: - raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - return await self._post( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/create", - body=await async_maybe_transform({"content": content}, insight_create_params.InsightCreateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[InsightCreateResponse]._unwrapper, - ), - cast_to=cast(Type[InsightCreateResponse], ResultWrapper[InsightCreateResponse]), - ) - - async def delete( - self, - insight_id: str, - *, - account_id: str, - event_id: str, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightDeleteResponse: - """ - Deletes an event insight - - Args: - account_id: Account ID. - - event_id: Event UUID. - - insight_id: Insight UUID. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not event_id: - raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - if not insight_id: - raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") - return await self._delete( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[InsightDeleteResponse]._unwrapper, - ), - cast_to=cast(Type[InsightDeleteResponse], ResultWrapper[InsightDeleteResponse]), - ) - - async def edit( - self, - insight_id: str, - *, - account_id: str, - event_id: str, - content: str, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightEditResponse: - """ - Updates an event insight - - Args: - account_id: Account ID. - - event_id: Event UUID. - - insight_id: Insight UUID. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not event_id: - raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - if not insight_id: - raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") - return await self._patch( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", - body=await async_maybe_transform({"content": content}, insight_edit_params.InsightEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[InsightEditResponse]._unwrapper, - ), - cast_to=cast(Type[InsightEditResponse], ResultWrapper[InsightEditResponse]), - ) - - async def get( - self, - insight_id: str, - *, - account_id: str, - event_id: str, - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightGetResponse: - """ - Reads an event insight - - Args: - account_id: Account ID. - - event_id: Event UUID. - - insight_id: Insight UUID. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_id: - raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - if not event_id: - raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - if not insight_id: - raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") - return await self._get( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[InsightGetResponse]._unwrapper, - ), - cast_to=cast(Type[InsightGetResponse], ResultWrapper[InsightGetResponse]), - ) - - -class InsightsResourceWithRawResponse: - def __init__(self, insights: InsightsResource) -> None: - self._insights = insights - - self.create = to_raw_response_wrapper( - insights.create, - ) - self.delete = to_raw_response_wrapper( - insights.delete, - ) - self.edit = to_raw_response_wrapper( - insights.edit, - ) - self.get = to_raw_response_wrapper( - insights.get, - ) - - -class AsyncInsightsResourceWithRawResponse: - def __init__(self, insights: AsyncInsightsResource) -> None: - self._insights = insights - - self.create = async_to_raw_response_wrapper( - insights.create, - ) - self.delete = async_to_raw_response_wrapper( - insights.delete, - ) - self.edit = async_to_raw_response_wrapper( - insights.edit, - ) - self.get = async_to_raw_response_wrapper( - insights.get, - ) - - -class InsightsResourceWithStreamingResponse: - def __init__(self, insights: InsightsResource) -> None: - self._insights = insights - - self.create = to_streamed_response_wrapper( - insights.create, - ) - self.delete = to_streamed_response_wrapper( - insights.delete, - ) - self.edit = to_streamed_response_wrapper( - insights.edit, - ) - self.get = to_streamed_response_wrapper( - insights.get, - ) - - -class AsyncInsightsResourceWithStreamingResponse: - def __init__(self, insights: AsyncInsightsResource) -> None: - self._insights = insights - - self.create = async_to_streamed_response_wrapper( - insights.create, - ) - self.delete = async_to_streamed_response_wrapper( - insights.delete, - ) - self.edit = async_to_streamed_response_wrapper( - insights.edit, - ) - self.get = async_to_streamed_response_wrapper( - insights.get, - ) diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py index 1de42ea02f3..9864b5c23d0 100644 --- a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py +++ b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py @@ -40,14 +40,6 @@ RelateResourceWithStreamingResponse, AsyncRelateResourceWithStreamingResponse, ) -from .insights import ( - InsightsResource, - AsyncInsightsResource, - InsightsResourceWithRawResponse, - AsyncInsightsResourceWithRawResponse, - InsightsResourceWithStreamingResponse, - AsyncInsightsResourceWithStreamingResponse, -) from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import maybe_transform, async_maybe_transform from .attackers import ( @@ -176,10 +168,6 @@ def event_tags(self) -> EventTagsResource: def target_industries(self) -> TargetIndustriesResource: return TargetIndustriesResource(self._client) - @cached_property - def insights(self) -> InsightsResource: - return InsightsResource(self._client) - @cached_property def with_raw_response(self) -> ThreatEventsResourceWithRawResponse: """ @@ -434,6 +422,8 @@ def edit( event: str | NotGiven = NOT_GIVEN, indicator: str | NotGiven = NOT_GIVEN, indicator_type: str | NotGiven = NOT_GIVEN, + insight: str | NotGiven = NOT_GIVEN, + raw: threat_event_edit_params.Raw | NotGiven = NOT_GIVEN, target_country: str | NotGiven = NOT_GIVEN, target_industry: str | NotGiven = NOT_GIVEN, tlp: str | NotGiven = NOT_GIVEN, @@ -475,6 +465,8 @@ def edit( "event": event, "indicator": indicator, "indicator_type": indicator_type, + "insight": insight, + "raw": raw, "target_country": target_country, "target_industry": target_industry, "tlp": tlp, @@ -573,10 +565,6 @@ def event_tags(self) -> AsyncEventTagsResource: def target_industries(self) -> AsyncTargetIndustriesResource: return AsyncTargetIndustriesResource(self._client) - @cached_property - def insights(self) -> AsyncInsightsResource: - return AsyncInsightsResource(self._client) - @cached_property def with_raw_response(self) -> AsyncThreatEventsResourceWithRawResponse: """ @@ -831,6 +819,8 @@ async def edit( event: str | NotGiven = NOT_GIVEN, indicator: str | NotGiven = NOT_GIVEN, indicator_type: str | NotGiven = NOT_GIVEN, + insight: str | NotGiven = NOT_GIVEN, + raw: threat_event_edit_params.Raw | NotGiven = NOT_GIVEN, target_country: str | NotGiven = NOT_GIVEN, target_industry: str | NotGiven = NOT_GIVEN, tlp: str | NotGiven = NOT_GIVEN, @@ -872,6 +862,8 @@ async def edit( "event": event, "indicator": indicator, "indicator_type": indicator_type, + "insight": insight, + "raw": raw, "target_country": target_country, "target_industry": target_industry, "tlp": tlp, @@ -992,10 +984,6 @@ def event_tags(self) -> EventTagsResourceWithRawResponse: def target_industries(self) -> TargetIndustriesResourceWithRawResponse: return TargetIndustriesResourceWithRawResponse(self._threat_events.target_industries) - @cached_property - def insights(self) -> InsightsResourceWithRawResponse: - return InsightsResourceWithRawResponse(self._threat_events.insights) - class AsyncThreatEventsResourceWithRawResponse: def __init__(self, threat_events: AsyncThreatEventsResource) -> None: @@ -1064,10 +1052,6 @@ def event_tags(self) -> AsyncEventTagsResourceWithRawResponse: def target_industries(self) -> AsyncTargetIndustriesResourceWithRawResponse: return AsyncTargetIndustriesResourceWithRawResponse(self._threat_events.target_industries) - @cached_property - def insights(self) -> AsyncInsightsResourceWithRawResponse: - return AsyncInsightsResourceWithRawResponse(self._threat_events.insights) - class ThreatEventsResourceWithStreamingResponse: def __init__(self, threat_events: ThreatEventsResource) -> None: @@ -1136,10 +1120,6 @@ def event_tags(self) -> EventTagsResourceWithStreamingResponse: def target_industries(self) -> TargetIndustriesResourceWithStreamingResponse: return TargetIndustriesResourceWithStreamingResponse(self._threat_events.target_industries) - @cached_property - def insights(self) -> InsightsResourceWithStreamingResponse: - return InsightsResourceWithStreamingResponse(self._threat_events.insights) - class AsyncThreatEventsResourceWithStreamingResponse: def __init__(self, threat_events: AsyncThreatEventsResource) -> None: @@ -1207,7 +1187,3 @@ def event_tags(self) -> AsyncEventTagsResourceWithStreamingResponse: @cached_property def target_industries(self) -> AsyncTargetIndustriesResourceWithStreamingResponse: return AsyncTargetIndustriesResourceWithStreamingResponse(self._threat_events.target_industries) - - @cached_property - def insights(self) -> AsyncInsightsResourceWithStreamingResponse: - return AsyncInsightsResourceWithStreamingResponse(self._threat_events.insights) diff --git a/src/cloudflare/types/cloudforce_one/threat_event_edit_params.py b/src/cloudflare/types/cloudforce_one/threat_event_edit_params.py index 1878da8e9e5..5488eb9964c 100644 --- a/src/cloudflare/types/cloudforce_one/threat_event_edit_params.py +++ b/src/cloudflare/types/cloudforce_one/threat_event_edit_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Union +from typing import Dict, Union, Optional from datetime import datetime from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo -__all__ = ["ThreatEventEditParams"] +__all__ = ["ThreatEventEditParams", "Raw"] class ThreatEventEditParams(TypedDict, total=False): @@ -29,8 +29,20 @@ class ThreatEventEditParams(TypedDict, total=False): indicator_type: Annotated[str, PropertyInfo(alias="indicatorType")] + insight: str + + raw: Raw + target_country: Annotated[str, PropertyInfo(alias="targetCountry")] target_industry: Annotated[str, PropertyInfo(alias="targetIndustry")] tlp: str + + +class Raw(TypedDict, total=False): + data: Optional[Dict[str, object]] + + source: str + + tlp: str diff --git a/src/cloudflare/types/cloudforce_one/threat_events/__init__.py b/src/cloudflare/types/cloudforce_one/threat_events/__init__.py index f4e3339f8d7..e164956d90b 100644 --- a/src/cloudflare/types/cloudforce_one/threat_events/__init__.py +++ b/src/cloudflare/types/cloudforce_one/threat_events/__init__.py @@ -9,19 +9,15 @@ from .cron_edit_response import CronEditResponse as CronEditResponse from .cron_list_response import CronListResponse as CronListResponse from .dataset_edit_params import DatasetEditParams as DatasetEditParams -from .insight_edit_params import InsightEditParams as InsightEditParams from .tag_create_response import TagCreateResponse as TagCreateResponse from .category_edit_params import CategoryEditParams as CategoryEditParams from .dataset_get_response import DatasetGetResponse as DatasetGetResponse from .dataset_raw_response import DatasetRawResponse as DatasetRawResponse -from .insight_get_response import InsightGetResponse as InsightGetResponse from .category_get_response import CategoryGetResponse as CategoryGetResponse from .country_list_response import CountryListResponse as CountryListResponse from .dataset_create_params import DatasetCreateParams as DatasetCreateParams from .dataset_edit_response import DatasetEditResponse as DatasetEditResponse from .dataset_list_response import DatasetListResponse as DatasetListResponse -from .insight_create_params import InsightCreateParams as InsightCreateParams -from .insight_edit_response import InsightEditResponse as InsightEditResponse from .attacker_list_response import AttackerListResponse as AttackerListResponse from .category_create_params import CategoryCreateParams as CategoryCreateParams from .category_edit_response import CategoryEditResponse as CategoryEditResponse @@ -29,8 +25,6 @@ from .relate_delete_response import RelateDeleteResponse as RelateDeleteResponse from .dataset_create_response import DatasetCreateResponse as DatasetCreateResponse from .event_tag_create_params import EventTagCreateParams as EventTagCreateParams -from .insight_create_response import InsightCreateResponse as InsightCreateResponse -from .insight_delete_response import InsightDeleteResponse as InsightDeleteResponse from .category_create_response import CategoryCreateResponse as CategoryCreateResponse from .category_delete_response import CategoryDeleteResponse as CategoryDeleteResponse from .event_tag_create_response import EventTagCreateResponse as EventTagCreateResponse diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py deleted file mode 100644 index bcb266c36be..00000000000 --- a/src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["InsightCreateParams"] - - -class InsightCreateParams(TypedDict, total=False): - account_id: Required[str] - """Account ID.""" - - content: Required[str] diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py deleted file mode 100644 index 4090786269b..00000000000 --- a/src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from ...._models import BaseModel - -__all__ = ["InsightCreateResponse"] - - -class InsightCreateResponse(BaseModel): - content: str - - uuid: str diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_delete_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_delete_response.py deleted file mode 100644 index d8f336d78cc..00000000000 --- a/src/cloudflare/types/cloudforce_one/threat_events/insight_delete_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from ...._models import BaseModel - -__all__ = ["InsightDeleteResponse"] - - -class InsightDeleteResponse(BaseModel): - success: bool diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_params.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_params.py deleted file mode 100644 index 5fd3dc33226..00000000000 --- a/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["InsightEditParams"] - - -class InsightEditParams(TypedDict, total=False): - account_id: Required[str] - """Account ID.""" - - event_id: Required[str] - """Event UUID.""" - - content: Required[str] diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_response.py deleted file mode 100644 index ce0558b59f0..00000000000 --- a/src/cloudflare/types/cloudforce_one/threat_events/insight_edit_response.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from ...._models import BaseModel - -__all__ = ["InsightEditResponse"] - - -class InsightEditResponse(BaseModel): - content: str - - uuid: str diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_get_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_get_response.py deleted file mode 100644 index 59d96187ff8..00000000000 --- a/src/cloudflare/types/cloudforce_one/threat_events/insight_get_response.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from ...._models import BaseModel - -__all__ = ["InsightGetResponse"] - - -class InsightGetResponse(BaseModel): - content: str - - uuid: str diff --git a/tests/api_resources/cloudforce_one/test_threat_events.py b/tests/api_resources/cloudforce_one/test_threat_events.py index d8b54907ec4..fa6ad756199 100644 --- a/tests/api_resources/cloudforce_one/test_threat_events.py +++ b/tests/api_resources/cloudforce_one/test_threat_events.py @@ -340,6 +340,12 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: event="An attacker registered the domain domain.com", indicator="domain2.com", indicator_type="sha256", + insight="new insight", + raw={ + "data": {"foo": "bar"}, + "source": "example.com", + "tlp": "amber", + }, target_country="US", target_industry="Insurance", tlp="amber", @@ -762,6 +768,12 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) event="An attacker registered the domain domain.com", indicator="domain2.com", indicator_type="sha256", + insight="new insight", + raw={ + "data": {"foo": "bar"}, + "source": "example.com", + "tlp": "amber", + }, target_country="US", target_industry="Insurance", tlp="amber", diff --git a/tests/api_resources/cloudforce_one/threat_events/test_insights.py b/tests/api_resources/cloudforce_one/threat_events/test_insights.py deleted file mode 100644 index a3c3cbd8184..00000000000 --- a/tests/api_resources/cloudforce_one/threat_events/test_insights.py +++ /dev/null @@ -1,539 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.cloudforce_one.threat_events import ( - InsightGetResponse, - InsightEditResponse, - InsightCreateResponse, - InsightDeleteResponse, -) - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInsights: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_method_create(self, client: Cloudflare) -> None: - insight = client.cloudforce_one.threat_events.insights.create( - event_id="event_id", - account_id="account_id", - content="Here is some additional context _in markdown_", - ) - assert_matches_type(InsightCreateResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_raw_response_create(self, client: Cloudflare) -> None: - response = client.cloudforce_one.threat_events.insights.with_raw_response.create( - event_id="event_id", - account_id="account_id", - content="Here is some additional context _in markdown_", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - insight = response.parse() - assert_matches_type(InsightCreateResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_streaming_response_create(self, client: Cloudflare) -> None: - with client.cloudforce_one.threat_events.insights.with_streaming_response.create( - event_id="event_id", - account_id="account_id", - content="Here is some additional context _in markdown_", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - insight = response.parse() - assert_matches_type(InsightCreateResponse, insight, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - 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.cloudforce_one.threat_events.insights.with_raw_response.create( - event_id="event_id", - account_id="", - content="Here is some additional context _in markdown_", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.create( - event_id="", - account_id="account_id", - content="Here is some additional context _in markdown_", - ) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_method_delete(self, client: Cloudflare) -> None: - insight = client.cloudforce_one.threat_events.insights.delete( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - insight = response.parse() - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.cloudforce_one.threat_events.insights.with_streaming_response.delete( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - insight = response.parse() - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_path_params_delete(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id="", - event_id="event_id", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id="account_id", - event_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="", - account_id="account_id", - event_id="event_id", - ) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - insight = client.cloudforce_one.threat_events.insights.edit( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) - assert_matches_type(InsightEditResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.cloudforce_one.threat_events.insights.with_raw_response.edit( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - insight = response.parse() - assert_matches_type(InsightEditResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.cloudforce_one.threat_events.insights.with_streaming_response.edit( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - insight = response.parse() - assert_matches_type(InsightEditResponse, insight, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_path_params_edit(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.edit( - insight_id="insight_id", - account_id="", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.edit( - insight_id="insight_id", - account_id="account_id", - event_id="", - content="Updated: Here is some additional context _in markdown_", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.edit( - insight_id="", - account_id="account_id", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - insight = client.cloudforce_one.threat_events.insights.get( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) - assert_matches_type(InsightGetResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.cloudforce_one.threat_events.insights.with_raw_response.get( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - insight = response.parse() - assert_matches_type(InsightGetResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.cloudforce_one.threat_events.insights.with_streaming_response.get( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - insight = response.parse() - assert_matches_type(InsightGetResponse, insight, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.get( - insight_id="insight_id", - account_id="", - event_id="event_id", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.get( - insight_id="insight_id", - account_id="account_id", - event_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.get( - insight_id="", - account_id="account_id", - event_id="event_id", - ) - - -class TestAsyncInsights: - parametrize = pytest.mark.parametrize( - "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] - ) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_method_create(self, async_client: AsyncCloudflare) -> None: - insight = await async_client.cloudforce_one.threat_events.insights.create( - event_id="event_id", - account_id="account_id", - content="Here is some additional context _in markdown_", - ) - assert_matches_type(InsightCreateResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: - response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.create( - event_id="event_id", - account_id="account_id", - content="Here is some additional context _in markdown_", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - insight = await response.parse() - assert_matches_type(InsightCreateResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: - async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.create( - event_id="event_id", - account_id="account_id", - content="Here is some additional context _in markdown_", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - insight = await response.parse() - assert_matches_type(InsightCreateResponse, insight, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - 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.cloudforce_one.threat_events.insights.with_raw_response.create( - event_id="event_id", - account_id="", - content="Here is some additional context _in markdown_", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.create( - event_id="", - account_id="account_id", - content="Here is some additional context _in markdown_", - ) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - insight = await async_client.cloudforce_one.threat_events.insights.delete( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - insight = await response.parse() - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.delete( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - insight = await response.parse() - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id="", - event_id="event_id", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id="account_id", - event_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="", - account_id="account_id", - event_id="event_id", - ) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - insight = await async_client.cloudforce_one.threat_events.insights.edit( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) - assert_matches_type(InsightEditResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - insight = await response.parse() - assert_matches_type(InsightEditResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.edit( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - insight = await response.parse() - assert_matches_type(InsightEditResponse, insight, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit( - insight_id="insight_id", - account_id="", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit( - insight_id="insight_id", - account_id="account_id", - event_id="", - content="Updated: Here is some additional context _in markdown_", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit( - insight_id="", - account_id="account_id", - event_id="event_id", - content="Updated: Here is some additional context _in markdown_", - ) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - insight = await async_client.cloudforce_one.threat_events.insights.get( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) - assert_matches_type(InsightGetResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.get( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - insight = await response.parse() - assert_matches_type(InsightGetResponse, insight, path=["response"]) - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.get( - insight_id="insight_id", - account_id="account_id", - event_id="event_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - insight = await response.parse() - assert_matches_type(InsightGetResponse, insight, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="TODO: HTTP 401 from prism") - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.get( - insight_id="insight_id", - account_id="", - event_id="event_id", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.get( - insight_id="insight_id", - account_id="account_id", - event_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.get( - insight_id="", - account_id="account_id", - event_id="event_id", - ) From cf574a4c28ea55613d66da64bd55d89d1ffb8859 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:40:29 +0000 Subject: [PATCH 317/392] chore(types): rebuild Pydantic models after all types are defined --- .../types/request_tracers/trace_create_response.py | 6 ------ src/cloudflare/types/request_tracers/trace_item.py | 6 ------ 2 files changed, 12 deletions(-) diff --git a/src/cloudflare/types/request_tracers/trace_create_response.py b/src/cloudflare/types/request_tracers/trace_create_response.py index 3e72c080e9a..e0de5dc7c3f 100644 --- a/src/cloudflare/types/request_tracers/trace_create_response.py +++ b/src/cloudflare/types/request_tracers/trace_create_response.py @@ -4,7 +4,6 @@ from typing import Optional -from ..._compat import PYDANTIC_V2 from ..._models import BaseModel __all__ = ["TraceCreateResponse"] @@ -18,8 +17,3 @@ class TraceCreateResponse(BaseModel): from .trace import Trace - -if PYDANTIC_V2: - TraceCreateResponse.model_rebuild() -else: - TraceCreateResponse.update_forward_refs() # type: ignore diff --git a/src/cloudflare/types/request_tracers/trace_item.py b/src/cloudflare/types/request_tracers/trace_item.py index 2830764115e..905e57991f8 100644 --- a/src/cloudflare/types/request_tracers/trace_item.py +++ b/src/cloudflare/types/request_tracers/trace_item.py @@ -4,7 +4,6 @@ from typing import Optional -from ..._compat import PYDANTIC_V2 from ..._models import BaseModel __all__ = ["TraceItem"] @@ -42,8 +41,3 @@ class TraceItem(BaseModel): from .trace import Trace - -if PYDANTIC_V2: - TraceItem.model_rebuild() -else: - TraceItem.update_forward_refs() # type: ignore From 0e774a05b94f8e30b7538325e5ddf00c012f67df Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 16:27:38 +0000 Subject: [PATCH 318/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 29a4588e952..cc6a1ec3396 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1773 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e966b691beb6f28c5d8db69acd25d780a5491ae9dd852027b3b8ba8f07322b50.yml -openapi_spec_hash: 9de7da84cbe53e2fa9833a704dcd1491 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8255c9a5d637233c8f672b126cd4d8618730b90a8432b5ea7ba5065df0b82b24.yml +openapi_spec_hash: df2012983c9a3a72569ced61618498d3 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From d1a1c963912171773c5ca8e03803a0867839226f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 17:27:56 +0000 Subject: [PATCH 319/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cc6a1ec3396..639a9c665ec 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1773 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8255c9a5d637233c8f672b126cd4d8618730b90a8432b5ea7ba5065df0b82b24.yml -openapi_spec_hash: df2012983c9a3a72569ced61618498d3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a2a574c41ee9e5cd3b63e8e7c07423be4adc5afa47920b5d1f2c9b8044c9dfb.yml +openapi_spec_hash: 5f5879a4b60876d93bffbb6abc8d2192 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From 3e5e8b790b7fe9531cc2170a273887dae9cb0b7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 18:26:53 +0000 Subject: [PATCH 320/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 639a9c665ec..d8e2022c505 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1773 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4a2a574c41ee9e5cd3b63e8e7c07423be4adc5afa47920b5d1f2c9b8044c9dfb.yml -openapi_spec_hash: 5f5879a4b60876d93bffbb6abc8d2192 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-75f338b06c69ebec31979f3b66e3035635e65e4657a126cd5a8866fedac11c5e.yml +openapi_spec_hash: 532bf1ff1cd193bf9d35843c8ac5d5ee config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 From b9c025b2745b45eb9d4ce743dd4d4131d0b9034b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 18:52:33 +0000 Subject: [PATCH 321/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/resources/abuse_reports.py | 442 ++++-------------- .../abuse_report_create_params.py | 112 +---- tests/api_resources/test_abuse_reports.py | 402 ++++++++++++---- 4 files changed, 422 insertions(+), 538 deletions(-) diff --git a/.stats.yml b/.stats.yml index d8e2022c505..b5eb8c4a3af 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1773 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-75f338b06c69ebec31979f3b66e3035635e65e4657a126cd5a8866fedac11c5e.yml -openapi_spec_hash: 532bf1ff1cd193bf9d35843c8ac5d5ee +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1ef60e0a6e6ea360f4ec097f02a529dfc8dd8d2d5e84bd506bed4836463090ff.yml +openapi_spec_hash: 79fb2f57dc2bbdd283d4238878994551 config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 diff --git a/src/cloudflare/resources/abuse_reports.py b/src/cloudflare/resources/abuse_reports.py index 8dccd449850..98fd039cbc1 100644 --- a/src/cloudflare/resources/abuse_reports.py +++ b/src/cloudflare/resources/abuse_reports.py @@ -48,28 +48,10 @@ def with_streaming_response(self) -> AbuseReportsResourceWithStreamingResponse: @overload def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_dmca"], address1: str, agent_name: str, agree: Literal[1], @@ -103,6 +85,8 @@ def create( Args: report_type: The abuse report type. + act: The abuse report type. + address1: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -174,28 +158,10 @@ def create( @overload def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_trademark", - "abuse_dmca", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_trademark"], email: str, email2: str, host_notification: Literal["send"], @@ -225,6 +191,8 @@ def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -281,28 +249,10 @@ def create( @overload def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_general", - "abuse_dmca", - "abuse_trademark", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_general"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -332,6 +282,8 @@ def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -395,28 +347,10 @@ def create( @overload def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_phishing", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_phishing"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -444,6 +378,8 @@ def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -497,28 +433,10 @@ def create( @overload def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_children", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_children"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -547,6 +465,8 @@ def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -603,28 +523,10 @@ def create( @overload def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_threat", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_threat"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -651,6 +553,8 @@ def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -701,28 +605,10 @@ def create( @overload def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_registrar_whois", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_ncsei", - ], + act: Literal["abuse_registrar_whois"], email: str, email2: str, name: str, @@ -747,6 +633,8 @@ def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -790,28 +678,10 @@ def create( @overload def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_ncsei", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - ], + act: Literal["abuse_ncsei"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -839,6 +709,8 @@ def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -958,28 +830,17 @@ def create( ) def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_dmca"] + | Literal["abuse_trademark"] + | Literal["abuse_general"] + | Literal["abuse_phishing"] + | Literal["abuse_children"] + | Literal["abuse_threat"] + | Literal["abuse_registrar_whois"] + | Literal["abuse_ncsei"], address1: str | NotGiven = NOT_GIVEN, agent_name: str | NotGiven = NOT_GIVEN, agree: Literal[1] | NotGiven = NOT_GIVEN, @@ -1091,28 +952,10 @@ def with_streaming_response(self) -> AsyncAbuseReportsResourceWithStreamingRespo @overload async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_dmca"], address1: str, agent_name: str, agree: Literal[1], @@ -1146,6 +989,8 @@ async def create( Args: report_type: The abuse report type. + act: The abuse report type. + address1: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1217,28 +1062,10 @@ async def create( @overload async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_trademark", - "abuse_dmca", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_trademark"], email: str, email2: str, host_notification: Literal["send"], @@ -1268,6 +1095,8 @@ async def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1324,28 +1153,10 @@ async def create( @overload async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_general", - "abuse_dmca", - "abuse_trademark", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_general"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -1375,6 +1186,8 @@ async def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1438,28 +1251,10 @@ async def create( @overload async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_phishing", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_phishing"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -1487,6 +1282,8 @@ async def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1540,28 +1337,10 @@ async def create( @overload async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_children", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_children"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -1590,6 +1369,8 @@ async def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1646,28 +1427,10 @@ async def create( @overload async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_threat", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_threat"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -1694,6 +1457,8 @@ async def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1744,28 +1509,10 @@ async def create( @overload async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_registrar_whois", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_ncsei", - ], + act: Literal["abuse_registrar_whois"], email: str, email2: str, name: str, @@ -1790,6 +1537,8 @@ async def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -1833,28 +1582,10 @@ async def create( @overload async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_ncsei", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - ], + act: Literal["abuse_ncsei"], email: str, email2: str, host_notification: Literal["send", "send-anon"], @@ -1882,6 +1613,8 @@ async def create( Args: report_type: The abuse report type. + act: The abuse report type. + email: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). @@ -2001,28 +1734,17 @@ async def create( ) async def create( self, - report_type: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + report_type: str, *, account_id: str, - act: Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ], + act: Literal["abuse_dmca"] + | Literal["abuse_trademark"] + | Literal["abuse_general"] + | Literal["abuse_phishing"] + | Literal["abuse_children"] + | Literal["abuse_threat"] + | Literal["abuse_registrar_whois"] + | Literal["abuse_ncsei"], address1: str | NotGiven = NOT_GIVEN, agent_name: str | NotGiven = NOT_GIVEN, agree: Literal[1] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py b/src/cloudflare/types/abuse_reports/abuse_report_create_params.py index 080ca385cc8..d16dafcc93c 100644 --- a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py +++ b/src/cloudflare/types/abuse_reports/abuse_report_create_params.py @@ -21,18 +21,8 @@ class AbuseReportsDmcaReport(TypedDict, total=False): account_id: Required[str] - act: Required[ - Literal[ - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] + act: Required[Literal["abuse_dmca"]] + """The abuse report type.""" address1: Required[str] """Text not exceeding 100 characters. @@ -153,18 +143,8 @@ class AbuseReportsDmcaReport(TypedDict, total=False): class AbuseReportsTrademarkReport(TypedDict, total=False): account_id: Required[str] - act: Required[ - Literal[ - "abuse_trademark", - "abuse_dmca", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] + act: Required[Literal["abuse_trademark"]] + """The abuse report type.""" email: Required[str] """A valid email of the abuse reporter. @@ -249,18 +229,8 @@ class AbuseReportsTrademarkReport(TypedDict, total=False): class AbuseReportsGeneralReport(TypedDict, total=False): account_id: Required[str] - act: Required[ - Literal[ - "abuse_general", - "abuse_dmca", - "abuse_trademark", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] + act: Required[Literal["abuse_general"]] + """The abuse report type.""" email: Required[str] """A valid email of the abuse reporter. @@ -358,18 +328,8 @@ class AbuseReportsGeneralReport(TypedDict, total=False): class AbuseReportsPhishingReport(TypedDict, total=False): account_id: Required[str] - act: Required[ - Literal[ - "abuse_phishing", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] + act: Required[Literal["abuse_phishing"]] + """The abuse report type.""" email: Required[str] """A valid email of the abuse reporter. @@ -452,18 +412,8 @@ class AbuseReportsPhishingReport(TypedDict, total=False): class AbuseReportsCsamReport(TypedDict, total=False): account_id: Required[str] - act: Required[ - Literal[ - "abuse_children", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_threat", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] + act: Required[Literal["abuse_children"]] + """The abuse report type.""" email: Required[str] """A valid email of the abuse reporter. @@ -552,18 +502,8 @@ class AbuseReportsCsamReport(TypedDict, total=False): class AbuseReportsThreatReport(TypedDict, total=False): account_id: Required[str] - act: Required[ - Literal[ - "abuse_threat", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_registrar_whois", - "abuse_ncsei", - ] - ] + act: Required[Literal["abuse_threat"]] + """The abuse report type.""" email: Required[str] """A valid email of the abuse reporter. @@ -639,18 +579,8 @@ class AbuseReportsThreatReport(TypedDict, total=False): class AbuseReportsRegistrarWhoisReport(TypedDict, total=False): account_id: Required[str] - act: Required[ - Literal[ - "abuse_registrar_whois", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_ncsei", - ] - ] + act: Required[Literal["abuse_registrar_whois"]] + """The abuse report type.""" email: Required[str] """A valid email of the abuse reporter. @@ -713,18 +643,8 @@ class AbuseReportsRegistrarWhoisReport(TypedDict, total=False): class AbuseReportsNcseiReport(TypedDict, total=False): account_id: Required[str] - act: Required[ - Literal[ - "abuse_ncsei", - "abuse_dmca", - "abuse_trademark", - "abuse_general", - "abuse_phishing", - "abuse_children", - "abuse_threat", - "abuse_registrar_whois", - ] - ] + act: Required[Literal["abuse_ncsei"]] + """The abuse report type.""" email: Required[str] """A valid email of the abuse reporter. diff --git a/tests/api_resources/test_abuse_reports.py b/tests/api_resources/test_abuse_reports.py index b6fda22efb8..8efb4e4713c 100644 --- a/tests/api_resources/test_abuse_reports.py +++ b/tests/api_resources/test_abuse_reports.py @@ -20,7 +20,7 @@ class TestAbuseReports: @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_dmca", address1="x", @@ -44,7 +44,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_dmca", address1="x", @@ -74,7 +74,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_dmca", address1="x", @@ -102,7 +102,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_dmca", address1="x", @@ -133,7 +133,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: def test_path_params_create_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_dmca", address1="x", @@ -152,11 +152,32 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", + email="email", + email2="email2", + host_notification="send", + name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_trademark", email="email", @@ -176,7 +197,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_trademark", email="email", @@ -202,7 +223,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_trademark", email="email", @@ -226,7 +247,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_trademark", email="email", @@ -253,7 +274,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_trademark", email="email", @@ -268,11 +289,28 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_trademark", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_general", email="email", @@ -289,7 +327,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_general", email="email", @@ -315,7 +353,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_general", email="email", @@ -336,7 +374,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_general", email="email", @@ -360,7 +398,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: def test_path_params_create_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_general", email="email", @@ -372,11 +410,25 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_general", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_phishing", email="email", @@ -393,7 +445,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_phishing", email="email", @@ -417,7 +469,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_phishing", email="email", @@ -438,7 +490,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_phishing", email="email", @@ -462,7 +514,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: def test_path_params_create_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_phishing", email="email", @@ -474,11 +526,25 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_phishing", + email="email", + email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", + name="x", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_children", email="email", @@ -496,7 +562,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_children", email="email", @@ -521,7 +587,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_children", email="email", @@ -543,7 +609,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_children", email="email", @@ -568,7 +634,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: def test_path_params_create_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_children", email="email", @@ -581,11 +647,26 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_children", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + ncmec_notification="send", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_threat", email="email", @@ -602,7 +683,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_threat", email="email", @@ -625,7 +706,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_threat", email="email", @@ -646,7 +727,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_threat", email="email", @@ -670,7 +751,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: def test_path_params_create_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_threat", email="email", @@ -682,11 +763,25 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_threat", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_registrar_whois", email="email", @@ -701,7 +796,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_registrar_whois", email="email", @@ -722,7 +817,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_registrar_whois", email="email", @@ -741,7 +836,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_registrar_whois", email="email", @@ -763,7 +858,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: def test_path_params_create_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_registrar_whois", email="email", @@ -773,11 +868,23 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_registrar_whois", + email="email", + email2="email2", + name="x", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_ncsei", email="email", @@ -794,7 +901,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_ncsei", email="email", @@ -818,7 +925,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_ncsei", email="email", @@ -839,7 +946,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_ncsei", email="email", @@ -863,7 +970,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: def test_path_params_create_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_ncsei", email="email", @@ -875,6 +982,20 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_ncsei", + email="email", + email2="email2", + host_notification="send", + name="x", + ncsei_subject_representation=True, + owner_notification="send", + urls="urls", + ) + class TestAsyncAbuseReports: parametrize = pytest.mark.parametrize( @@ -885,7 +1006,7 @@ class TestAsyncAbuseReports: @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_dmca", address1="x", @@ -909,7 +1030,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_dmca", address1="x", @@ -939,7 +1060,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_dmca", address1="x", @@ -967,7 +1088,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_dmca", address1="x", @@ -998,7 +1119,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_dmca", address1="x", @@ -1017,11 +1138,32 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + await async_client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=1, + city="x", + country="x", + email="email", + email2="email2", + host_notification="send", + name="x", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_trademark", email="email", @@ -1041,7 +1183,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_trademark", email="email", @@ -1067,7 +1209,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_trademark", email="email", @@ -1091,7 +1233,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_trademark", email="email", @@ -1118,7 +1260,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_trademark", email="email", @@ -1133,11 +1275,28 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + await async_client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_trademark", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_general", email="email", @@ -1154,7 +1313,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_general", email="email", @@ -1180,7 +1339,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_general", email="email", @@ -1201,7 +1360,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_general", email="email", @@ -1225,7 +1384,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_general", email="email", @@ -1237,11 +1396,25 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + await async_client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_general", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_phishing", email="email", @@ -1258,7 +1431,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_phishing", email="email", @@ -1282,7 +1455,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_phishing", email="email", @@ -1303,7 +1476,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_phishing", email="email", @@ -1327,7 +1500,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_phishing", email="email", @@ -1339,11 +1512,25 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + await async_client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_phishing", + email="email", + email2="email2", + host_notification="send", + justification="xxxxxxxxxxxxxxxxxxxx", + name="x", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_children", email="email", @@ -1361,7 +1548,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_children", email="email", @@ -1386,7 +1573,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_children", email="email", @@ -1408,7 +1595,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_children", email="email", @@ -1433,7 +1620,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_children", email="email", @@ -1446,11 +1633,26 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + await async_client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_children", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + ncmec_notification="send", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_threat", email="email", @@ -1467,7 +1669,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_threat", email="email", @@ -1490,7 +1692,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_threat", email="email", @@ -1511,7 +1713,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_threat", email="email", @@ -1535,7 +1737,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_threat", email="email", @@ -1547,11 +1749,25 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + await async_client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_threat", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_registrar_whois", email="email", @@ -1566,7 +1782,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_registrar_whois", email="email", @@ -1587,7 +1803,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_registrar_whois", email="email", @@ -1606,7 +1822,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_registrar_whois", email="email", @@ -1628,7 +1844,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_registrar_whois", email="email", @@ -1638,11 +1854,23 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare urls="urls", ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + await async_client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_registrar_whois", + email="email", + email2="email2", + name="x", + owner_notification="send", + urls="urls", + ) + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_ncsei", email="email", @@ -1659,7 +1887,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: abuse_report = await async_client.abuse_reports.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_ncsei", email="email", @@ -1683,7 +1911,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_ncsei", email="email", @@ -1704,7 +1932,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.abuse_reports.with_streaming_response.create( - report_type="abuse_general", + report_type="report_type", account_id="023e105f4ecef8ad9ca31a8372d0c353", act="abuse_ncsei", email="email", @@ -1728,7 +1956,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.abuse_reports.with_raw_response.create( - report_type="abuse_general", + report_type="report_type", account_id="", act="abuse_ncsei", email="email", @@ -1739,3 +1967,17 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare owner_notification="send", urls="urls", ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `report_type` but received ''"): + await async_client.abuse_reports.with_raw_response.create( + report_type="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + act="abuse_ncsei", + email="email", + email2="email2", + host_notification="send", + name="x", + ncsei_subject_representation=True, + owner_notification="send", + urls="urls", + ) From 8c44db926c36c9734fcf7f07a7b82fc609f29297 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 19:15:53 +0000 Subject: [PATCH 322/392] fix(types): add missing types --- src/cloudflare/types/radar/as112_timeseries_response.py | 9 ++++++++- .../types/radar/attacks/layer3_timeseries_response.py | 9 ++++++++- src/cloudflare/types/radar/bot_timeseries_response.py | 9 ++++++++- src/cloudflare/types/radar/dns_timeseries_response.py | 9 ++++++++- src/cloudflare/types/radar/http_timeseries_response.py | 9 ++++++++- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/cloudflare/types/radar/as112_timeseries_response.py b/src/cloudflare/types/radar/as112_timeseries_response.py index b9a7db6fe95..c2f4cdb133d 100644 --- a/src/cloudflare/types/radar/as112_timeseries_response.py +++ b/src/cloudflare/types/radar/as112_timeseries_response.py @@ -15,6 +15,7 @@ "MetaConfidenceInfoAnnotation", "MetaDateRange", "MetaUnit", + "AS112TimeseriesResponseItem", ] @@ -93,6 +94,12 @@ class Meta(BaseModel): """Measurement units for the results.""" +class AS112TimeseriesResponseItem(BaseModel): + timestamps: List[datetime] + + values: List[str] + + class AS112TimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" @@ -101,4 +108,4 @@ class AS112TimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... + def __getattr__(self, attr: str) -> AS112TimeseriesResponseItem: ... diff --git a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py index f8ef59bba7f..044f3fd0c2d 100644 --- a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py +++ b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py @@ -15,6 +15,7 @@ "MetaConfidenceInfoAnnotation", "MetaDateRange", "MetaUnit", + "Layer3TimeseriesResponseItem", ] @@ -93,6 +94,12 @@ class Meta(BaseModel): """Measurement units for the results.""" +class Layer3TimeseriesResponseItem(BaseModel): + timestamps: List[datetime] + + values: List[str] + + class Layer3TimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" @@ -101,4 +108,4 @@ class Layer3TimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... + def __getattr__(self, attr: str) -> Layer3TimeseriesResponseItem: ... diff --git a/src/cloudflare/types/radar/bot_timeseries_response.py b/src/cloudflare/types/radar/bot_timeseries_response.py index 6bafbb670b0..650c6eb786f 100644 --- a/src/cloudflare/types/radar/bot_timeseries_response.py +++ b/src/cloudflare/types/radar/bot_timeseries_response.py @@ -15,6 +15,7 @@ "MetaConfidenceInfoAnnotation", "MetaDateRange", "MetaUnit", + "BotTimeseriesResponseItem", ] @@ -93,6 +94,12 @@ class Meta(BaseModel): """Measurement units for the results.""" +class BotTimeseriesResponseItem(BaseModel): + timestamps: List[datetime] + + values: List[str] + + class BotTimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" @@ -101,4 +108,4 @@ class BotTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... + def __getattr__(self, attr: str) -> BotTimeseriesResponseItem: ... diff --git a/src/cloudflare/types/radar/dns_timeseries_response.py b/src/cloudflare/types/radar/dns_timeseries_response.py index e813f59861c..16f66a9f38a 100644 --- a/src/cloudflare/types/radar/dns_timeseries_response.py +++ b/src/cloudflare/types/radar/dns_timeseries_response.py @@ -15,6 +15,7 @@ "MetaConfidenceInfoAnnotation", "MetaDateRange", "MetaUnit", + "DNSTimeseriesResponseItem", ] @@ -93,6 +94,12 @@ class Meta(BaseModel): """Measurement units for the results.""" +class DNSTimeseriesResponseItem(BaseModel): + timestamps: List[datetime] + + values: List[str] + + class DNSTimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" @@ -101,4 +108,4 @@ class DNSTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... + def __getattr__(self, attr: str) -> DNSTimeseriesResponseItem: ... diff --git a/src/cloudflare/types/radar/http_timeseries_response.py b/src/cloudflare/types/radar/http_timeseries_response.py index 40aa6d1f683..ed239c69013 100644 --- a/src/cloudflare/types/radar/http_timeseries_response.py +++ b/src/cloudflare/types/radar/http_timeseries_response.py @@ -15,6 +15,7 @@ "MetaConfidenceInfoAnnotation", "MetaDateRange", "MetaUnit", + "HTTPTimeseriesResponseItem", ] @@ -93,6 +94,12 @@ class Meta(BaseModel): """Measurement units for the results.""" +class HTTPTimeseriesResponseItem(BaseModel): + timestamps: List[datetime] + + values: List[str] + + class HTTPTimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" @@ -101,4 +108,4 @@ class HTTPTimeseriesResponse(BaseModel): # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... + def __getattr__(self, attr: str) -> HTTPTimeseriesResponseItem: ... From ad06dcd9de8fa91a2876359c865fd3441c7efee5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 20:09:41 +0000 Subject: [PATCH 323/392] feat(api): api update --- .stats.yml | 4 +- api.md | 11 +- .../resources/workers/scripts/deployments.py | 218 ++++++++++++++- .../types/workers/scripts/__init__.py | 2 + .../scripts/deployment_delete_response.py | 45 +++ .../scripts/deployment_get_response.py | 16 +- .../scripts/deployment_list_response.py | 42 +++ .../workers/scripts/test_deployments.py | 263 +++++++++++++++++- 8 files changed, 574 insertions(+), 27 deletions(-) create mode 100644 src/cloudflare/types/workers/scripts/deployment_delete_response.py create mode 100644 src/cloudflare/types/workers/scripts/deployment_list_response.py diff --git a/.stats.yml b/.stats.yml index b5eb8c4a3af..307bc79987b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1773 +configured_endpoints: 1775 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1ef60e0a6e6ea360f4ec097f02a529dfc8dd8d2d5e84bd506bed4836463090ff.yml openapi_spec_hash: 79fb2f57dc2bbdd283d4238878994551 -config_hash: bafeb7666d2b7868c9d4ab8f0cc686e1 +config_hash: 4a37da9893560914a7ac1a75cc01202a diff --git a/api.md b/api.md index f5f3d54bc27..368bd94b658 100644 --- a/api.md +++ b/api.md @@ -2389,13 +2389,20 @@ Methods: Types: ```python -from cloudflare.types.workers.scripts import DeploymentCreateResponse, DeploymentGetResponse +from cloudflare.types.workers.scripts import ( + DeploymentCreateResponse, + DeploymentListResponse, + DeploymentDeleteResponse, + DeploymentGetResponse, +) ``` Methods: - client.workers.scripts.deployments.create(script_name, \*, account_id, \*\*params) -> DeploymentCreateResponse -- client.workers.scripts.deployments.get(script_name, \*, account_id) -> DeploymentGetResponse +- client.workers.scripts.deployments.list(script_name, \*, account_id) -> DeploymentListResponse +- client.workers.scripts.deployments.delete(deployment_id, \*, account_id, script_name) -> DeploymentDeleteResponse +- client.workers.scripts.deployments.get(deployment_id, \*, account_id, script_name) -> DeploymentGetResponse ### Versions diff --git a/src/cloudflare/resources/workers/scripts/deployments.py b/src/cloudflare/resources/workers/scripts/deployments.py index 0f2550f6203..e4eeb69456a 100644 --- a/src/cloudflare/resources/workers/scripts/deployments.py +++ b/src/cloudflare/resources/workers/scripts/deployments.py @@ -21,7 +21,9 @@ from ...._base_client import make_request_options from ....types.workers.scripts import deployment_create_params from ....types.workers.scripts.deployment_get_response import DeploymentGetResponse +from ....types.workers.scripts.deployment_list_response import DeploymentListResponse from ....types.workers.scripts.deployment_create_response import DeploymentCreateResponse +from ....types.workers.scripts.deployment_delete_response import DeploymentDeleteResponse __all__ = ["DeploymentsResource", "AsyncDeploymentsResource"] @@ -109,7 +111,7 @@ def create( cast_to=cast(Type[DeploymentCreateResponse], ResultWrapper[DeploymentCreateResponse]), ) - def get( + def list( self, script_name: str, *, @@ -120,7 +122,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentGetResponse: + ) -> DeploymentListResponse: """List of Worker Deployments. The first deployment in the list is the latest @@ -145,6 +147,98 @@ def get( raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") return self._get( f"/accounts/{account_id}/workers/scripts/{script_name}/deployments", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[DeploymentListResponse]._unwrapper, + ), + cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]), + ) + + def delete( + self, + deployment_id: str, + *, + account_id: str, + script_name: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> DeploymentDeleteResponse: + """Delete a Worker Deployment. + + The latest deployment, which is actively serving + traffic, cannot be deleted. All other deployments can be deleted. + + Args: + account_id: Identifier. + + script_name: Name of the script, used in URLs and route configuration. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not script_name: + raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + if not deployment_id: + raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}") + return self._delete( + f"/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=DeploymentDeleteResponse, + ) + + def get( + self, + deployment_id: str, + *, + account_id: str, + script_name: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> DeploymentGetResponse: + """ + Get information about a Worker Deployment. + + Args: + account_id: Identifier. + + script_name: Name of the script, used in URLs and route configuration. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not script_name: + raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + if not deployment_id: + raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}") + return self._get( + f"/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -239,7 +333,7 @@ async def create( cast_to=cast(Type[DeploymentCreateResponse], ResultWrapper[DeploymentCreateResponse]), ) - async def get( + async def list( self, script_name: str, *, @@ -250,7 +344,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentGetResponse: + ) -> DeploymentListResponse: """List of Worker Deployments. The first deployment in the list is the latest @@ -275,6 +369,98 @@ async def get( raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") return await self._get( f"/accounts/{account_id}/workers/scripts/{script_name}/deployments", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[DeploymentListResponse]._unwrapper, + ), + cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]), + ) + + async def delete( + self, + deployment_id: str, + *, + account_id: str, + script_name: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> DeploymentDeleteResponse: + """Delete a Worker Deployment. + + The latest deployment, which is actively serving + traffic, cannot be deleted. All other deployments can be deleted. + + Args: + account_id: Identifier. + + script_name: Name of the script, used in URLs and route configuration. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not script_name: + raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + if not deployment_id: + raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}") + return await self._delete( + f"/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=DeploymentDeleteResponse, + ) + + async def get( + self, + deployment_id: str, + *, + account_id: str, + script_name: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> DeploymentGetResponse: + """ + Get information about a Worker Deployment. + + Args: + account_id: Identifier. + + script_name: Name of the script, used in URLs and route configuration. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not script_name: + raise ValueError(f"Expected a non-empty value for `script_name` but received {script_name!r}") + if not deployment_id: + raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}") + return await self._get( + f"/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -293,6 +479,12 @@ def __init__(self, deployments: DeploymentsResource) -> None: self.create = to_raw_response_wrapper( deployments.create, ) + self.list = to_raw_response_wrapper( + deployments.list, + ) + self.delete = to_raw_response_wrapper( + deployments.delete, + ) self.get = to_raw_response_wrapper( deployments.get, ) @@ -305,6 +497,12 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None: self.create = async_to_raw_response_wrapper( deployments.create, ) + self.list = async_to_raw_response_wrapper( + deployments.list, + ) + self.delete = async_to_raw_response_wrapper( + deployments.delete, + ) self.get = async_to_raw_response_wrapper( deployments.get, ) @@ -317,6 +515,12 @@ def __init__(self, deployments: DeploymentsResource) -> None: self.create = to_streamed_response_wrapper( deployments.create, ) + self.list = to_streamed_response_wrapper( + deployments.list, + ) + self.delete = to_streamed_response_wrapper( + deployments.delete, + ) self.get = to_streamed_response_wrapper( deployments.get, ) @@ -329,6 +533,12 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None: self.create = async_to_streamed_response_wrapper( deployments.create, ) + self.list = async_to_streamed_response_wrapper( + deployments.list, + ) + self.delete = async_to_streamed_response_wrapper( + deployments.delete, + ) self.get = async_to_streamed_response_wrapper( deployments.get, ) diff --git a/src/cloudflare/types/workers/scripts/__init__.py b/src/cloudflare/types/workers/scripts/__init__.py index 9b667960aa6..d12d7edd39e 100644 --- a/src/cloudflare/types/workers/scripts/__init__.py +++ b/src/cloudflare/types/workers/scripts/__init__.py @@ -25,10 +25,12 @@ from .subdomain_create_params import SubdomainCreateParams as SubdomainCreateParams from .version_create_response import VersionCreateResponse as VersionCreateResponse from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams +from .deployment_list_response import DeploymentListResponse as DeploymentListResponse from .schedule_update_response import ScheduleUpdateResponse as ScheduleUpdateResponse from .subdomain_create_response import SubdomainCreateResponse as SubdomainCreateResponse from .subdomain_delete_response import SubdomainDeleteResponse as SubdomainDeleteResponse from .deployment_create_response import DeploymentCreateResponse as DeploymentCreateResponse +from .deployment_delete_response import DeploymentDeleteResponse as DeploymentDeleteResponse from .script_and_version_setting_edit_params import ( ScriptAndVersionSettingEditParams as ScriptAndVersionSettingEditParams, ) diff --git a/src/cloudflare/types/workers/scripts/deployment_delete_response.py b/src/cloudflare/types/workers/scripts/deployment_delete_response.py new file mode 100644 index 00000000000..f1eec442f82 --- /dev/null +++ b/src/cloudflare/types/workers/scripts/deployment_delete_response.py @@ -0,0 +1,45 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from ...._models import BaseModel + +__all__ = ["DeploymentDeleteResponse", "Error", "ErrorSource", "Message", "MessageSource"] + + +class ErrorSource(BaseModel): + pointer: Optional[str] = None + + +class Error(BaseModel): + code: int + + message: str + + documentation_url: Optional[str] = None + + source: Optional[ErrorSource] = None + + +class MessageSource(BaseModel): + pointer: Optional[str] = None + + +class Message(BaseModel): + code: int + + message: str + + documentation_url: Optional[str] = None + + source: Optional[MessageSource] = None + + +class DeploymentDeleteResponse(BaseModel): + errors: List[Error] + + messages: List[Message] + + success: Literal[True] + """Whether the API call was successful.""" diff --git a/src/cloudflare/types/workers/scripts/deployment_get_response.py b/src/cloudflare/types/workers/scripts/deployment_get_response.py index 6d3c01bd99f..0c579fad20d 100644 --- a/src/cloudflare/types/workers/scripts/deployment_get_response.py +++ b/src/cloudflare/types/workers/scripts/deployment_get_response.py @@ -8,21 +8,21 @@ from ...._models import BaseModel -__all__ = ["DeploymentGetResponse", "Deployment", "DeploymentVersion", "DeploymentAnnotations"] +__all__ = ["DeploymentGetResponse", "Version", "Annotations"] -class DeploymentVersion(BaseModel): +class Version(BaseModel): percentage: float version_id: str -class DeploymentAnnotations(BaseModel): +class Annotations(BaseModel): workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None) """Human-readable message about the deployment. Truncated to 100 bytes.""" -class Deployment(BaseModel): +class DeploymentGetResponse(BaseModel): id: str created_on: datetime @@ -31,12 +31,8 @@ class Deployment(BaseModel): strategy: Literal["percentage"] - versions: List[DeploymentVersion] + versions: List[Version] - annotations: Optional[DeploymentAnnotations] = None + annotations: Optional[Annotations] = None author_email: Optional[str] = None - - -class DeploymentGetResponse(BaseModel): - deployments: List[Deployment] diff --git a/src/cloudflare/types/workers/scripts/deployment_list_response.py b/src/cloudflare/types/workers/scripts/deployment_list_response.py new file mode 100644 index 00000000000..6637c9f4235 --- /dev/null +++ b/src/cloudflare/types/workers/scripts/deployment_list_response.py @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel + +__all__ = ["DeploymentListResponse", "Deployment", "DeploymentVersion", "DeploymentAnnotations"] + + +class DeploymentVersion(BaseModel): + percentage: float + + version_id: str + + +class DeploymentAnnotations(BaseModel): + workers_message: Optional[str] = FieldInfo(alias="workers/message", default=None) + """Human-readable message about the deployment. Truncated to 100 bytes.""" + + +class Deployment(BaseModel): + id: str + + created_on: datetime + + source: str + + strategy: Literal["percentage"] + + versions: List[DeploymentVersion] + + annotations: Optional[DeploymentAnnotations] = None + + author_email: Optional[str] = None + + +class DeploymentListResponse(BaseModel): + deployments: List[Deployment] diff --git a/tests/api_resources/workers/scripts/test_deployments.py b/tests/api_resources/workers/scripts/test_deployments.py index b49090e136e..eabd533c8e1 100644 --- a/tests/api_resources/workers/scripts/test_deployments.py +++ b/tests/api_resources/workers/scripts/test_deployments.py @@ -9,7 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers.scripts import DeploymentGetResponse, DeploymentCreateResponse +from cloudflare.types.workers.scripts import ( + DeploymentGetResponse, + DeploymentListResponse, + DeploymentCreateResponse, + DeploymentDeleteResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -117,19 +122,129 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], ) + @parametrize + def test_method_list(self, client: Cloudflare) -> None: + deployment = client.workers.scripts.deployments.list( + script_name="this-is_my_script-01", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Cloudflare) -> None: + response = client.workers.scripts.deployments.with_raw_response.list( + script_name="this-is_my_script-01", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment = response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Cloudflare) -> None: + with client.workers.scripts.deployments.with_streaming_response.list( + script_name="this-is_my_script-01", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment = response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_list(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.workers.scripts.deployments.with_raw_response.list( + script_name="this-is_my_script-01", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): + client.workers.scripts.deployments.with_raw_response.list( + script_name="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + deployment = client.workers.scripts.deployments.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", + ) + assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.workers.scripts.deployments.with_raw_response.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment = response.parse() + assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.workers.scripts.deployments.with_streaming_response.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment = response.parse() + assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.workers.scripts.deployments.with_raw_response.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + script_name="this-is_my_script-01", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): + client.workers.scripts.deployments.with_raw_response.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): + client.workers.scripts.deployments.with_raw_response.delete( + deployment_id="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", + ) + @parametrize def test_method_get(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.get( - script_name="this-is_my_script-01", + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", ) assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.deployments.with_raw_response.get( - script_name="this-is_my_script-01", + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", ) assert response.is_closed is True @@ -140,8 +255,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.deployments.with_streaming_response.get( - script_name="this-is_my_script-01", + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,14 +271,23 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.deployments.with_raw_response.get( - script_name="this-is_my_script-01", + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", + script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.deployments.with_raw_response.get( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): + client.workers.scripts.deployments.with_raw_response.get( + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", ) @@ -271,19 +396,129 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], ) + @parametrize + async def test_method_list(self, async_client: AsyncCloudflare) -> None: + deployment = await async_client.workers.scripts.deployments.list( + script_name="this-is_my_script-01", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: + response = await async_client.workers.scripts.deployments.with_raw_response.list( + script_name="this-is_my_script-01", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment = await response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: + async with async_client.workers.scripts.deployments.with_streaming_response.list( + script_name="this-is_my_script-01", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment = await response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.workers.scripts.deployments.with_raw_response.list( + script_name="this-is_my_script-01", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): + await async_client.workers.scripts.deployments.with_raw_response.list( + script_name="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + deployment = await async_client.workers.scripts.deployments.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", + ) + assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.workers.scripts.deployments.with_raw_response.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment = await response.parse() + assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.workers.scripts.deployments.with_streaming_response.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment = await response.parse() + assert_matches_type(DeploymentDeleteResponse, deployment, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.workers.scripts.deployments.with_raw_response.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="", + script_name="this-is_my_script-01", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): + await async_client.workers.scripts.deployments.with_raw_response.delete( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): + await async_client.workers.scripts.deployments.with_raw_response.delete( + deployment_id="", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", + ) + @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.get( - script_name="this-is_my_script-01", + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", ) assert_matches_type(DeploymentGetResponse, deployment, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.deployments.with_raw_response.get( - script_name="this-is_my_script-01", + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", ) assert response.is_closed is True @@ -294,8 +529,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.deployments.with_streaming_response.get( - script_name="this-is_my_script-01", + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -309,12 +545,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.deployments.with_raw_response.get( - script_name="this-is_my_script-01", + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", + script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.deployments.with_raw_response.get( + deployment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): + await async_client.workers.scripts.deployments.with_raw_response.get( + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", + script_name="this-is_my_script-01", ) From d246a3286e48d71140306b111f96442d704c9b3d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 20:20:47 +0000 Subject: [PATCH 324/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 307bc79987b..233e36de72f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1ef60e0a6e6ea360f4ec097f02a529dfc8dd8d2d5e84bd506bed4836463090ff.yml -openapi_spec_hash: 79fb2f57dc2bbdd283d4238878994551 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0d261d2afe3855ce9280b3637dcb74230f2983d8fede1904eea4fa09ef21815c.yml +openapi_spec_hash: 4b5c51bfdd7250d2428bfd147aa71fcb config_hash: 4a37da9893560914a7ac1a75cc01202a From 32bd656fd2b5a484fc6a345dc0808de3ad9ef392 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 21:02:33 +0000 Subject: [PATCH 325/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 233e36de72f..fadadd3c81f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0d261d2afe3855ce9280b3637dcb74230f2983d8fede1904eea4fa09ef21815c.yml -openapi_spec_hash: 4b5c51bfdd7250d2428bfd147aa71fcb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-06d2f63d5264a92aeb69617a5fe4c285a100154b1f1d21d142571ce72272d5d0.yml +openapi_spec_hash: cef43ab586521b87b45148240a4afd08 config_hash: 4a37da9893560914a7ac1a75cc01202a From 1bea8ae838936eab4da1b81092e6a184d4cbee38 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 21:25:16 +0000 Subject: [PATCH 326/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/types/shared/token_policy.py | 4 +- .../types/shared_params/token_policy.py | 4 +- tests/api_resources/accounts/test_tokens.py | 110 ++++++++++++++---- tests/api_resources/user/test_tokens.py | 90 +++++++++++--- 5 files changed, 166 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index fadadd3c81f..971a4f5203c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-06d2f63d5264a92aeb69617a5fe4c285a100154b1f1d21d142571ce72272d5d0.yml -openapi_spec_hash: cef43ab586521b87b45148240a4afd08 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b7236570f7fb137229c57fa7922558babb89b8237d6d6d379600875e6a30a1f0.yml +openapi_spec_hash: 9c7de431e765ad603b3428f08f797b9e config_hash: 4a37da9893560914a7ac1a75cc01202a diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index 6674df67455..9d48b7d912c 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Optional from typing_extensions import Literal from ..._models import BaseModel @@ -35,5 +35,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Dict[str, Union[str, Dict[str, str]]] + resources: Dict[str, object] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index d1f663c2d40..db6ce09a0ea 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Union, Iterable +from typing import Dict, Iterable from typing_extensions import Literal, Required, TypedDict __all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] @@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Dict[str, Union[str, Dict[str, str]]]] + resources: Required[Dict[str, object]] """A list of resource names that the policy applies to.""" diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index a936ded5e33..4b20aebd037 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -37,7 +37,10 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -68,7 +71,10 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], condition={ @@ -95,7 +101,10 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -118,7 +127,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) as response: @@ -144,7 +156,10 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -163,7 +178,10 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -195,7 +213,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], condition={ @@ -224,7 +245,10 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -248,7 +272,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) as response: @@ -275,7 +302,10 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -292,7 +322,10 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -515,7 +548,10 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -546,7 +582,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], condition={ @@ -573,7 +612,10 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -596,7 +638,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) as response: @@ -622,7 +667,10 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -641,7 +689,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -673,7 +724,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], condition={ @@ -702,7 +756,10 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -726,7 +783,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) as response: @@ -753,7 +813,10 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -770,7 +833,10 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index bcba28f9023..eee3a083f15 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -36,7 +36,10 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -66,7 +69,10 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], condition={ @@ -92,7 +98,10 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -114,7 +123,10 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) as response: @@ -139,7 +151,10 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -170,7 +185,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], condition={ @@ -198,7 +216,10 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -221,7 +242,10 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) as response: @@ -247,7 +271,10 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -420,7 +447,10 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -450,7 +480,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], condition={ @@ -476,7 +509,10 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -498,7 +534,10 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) as response: @@ -523,7 +562,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -554,7 +596,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], condition={ @@ -582,7 +627,10 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) @@ -605,7 +653,10 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) as response: @@ -631,7 +682,10 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": {"foo": "string"}, + "resources": { + "object": "bar", + "string": "bar", + }, } ], ) From 71b7e7f5ba460b768037980dffe23357b66a1994 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 22:17:02 +0000 Subject: [PATCH 327/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 971a4f5203c..8026c4aecfe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b7236570f7fb137229c57fa7922558babb89b8237d6d6d379600875e6a30a1f0.yml -openapi_spec_hash: 9c7de431e765ad603b3428f08f797b9e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0e4192cef7b489c4d61e055667ff40a9ac086247f84e07f2db68247ec8e61d4b.yml +openapi_spec_hash: 92890d32e06728dad81a9613c60e7264 config_hash: 4a37da9893560914a7ac1a75cc01202a From 80a1de570462f7257e3b44ceced33901e6318b19 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 22:33:28 +0000 Subject: [PATCH 328/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8026c4aecfe..5e51a89006f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0e4192cef7b489c4d61e055667ff40a9ac086247f84e07f2db68247ec8e61d4b.yml -openapi_spec_hash: 92890d32e06728dad81a9613c60e7264 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-78d57beeb3345afbf4080e1966d72f6350a8d8a965bde9b81ae43101f971fdc3.yml +openapi_spec_hash: 6887e410fed128ffec6a86d38669beb8 config_hash: 4a37da9893560914a7ac1a75cc01202a From b6e260e2709d791d41cf600c8019675e7b07aff3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 22:53:59 +0000 Subject: [PATCH 329/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5e51a89006f..5cad8418a54 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-78d57beeb3345afbf4080e1966d72f6350a8d8a965bde9b81ae43101f971fdc3.yml -openapi_spec_hash: 6887e410fed128ffec6a86d38669beb8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4509efd70f60632a97fb735ccd436c3afbc8fe77c7b871d06fe00b27f2d7bd2f.yml +openapi_spec_hash: c614f5b658079d60ee69cb61106f51e8 config_hash: 4a37da9893560914a7ac1a75cc01202a From 6cf8fb31a766821a0615211ec5674338c2505ce2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 23:26:34 +0000 Subject: [PATCH 330/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5cad8418a54..8fde3dfe801 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4509efd70f60632a97fb735ccd436c3afbc8fe77c7b871d06fe00b27f2d7bd2f.yml -openapi_spec_hash: c614f5b658079d60ee69cb61106f51e8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3642238a0fcdc091efbca5515455c92c73e4d66478c4dca432a6109fa97e130f.yml +openapi_spec_hash: 24a2895c05baa9100b3cda54d3ab9e19 config_hash: 4a37da9893560914a7ac1a75cc01202a From 0084a4d643e56ef69978eb3868b73beb4e9c24e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 01:20:26 +0000 Subject: [PATCH 331/392] feat(api): api update --- .stats.yml | 4 +- src/cloudflare/types/shared/token_policy.py | 4 +- .../types/shared_params/token_policy.py | 4 +- tests/api_resources/accounts/test_tokens.py | 110 ++++-------------- tests/api_resources/user/test_tokens.py | 90 +++----------- 5 files changed, 46 insertions(+), 166 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8fde3dfe801..5d81a1bdc46 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3642238a0fcdc091efbca5515455c92c73e4d66478c4dca432a6109fa97e130f.yml -openapi_spec_hash: 24a2895c05baa9100b3cda54d3ab9e19 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cb6b87f45c66e5a30eb913c34f701a5609b2761a5cc0c6ae3a9dd56632ab4cc.yml +openapi_spec_hash: 805bdec318dc4e872b6bed9e2789a4f0 config_hash: 4a37da9893560914a7ac1a75cc01202a diff --git a/src/cloudflare/types/shared/token_policy.py b/src/cloudflare/types/shared/token_policy.py index 9d48b7d912c..c20e4daffd2 100644 --- a/src/cloudflare/types/shared/token_policy.py +++ b/src/cloudflare/types/shared/token_policy.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List, Union, Optional from typing_extensions import Literal from ..._models import BaseModel @@ -35,5 +35,5 @@ class TokenPolicy(BaseModel): permission_groups: List[PermissionGroup] """A set of permission groups that are specified to the policy.""" - resources: Dict[str, object] + resources: Union[Dict[str, str], Dict[str, Dict[str, str]]] """A list of resource names that the policy applies to.""" diff --git a/src/cloudflare/types/shared_params/token_policy.py b/src/cloudflare/types/shared_params/token_policy.py index db6ce09a0ea..7a6cfd2e9b5 100644 --- a/src/cloudflare/types/shared_params/token_policy.py +++ b/src/cloudflare/types/shared_params/token_policy.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable +from typing import Dict, Union, Iterable from typing_extensions import Literal, Required, TypedDict __all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"] @@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False): permission_groups: Required[Iterable[PermissionGroup]] """A set of permission groups that are specified to the policy.""" - resources: Required[Dict[str, object]] + resources: Required[Union[Dict[str, str], Dict[str, Dict[str, str]]]] """A list of resource names that the policy applies to.""" diff --git a/tests/api_resources/accounts/test_tokens.py b/tests/api_resources/accounts/test_tokens.py index 4b20aebd037..a936ded5e33 100644 --- a/tests/api_resources/accounts/test_tokens.py +++ b/tests/api_resources/accounts/test_tokens.py @@ -37,10 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -71,10 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -101,10 +95,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -127,10 +118,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -156,10 +144,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -178,10 +163,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -213,10 +195,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -245,10 +224,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -272,10 +248,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -302,10 +275,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -322,10 +292,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -548,10 +515,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -582,10 +546,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -612,10 +573,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -638,10 +596,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -667,10 +622,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -689,10 +641,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -724,10 +673,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -756,10 +702,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -783,10 +726,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -813,10 +753,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -833,10 +770,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index eee3a083f15..bcba28f9023 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -36,10 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -69,10 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -98,10 +92,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -123,10 +114,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -151,10 +139,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -185,10 +170,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, }, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -216,10 +198,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -242,10 +221,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -271,10 +247,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -447,10 +420,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -480,10 +450,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -509,10 +476,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -534,10 +498,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -562,10 +523,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -596,10 +554,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, }, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], condition={ @@ -627,10 +582,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) @@ -653,10 +605,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) as response: @@ -682,10 +631,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"id": "c8fed203ed3043cba015a93ad1616f1f"}, {"id": "82e64a83756745bbbb1c9c2701bf816b"}, ], - "resources": { - "object": "bar", - "string": "bar", - }, + "resources": {"foo": "string"}, } ], ) From cb97258bd54613a7d2b7a3a20769b2c8cd383521 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 06:10:08 +0000 Subject: [PATCH 332/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5d81a1bdc46..87a4f924a2d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cb6b87f45c66e5a30eb913c34f701a5609b2761a5cc0c6ae3a9dd56632ab4cc.yml -openapi_spec_hash: 805bdec318dc4e872b6bed9e2789a4f0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8b54845ed67539699f6055140320768b6c96bad028bf089511ee5aaf153a0e7.yml +openapi_spec_hash: fda520cb2574281d90bd1a9e6a2b36d3 config_hash: 4a37da9893560914a7ac1a75cc01202a From b05d4580a3f7a89392d774da436e1af2da982916 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 06:21:26 +0000 Subject: [PATCH 333/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 87a4f924a2d..81764a7e208 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c8b54845ed67539699f6055140320768b6c96bad028bf089511ee5aaf153a0e7.yml -openapi_spec_hash: fda520cb2574281d90bd1a9e6a2b36d3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-203c8c7034527bc2c3feb3b0e26522813574fa0f150833b436a35c6f70f14d76.yml +openapi_spec_hash: 02236f066f9b3b9c5fd1ac42a70beb8a config_hash: 4a37da9893560914a7ac1a75cc01202a From bf0fafeab386e4180139a1da32873761731dea1b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 08:34:21 +0000 Subject: [PATCH 334/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 81764a7e208..e56690a48fd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-203c8c7034527bc2c3feb3b0e26522813574fa0f150833b436a35c6f70f14d76.yml -openapi_spec_hash: 02236f066f9b3b9c5fd1ac42a70beb8a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7041628cf0d2afed7b64536d404b91abad90d4203c64c6289c02c5d65aa2f8c8.yml +openapi_spec_hash: fc297d0a0a93df81a66c090a3d1ac374 config_hash: 4a37da9893560914a7ac1a75cc01202a From 094a1c0f2481b8e41ad5f06c12ada4d22776299f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 09:11:53 +0000 Subject: [PATCH 335/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/types/rulesets/rule_create_params.py | 8 +++++++- src/cloudflare/types/rulesets/rule_edit_params.py | 8 +++++++- src/cloudflare/types/rulesets/set_cache_settings_rule.py | 2 +- .../types/rulesets/set_cache_settings_rule_param.py | 2 +- src/cloudflare/types/rulesets/skip_rule.py | 6 ++++++ src/cloudflare/types/rulesets/skip_rule_param.py | 6 ++++++ tests/api_resources/rulesets/test_rules.py | 4 ++++ 8 files changed, 34 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index e56690a48fd..d6e9e178787 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7041628cf0d2afed7b64536d404b91abad90d4203c64c6289c02c5d65aa2f8c8.yml -openapi_spec_hash: fc297d0a0a93df81a66c090a3d1ac374 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f759309b015ca845e3ba5577121deedfa5cce762cb1df35e6bf2d846f485cf59.yml +openapi_spec_hash: 5fcc8f88643596819d2afd717be92c53 config_hash: 4a37da9893560914a7ac1a75cc01202a diff --git a/src/cloudflare/types/rulesets/rule_create_params.py b/src/cloudflare/types/rulesets/rule_create_params.py index 34df410f1f4..16e6014e17d 100644 --- a/src/cloudflare/types/rulesets/rule_create_params.py +++ b/src/cloudflare/types/rulesets/rule_create_params.py @@ -2102,6 +2102,12 @@ class SkipRule(TypedDict, total=False): class SkipRuleActionParameters(TypedDict, total=False): + phase: Literal["current"] + """A phase to skip the execution of. + + This property is only compatible with products. + """ + phases: List[Phase] """A list of phases to skip the execution of. @@ -2250,7 +2256,7 @@ class SetCacheSettingsRule(TypedDict, total=False): class SetCacheSettingsRuleActionParametersBrowserTTL(TypedDict, total=False): - mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin"]] + mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin", "bypass"]] """Determines which browser ttl mode to use.""" default: int diff --git a/src/cloudflare/types/rulesets/rule_edit_params.py b/src/cloudflare/types/rulesets/rule_edit_params.py index 31aa6f96dbd..fda9b7dee6b 100644 --- a/src/cloudflare/types/rulesets/rule_edit_params.py +++ b/src/cloudflare/types/rulesets/rule_edit_params.py @@ -2144,6 +2144,12 @@ class SkipRule(TypedDict, total=False): class SkipRuleActionParameters(TypedDict, total=False): + phase: Literal["current"] + """A phase to skip the execution of. + + This property is only compatible with products. + """ + phases: List[Phase] """A list of phases to skip the execution of. @@ -2295,7 +2301,7 @@ class SetCacheSettingsRule(TypedDict, total=False): class SetCacheSettingsRuleActionParametersBrowserTTL(TypedDict, total=False): - mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin"]] + mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin", "bypass"]] """Determines which browser ttl mode to use.""" default: int diff --git a/src/cloudflare/types/rulesets/set_cache_settings_rule.py b/src/cloudflare/types/rulesets/set_cache_settings_rule.py index 9f62db2a262..f3db4b5f78b 100644 --- a/src/cloudflare/types/rulesets/set_cache_settings_rule.py +++ b/src/cloudflare/types/rulesets/set_cache_settings_rule.py @@ -39,7 +39,7 @@ class ActionParametersBrowserTTL(BaseModel): - mode: Literal["respect_origin", "bypass_by_default", "override_origin"] + mode: Literal["respect_origin", "bypass_by_default", "override_origin", "bypass"] """Determines which browser ttl mode to use.""" default: Optional[int] = None diff --git a/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py b/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py index 5bc1c8ef884..d6e3e13afcd 100644 --- a/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py +++ b/src/cloudflare/types/rulesets/set_cache_settings_rule_param.py @@ -37,7 +37,7 @@ class ActionParametersBrowserTTL(TypedDict, total=False): - mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin"]] + mode: Required[Literal["respect_origin", "bypass_by_default", "override_origin", "bypass"]] """Determines which browser ttl mode to use.""" default: int diff --git a/src/cloudflare/types/rulesets/skip_rule.py b/src/cloudflare/types/rulesets/skip_rule.py index 0bb2576e6c5..896e1c59b50 100644 --- a/src/cloudflare/types/rulesets/skip_rule.py +++ b/src/cloudflare/types/rulesets/skip_rule.py @@ -12,6 +12,12 @@ class ActionParameters(BaseModel): + phase: Optional[Literal["current"]] = None + """A phase to skip the execution of. + + This property is only compatible with products. + """ + phases: Optional[List[Phase]] = None """A list of phases to skip the execution of. diff --git a/src/cloudflare/types/rulesets/skip_rule_param.py b/src/cloudflare/types/rulesets/skip_rule_param.py index 95d7e97f80f..589cbf7b70f 100644 --- a/src/cloudflare/types/rulesets/skip_rule_param.py +++ b/src/cloudflare/types/rulesets/skip_rule_param.py @@ -12,6 +12,12 @@ class ActionParameters(TypedDict, total=False): + phase: Literal["current"] + """A phase to skip the execution of. + + This property is only compatible with products. + """ + phases: List[Phase] """A list of phases to skip the execution of. diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index 3c990cb972c..3187d76d509 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -1294,6 +1294,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ + "phase": "current", "phases": ["http_request_firewall_custom"], "products": ["bic"], "rules": {"4814384a9e5d4991b9815dcfc25d2f1f": ["8ac8bc2a661e475d940980f9317f28e1"]}, @@ -3340,6 +3341,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ + "phase": "current", "phases": ["http_request_firewall_custom"], "products": ["bic"], "rules": {"4814384a9e5d4991b9815dcfc25d2f1f": ["8ac8bc2a661e475d940980f9317f28e1"]}, @@ -5195,6 +5197,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ + "phase": "current", "phases": ["http_request_firewall_custom"], "products": ["bic"], "rules": {"4814384a9e5d4991b9815dcfc25d2f1f": ["8ac8bc2a661e475d940980f9317f28e1"]}, @@ -7241,6 +7244,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ + "phase": "current", "phases": ["http_request_firewall_custom"], "products": ["bic"], "rules": {"4814384a9e5d4991b9815dcfc25d2f1f": ["8ac8bc2a661e475d940980f9317f28e1"]}, From 4ab783f798c1d2ac041afe9cc0f1829131a4cbba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 09:53:46 +0000 Subject: [PATCH 336/392] feat(api): api update --- .stats.yml | 4 +-- src/cloudflare/resources/images/v1/v1.py | 28 ++++++++++++++++++- .../resources/images/v2/direct_uploads.py | 8 ++++++ src/cloudflare/resources/images/v2/v2.py | 10 +++++++ src/cloudflare/types/images/image.py | 3 ++ .../types/images/v1_create_params.py | 3 ++ src/cloudflare/types/images/v1_edit_params.py | 3 ++ src/cloudflare/types/images/v1_list_params.py | 7 +++++ .../images/v2/direct_upload_create_params.py | 3 ++ src/cloudflare/types/images/v2_list_params.py | 6 ++++ tests/api_resources/images/test_v1.py | 6 ++++ tests/api_resources/images/test_v2.py | 2 ++ .../images/v2/test_direct_uploads.py | 2 ++ 13 files changed, 82 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d6e9e178787..51618582db1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f759309b015ca845e3ba5577121deedfa5cce762cb1df35e6bf2d846f485cf59.yml -openapi_spec_hash: 5fcc8f88643596819d2afd717be92c53 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-59241dbd4fa8b7b8cca89221a611c2b835cdb65ffb8e0c6f2626581cdafb5280.yml +openapi_spec_hash: e1b565911799ceedcc1aec7b0d3ced13 config_hash: 4a37da9893560914a7ac1a75cc01202a diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index 8c8c30b70e6..9f38796d708 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -3,7 +3,7 @@ from __future__ import annotations import typing_extensions -from typing import Any, Type, Mapping, cast +from typing import Any, Type, Mapping, Optional, cast import httpx @@ -101,6 +101,7 @@ def create( *, account_id: str, id: str | NotGiven = NOT_GIVEN, + creator: str | NotGiven = NOT_GIVEN, file: FileTypes | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, @@ -122,6 +123,8 @@ def create( id: An optional custom unique identifier for your image. + creator: Can set the creator field with an internal user ID. + file: An image binary data. Only needed when type is uploading a file. metadata: User modifiable key-value store. Can use used for keeping references to another @@ -145,6 +148,7 @@ def create( body = deepcopy_minimal( { "id": id, + "creator": creator, "file": file, "metadata": metadata, "require_signed_urls": require_signed_urls, @@ -175,6 +179,7 @@ def list( self, *, account_id: str, + creator: Optional[str] | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, per_page: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -192,6 +197,9 @@ def list( Args: account_id: Account identifier tag. + creator: Internal user ID set within the creator field. Setting to empty string "" will + return images where creator field is not set + page: Page number of paginated results. per_page: Number of items per page. @@ -216,6 +224,7 @@ def list( timeout=timeout, query=maybe_transform( { + "creator": creator, "page": page, "per_page": per_page, }, @@ -281,6 +290,7 @@ def edit( image_id: str, *, account_id: str, + creator: str | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -300,6 +310,8 @@ def edit( image_id: Image unique identifier. + creator: Can set the creator field with an internal user ID. + metadata: User modifiable key-value store. Can be used for keeping references to another system of record for managing images. No change if not specified. @@ -323,6 +335,7 @@ def edit( f"/accounts/{account_id}/images/v1/{image_id}", body=maybe_transform( { + "creator": creator, "metadata": metadata, "require_signed_urls": require_signed_urls, }, @@ -424,6 +437,7 @@ async def create( *, account_id: str, id: str | NotGiven = NOT_GIVEN, + creator: str | NotGiven = NOT_GIVEN, file: FileTypes | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, @@ -445,6 +459,8 @@ async def create( id: An optional custom unique identifier for your image. + creator: Can set the creator field with an internal user ID. + file: An image binary data. Only needed when type is uploading a file. metadata: User modifiable key-value store. Can use used for keeping references to another @@ -468,6 +484,7 @@ async def create( body = deepcopy_minimal( { "id": id, + "creator": creator, "file": file, "metadata": metadata, "require_signed_urls": require_signed_urls, @@ -498,6 +515,7 @@ def list( self, *, account_id: str, + creator: Optional[str] | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, per_page: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -515,6 +533,9 @@ def list( Args: account_id: Account identifier tag. + creator: Internal user ID set within the creator field. Setting to empty string "" will + return images where creator field is not set + page: Page number of paginated results. per_page: Number of items per page. @@ -539,6 +560,7 @@ def list( timeout=timeout, query=maybe_transform( { + "creator": creator, "page": page, "per_page": per_page, }, @@ -604,6 +626,7 @@ async def edit( image_id: str, *, account_id: str, + creator: str | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -623,6 +646,8 @@ async def edit( image_id: Image unique identifier. + creator: Can set the creator field with an internal user ID. + metadata: User modifiable key-value store. Can be used for keeping references to another system of record for managing images. No change if not specified. @@ -646,6 +671,7 @@ async def edit( f"/accounts/{account_id}/images/v1/{image_id}", body=await async_maybe_transform( { + "creator": creator, "metadata": metadata, "require_signed_urls": require_signed_urls, }, diff --git a/src/cloudflare/resources/images/v2/direct_uploads.py b/src/cloudflare/resources/images/v2/direct_uploads.py index cd30c813f89..e062f971ec3 100644 --- a/src/cloudflare/resources/images/v2/direct_uploads.py +++ b/src/cloudflare/resources/images/v2/direct_uploads.py @@ -50,6 +50,7 @@ def create( *, account_id: str, id: str | NotGiven = NOT_GIVEN, + creator: str | NotGiven = NOT_GIVEN, expiry: Union[str, datetime] | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, @@ -77,6 +78,8 @@ def create( and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID. + creator: Can set the creator field with an internal user ID. + expiry: The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours. @@ -104,6 +107,7 @@ def create( body=maybe_transform( { "id": id, + "creator": creator, "expiry": expiry, "metadata": metadata, "require_signed_urls": require_signed_urls, @@ -146,6 +150,7 @@ async def create( *, account_id: str, id: str | NotGiven = NOT_GIVEN, + creator: str | NotGiven = NOT_GIVEN, expiry: Union[str, datetime] | NotGiven = NOT_GIVEN, metadata: object | NotGiven = NOT_GIVEN, require_signed_urls: bool | NotGiven = NOT_GIVEN, @@ -173,6 +178,8 @@ async def create( and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID. + creator: Can set the creator field with an internal user ID. + expiry: The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours. @@ -200,6 +207,7 @@ async def create( body=await async_maybe_transform( { "id": id, + "creator": creator, "expiry": expiry, "metadata": metadata, "require_signed_urls": require_signed_urls, diff --git a/src/cloudflare/resources/images/v2/v2.py b/src/cloudflare/resources/images/v2/v2.py index 0e821133e77..a882d45b3a1 100644 --- a/src/cloudflare/resources/images/v2/v2.py +++ b/src/cloudflare/resources/images/v2/v2.py @@ -62,6 +62,7 @@ def list( *, account_id: str, continuation_token: Optional[str] | NotGiven = NOT_GIVEN, + creator: Optional[str] | NotGiven = NOT_GIVEN, per_page: float | NotGiven = NOT_GIVEN, sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -82,6 +83,9 @@ def list( continuation_token: Continuation token for a next page. List images V2 returns continuation_token + creator: Internal user ID set within the creator field. Setting to empty string "" will + return images where creator field is not set + per_page: Number of items per page. sort_order: Sorting order by upload time. @@ -106,6 +110,7 @@ def list( query=maybe_transform( { "continuation_token": continuation_token, + "creator": creator, "per_page": per_page, "sort_order": sort_order, }, @@ -146,6 +151,7 @@ async def list( *, account_id: str, continuation_token: Optional[str] | NotGiven = NOT_GIVEN, + creator: Optional[str] | NotGiven = NOT_GIVEN, per_page: float | NotGiven = NOT_GIVEN, sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -166,6 +172,9 @@ async def list( continuation_token: Continuation token for a next page. List images V2 returns continuation_token + creator: Internal user ID set within the creator field. Setting to empty string "" will + return images where creator field is not set + per_page: Number of items per page. sort_order: Sorting order by upload time. @@ -190,6 +199,7 @@ async def list( query=await async_maybe_transform( { "continuation_token": continuation_token, + "creator": creator, "per_page": per_page, "sort_order": sort_order, }, diff --git a/src/cloudflare/types/images/image.py b/src/cloudflare/types/images/image.py index 1dcd113d999..7260a8c3d04 100644 --- a/src/cloudflare/types/images/image.py +++ b/src/cloudflare/types/images/image.py @@ -14,6 +14,9 @@ class Image(BaseModel): id: Optional[str] = None """Image unique identifier.""" + creator: Optional[str] = None + """Can set the creator field with an internal user ID.""" + filename: Optional[str] = None """Image file name.""" diff --git a/src/cloudflare/types/images/v1_create_params.py b/src/cloudflare/types/images/v1_create_params.py index d5f63555521..87764baa3a7 100644 --- a/src/cloudflare/types/images/v1_create_params.py +++ b/src/cloudflare/types/images/v1_create_params.py @@ -17,6 +17,9 @@ class V1CreateParams(TypedDict, total=False): id: str """An optional custom unique identifier for your image.""" + creator: str + """Can set the creator field with an internal user ID.""" + file: FileTypes """An image binary data. Only needed when type is uploading a file.""" diff --git a/src/cloudflare/types/images/v1_edit_params.py b/src/cloudflare/types/images/v1_edit_params.py index 5b77a97bd40..47b3f325861 100644 --- a/src/cloudflare/types/images/v1_edit_params.py +++ b/src/cloudflare/types/images/v1_edit_params.py @@ -13,6 +13,9 @@ class V1EditParams(TypedDict, total=False): account_id: Required[str] """Account identifier tag.""" + creator: str + """Can set the creator field with an internal user ID.""" + metadata: object """User modifiable key-value store. diff --git a/src/cloudflare/types/images/v1_list_params.py b/src/cloudflare/types/images/v1_list_params.py index b77d95f1d8b..4e726436864 100644 --- a/src/cloudflare/types/images/v1_list_params.py +++ b/src/cloudflare/types/images/v1_list_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Required, TypedDict __all__ = ["V1ListParams"] @@ -11,6 +12,12 @@ class V1ListParams(TypedDict, total=False): account_id: Required[str] """Account identifier tag.""" + creator: Optional[str] + """Internal user ID set within the creator field. + + Setting to empty string "" will return images where creator field is not set + """ + page: float """Page number of paginated results.""" diff --git a/src/cloudflare/types/images/v2/direct_upload_create_params.py b/src/cloudflare/types/images/v2/direct_upload_create_params.py index 477b46c0e38..f4c7b7971b1 100644 --- a/src/cloudflare/types/images/v2/direct_upload_create_params.py +++ b/src/cloudflare/types/images/v2/direct_upload_create_params.py @@ -22,6 +22,9 @@ class DirectUploadCreateParams(TypedDict, total=False): Cannot start nor end with a / (forward slash). Cannot be a UUID. """ + creator: str + """Can set the creator field with an internal user ID.""" + expiry: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """The date after which the upload will not be accepted. diff --git a/src/cloudflare/types/images/v2_list_params.py b/src/cloudflare/types/images/v2_list_params.py index 234d7442c86..dd5a939fe9d 100644 --- a/src/cloudflare/types/images/v2_list_params.py +++ b/src/cloudflare/types/images/v2_list_params.py @@ -15,6 +15,12 @@ class V2ListParams(TypedDict, total=False): continuation_token: Optional[str] """Continuation token for a next page. List images V2 returns continuation_token""" + creator: Optional[str] + """Internal user ID set within the creator field. + + Setting to empty string "" will return images where creator field is not set + """ + per_page: float """Number of items per page.""" diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index ef5f5fb4905..2e168db2008 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -38,6 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", id="id", + creator="creator", file=b"raw file contents", metadata={}, require_signed_urls=True, @@ -93,6 +94,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): v1 = client.images.v1.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", + creator="creator", page=1, per_page=10, ) @@ -194,6 +196,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.edit( image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", + creator="creator", metadata={}, require_signed_urls=True, ) @@ -307,6 +310,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare v1 = await async_client.images.v1.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", id="id", + creator="creator", file=b"raw file contents", metadata={}, require_signed_urls=True, @@ -362,6 +366,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) with pytest.warns(DeprecationWarning): v1 = await async_client.images.v1.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", + creator="creator", page=1, per_page=10, ) @@ -463,6 +468,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) v1 = await async_client.images.v1.edit( image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", + creator="creator", metadata={}, require_signed_urls=True, ) diff --git a/tests/api_resources/images/test_v2.py b/tests/api_resources/images/test_v2.py index fb62181f81d..84d5e15b82c 100644 --- a/tests/api_resources/images/test_v2.py +++ b/tests/api_resources/images/test_v2.py @@ -29,6 +29,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: v2 = client.images.v2.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", continuation_token="continuation_token", + creator="creator", per_page=10, sort_order="asc", ) @@ -83,6 +84,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) v2 = await async_client.images.v2.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", continuation_token="continuation_token", + creator="creator", per_page=10, sort_order="asc", ) diff --git a/tests/api_resources/images/v2/test_direct_uploads.py b/tests/api_resources/images/v2/test_direct_uploads.py index fb031cd38e4..066ffab203a 100644 --- a/tests/api_resources/images/v2/test_direct_uploads.py +++ b/tests/api_resources/images/v2/test_direct_uploads.py @@ -32,6 +32,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: direct_upload = client.images.v2.direct_uploads.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", id="this/is/my-customid", + creator="creator", expiry=parse_datetime("2021-01-02T02:20:00Z"), metadata={}, require_signed_urls=True, @@ -92,6 +93,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare direct_upload = await async_client.images.v2.direct_uploads.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", id="this/is/my-customid", + creator="creator", expiry=parse_datetime("2021-01-02T02:20:00Z"), metadata={}, require_signed_urls=True, From 44dfbdb32b61612c60afd7b6c13cd1c26fa207b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 10:26:06 +0000 Subject: [PATCH 337/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 51618582db1..b1fc0207290 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-59241dbd4fa8b7b8cca89221a611c2b835cdb65ffb8e0c6f2626581cdafb5280.yml -openapi_spec_hash: e1b565911799ceedcc1aec7b0d3ced13 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-adb37d2cf4c59719d13ef439e4bafbbf0d9626f50d4237e18a89a8945f678b9e.yml +openapi_spec_hash: c97c7f85a9d3d9f7ae00b38cc2cc4d02 config_hash: 4a37da9893560914a7ac1a75cc01202a From 879271df82481d94267d979cebaf974d2d019c60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 10:55:14 +0000 Subject: [PATCH 338/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b1fc0207290..e162adaf8dc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-adb37d2cf4c59719d13ef439e4bafbbf0d9626f50d4237e18a89a8945f678b9e.yml -openapi_spec_hash: c97c7f85a9d3d9f7ae00b38cc2cc4d02 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e0fc975f26165c1665bb22edc2976c1fcc8eaa913d7a3746d9c46a04ab08208.yml +openapi_spec_hash: c28459aa1d5b1e3f78bbacf881a1c475 config_hash: 4a37da9893560914a7ac1a75cc01202a From 876c80a5025bbb9186e35e8321a447d108c4cfb8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:08:02 +0000 Subject: [PATCH 339/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e162adaf8dc..e54179f2ffa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e0fc975f26165c1665bb22edc2976c1fcc8eaa913d7a3746d9c46a04ab08208.yml -openapi_spec_hash: c28459aa1d5b1e3f78bbacf881a1c475 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-29e381db5eafe31a9ad5bcd56383804b78e1563b55775c600d1c15357a6aab25.yml +openapi_spec_hash: fbf07cecb8ffa77ff1fc391bd14881d1 config_hash: 4a37da9893560914a7ac1a75cc01202a From 5c5c79d6d3d3601c38fc470d49d03d1e46716b7d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 12:05:34 +0000 Subject: [PATCH 340/392] fix(parsing): parse extra field types --- src/cloudflare/_models.py | 25 ++++++++++++++-- .../summary_model_response.py | 3 +- .../summary_task_response.py | 3 +- .../timeseries_group_user_agent_response.py | 3 +- .../timeseries_group_query_type_response.py | 3 +- ...imeseries_group_response_codes_response.py | 3 +- .../types/radar/as112_timeseries_response.py | 3 +- .../timeseries_group_industry_response.py | 3 +- .../timeseries_group_vector_response.py | 3 +- .../timeseries_group_vertical_response.py | 3 +- .../attacks/layer3_timeseries_response.py | 3 +- .../timeseries_group_http_method_response.py | 3 +- .../timeseries_group_industry_response.py | 3 +- ...timeseries_group_managed_rules_response.py | 3 +- ...eries_group_mitigation_product_response.py | 3 +- .../timeseries_group_vertical_response.py | 3 +- .../radar/bot_timeseries_groups_response.py | 3 +- .../types/radar/bot_timeseries_response.py | 3 +- .../web_crawler_timeseries_groups_response.py | 3 +- .../timeseries_group_query_type_response.py | 3 +- ...timeseries_group_response_code_response.py | 3 +- .../types/radar/dns_timeseries_response.py | 3 +- ...imeseries_group_browser_family_response.py | 3 +- .../http/timeseries_group_browser_response.py | 3 +- .../http/timeseries_group_os_response.py | 3 +- .../types/radar/http_timeseries_response.py | 3 +- ...rnet_service_timeseries_groups_response.py | 3 +- .../ranking_timeseries_groups_response.py | 3 +- tests/test_models.py | 29 ++++++++++++++++++- 29 files changed, 105 insertions(+), 30 deletions(-) diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py index f7cbd38ed72..ddf07fa569b 100644 --- a/src/cloudflare/_models.py +++ b/src/cloudflare/_models.py @@ -209,14 +209,18 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] else: fields_values[name] = field_get_default(field) + extra_field_type = _get_extra_fields_type(__cls) + _extra = {} for key, value in values.items(): if key not in model_fields: + parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value + if PYDANTIC_V2: - _extra[key] = value + _extra[key] = parsed else: _fields_set.add(key) - fields_values[key] = value + fields_values[key] = parsed object.__setattr__(m, "__dict__", fields_values) @@ -371,6 +375,23 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None)) +def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None: + if not PYDANTIC_V2: + # TODO + return None + + schema = cls.__pydantic_core_schema__ + if schema["type"] == "model": + fields = schema["schema"] + if fields["type"] == "model-fields": + extras = fields.get("extras_schema") + if extras and "cls" in extras: + # mypy can't narrow the type + return extras["cls"] # type: ignore[no-any-return] + + return None + + def is_basemodel(type_: type) -> bool: """Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`""" if is_union(type_): diff --git a/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py b/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py index c9af7e04f58..9e7dd1690b2 100644 --- a/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py +++ b/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_model_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py b/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py index f45dc1088fe..e19a30aace7 100644 --- a/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py +++ b/src/cloudflare/types/radar/ai/inference/timeseries_groups/summary_task_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py b/src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py index a50abb619b3..17443d5bfdf 100644 --- a/src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py +++ b/src/cloudflare/types/radar/ai/timeseries_group_user_agent_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/as112/timeseries_group_query_type_response.py b/src/cloudflare/types/radar/as112/timeseries_group_query_type_response.py index 4240248af6a..29144452c39 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_query_type_response.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_query_type_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/as112/timeseries_group_response_codes_response.py b/src/cloudflare/types/radar/as112/timeseries_group_response_codes_response.py index 9f8245b2ed6..ba71485ad18 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_response_codes_response.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_response_codes_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/as112_timeseries_response.py b/src/cloudflare/types/radar/as112_timeseries_response.py index c2f4cdb133d..1ff62cad56f 100644 --- a/src/cloudflare/types/radar/as112_timeseries_response.py +++ b/src/cloudflare/types/radar/as112_timeseries_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -104,6 +104,7 @@ class AS112TimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" + __pydantic_extra__: Dict[str, AS112TimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_response.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_response.py index 507d3cd63b8..cd8133c26da 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_industry_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_response.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_response.py index e4a17e94b13..56c74f37ef6 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vector_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_response.py b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_response.py index 2bb3dba6141..efe0e943ca2 100644 --- a/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/timeseries_group_vertical_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py index 044f3fd0c2d..3224e6aab2b 100644 --- a/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py +++ b/src/cloudflare/types/radar/attacks/layer3_timeseries_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -104,6 +104,7 @@ class Layer3TimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" + __pydantic_extra__: Dict[str, Layer3TimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py index 38f2e8a60ff..40b3fe53dcb 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_response.py index 507d3cd63b8..cd8133c26da 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_industry_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_response.py index 957e3974c22..9d6d7089370 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py index e0c4fcc3c37..f8851f3e883 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_response.py index 2bb3dba6141..efe0e943ca2 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_vertical_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/bot_timeseries_groups_response.py b/src/cloudflare/types/radar/bot_timeseries_groups_response.py index 5a2913f66a9..5ac78a6bf90 100644 --- a/src/cloudflare/types/radar/bot_timeseries_groups_response.py +++ b/src/cloudflare/types/radar/bot_timeseries_groups_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/bot_timeseries_response.py b/src/cloudflare/types/radar/bot_timeseries_response.py index 650c6eb786f..6d47e77aff6 100644 --- a/src/cloudflare/types/radar/bot_timeseries_response.py +++ b/src/cloudflare/types/radar/bot_timeseries_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -104,6 +104,7 @@ class BotTimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" + __pydantic_extra__: Dict[str, BotTimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py index b7a819d8282..cefd53bd22f 100644 --- a/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py +++ b/src/cloudflare/types/radar/bots/web_crawler_timeseries_groups_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/dns/timeseries_group_query_type_response.py b/src/cloudflare/types/radar/dns/timeseries_group_query_type_response.py index 4240248af6a..29144452c39 100644 --- a/src/cloudflare/types/radar/dns/timeseries_group_query_type_response.py +++ b/src/cloudflare/types/radar/dns/timeseries_group_query_type_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/dns/timeseries_group_response_code_response.py b/src/cloudflare/types/radar/dns/timeseries_group_response_code_response.py index 5925803e452..eb62257cb18 100644 --- a/src/cloudflare/types/radar/dns/timeseries_group_response_code_response.py +++ b/src/cloudflare/types/radar/dns/timeseries_group_response_code_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/dns_timeseries_response.py b/src/cloudflare/types/radar/dns_timeseries_response.py index 16f66a9f38a..29e59a67962 100644 --- a/src/cloudflare/types/radar/dns_timeseries_response.py +++ b/src/cloudflare/types/radar/dns_timeseries_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -104,6 +104,7 @@ class DNSTimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" + __pydantic_extra__: Dict[str, DNSTimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/http/timeseries_group_browser_family_response.py b/src/cloudflare/types/radar/http/timeseries_group_browser_family_response.py index 6208810f399..42382ad6a68 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_browser_family_response.py +++ b/src/cloudflare/types/radar/http/timeseries_group_browser_family_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/http/timeseries_group_browser_response.py b/src/cloudflare/types/radar/http/timeseries_group_browser_response.py index e594533b685..2742df8a463 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_browser_response.py +++ b/src/cloudflare/types/radar/http/timeseries_group_browser_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/http/timeseries_group_os_response.py b/src/cloudflare/types/radar/http/timeseries_group_os_response.py index a6aa9c38b9a..c8131e4bf37 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_os_response.py +++ b/src/cloudflare/types/radar/http/timeseries_group_os_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[str]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/http_timeseries_response.py b/src/cloudflare/types/radar/http_timeseries_response.py index ed239c69013..b0e939292ae 100644 --- a/src/cloudflare/types/radar/http_timeseries_response.py +++ b/src/cloudflare/types/radar/http_timeseries_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Dict, List from datetime import datetime from typing_extensions import Literal @@ -104,6 +104,7 @@ class HTTPTimeseriesResponse(BaseModel): meta: Meta """Metadata for the results.""" + __pydantic_extra__: Dict[str, HTTPTimeseriesResponseItem] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/ranking/internet_service_timeseries_groups_response.py b/src/cloudflare/types/radar/ranking/internet_service_timeseries_groups_response.py index c701e25c647..1ada971f603 100644 --- a/src/cloudflare/types/radar/ranking/internet_service_timeseries_groups_response.py +++ b/src/cloudflare/types/radar/ranking/internet_service_timeseries_groups_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List, Union +from typing import TYPE_CHECKING, Dict, List, Union from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[Union[str, float]]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/src/cloudflare/types/radar/ranking_timeseries_groups_response.py b/src/cloudflare/types/radar/ranking_timeseries_groups_response.py index 109b0c8f1ee..801113ffbd6 100644 --- a/src/cloudflare/types/radar/ranking_timeseries_groups_response.py +++ b/src/cloudflare/types/radar/ranking_timeseries_groups_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, List, Union +from typing import TYPE_CHECKING, Dict, List, Union from datetime import datetime from typing_extensions import Literal @@ -97,6 +97,7 @@ class Meta(BaseModel): class Serie0(BaseModel): timestamps: List[datetime] + __pydantic_extra__: Dict[str, List[Union[str, float]]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] if TYPE_CHECKING: # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. diff --git a/tests/test_models.py b/tests/test_models.py index a3db766596e..a35be11534d 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,5 +1,5 @@ import json -from typing import Any, Dict, List, Union, Optional, cast +from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast from datetime import datetime, timezone from typing_extensions import Literal, Annotated, TypeAliasType @@ -934,3 +934,30 @@ class Type2(BaseModel): ) assert isinstance(model, Type1) assert isinstance(model.value, InnerType2) + + +@pytest.mark.skipif(not PYDANTIC_V2, reason="this is only supported in pydantic v2 for now") +def test_extra_properties() -> None: + class Item(BaseModel): + prop: int + + class Model(BaseModel): + __pydantic_extra__: Dict[str, Item] = Field(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + other: str + + if TYPE_CHECKING: + + def __getattr__(self, attr: str) -> Item: ... + + model = construct_type( + type_=Model, + value={ + "a": {"prop": 1}, + "other": "foo", + }, + ) + assert isinstance(model, Model) + assert model.a.prop == 1 + assert isinstance(model.a, Item) + assert model.other == "foo" From df0e392ff84da46140aa5e813812768bd343e94a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 12:41:48 +0000 Subject: [PATCH 341/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e54179f2ffa..be78bfb642f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-29e381db5eafe31a9ad5bcd56383804b78e1563b55775c600d1c15357a6aab25.yml -openapi_spec_hash: fbf07cecb8ffa77ff1fc391bd14881d1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db576e0ecd56bb9bf5bdd2d8c4bd3df8b4a1eafda5469528e6b25f8292b31764.yml +openapi_spec_hash: 328863e07a37d5f467c422e5a610aaa9 config_hash: 4a37da9893560914a7ac1a75cc01202a From 4386083c75f8ee1d312229b410319cd3601c03f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:18:06 +0000 Subject: [PATCH 342/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index be78bfb642f..0a62a36fb94 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db576e0ecd56bb9bf5bdd2d8c4bd3df8b4a1eafda5469528e6b25f8292b31764.yml -openapi_spec_hash: 328863e07a37d5f467c422e5a610aaa9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ac18a3d5dcd7820ecac9febb1237496d5e8c47ad800bea3e88a933f071286785.yml +openapi_spec_hash: 633b0a64325e6d8f62e555641c93ea0d config_hash: 4a37da9893560914a7ac1a75cc01202a From 4b2576975390342d64a58d6181e8a3f77f58e7b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:32:13 +0000 Subject: [PATCH 343/392] feat(api): api update --- .stats.yml | 4 +- api.md | 17 +- src/cloudflare/resources/snippets/content.py | 12 +- src/cloudflare/resources/snippets/rules.py | 54 +++-- src/cloudflare/resources/snippets/snippets.py | 198 ++++++++++------ src/cloudflare/types/snippets/__init__.py | 5 +- .../types/snippets/rule_delete_response.py | 24 +- .../types/snippets/rule_list_response.py | 20 +- .../types/snippets/rule_update_params.py | 23 +- .../types/snippets/rule_update_response.py | 20 +- src/cloudflare/types/snippets/snippet.py | 18 -- .../types/snippets/snippet_delete_response.py | 16 +- .../types/snippets/snippet_get_response.py | 19 ++ .../types/snippets/snippet_list_params.py | 18 ++ .../types/snippets/snippet_list_response.py | 19 ++ .../types/snippets/snippet_update_params.py | 16 +- .../types/snippets/snippet_update_response.py | 19 ++ tests/api_resources/snippets/test_content.py | 44 ++-- tests/api_resources/snippets/test_rules.py | 114 +++++---- tests/api_resources/test_snippets.py | 222 ++++++++++-------- 20 files changed, 533 insertions(+), 349 deletions(-) delete mode 100644 src/cloudflare/types/snippets/snippet.py create mode 100644 src/cloudflare/types/snippets/snippet_get_response.py create mode 100644 src/cloudflare/types/snippets/snippet_list_params.py create mode 100644 src/cloudflare/types/snippets/snippet_list_response.py create mode 100644 src/cloudflare/types/snippets/snippet_update_response.py diff --git a/.stats.yml b/.stats.yml index 0a62a36fb94..56b0f33d115 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ac18a3d5dcd7820ecac9febb1237496d5e8c47ad800bea3e88a933f071286785.yml -openapi_spec_hash: 633b0a64325e6d8f62e555641c93ea0d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-11f530e0accb1d6d9ee14a3a1fdf9e99ebff98e60ac7f59edbd17aafb11e2007.yml +openapi_spec_hash: 185fb53ac70e4b381c40c7e8d291df98 config_hash: 4a37da9893560914a7ac1a75cc01202a diff --git a/api.md b/api.md index 368bd94b658..02abc6a7ee0 100644 --- a/api.md +++ b/api.md @@ -8771,15 +8771,20 @@ Methods: Types: ```python -from cloudflare.types.snippets import Snippet, SnippetDeleteResponse +from cloudflare.types.snippets import ( + SnippetUpdateResponse, + SnippetListResponse, + SnippetDeleteResponse, + SnippetGetResponse, +) ``` Methods: -- client.snippets.update(snippet_name, \*, zone_id, \*\*params) -> Optional[Snippet] -- client.snippets.list(\*, zone_id) -> SyncSinglePage[Snippet] -- client.snippets.delete(snippet_name, \*, zone_id) -> SnippetDeleteResponse -- client.snippets.get(snippet_name, \*, zone_id) -> Optional[Snippet] +- client.snippets.update(snippet_name, \*, zone_id, \*\*params) -> SnippetUpdateResponse +- client.snippets.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[SnippetListResponse] +- client.snippets.delete(snippet_name, \*, zone_id) -> str +- client.snippets.get(snippet_name, \*, zone_id) -> SnippetGetResponse ## Content @@ -8799,7 +8804,7 @@ Methods: - client.snippets.rules.update(\*, zone_id, \*\*params) -> SyncSinglePage[RuleUpdateResponse] - client.snippets.rules.list(\*, zone_id) -> SyncSinglePage[RuleListResponse] -- client.snippets.rules.delete(\*, zone_id) -> RuleDeleteResponse +- client.snippets.rules.delete(\*, zone_id) -> SyncSinglePage[RuleDeleteResponse] # Calls diff --git a/src/cloudflare/resources/snippets/content.py b/src/cloudflare/resources/snippets/content.py index 92f1ffef2f8..53ee455d60b 100644 --- a/src/cloudflare/resources/snippets/content.py +++ b/src/cloudflare/resources/snippets/content.py @@ -55,12 +55,12 @@ def get( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> BinaryAPIResponse: """ - Snippet Content + Fetches the content of a snippet belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - snippet_name: Snippet identifying name + snippet_name: The identifying name of the snippet. extra_headers: Send extra headers @@ -117,12 +117,12 @@ async def get( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncBinaryAPIResponse: """ - Snippet Content + Fetches the content of a snippet belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - snippet_name: Snippet identifying name + snippet_name: The identifying name of the snippet. extra_headers: Send extra headers diff --git a/src/cloudflare/resources/snippets/rules.py b/src/cloudflare/resources/snippets/rules.py index 51785fd67ab..54ef6527f7a 100644 --- a/src/cloudflare/resources/snippets/rules.py +++ b/src/cloudflare/resources/snippets/rules.py @@ -50,7 +50,7 @@ def update( self, *, zone_id: str, - rules: Iterable[rule_update_params.Rule] | NotGiven = NOT_GIVEN, + body: Iterable[rule_update_params.Body], # 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, @@ -59,12 +59,12 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[RuleUpdateResponse]: """ - Put Rules + Updates all snippet rules belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - rules: List of snippet rules + body: A list of snippet rules. extra_headers: Send extra headers @@ -79,7 +79,7 @@ def update( return self._get_api_list( f"/zones/{zone_id}/snippets/snippet_rules", page=SyncSinglePage[RuleUpdateResponse], - body=maybe_transform({"rules": rules}, rule_update_params.RuleUpdateParams), + body=maybe_transform(body, Iterable[rule_update_params.Body]), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -99,10 +99,10 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[RuleListResponse]: """ - Rules + Fetches all snippet rules belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. extra_headers: Send extra headers @@ -133,12 +133,12 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleDeleteResponse: + ) -> SyncSinglePage[RuleDeleteResponse]: """ - Delete All Rules + Deletes all snippet rules belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. extra_headers: Send extra headers @@ -150,12 +150,14 @@ def delete( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._delete( + return self._get_api_list( f"/zones/{zone_id}/snippets/snippet_rules", + page=SyncSinglePage[RuleDeleteResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=RuleDeleteResponse, + model=RuleDeleteResponse, + method="delete", ) @@ -183,7 +185,7 @@ def update( self, *, zone_id: str, - rules: Iterable[rule_update_params.Rule] | NotGiven = NOT_GIVEN, + body: Iterable[rule_update_params.Body], # 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, @@ -192,12 +194,12 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[RuleUpdateResponse, AsyncSinglePage[RuleUpdateResponse]]: """ - Put Rules + Updates all snippet rules belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - rules: List of snippet rules + body: A list of snippet rules. extra_headers: Send extra headers @@ -212,7 +214,7 @@ def update( return self._get_api_list( f"/zones/{zone_id}/snippets/snippet_rules", page=AsyncSinglePage[RuleUpdateResponse], - body=maybe_transform({"rules": rules}, rule_update_params.RuleUpdateParams), + body=maybe_transform(body, Iterable[rule_update_params.Body]), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -232,10 +234,10 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[RuleListResponse, AsyncSinglePage[RuleListResponse]]: """ - Rules + Fetches all snippet rules belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. extra_headers: Send extra headers @@ -256,7 +258,7 @@ def list( model=RuleListResponse, ) - async def delete( + def delete( self, *, zone_id: str, @@ -266,12 +268,12 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleDeleteResponse: + ) -> AsyncPaginator[RuleDeleteResponse, AsyncSinglePage[RuleDeleteResponse]]: """ - Delete All Rules + Deletes all snippet rules belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. extra_headers: Send extra headers @@ -283,12 +285,14 @@ async def delete( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._delete( + return self._get_api_list( f"/zones/{zone_id}/snippets/snippet_rules", + page=AsyncSinglePage[RuleDeleteResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=RuleDeleteResponse, + model=RuleDeleteResponse, + method="delete", ) diff --git a/src/cloudflare/resources/snippets/snippets.py b/src/cloudflare/resources/snippets/snippets.py index 98fb8e4aa61..5052267b8d0 100644 --- a/src/cloudflare/resources/snippets/snippets.py +++ b/src/cloudflare/resources/snippets/snippets.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import List, Type, Mapping, Optional, cast import httpx @@ -22,8 +22,8 @@ ContentResourceWithStreamingResponse, AsyncContentResourceWithStreamingResponse, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import maybe_transform, async_maybe_transform +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes +from ..._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -33,11 +33,13 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper -from ...pagination import SyncSinglePage, AsyncSinglePage +from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from ..._base_client import AsyncPaginator, make_request_options -from ...types.snippets import snippet_update_params -from ...types.snippets.snippet import Snippet +from ...types.snippets import snippet_list_params, snippet_update_params +from ...types.snippets.snippet_get_response import SnippetGetResponse +from ...types.snippets.snippet_list_response import SnippetListResponse from ...types.snippets.snippet_delete_response import SnippetDeleteResponse +from ...types.snippets.snippet_update_response import SnippetUpdateResponse __all__ = ["SnippetsResource", "AsyncSnippetsResource"] @@ -75,24 +77,26 @@ def update( snippet_name: str, *, zone_id: str, - files: str | NotGiven = NOT_GIVEN, - metadata: snippet_update_params.Metadata | NotGiven = NOT_GIVEN, + files: List[FileTypes], + metadata: snippet_update_params.Metadata, # 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Snippet]: + ) -> SnippetUpdateResponse: """ - Put Snippet + Creates or updates a snippet belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - snippet_name: Snippet identifying name + snippet_name: The identifying name of the snippet. - files: Content files of uploaded snippet + files: The list of files belonging to the snippet. + + metadata: Metadata about the snippet. extra_headers: Send extra headers @@ -106,45 +110,53 @@ def update( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") + body = deepcopy_minimal( + { + "files": files, + "metadata": metadata, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._put( f"/zones/{zone_id}/snippets/{snippet_name}", - body=maybe_transform( - { - "files": files, - "metadata": metadata, - }, - snippet_update_params.SnippetUpdateParams, - ), + body=maybe_transform(body, snippet_update_params.SnippetUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[Snippet]]._unwrapper, + post_parser=ResultWrapper[SnippetUpdateResponse]._unwrapper, ), - cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]), + cast_to=cast(Type[SnippetUpdateResponse], ResultWrapper[SnippetUpdateResponse]), ) def list( self, *, zone_id: str, + page: int | NotGiven = NOT_GIVEN, + per_page: int | 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncSinglePage[Snippet]: + ) -> SyncV4PagePaginationArray[SnippetListResponse]: """ - All Snippets + Fetches all snippets belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. + + page: The current page number. + + per_page: The number of results to return per page. extra_headers: Send extra headers @@ -158,11 +170,21 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/snippets", - page=SyncSinglePage[Snippet], + page=SyncV4PagePaginationArray[SnippetListResponse], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "page": page, + "per_page": per_page, + }, + snippet_list_params.SnippetListParams, + ), ), - model=Snippet, + model=SnippetListResponse, ) def delete( @@ -176,14 +198,14 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SnippetDeleteResponse: + ) -> str: """ - Delete Snippet + Deletes a snippet belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - snippet_name: Snippet identifying name + snippet_name: The identifying name of the snippet. extra_headers: Send extra headers @@ -200,9 +222,13 @@ def delete( return self._delete( f"/zones/{zone_id}/snippets/{snippet_name}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SnippetDeleteResponse]]._unwrapper, ), - cast_to=SnippetDeleteResponse, + cast_to=cast(Type[str], ResultWrapper[str]), ) def get( @@ -216,14 +242,14 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Snippet]: + ) -> SnippetGetResponse: """ - Snippet + Fetches a snippet belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - snippet_name: Snippet identifying name + snippet_name: The identifying name of the snippet. extra_headers: Send extra headers @@ -244,9 +270,9 @@ def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[Snippet]]._unwrapper, + post_parser=ResultWrapper[SnippetGetResponse]._unwrapper, ), - cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]), + cast_to=cast(Type[SnippetGetResponse], ResultWrapper[SnippetGetResponse]), ) @@ -283,24 +309,26 @@ async def update( snippet_name: str, *, zone_id: str, - files: str | NotGiven = NOT_GIVEN, - metadata: snippet_update_params.Metadata | NotGiven = NOT_GIVEN, + files: List[FileTypes], + metadata: snippet_update_params.Metadata, # 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Snippet]: + ) -> SnippetUpdateResponse: """ - Put Snippet + Creates or updates a snippet belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - snippet_name: Snippet identifying name + snippet_name: The identifying name of the snippet. - files: Content files of uploaded snippet + files: The list of files belonging to the snippet. + + metadata: Metadata about the snippet. extra_headers: Send extra headers @@ -314,45 +342,53 @@ async def update( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") if not snippet_name: raise ValueError(f"Expected a non-empty value for `snippet_name` but received {snippet_name!r}") + body = deepcopy_minimal( + { + "files": files, + "metadata": metadata, + } + ) + extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", ""]]) # It should be noted that the actual Content-Type header that will be # sent to the server will contain a `boundary` parameter, e.g. # multipart/form-data; boundary=---abc-- extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._put( f"/zones/{zone_id}/snippets/{snippet_name}", - body=await async_maybe_transform( - { - "files": files, - "metadata": metadata, - }, - snippet_update_params.SnippetUpdateParams, - ), + body=await async_maybe_transform(body, snippet_update_params.SnippetUpdateParams), + files=extracted_files, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[Snippet]]._unwrapper, + post_parser=ResultWrapper[SnippetUpdateResponse]._unwrapper, ), - cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]), + cast_to=cast(Type[SnippetUpdateResponse], ResultWrapper[SnippetUpdateResponse]), ) def list( self, *, zone_id: str, + page: int | NotGiven = NOT_GIVEN, + per_page: int | 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[Snippet, AsyncSinglePage[Snippet]]: + ) -> AsyncPaginator[SnippetListResponse, AsyncV4PagePaginationArray[SnippetListResponse]]: """ - All Snippets + Fetches all snippets belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. + + page: The current page number. + + per_page: The number of results to return per page. extra_headers: Send extra headers @@ -366,11 +402,21 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/snippets", - page=AsyncSinglePage[Snippet], + page=AsyncV4PagePaginationArray[SnippetListResponse], options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "page": page, + "per_page": per_page, + }, + snippet_list_params.SnippetListParams, + ), ), - model=Snippet, + model=SnippetListResponse, ) async def delete( @@ -384,14 +430,14 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SnippetDeleteResponse: + ) -> str: """ - Delete Snippet + Deletes a snippet belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - snippet_name: Snippet identifying name + snippet_name: The identifying name of the snippet. extra_headers: Send extra headers @@ -408,9 +454,13 @@ async def delete( return await self._delete( f"/zones/{zone_id}/snippets/{snippet_name}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[SnippetDeleteResponse]]._unwrapper, ), - cast_to=SnippetDeleteResponse, + cast_to=cast(Type[str], ResultWrapper[str]), ) async def get( @@ -424,14 +474,14 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Snippet]: + ) -> SnippetGetResponse: """ - Snippet + Fetches a snippet belonging to the zone. Args: - zone_id: Identifier + zone_id: The unique ID of the zone. - snippet_name: Snippet identifying name + snippet_name: The identifying name of the snippet. extra_headers: Send extra headers @@ -452,9 +502,9 @@ async def get( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[Optional[Snippet]]._unwrapper, + post_parser=ResultWrapper[SnippetGetResponse]._unwrapper, ), - cast_to=cast(Type[Optional[Snippet]], ResultWrapper[Snippet]), + cast_to=cast(Type[SnippetGetResponse], ResultWrapper[SnippetGetResponse]), ) diff --git a/src/cloudflare/types/snippets/__init__.py b/src/cloudflare/types/snippets/__init__.py index a166150902d..380f54adfbb 100644 --- a/src/cloudflare/types/snippets/__init__.py +++ b/src/cloudflare/types/snippets/__init__.py @@ -2,10 +2,13 @@ from __future__ import annotations -from .snippet import Snippet as Snippet from .rule_list_response import RuleListResponse as RuleListResponse from .rule_update_params import RuleUpdateParams as RuleUpdateParams +from .snippet_list_params import SnippetListParams as SnippetListParams from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse +from .snippet_get_response import SnippetGetResponse as SnippetGetResponse +from .snippet_list_response import SnippetListResponse as SnippetListResponse from .snippet_update_params import SnippetUpdateParams as SnippetUpdateParams from .snippet_delete_response import SnippetDeleteResponse as SnippetDeleteResponse +from .snippet_update_response import SnippetUpdateResponse as SnippetUpdateResponse diff --git a/src/cloudflare/types/snippets/rule_delete_response.py b/src/cloudflare/types/snippets/rule_delete_response.py index 4e1765a3121..c950a953427 100644 --- a/src/cloudflare/types/snippets/rule_delete_response.py +++ b/src/cloudflare/types/snippets/rule_delete_response.py @@ -1,18 +1,28 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List -from typing_extensions import Literal +from typing import Optional +from datetime import datetime from ..._models import BaseModel -from ..shared.response_info import ResponseInfo __all__ = ["RuleDeleteResponse"] class RuleDeleteResponse(BaseModel): - errors: List[ResponseInfo] + id: str + """The unique ID of the rule.""" - messages: List[ResponseInfo] + expression: str + """The expression defining which traffic will match the rule.""" - success: Literal[True] - """Whether the API call was successful""" + last_updated: datetime + """The timestamp of when the rule was last modified.""" + + snippet_name: str + """The identifying name of the snippet.""" + + description: Optional[str] = None + """An informative description of the rule.""" + + enabled: Optional[bool] = None + """Whether the rule should be executed.""" diff --git a/src/cloudflare/types/snippets/rule_list_response.py b/src/cloudflare/types/snippets/rule_list_response.py index 63c540e55c7..24b994c9da8 100644 --- a/src/cloudflare/types/snippets/rule_list_response.py +++ b/src/cloudflare/types/snippets/rule_list_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from datetime import datetime from ..._models import BaseModel @@ -8,11 +9,20 @@ class RuleListResponse(BaseModel): - description: Optional[str] = None + id: str + """The unique ID of the rule.""" - enabled: Optional[bool] = None + expression: str + """The expression defining which traffic will match the rule.""" + + last_updated: datetime + """The timestamp of when the rule was last modified.""" - expression: Optional[str] = None + snippet_name: str + """The identifying name of the snippet.""" - snippet_name: Optional[str] = None - """Snippet identifying name""" + description: Optional[str] = None + """An informative description of the rule.""" + + enabled: Optional[bool] = None + """Whether the rule should be executed.""" diff --git a/src/cloudflare/types/snippets/rule_update_params.py b/src/cloudflare/types/snippets/rule_update_params.py index a539ccf8213..5a91c7e90ce 100644 --- a/src/cloudflare/types/snippets/rule_update_params.py +++ b/src/cloudflare/types/snippets/rule_update_params.py @@ -5,23 +5,26 @@ from typing import Iterable from typing_extensions import Required, TypedDict -__all__ = ["RuleUpdateParams", "Rule"] +__all__ = ["RuleUpdateParams", "Body"] class RuleUpdateParams(TypedDict, total=False): zone_id: Required[str] - """Identifier""" + """The unique ID of the zone.""" - rules: Iterable[Rule] - """List of snippet rules""" + body: Required[Iterable[Body]] + """A list of snippet rules.""" -class Rule(TypedDict, total=False): - description: str +class Body(TypedDict, total=False): + expression: Required[str] + """The expression defining which traffic will match the rule.""" - enabled: bool + snippet_name: Required[str] + """The identifying name of the snippet.""" - expression: str + description: str + """An informative description of the rule.""" - snippet_name: str - """Snippet identifying name""" + enabled: bool + """Whether the rule should be executed.""" diff --git a/src/cloudflare/types/snippets/rule_update_response.py b/src/cloudflare/types/snippets/rule_update_response.py index 29121fa03ab..e27e8b9e0b2 100644 --- a/src/cloudflare/types/snippets/rule_update_response.py +++ b/src/cloudflare/types/snippets/rule_update_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from datetime import datetime from ..._models import BaseModel @@ -8,11 +9,20 @@ class RuleUpdateResponse(BaseModel): - description: Optional[str] = None + id: str + """The unique ID of the rule.""" - enabled: Optional[bool] = None + expression: str + """The expression defining which traffic will match the rule.""" + + last_updated: datetime + """The timestamp of when the rule was last modified.""" - expression: Optional[str] = None + snippet_name: str + """The identifying name of the snippet.""" - snippet_name: Optional[str] = None - """Snippet identifying name""" + description: Optional[str] = None + """An informative description of the rule.""" + + enabled: Optional[bool] = None + """Whether the rule should be executed.""" diff --git a/src/cloudflare/types/snippets/snippet.py b/src/cloudflare/types/snippets/snippet.py deleted file mode 100644 index 69dc660896e..00000000000 --- a/src/cloudflare/types/snippets/snippet.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["Snippet"] - - -class Snippet(BaseModel): - created_on: Optional[str] = None - """Creation time of the snippet""" - - modified_on: Optional[str] = None - """Modification time of the snippet""" - - snippet_name: Optional[str] = None - """Snippet identifying name""" diff --git a/src/cloudflare/types/snippets/snippet_delete_response.py b/src/cloudflare/types/snippets/snippet_delete_response.py index 6a1b4806d1b..df12b7993ea 100644 --- a/src/cloudflare/types/snippets/snippet_delete_response.py +++ b/src/cloudflare/types/snippets/snippet_delete_response.py @@ -1,18 +1,8 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List -from typing_extensions import Literal - -from ..._models import BaseModel -from ..shared.response_info import ResponseInfo +from typing import Optional +from typing_extensions import TypeAlias __all__ = ["SnippetDeleteResponse"] - -class SnippetDeleteResponse(BaseModel): - errors: List[ResponseInfo] - - messages: List[ResponseInfo] - - success: Literal[True] - """Whether the API call was successful""" +SnippetDeleteResponse: TypeAlias = Optional[str] diff --git a/src/cloudflare/types/snippets/snippet_get_response.py b/src/cloudflare/types/snippets/snippet_get_response.py new file mode 100644 index 00000000000..905fc50d1cb --- /dev/null +++ b/src/cloudflare/types/snippets/snippet_get_response.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["SnippetGetResponse"] + + +class SnippetGetResponse(BaseModel): + created_on: datetime + """The timestamp of when the snippet was created.""" + + snippet_name: str + """The identifying name of the snippet.""" + + modified_on: Optional[datetime] = None + """The timestamp of when the snippet was last modified.""" diff --git a/src/cloudflare/types/snippets/snippet_list_params.py b/src/cloudflare/types/snippets/snippet_list_params.py new file mode 100644 index 00000000000..2415136e4e5 --- /dev/null +++ b/src/cloudflare/types/snippets/snippet_list_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["SnippetListParams"] + + +class SnippetListParams(TypedDict, total=False): + zone_id: Required[str] + """The unique ID of the zone.""" + + page: int + """The current page number.""" + + per_page: int + """The number of results to return per page.""" diff --git a/src/cloudflare/types/snippets/snippet_list_response.py b/src/cloudflare/types/snippets/snippet_list_response.py new file mode 100644 index 00000000000..9f12aa6bc21 --- /dev/null +++ b/src/cloudflare/types/snippets/snippet_list_response.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["SnippetListResponse"] + + +class SnippetListResponse(BaseModel): + created_on: datetime + """The timestamp of when the snippet was created.""" + + snippet_name: str + """The identifying name of the snippet.""" + + modified_on: Optional[datetime] = None + """The timestamp of when the snippet was last modified.""" diff --git a/src/cloudflare/types/snippets/snippet_update_params.py b/src/cloudflare/types/snippets/snippet_update_params.py index 7f1e3894a00..5145f0db834 100644 --- a/src/cloudflare/types/snippets/snippet_update_params.py +++ b/src/cloudflare/types/snippets/snippet_update_params.py @@ -2,21 +2,25 @@ from __future__ import annotations +from typing import List from typing_extensions import Required, TypedDict +from ..._types import FileTypes + __all__ = ["SnippetUpdateParams", "Metadata"] class SnippetUpdateParams(TypedDict, total=False): zone_id: Required[str] - """Identifier""" + """The unique ID of the zone.""" - files: str - """Content files of uploaded snippet""" + files: Required[List[FileTypes]] + """The list of files belonging to the snippet.""" - metadata: Metadata + metadata: Required[Metadata] + """Metadata about the snippet.""" class Metadata(TypedDict, total=False): - main_module: str - """Main module name of uploaded snippet""" + main_module: Required[str] + """Name of the file that contains the main module of the snippet.""" diff --git a/src/cloudflare/types/snippets/snippet_update_response.py b/src/cloudflare/types/snippets/snippet_update_response.py new file mode 100644 index 00000000000..664c8fccbe0 --- /dev/null +++ b/src/cloudflare/types/snippets/snippet_update_response.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["SnippetUpdateResponse"] + + +class SnippetUpdateResponse(BaseModel): + created_on: datetime + """The timestamp of when the snippet was created.""" + + snippet_name: str + """The identifying name of the snippet.""" + + modified_on: Optional[datetime] = None + """The timestamp of when the snippet was last modified.""" diff --git a/tests/api_resources/snippets/test_content.py b/tests/api_resources/snippets/test_content.py index 163b3683f2b..a3d69547087 100644 --- a/tests/api_resources/snippets/test_content.py +++ b/tests/api_resources/snippets/test_content.py @@ -27,12 +27,12 @@ class TestContent: @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock( + respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) content = client.snippets.content.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert content.is_closed assert content.json() == {"foo": "bar"} @@ -43,13 +43,13 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock( + respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) content = client.snippets.content.with_raw_response.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert content.is_closed is True @@ -61,12 +61,12 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock( + respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.snippets.content.with_streaming_response.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as content: assert not content.is_closed assert content.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,14 +83,14 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.content.with_raw_response.get( - snippet_name="snippet_name_01", + snippet_name="my_snippet", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.content.with_raw_response.get( snippet_name="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) @@ -103,12 +103,12 @@ class TestAsyncContent: @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock( + respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) content = await async_client.snippets.content.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert content.is_closed assert await content.json() == {"foo": "bar"} @@ -119,13 +119,13 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock( + respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) content = await async_client.snippets.content.with_raw_response.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert content.is_closed is True @@ -137,12 +137,12 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/zones/023e105f4ecef8ad9ca31a8372d0c353/snippets/snippet_name_01/content").mock( + respx_mock.get("/zones/9f1839b6152d298aca64c4e906b6d074/snippets/my_snippet/content").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.snippets.content.with_streaming_response.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as content: assert not content.is_closed assert content.http_request.headers.get("X-Stainless-Lang") == "python" @@ -159,12 +159,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.content.with_raw_response.get( - snippet_name="snippet_name_01", + snippet_name="my_snippet", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.content.with_raw_response.get( snippet_name="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) diff --git a/tests/api_resources/snippets/test_rules.py b/tests/api_resources/snippets/test_rules.py index 46a3e6bb37f..84cec8e671c 100644 --- a/tests/api_resources/snippets/test_rules.py +++ b/tests/api_resources/snippets/test_rules.py @@ -21,20 +21,11 @@ class TestRules: @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.snippets.rules.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(SyncSinglePage[RuleUpdateResponse], rule, path=["response"]) - - @parametrize - def test_method_update_with_all_params(self, client: Cloudflare) -> None: - rule = client.snippets.rules.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - rules=[ + zone_id="9f1839b6152d298aca64c4e906b6d074", + body=[ { - "description": "Rule description", - "enabled": True, - "expression": 'http.cookie eq "a=b"', - "snippet_name": "snippet_name_01", + "expression": "ip.src ne 1.1.1.1", + "snippet_name": "my_snippet", } ], ) @@ -43,7 +34,13 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.snippets.rules.with_raw_response.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", + body=[ + { + "expression": "ip.src ne 1.1.1.1", + "snippet_name": "my_snippet", + } + ], ) assert response.is_closed is True @@ -54,7 +51,13 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.snippets.rules.with_streaming_response.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", + body=[ + { + "expression": "ip.src ne 1.1.1.1", + "snippet_name": "my_snippet", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,19 +72,25 @@ 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.snippets.rules.with_raw_response.update( zone_id="", + body=[ + { + "expression": "ip.src ne 1.1.1.1", + "snippet_name": "my_snippet", + } + ], ) @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.snippets.rules.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.snippets.rules.with_raw_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True @@ -92,7 +101,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.snippets.rules.with_streaming_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -112,31 +121,31 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.snippets.rules.delete( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(SyncSinglePage[RuleDeleteResponse], rule, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.snippets.rules.with_raw_response.delete( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(SyncSinglePage[RuleDeleteResponse], rule, path=["response"]) @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.snippets.rules.with_streaming_response.delete( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(SyncSinglePage[RuleDeleteResponse], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -156,20 +165,11 @@ class TestAsyncRules: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.snippets.rules.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(AsyncSinglePage[RuleUpdateResponse], rule, path=["response"]) - - @parametrize - async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - rule = await async_client.snippets.rules.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - rules=[ + zone_id="9f1839b6152d298aca64c4e906b6d074", + body=[ { - "description": "Rule description", - "enabled": True, - "expression": 'http.cookie eq "a=b"', - "snippet_name": "snippet_name_01", + "expression": "ip.src ne 1.1.1.1", + "snippet_name": "my_snippet", } ], ) @@ -178,7 +178,13 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.rules.with_raw_response.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", + body=[ + { + "expression": "ip.src ne 1.1.1.1", + "snippet_name": "my_snippet", + } + ], ) assert response.is_closed is True @@ -189,7 +195,13 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.rules.with_streaming_response.update( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", + body=[ + { + "expression": "ip.src ne 1.1.1.1", + "snippet_name": "my_snippet", + } + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,19 +216,25 @@ 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.snippets.rules.with_raw_response.update( zone_id="", + body=[ + { + "expression": "ip.src ne 1.1.1.1", + "snippet_name": "my_snippet", + } + ], ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.snippets.rules.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.rules.with_raw_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True @@ -227,7 +245,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.rules.with_streaming_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -247,31 +265,31 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.snippets.rules.delete( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(AsyncSinglePage[RuleDeleteResponse], rule, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.rules.with_raw_response.delete( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(AsyncSinglePage[RuleDeleteResponse], rule, path=["response"]) @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.rules.with_streaming_response.delete( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleDeleteResponse, rule, path=["response"]) + assert_matches_type(AsyncSinglePage[RuleDeleteResponse], rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_snippets.py b/tests/api_resources/test_snippets.py index e0ca184d00e..613a845621b 100644 --- a/tests/api_resources/test_snippets.py +++ b/tests/api_resources/test_snippets.py @@ -3,14 +3,18 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.snippets import Snippet, SnippetDeleteResponse +from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray +from cloudflare.types.snippets import ( + SnippetGetResponse, + SnippetListResponse, + SnippetUpdateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,47 +26,42 @@ class TestSnippets: @parametrize def test_method_update(self, client: Cloudflare) -> None: snippet = client.snippets.update( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Snippet], snippet, path=["response"]) - - @pytest.mark.skip(reason="throwing HTTP 415") - @parametrize - def test_method_update_with_all_params(self, client: Cloudflare) -> None: - snippet = client.snippets.update( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - files="export { async function fetch(request, env) {return new Response('some_response') } }", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", + files=[b"raw file contents"], metadata={"main_module": "main.js"}, ) - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) @pytest.mark.skip(reason="throwing HTTP 415") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.update( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", + files=[b"raw file contents"], + metadata={"main_module": "main.js"}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) @pytest.mark.skip(reason="throwing HTTP 415") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.update( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", + files=[b"raw file contents"], + metadata={"main_module": "main.js"}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -71,44 +70,57 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: 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.snippets.with_raw_response.update( - snippet_name="snippet_name_01", + snippet_name="my_snippet", zone_id="", + files=[b"raw file contents"], + metadata={"main_module": "main.js"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.update( snippet_name="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", + files=[b"raw file contents"], + metadata={"main_module": "main.js"}, ) @parametrize def test_method_list(self, client: Cloudflare) -> None: snippet = client.snippets.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", + ) + assert_matches_type(SyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Cloudflare) -> None: + snippet = client.snippets.list( + zone_id="9f1839b6152d298aca64c4e906b6d074", + page=1, + per_page=25, ) - assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"]) @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -122,34 +134,34 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: snippet = client.snippets.delete( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) - assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) + assert_matches_type(str, snippet, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.delete( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) + assert_matches_type(str, snippet, path=["response"]) @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.delete( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) + assert_matches_type(str, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -157,47 +169,47 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.delete( - snippet_name="snippet_name_01", + snippet_name="my_snippet", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.delete( snippet_name="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: snippet = client.snippets.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetGetResponse, snippet, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetGetResponse, snippet, path=["response"]) @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetGetResponse, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -205,14 +217,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.get( - snippet_name="snippet_name_01", + snippet_name="my_snippet", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.get( snippet_name="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) @@ -225,47 +237,42 @@ class TestAsyncSnippets: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.update( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[Snippet], snippet, path=["response"]) - - @pytest.mark.skip(reason="throwing HTTP 415") - @parametrize - async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: - snippet = await async_client.snippets.update( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - files="export { async function fetch(request, env) {return new Response('some_response') } }", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", + files=[b"raw file contents"], metadata={"main_module": "main.js"}, ) - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) @pytest.mark.skip(reason="throwing HTTP 415") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.update( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", + files=[b"raw file contents"], + metadata={"main_module": "main.js"}, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) @pytest.mark.skip(reason="throwing HTTP 415") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.update( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", + files=[b"raw file contents"], + metadata={"main_module": "main.js"}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetUpdateResponse, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -274,44 +281,57 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> 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.snippets.with_raw_response.update( - snippet_name="snippet_name_01", + snippet_name="my_snippet", zone_id="", + files=[b"raw file contents"], + metadata={"main_module": "main.js"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.update( snippet_name="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", + files=[b"raw file contents"], + metadata={"main_module": "main.js"}, ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", + ) + assert_matches_type(AsyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: + snippet = await async_client.snippets.list( + zone_id="9f1839b6152d298aca64c4e906b6d074", + page=1, + per_page=25, ) - assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.list( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[SnippetListResponse], snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -325,34 +345,34 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.delete( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) - assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) + assert_matches_type(str, snippet, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.delete( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) + assert_matches_type(str, snippet, path=["response"]) @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.delete( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) + assert_matches_type(str, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -360,47 +380,47 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.delete( - snippet_name="snippet_name_01", + snippet_name="my_snippet", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.delete( snippet_name="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetGetResponse, snippet, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetGetResponse, snippet, path=["response"]) @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.get( - snippet_name="snippet_name_01", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + snippet_name="my_snippet", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(Optional[Snippet], snippet, path=["response"]) + assert_matches_type(SnippetGetResponse, snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -408,12 +428,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.get( - snippet_name="snippet_name_01", + snippet_name="my_snippet", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.get( snippet_name="", - zone_id="023e105f4ecef8ad9ca31a8372d0c353", + zone_id="9f1839b6152d298aca64c4e906b6d074", ) From 88dab662fe5e824887485782e54d4621c60961e3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:44:27 +0000 Subject: [PATCH 344/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 56b0f33d115..6b375fe48e7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-11f530e0accb1d6d9ee14a3a1fdf9e99ebff98e60ac7f59edbd17aafb11e2007.yml -openapi_spec_hash: 185fb53ac70e4b381c40c7e8d291df98 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8b1bca944f110e0de0f19fbbbc170d58e47b8996f8b945ede7c55e289c1f5f1e.yml +openapi_spec_hash: 2022aee5dbc58b0b3fb146ee4c7ee9ba config_hash: 4a37da9893560914a7ac1a75cc01202a From 1b8800675d34f8b6f09a54c307a300077903a8ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:56:19 +0000 Subject: [PATCH 345/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6b375fe48e7..6ae16abc5ea 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8b1bca944f110e0de0f19fbbbc170d58e47b8996f8b945ede7c55e289c1f5f1e.yml -openapi_spec_hash: 2022aee5dbc58b0b3fb146ee4c7ee9ba +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-709bddd6b91a5e681c2ec5e0dfa5ff72e54ee14172c94106f686244a75e616ab.yml +openapi_spec_hash: fa579adf5353c39192ab0b879e22257a config_hash: 4a37da9893560914a7ac1a75cc01202a From 0187ceb276e36992f2e44f14674abfa21a90aee3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:07:47 +0000 Subject: [PATCH 346/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6ae16abc5ea..bdd313b133b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-709bddd6b91a5e681c2ec5e0dfa5ff72e54ee14172c94106f686244a75e616ab.yml -openapi_spec_hash: fa579adf5353c39192ab0b879e22257a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fd6f617d40367c9138edd2c312e02e8d9ba159df60316a0cb6b05f5da9def51c.yml +openapi_spec_hash: 4f291eb8643640c1b842ad73043d0492 config_hash: 4a37da9893560914a7ac1a75cc01202a From cb9d535393c99a04a5a144f07ac260f1027eec58 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:35:49 +0000 Subject: [PATCH 347/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bdd313b133b..ff45cef6e0e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fd6f617d40367c9138edd2c312e02e8d9ba159df60316a0cb6b05f5da9def51c.yml -openapi_spec_hash: 4f291eb8643640c1b842ad73043d0492 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-760ea76244cfa1bdcc28baac89ead8a7066e9868531aaddffb6ccc8802e2e5b4.yml +openapi_spec_hash: c893540155dbb485039a5b57e64ece61 config_hash: 4a37da9893560914a7ac1a75cc01202a From 5eeb5390595eba78791fccd3270492ede23405a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:10:44 +0000 Subject: [PATCH 348/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ff45cef6e0e..d1dc29991b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-760ea76244cfa1bdcc28baac89ead8a7066e9868531aaddffb6ccc8802e2e5b4.yml -openapi_spec_hash: c893540155dbb485039a5b57e64ece61 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b6f2b687bf8f447895124119e1438771342734068a0821516f5047b83d5d3ec7.yml +openapi_spec_hash: 429cfdf0d358d327d26a56f274631db1 config_hash: 4a37da9893560914a7ac1a75cc01202a From 230ae2d7459ec2e2a4e7bc5f1c6abb3371e55860 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:34:07 +0000 Subject: [PATCH 349/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d1dc29991b2..f7c0ec5d2eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b6f2b687bf8f447895124119e1438771342734068a0821516f5047b83d5d3ec7.yml -openapi_spec_hash: 429cfdf0d358d327d26a56f274631db1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8e0538866d9e5c4160420a6fa355975d6d67ed9afe8baa485bab806895b4ebee.yml +openapi_spec_hash: 99927ea5b698f1e5f9d27222e2cd3d4e config_hash: 4a37da9893560914a7ac1a75cc01202a From 310e91cdd28741733d702cf95aaa87072b12bfc0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:54:13 +0000 Subject: [PATCH 350/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f7c0ec5d2eb..a6a431990e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8e0538866d9e5c4160420a6fa355975d6d67ed9afe8baa485bab806895b4ebee.yml -openapi_spec_hash: 99927ea5b698f1e5f9d27222e2cd3d4e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-df3e57fc009b3288e627cc200018db5b00f119bf7af968734eaa7abb101d9243.yml +openapi_spec_hash: 721c84387f1cfda7d1c2ad8479a5212c config_hash: 4a37da9893560914a7ac1a75cc01202a From 31adc61b53e2f7a10878ff1c1ca60f11d46b5772 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:06:27 +0000 Subject: [PATCH 351/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a6a431990e5..edc924b977e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-df3e57fc009b3288e627cc200018db5b00f119bf7af968734eaa7abb101d9243.yml -openapi_spec_hash: 721c84387f1cfda7d1c2ad8479a5212c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1962c1a0bc4e6b1375f948f59a159bc652792b4296de38d0e6d7e922cab4ed9b.yml +openapi_spec_hash: 7192f11a8354eea8625d87a6f0f6c45a config_hash: 4a37da9893560914a7ac1a75cc01202a From 3e7d58a63da10815b04bc4945e819ea7ac975377 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:17:28 +0000 Subject: [PATCH 352/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index edc924b977e..9d5e9c10ba5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1962c1a0bc4e6b1375f948f59a159bc652792b4296de38d0e6d7e922cab4ed9b.yml -openapi_spec_hash: 7192f11a8354eea8625d87a6f0f6c45a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7fec511369a0cdd1964ae80a4c5494a2cf1c32edffe9e0c357cc0e954d4b364d.yml +openapi_spec_hash: 7e7412d812db9d97d204be8b6313c6ff config_hash: 4a37da9893560914a7ac1a75cc01202a From 90035b1ef5df466e26f5569005042342f34685a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:29:02 +0000 Subject: [PATCH 353/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/resources/zero_trust/gateway/locations.py | 8 ++++---- .../types/zero_trust/gateway/doh_endpoint_param.py | 4 ++-- .../types/zero_trust/gateway/dot_endpoint_param.py | 4 ++-- .../types/zero_trust/gateway/ipv6_endpoint_param.py | 4 ++-- .../types/zero_trust/gateway/location_create_params.py | 4 ++-- .../types/zero_trust/gateway/location_update_params.py | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9d5e9c10ba5..b8625f0e24a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7fec511369a0cdd1964ae80a4c5494a2cf1c32edffe9e0c357cc0e954d4b364d.yml -openapi_spec_hash: 7e7412d812db9d97d204be8b6313c6ff +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4595f0857b20ab50f25d4659de8bb3f52d17e97902891e93ffe81d2eb2996477.yml +openapi_spec_hash: 93099cd50af0c833278cc49acbbef94e config_hash: 4a37da9893560914a7ac1a75cc01202a diff --git a/src/cloudflare/resources/zero_trust/gateway/locations.py b/src/cloudflare/resources/zero_trust/gateway/locations.py index fcbcd6698e6..39a5683c73b 100644 --- a/src/cloudflare/resources/zero_trust/gateway/locations.py +++ b/src/cloudflare/resources/zero_trust/gateway/locations.py @@ -55,7 +55,7 @@ def create( dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, endpoints: EndpointParam | NotGiven = NOT_GIVEN, - networks: Iterable[location_create_params.Network] | NotGiven = NOT_GIVEN, + networks: Optional[Iterable[location_create_params.Network]] | 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, @@ -130,7 +130,7 @@ def update( dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, endpoints: EndpointParam | NotGiven = NOT_GIVEN, - networks: Iterable[location_update_params.Network] | NotGiven = NOT_GIVEN, + networks: Optional[Iterable[location_update_params.Network]] | 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, @@ -341,7 +341,7 @@ async def create( dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, endpoints: EndpointParam | NotGiven = NOT_GIVEN, - networks: Iterable[location_create_params.Network] | NotGiven = NOT_GIVEN, + networks: Optional[Iterable[location_create_params.Network]] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -416,7 +416,7 @@ async def update( dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, endpoints: EndpointParam | NotGiven = NOT_GIVEN, - networks: Iterable[location_update_params.Network] | NotGiven = NOT_GIVEN, + networks: Optional[Iterable[location_update_params.Network]] | 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, diff --git a/src/cloudflare/types/zero_trust/gateway/doh_endpoint_param.py b/src/cloudflare/types/zero_trust/gateway/doh_endpoint_param.py index b742fc65b52..abe16c9d3a7 100644 --- a/src/cloudflare/types/zero_trust/gateway/doh_endpoint_param.py +++ b/src/cloudflare/types/zero_trust/gateway/doh_endpoint_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable +from typing import Iterable, Optional from typing_extensions import TypedDict from .ip_network_param import IPNetworkParam @@ -14,7 +14,7 @@ class DOHEndpointParam(TypedDict, total=False): enabled: bool """True if the endpoint is enabled for this location.""" - networks: Iterable[IPNetworkParam] + networks: Optional[Iterable[IPNetworkParam]] """A list of allowed source IP network ranges for this endpoint. When empty, all source IPs are allowed. A non-empty list is only effective if diff --git a/src/cloudflare/types/zero_trust/gateway/dot_endpoint_param.py b/src/cloudflare/types/zero_trust/gateway/dot_endpoint_param.py index f72b4c1ef13..2766ec6c45e 100644 --- a/src/cloudflare/types/zero_trust/gateway/dot_endpoint_param.py +++ b/src/cloudflare/types/zero_trust/gateway/dot_endpoint_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable +from typing import Iterable, Optional from typing_extensions import TypedDict from .ip_network_param import IPNetworkParam @@ -14,7 +14,7 @@ class DOTEndpointParam(TypedDict, total=False): enabled: bool """True if the endpoint is enabled for this location.""" - networks: Iterable[IPNetworkParam] + networks: Optional[Iterable[IPNetworkParam]] """A list of allowed source IP network ranges for this endpoint. When empty, all source IPs are allowed. A non-empty list is only effective if diff --git a/src/cloudflare/types/zero_trust/gateway/ipv6_endpoint_param.py b/src/cloudflare/types/zero_trust/gateway/ipv6_endpoint_param.py index 5c48a9dc32e..df7ead856d4 100644 --- a/src/cloudflare/types/zero_trust/gateway/ipv6_endpoint_param.py +++ b/src/cloudflare/types/zero_trust/gateway/ipv6_endpoint_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable +from typing import Iterable, Optional from typing_extensions import TypedDict from .ipv6_network_param import IPV6NetworkParam @@ -14,7 +14,7 @@ class IPV6EndpointParam(TypedDict, total=False): enabled: bool """True if the endpoint is enabled for this location.""" - networks: Iterable[IPV6NetworkParam] + networks: Optional[Iterable[IPV6NetworkParam]] """A list of allowed source IPv6 network ranges for this endpoint. When empty, all source IPs are allowed. A non-empty list is only effective if diff --git a/src/cloudflare/types/zero_trust/gateway/location_create_params.py b/src/cloudflare/types/zero_trust/gateway/location_create_params.py index 69898f1625b..1db801a7c5b 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_create_params.py +++ b/src/cloudflare/types/zero_trust/gateway/location_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable +from typing import Iterable, Optional from typing_extensions import Required, TypedDict from .endpoint_param import EndpointParam @@ -38,7 +38,7 @@ class LocationCreateParams(TypedDict, total=False): endpoints configuration remains unchanged. """ - networks: Iterable[Network] + networks: Optional[Iterable[Network]] """A list of network ranges that requests from this location would originate from. A non-empty list is only effective if the ipv4 endpoint is enabled for this diff --git a/src/cloudflare/types/zero_trust/gateway/location_update_params.py b/src/cloudflare/types/zero_trust/gateway/location_update_params.py index 530e5b17e6c..76e8bb7f8a9 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_update_params.py +++ b/src/cloudflare/types/zero_trust/gateway/location_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable +from typing import Iterable, Optional from typing_extensions import Required, TypedDict from .endpoint_param import EndpointParam @@ -38,7 +38,7 @@ class LocationUpdateParams(TypedDict, total=False): endpoints configuration remains unchanged. """ - networks: Iterable[Network] + networks: Optional[Iterable[Network]] """A list of network ranges that requests from this location would originate from. A non-empty list is only effective if the ipv4 endpoint is enabled for this From f6c72ea573ed99cc71dd9f85c1265a4cee581ebc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:46:38 +0000 Subject: [PATCH 354/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b8625f0e24a..1c0132889a2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4595f0857b20ab50f25d4659de8bb3f52d17e97902891e93ffe81d2eb2996477.yml -openapi_spec_hash: 93099cd50af0c833278cc49acbbef94e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b95716ec1c8bc841b8d32a0b497db9febe63e55303936425b8893baf1d7986ef.yml +openapi_spec_hash: 09e1ee2bc47c77d94ea52c371ed3d404 config_hash: 4a37da9893560914a7ac1a75cc01202a From c9c06d5f4b79f2d1631d112fdd7ffafb0032e25a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:11:50 +0000 Subject: [PATCH 355/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1c0132889a2..015585af359 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b95716ec1c8bc841b8d32a0b497db9febe63e55303936425b8893baf1d7986ef.yml -openapi_spec_hash: 09e1ee2bc47c77d94ea52c371ed3d404 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d433472b23ca82769dcf5d6214c6851f4495eda7fd882db77d0caf3a4328153a.yml +openapi_spec_hash: c7054c3968d7b19eb13fac5367799953 config_hash: 4a37da9893560914a7ac1a75cc01202a From ef97dc26cd3fac2b4b4c947d6a648cd00aae7a14 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:23:34 +0000 Subject: [PATCH 356/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 015585af359..69f259d928a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d433472b23ca82769dcf5d6214c6851f4495eda7fd882db77d0caf3a4328153a.yml -openapi_spec_hash: c7054c3968d7b19eb13fac5367799953 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-13b57e45981685a6b8372240c11216748658b990017d0b2f64477bbbb978259a.yml +openapi_spec_hash: 6d0d5ce614a7d6c63ef3e4709751cbf0 config_hash: 4a37da9893560914a7ac1a75cc01202a From d73381f79d699f148c0ba0697291c7bfaef25181 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:35:00 +0000 Subject: [PATCH 357/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 69f259d928a..cf0dba6caea 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-13b57e45981685a6b8372240c11216748658b990017d0b2f64477bbbb978259a.yml -openapi_spec_hash: 6d0d5ce614a7d6c63ef3e4709751cbf0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c093d3b152ec3c14cc6288a14385a18efab4f12d99e86cadd923342c565c7c4e.yml +openapi_spec_hash: 608b058a8d7bd197a14dab04e018739f config_hash: 4a37da9893560914a7ac1a75cc01202a From eea855a0e55ff726680f183b447e66c7ddc405f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:58:27 +0000 Subject: [PATCH 358/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cf0dba6caea..f075e4a3f56 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1775 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c093d3b152ec3c14cc6288a14385a18efab4f12d99e86cadd923342c565c7c4e.yml -openapi_spec_hash: 608b058a8d7bd197a14dab04e018739f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be33ed716939444c958b96a8d44b4c5cadd6ca31e9f8a482499af3b9e02a32a1.yml +openapi_spec_hash: 0eaa6c9fe834ee3f0dd40c71033e412e config_hash: 4a37da9893560914a7ac1a75cc01202a From d00a8be88733a8a5aa1af3abdb942e47befc2b47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 18:15:15 +0000 Subject: [PATCH 359/392] chore(api): upload stainless config from cloudflare-config --- .stats.yml | 4 +- api.md | 17 + .../resources/diagnostics/__init__.py | 14 + .../resources/diagnostics/diagnostics.py | 32 ++ .../diagnostics/endpoint_healthchecks.py | 314 ++++++++++++++++++ src/cloudflare/types/diagnostics/__init__.py | 3 + .../endpoint_healthcheck_create_params.py | 21 ++ .../endpoint_healthcheck_create_response.py | 22 ++ .../endpoint_healthcheck_list_response.py | 22 ++ .../diagnostics/test_endpoint_healthchecks.py | 215 ++++++++++++ 10 files changed, 662 insertions(+), 2 deletions(-) create mode 100644 src/cloudflare/resources/diagnostics/endpoint_healthchecks.py create mode 100644 src/cloudflare/types/diagnostics/endpoint_healthcheck_create_params.py create mode 100644 src/cloudflare/types/diagnostics/endpoint_healthcheck_create_response.py create mode 100644 src/cloudflare/types/diagnostics/endpoint_healthcheck_list_response.py create mode 100644 tests/api_resources/diagnostics/test_endpoint_healthchecks.py diff --git a/.stats.yml b/.stats.yml index f075e4a3f56..3c2931e9e73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1775 +configured_endpoints: 1777 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be33ed716939444c958b96a8d44b4c5cadd6ca31e9f8a482499af3b9e02a32a1.yml openapi_spec_hash: 0eaa6c9fe834ee3f0dd40c71033e412e -config_hash: 4a37da9893560914a7ac1a75cc01202a +config_hash: a35e9eb0436652c704bebf7c0a38085b diff --git a/api.md b/api.md index 02abc6a7ee0..ceccbff49f7 100644 --- a/api.md +++ b/api.md @@ -3430,6 +3430,23 @@ Methods: - client.diagnostics.traceroutes.create(\*, account_id, \*\*params) -> SyncSinglePage[Traceroute] +## EndpointHealthchecks + +Types: + +```python +from cloudflare.types.diagnostics import ( + EndpointHealthcheck, + EndpointHealthcheckCreateResponse, + EndpointHealthcheckListResponse, +) +``` + +Methods: + +- client.diagnostics.endpoint_healthchecks.create(\*, account_id, \*\*params) -> Optional[EndpointHealthcheckCreateResponse] +- client.diagnostics.endpoint_healthchecks.list(\*, account_id) -> Optional[EndpointHealthcheckListResponse] + # Images ## V1 diff --git a/src/cloudflare/resources/diagnostics/__init__.py b/src/cloudflare/resources/diagnostics/__init__.py index 4ccc6dce7cb..0c5fba15051 100644 --- a/src/cloudflare/resources/diagnostics/__init__.py +++ b/src/cloudflare/resources/diagnostics/__init__.py @@ -16,6 +16,14 @@ TraceroutesResourceWithStreamingResponse, AsyncTraceroutesResourceWithStreamingResponse, ) +from .endpoint_healthchecks import ( + EndpointHealthchecksResource, + AsyncEndpointHealthchecksResource, + EndpointHealthchecksResourceWithRawResponse, + AsyncEndpointHealthchecksResourceWithRawResponse, + EndpointHealthchecksResourceWithStreamingResponse, + AsyncEndpointHealthchecksResourceWithStreamingResponse, +) __all__ = [ "TraceroutesResource", @@ -24,6 +32,12 @@ "AsyncTraceroutesResourceWithRawResponse", "TraceroutesResourceWithStreamingResponse", "AsyncTraceroutesResourceWithStreamingResponse", + "EndpointHealthchecksResource", + "AsyncEndpointHealthchecksResource", + "EndpointHealthchecksResourceWithRawResponse", + "AsyncEndpointHealthchecksResourceWithRawResponse", + "EndpointHealthchecksResourceWithStreamingResponse", + "AsyncEndpointHealthchecksResourceWithStreamingResponse", "DiagnosticsResource", "AsyncDiagnosticsResource", "DiagnosticsResourceWithRawResponse", diff --git a/src/cloudflare/resources/diagnostics/diagnostics.py b/src/cloudflare/resources/diagnostics/diagnostics.py index e745c5cefb6..440f6803afe 100644 --- a/src/cloudflare/resources/diagnostics/diagnostics.py +++ b/src/cloudflare/resources/diagnostics/diagnostics.py @@ -12,6 +12,14 @@ TraceroutesResourceWithStreamingResponse, AsyncTraceroutesResourceWithStreamingResponse, ) +from .endpoint_healthchecks import ( + EndpointHealthchecksResource, + AsyncEndpointHealthchecksResource, + EndpointHealthchecksResourceWithRawResponse, + AsyncEndpointHealthchecksResourceWithRawResponse, + EndpointHealthchecksResourceWithStreamingResponse, + AsyncEndpointHealthchecksResourceWithStreamingResponse, +) __all__ = ["DiagnosticsResource", "AsyncDiagnosticsResource"] @@ -21,6 +29,10 @@ class DiagnosticsResource(SyncAPIResource): def traceroutes(self) -> TraceroutesResource: return TraceroutesResource(self._client) + @cached_property + def endpoint_healthchecks(self) -> EndpointHealthchecksResource: + return EndpointHealthchecksResource(self._client) + @cached_property def with_raw_response(self) -> DiagnosticsResourceWithRawResponse: """ @@ -46,6 +58,10 @@ class AsyncDiagnosticsResource(AsyncAPIResource): def traceroutes(self) -> AsyncTraceroutesResource: return AsyncTraceroutesResource(self._client) + @cached_property + def endpoint_healthchecks(self) -> AsyncEndpointHealthchecksResource: + return AsyncEndpointHealthchecksResource(self._client) + @cached_property def with_raw_response(self) -> AsyncDiagnosticsResourceWithRawResponse: """ @@ -74,6 +90,10 @@ def __init__(self, diagnostics: DiagnosticsResource) -> None: def traceroutes(self) -> TraceroutesResourceWithRawResponse: return TraceroutesResourceWithRawResponse(self._diagnostics.traceroutes) + @cached_property + def endpoint_healthchecks(self) -> EndpointHealthchecksResourceWithRawResponse: + return EndpointHealthchecksResourceWithRawResponse(self._diagnostics.endpoint_healthchecks) + class AsyncDiagnosticsResourceWithRawResponse: def __init__(self, diagnostics: AsyncDiagnosticsResource) -> None: @@ -83,6 +103,10 @@ def __init__(self, diagnostics: AsyncDiagnosticsResource) -> None: def traceroutes(self) -> AsyncTraceroutesResourceWithRawResponse: return AsyncTraceroutesResourceWithRawResponse(self._diagnostics.traceroutes) + @cached_property + def endpoint_healthchecks(self) -> AsyncEndpointHealthchecksResourceWithRawResponse: + return AsyncEndpointHealthchecksResourceWithRawResponse(self._diagnostics.endpoint_healthchecks) + class DiagnosticsResourceWithStreamingResponse: def __init__(self, diagnostics: DiagnosticsResource) -> None: @@ -92,6 +116,10 @@ def __init__(self, diagnostics: DiagnosticsResource) -> None: def traceroutes(self) -> TraceroutesResourceWithStreamingResponse: return TraceroutesResourceWithStreamingResponse(self._diagnostics.traceroutes) + @cached_property + def endpoint_healthchecks(self) -> EndpointHealthchecksResourceWithStreamingResponse: + return EndpointHealthchecksResourceWithStreamingResponse(self._diagnostics.endpoint_healthchecks) + class AsyncDiagnosticsResourceWithStreamingResponse: def __init__(self, diagnostics: AsyncDiagnosticsResource) -> None: @@ -100,3 +128,7 @@ def __init__(self, diagnostics: AsyncDiagnosticsResource) -> None: @cached_property def traceroutes(self) -> AsyncTraceroutesResourceWithStreamingResponse: return AsyncTraceroutesResourceWithStreamingResponse(self._diagnostics.traceroutes) + + @cached_property + def endpoint_healthchecks(self) -> AsyncEndpointHealthchecksResourceWithStreamingResponse: + return AsyncEndpointHealthchecksResourceWithStreamingResponse(self._diagnostics.endpoint_healthchecks) diff --git a/src/cloudflare/resources/diagnostics/endpoint_healthchecks.py b/src/cloudflare/resources/diagnostics/endpoint_healthchecks.py new file mode 100644 index 00000000000..0654a299adc --- /dev/null +++ b/src/cloudflare/resources/diagnostics/endpoint_healthchecks.py @@ -0,0 +1,314 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, Optional, cast +from typing_extensions import Literal + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._wrappers import ResultWrapper +from ..._base_client import make_request_options +from ...types.diagnostics import endpoint_healthcheck_create_params +from ...types.diagnostics.endpoint_healthcheck_list_response import EndpointHealthcheckListResponse +from ...types.diagnostics.endpoint_healthcheck_create_response import EndpointHealthcheckCreateResponse + +__all__ = ["EndpointHealthchecksResource", "AsyncEndpointHealthchecksResource"] + + +class EndpointHealthchecksResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> EndpointHealthchecksResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return EndpointHealthchecksResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> EndpointHealthchecksResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return EndpointHealthchecksResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + check_type: Literal["icmp"], + endpoint: str, + name: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[EndpointHealthcheckCreateResponse]: + """ + Create Endpoint Health Check. + + Args: + account_id: Identifier + + check_type: type of check to perform + + endpoint: the IP address of the host to perform checks against + + name: Optional name associated with this check + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._post( + f"/accounts/{account_id}/diagnostics/endpoint-healthchecks", + body=maybe_transform( + { + "check_type": check_type, + "endpoint": endpoint, + "name": name, + }, + endpoint_healthcheck_create_params.EndpointHealthcheckCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[EndpointHealthcheckCreateResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[EndpointHealthcheckCreateResponse]], ResultWrapper[EndpointHealthcheckCreateResponse] + ), + ) + + def list( + self, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[EndpointHealthcheckListResponse]: + """ + List Endpoint Health Checks. + + Args: + account_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return self._get( + f"/accounts/{account_id}/diagnostics/endpoint-healthchecks", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[EndpointHealthcheckListResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[EndpointHealthcheckListResponse]], ResultWrapper[EndpointHealthcheckListResponse] + ), + ) + + +class AsyncEndpointHealthchecksResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncEndpointHealthchecksResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncEndpointHealthchecksResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncEndpointHealthchecksResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncEndpointHealthchecksResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + check_type: Literal["icmp"], + endpoint: str, + name: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[EndpointHealthcheckCreateResponse]: + """ + Create Endpoint Health Check. + + Args: + account_id: Identifier + + check_type: type of check to perform + + endpoint: the IP address of the host to perform checks against + + name: Optional name associated with this check + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._post( + f"/accounts/{account_id}/diagnostics/endpoint-healthchecks", + body=await async_maybe_transform( + { + "check_type": check_type, + "endpoint": endpoint, + "name": name, + }, + endpoint_healthcheck_create_params.EndpointHealthcheckCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[EndpointHealthcheckCreateResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[EndpointHealthcheckCreateResponse]], ResultWrapper[EndpointHealthcheckCreateResponse] + ), + ) + + async def list( + self, + *, + account_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[EndpointHealthcheckListResponse]: + """ + List Endpoint Health Checks. + + Args: + account_id: Identifier + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + return await self._get( + f"/accounts/{account_id}/diagnostics/endpoint-healthchecks", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[EndpointHealthcheckListResponse]]._unwrapper, + ), + cast_to=cast( + Type[Optional[EndpointHealthcheckListResponse]], ResultWrapper[EndpointHealthcheckListResponse] + ), + ) + + +class EndpointHealthchecksResourceWithRawResponse: + def __init__(self, endpoint_healthchecks: EndpointHealthchecksResource) -> None: + self._endpoint_healthchecks = endpoint_healthchecks + + self.create = to_raw_response_wrapper( + endpoint_healthchecks.create, + ) + self.list = to_raw_response_wrapper( + endpoint_healthchecks.list, + ) + + +class AsyncEndpointHealthchecksResourceWithRawResponse: + def __init__(self, endpoint_healthchecks: AsyncEndpointHealthchecksResource) -> None: + self._endpoint_healthchecks = endpoint_healthchecks + + self.create = async_to_raw_response_wrapper( + endpoint_healthchecks.create, + ) + self.list = async_to_raw_response_wrapper( + endpoint_healthchecks.list, + ) + + +class EndpointHealthchecksResourceWithStreamingResponse: + def __init__(self, endpoint_healthchecks: EndpointHealthchecksResource) -> None: + self._endpoint_healthchecks = endpoint_healthchecks + + self.create = to_streamed_response_wrapper( + endpoint_healthchecks.create, + ) + self.list = to_streamed_response_wrapper( + endpoint_healthchecks.list, + ) + + +class AsyncEndpointHealthchecksResourceWithStreamingResponse: + def __init__(self, endpoint_healthchecks: AsyncEndpointHealthchecksResource) -> None: + self._endpoint_healthchecks = endpoint_healthchecks + + self.create = async_to_streamed_response_wrapper( + endpoint_healthchecks.create, + ) + self.list = async_to_streamed_response_wrapper( + endpoint_healthchecks.list, + ) diff --git a/src/cloudflare/types/diagnostics/__init__.py b/src/cloudflare/types/diagnostics/__init__.py index 8dafb1b2780..726192d8e32 100644 --- a/src/cloudflare/types/diagnostics/__init__.py +++ b/src/cloudflare/types/diagnostics/__init__.py @@ -4,3 +4,6 @@ from .traceroute import Traceroute as Traceroute from .traceroute_create_params import TracerouteCreateParams as TracerouteCreateParams +from .endpoint_healthcheck_create_params import EndpointHealthcheckCreateParams as EndpointHealthcheckCreateParams +from .endpoint_healthcheck_list_response import EndpointHealthcheckListResponse as EndpointHealthcheckListResponse +from .endpoint_healthcheck_create_response import EndpointHealthcheckCreateResponse as EndpointHealthcheckCreateResponse diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_params.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_params.py new file mode 100644 index 00000000000..f47f969bac2 --- /dev/null +++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_params.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["EndpointHealthcheckCreateParams"] + + +class EndpointHealthcheckCreateParams(TypedDict, total=False): + account_id: Required[str] + """Identifier""" + + check_type: Required[Literal["icmp"]] + """type of check to perform""" + + endpoint: Required[str] + """the IP address of the host to perform checks against""" + + name: str + """Optional name associated with this check""" diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_response.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_response.py new file mode 100644 index 00000000000..9d27507c25c --- /dev/null +++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_create_response.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["EndpointHealthcheckCreateResponse"] + + +class EndpointHealthcheckCreateResponse(BaseModel): + check_type: Literal["icmp"] + """type of check to perform""" + + endpoint: str + """the IP address of the host to perform checks against""" + + id: Optional[str] = None + """UUID.""" + + name: Optional[str] = None + """Optional name associated with this check""" diff --git a/src/cloudflare/types/diagnostics/endpoint_healthcheck_list_response.py b/src/cloudflare/types/diagnostics/endpoint_healthcheck_list_response.py new file mode 100644 index 00000000000..0d6b2811c24 --- /dev/null +++ b/src/cloudflare/types/diagnostics/endpoint_healthcheck_list_response.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["EndpointHealthcheckListResponse"] + + +class EndpointHealthcheckListResponse(BaseModel): + check_type: Literal["icmp"] + """type of check to perform""" + + endpoint: str + """the IP address of the host to perform checks against""" + + id: Optional[str] = None + """UUID.""" + + name: Optional[str] = None + """Optional name associated with this check""" diff --git a/tests/api_resources/diagnostics/test_endpoint_healthchecks.py b/tests/api_resources/diagnostics/test_endpoint_healthchecks.py new file mode 100644 index 00000000000..f4a340af9ba --- /dev/null +++ b/tests/api_resources/diagnostics/test_endpoint_healthchecks.py @@ -0,0 +1,215 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, Optional, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.diagnostics import ( + EndpointHealthcheckListResponse, + EndpointHealthcheckCreateResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestEndpointHealthchecks: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Cloudflare) -> None: + endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + check_type="icmp", + endpoint="203.0.113.1", + ) + assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Cloudflare) -> None: + endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + check_type="icmp", + endpoint="203.0.113.1", + name="My Endpoint", + ) + assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.diagnostics.endpoint_healthchecks.with_raw_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + check_type="icmp", + endpoint="203.0.113.1", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + endpoint_healthcheck = response.parse() + assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.diagnostics.endpoint_healthchecks.with_streaming_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + check_type="icmp", + endpoint="203.0.113.1", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + endpoint_healthcheck = response.parse() + assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.diagnostics.endpoint_healthchecks.with_raw_response.create( + account_id="", + check_type="icmp", + endpoint="203.0.113.1", + ) + + @parametrize + def test_method_list(self, client: Cloudflare) -> None: + endpoint_healthcheck = client.diagnostics.endpoint_healthchecks.list( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Cloudflare) -> None: + response = client.diagnostics.endpoint_healthchecks.with_raw_response.list( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + endpoint_healthcheck = response.parse() + assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Cloudflare) -> None: + with client.diagnostics.endpoint_healthchecks.with_streaming_response.list( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + endpoint_healthcheck = response.parse() + assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_list(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.diagnostics.endpoint_healthchecks.with_raw_response.list( + account_id="", + ) + + +class TestAsyncEndpointHealthchecks: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + check_type="icmp", + endpoint="203.0.113.1", + ) + assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + check_type="icmp", + endpoint="203.0.113.1", + name="My Endpoint", + ) + assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.diagnostics.endpoint_healthchecks.with_raw_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + check_type="icmp", + endpoint="203.0.113.1", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + endpoint_healthcheck = await response.parse() + assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.diagnostics.endpoint_healthchecks.with_streaming_response.create( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + check_type="icmp", + endpoint="203.0.113.1", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + endpoint_healthcheck = await response.parse() + assert_matches_type(Optional[EndpointHealthcheckCreateResponse], endpoint_healthcheck, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + 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.diagnostics.endpoint_healthchecks.with_raw_response.create( + account_id="", + check_type="icmp", + endpoint="203.0.113.1", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncCloudflare) -> None: + endpoint_healthcheck = await async_client.diagnostics.endpoint_healthchecks.list( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: + response = await async_client.diagnostics.endpoint_healthchecks.with_raw_response.list( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + endpoint_healthcheck = await response.parse() + assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: + async with async_client.diagnostics.endpoint_healthchecks.with_streaming_response.list( + account_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + endpoint_healthcheck = await response.parse() + assert_matches_type(Optional[EndpointHealthcheckListResponse], endpoint_healthcheck, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.diagnostics.endpoint_healthchecks.with_raw_response.list( + account_id="", + ) From 3c0fb7b3dc58f8620d1b95b4bb2c7cdcfe5007eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 18:37:08 +0000 Subject: [PATCH 360/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3c2931e9e73..059fe0d7561 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-be33ed716939444c958b96a8d44b4c5cadd6ca31e9f8a482499af3b9e02a32a1.yml -openapi_spec_hash: 0eaa6c9fe834ee3f0dd40c71033e412e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ef60678cddeb091bc65b798a4584f0d5a9ceab87046435a85aa4872c190bf40.yml +openapi_spec_hash: a391f4e0b5029905a26bd289e022401e config_hash: a35e9eb0436652c704bebf7c0a38085b From d43aff4a49f54e2b66cd1cf173a1bbbbd67e9de6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 18:57:27 +0000 Subject: [PATCH 361/392] feat(api): api update --- .stats.yml | 4 ++-- .../resources/zero_trust/gateway/rules.py | 8 ++++---- .../types/zero_trust/gateway/gateway_rule.py | 2 +- .../types/zero_trust/gateway/location.py | 2 +- .../zero_trust/gateway/rule_create_params.py | 2 +- .../types/zero_trust/gateway/rule_setting.py | 2 +- .../zero_trust/gateway/rule_setting_param.py | 2 +- .../zero_trust/gateway/rule_update_params.py | 2 +- .../zero_trust/gateway/test_rules.py | 20 +++++++++++++++---- 9 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 059fe0d7561..8b746a70dfe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ef60678cddeb091bc65b798a4584f0d5a9ceab87046435a85aa4872c190bf40.yml -openapi_spec_hash: a391f4e0b5029905a26bd289e022401e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5d3e8222346377faccd40549dbab761650548e52d51c924da09b1607f6ce7cb5.yml +openapi_spec_hash: 88ae18e728960e49b36ba049c8f3d13b config_hash: a35e9eb0436652c704bebf7c0a38085b diff --git a/src/cloudflare/resources/zero_trust/gateway/rules.py b/src/cloudflare/resources/zero_trust/gateway/rules.py index b08551a25b4..3cb12b71060 100644 --- a/src/cloudflare/resources/zero_trust/gateway/rules.py +++ b/src/cloudflare/resources/zero_trust/gateway/rules.py @@ -93,7 +93,7 @@ def create( Creates a new Zero Trust Gateway rule. Args: - action: The action to preform when the associated traffic, identity, and device posture + action: The action to perform when the associated traffic, identity, and device posture expressions are either absent or evaluate to `true`. name: The name of the rule. @@ -213,7 +213,7 @@ def update( Args: rule_id: The API resource UUID. - action: The action to preform when the associated traffic, identity, and device posture + action: The action to perform when the associated traffic, identity, and device posture expressions are either absent or evaluate to `true`. name: The name of the rule. @@ -517,7 +517,7 @@ async def create( Creates a new Zero Trust Gateway rule. Args: - action: The action to preform when the associated traffic, identity, and device posture + action: The action to perform when the associated traffic, identity, and device posture expressions are either absent or evaluate to `true`. name: The name of the rule. @@ -637,7 +637,7 @@ async def update( Args: rule_id: The API resource UUID. - action: The action to preform when the associated traffic, identity, and device posture + action: The action to perform when the associated traffic, identity, and device posture expressions are either absent or evaluate to `true`. name: The name of the rule. diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_rule.py b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py index a04ce62a706..6212fef607a 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_rule.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py @@ -60,7 +60,7 @@ class GatewayRule(BaseModel): ] ] = None """ - The action to preform when the associated traffic, identity, and device posture + The action to perform when the associated traffic, identity, and device posture expressions are either absent or evaluate to `true`. """ diff --git a/src/cloudflare/types/zero_trust/gateway/location.py b/src/cloudflare/types/zero_trust/gateway/location.py index a5755c64010..547a5e84b8c 100644 --- a/src/cloudflare/types/zero_trust/gateway/location.py +++ b/src/cloudflare/types/zero_trust/gateway/location.py @@ -29,7 +29,7 @@ class Location(BaseModel): """ The uuid identifier of the IPv6 block brought to the gateway, so that this location's IPv6 address is allocated from the Bring Your Own Ipv6(BYOIPv6) block - and not from the standard CloudFlare IPv6 block. + and not from the standard Cloudflare IPv6 block. """ doh_subdomain: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/gateway/rule_create_params.py b/src/cloudflare/types/zero_trust/gateway/rule_create_params.py index 11890eae556..9219840a8df 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_create_params.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_create_params.py @@ -38,7 +38,7 @@ class RuleCreateParams(TypedDict, total=False): ] ] """ - The action to preform when the associated traffic, identity, and device posture + The action to perform when the associated traffic, identity, and device posture expressions are either absent or evaluate to `true`. """ diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting.py b/src/cloudflare/types/zero_trust/gateway/rule_setting.py index 84432d8e0bb..f976a1ec348 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting.py @@ -202,7 +202,7 @@ class UntrustedCERT(BaseModel): class RuleSetting(BaseModel): - add_headers: Optional[Dict[str, str]] = None + add_headers: Optional[Dict[str, List[str]]] = None """Add custom headers to allowed requests, in the form of key-value pairs. Keys are header names, pointing to an array with its header value(s). diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py index ce610ff6660..87307dcffd4 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py @@ -201,7 +201,7 @@ class UntrustedCERT(TypedDict, total=False): class RuleSettingParam(TypedDict, total=False): - add_headers: Optional[Dict[str, str]] + add_headers: Optional[Dict[str, List[str]]] """Add custom headers to allowed requests, in the form of key-value pairs. Keys are header names, pointing to an array with its header value(s). diff --git a/src/cloudflare/types/zero_trust/gateway/rule_update_params.py b/src/cloudflare/types/zero_trust/gateway/rule_update_params.py index 930f828f8bf..5171c30b9d4 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_update_params.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_update_params.py @@ -38,7 +38,7 @@ class RuleUpdateParams(TypedDict, total=False): ] ] """ - The action to preform when the associated traffic, identity, and device posture + The action to perform when the associated traffic, identity, and device posture expressions are either absent or evaluate to `true`. """ diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index f8d10747e1f..f7da7864799 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -47,7 +47,10 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: identity='any(identity.groups.name[*] in {"finance"})', precedence=0, rule_settings={ - "add_headers": {"foo": "string"}, + "add_headers": { + "My-Next-Header": ["foo", "bar"], + "X-Custom-Header-Name": ["somecustomvalue"], + }, "allow_child_bypass": False, "audit_ssh": {"command_logging": False}, "biso_admin_controls": { @@ -207,7 +210,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: identity='any(identity.groups.name[*] in {"finance"})', precedence=0, rule_settings={ - "add_headers": {"foo": "string"}, + "add_headers": { + "My-Next-Header": ["foo", "bar"], + "X-Custom-Header-Name": ["somecustomvalue"], + }, "allow_child_bypass": False, "audit_ssh": {"command_logging": False}, "biso_admin_controls": { @@ -564,7 +570,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare identity='any(identity.groups.name[*] in {"finance"})', precedence=0, rule_settings={ - "add_headers": {"foo": "string"}, + "add_headers": { + "My-Next-Header": ["foo", "bar"], + "X-Custom-Header-Name": ["somecustomvalue"], + }, "allow_child_bypass": False, "audit_ssh": {"command_logging": False}, "biso_admin_controls": { @@ -724,7 +733,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare identity='any(identity.groups.name[*] in {"finance"})', precedence=0, rule_settings={ - "add_headers": {"foo": "string"}, + "add_headers": { + "My-Next-Header": ["foo", "bar"], + "X-Custom-Header-Name": ["somecustomvalue"], + }, "allow_child_bypass": False, "audit_ssh": {"command_logging": False}, "biso_admin_controls": { From 7773d8abc67e3a475fe2cd7c73301f3e9c7044bb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 19:08:25 +0000 Subject: [PATCH 362/392] feat(api): api update --- .stats.yml | 4 ++-- .../addressing/prefixes/bgp_prefixes.py | 22 ++++++++++--------- .../types/addressing/prefixes/bgp_prefix.py | 15 +++++++------ .../prefixes/bgp_prefix_edit_params.py | 13 ++++++----- .../addressing/prefixes/test_bgp_prefixes.py | 4 ++-- 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8b746a70dfe..fb093c49390 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5d3e8222346377faccd40549dbab761650548e52d51c924da09b1607f6ce7cb5.yml -openapi_spec_hash: 88ae18e728960e49b36ba049c8f3d13b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-39ccadcddaa1e181eb29efb2f50fc4d2df982a526c68bc31e34f28e8d4dc2c08.yml +openapi_spec_hash: 34225107db418f33a43166f75ff9c18a config_hash: a35e9eb0436652c704bebf7c0a38085b diff --git a/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py b/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py index c93b5901764..3a0eb8e44c0 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp_prefixes.py @@ -147,8 +147,8 @@ def edit( account_id: str, prefix_id: str, asn_prepend_count: int | NotGiven = NOT_GIVEN, + auto_advertise_withdraw: bool | NotGiven = NOT_GIVEN, on_demand: bgp_prefix_edit_params.OnDemand | NotGiven = NOT_GIVEN, - withdraw_if_no_route: bool | 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, @@ -169,9 +169,10 @@ def edit( asn_prepend_count: Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute - withdraw_if_no_route: Controls whether the BGP prefix is automatically withdrawn when prefix is - withdrawn from Magic routing table (for Magic Transit customers using Direct - CNI) + auto_advertise_withdraw: Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no + matching BGP prefix in the Magic routing table. When true, Cloudflare will + automatically withdraw the BGP prefix when there are no matching BGP routes, and + will resume advertising when there is at least one matching BGP route. extra_headers: Send extra headers @@ -192,8 +193,8 @@ def edit( body=maybe_transform( { "asn_prepend_count": asn_prepend_count, + "auto_advertise_withdraw": auto_advertise_withdraw, "on_demand": on_demand, - "withdraw_if_no_route": withdraw_if_no_route, }, bgp_prefix_edit_params.BGPPrefixEditParams, ), @@ -379,8 +380,8 @@ async def edit( account_id: str, prefix_id: str, asn_prepend_count: int | NotGiven = NOT_GIVEN, + auto_advertise_withdraw: bool | NotGiven = NOT_GIVEN, on_demand: bgp_prefix_edit_params.OnDemand | NotGiven = NOT_GIVEN, - withdraw_if_no_route: bool | 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, @@ -401,9 +402,10 @@ async def edit( asn_prepend_count: Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute - withdraw_if_no_route: Controls whether the BGP prefix is automatically withdrawn when prefix is - withdrawn from Magic routing table (for Magic Transit customers using Direct - CNI) + auto_advertise_withdraw: Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no + matching BGP prefix in the Magic routing table. When true, Cloudflare will + automatically withdraw the BGP prefix when there are no matching BGP routes, and + will resume advertising when there is at least one matching BGP route. extra_headers: Send extra headers @@ -424,8 +426,8 @@ async def edit( body=await async_maybe_transform( { "asn_prepend_count": asn_prepend_count, + "auto_advertise_withdraw": auto_advertise_withdraw, "on_demand": on_demand, - "withdraw_if_no_route": withdraw_if_no_route, }, bgp_prefix_edit_params.BGPPrefixEditParams, ), diff --git a/src/cloudflare/types/addressing/prefixes/bgp_prefix.py b/src/cloudflare/types/addressing/prefixes/bgp_prefix.py index 8260aa32d68..24bd9ef9d4a 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp_prefix.py +++ b/src/cloudflare/types/addressing/prefixes/bgp_prefix.py @@ -58,6 +58,14 @@ class BGPPrefix(BaseModel): asn_prepend_count: Optional[int] = None """Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute""" + auto_advertise_withdraw: Optional[bool] = None + """ + Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no + matching BGP prefix in the Magic routing table. When true, Cloudflare will + automatically withdraw the BGP prefix when there are no matching BGP routes, and + will resume advertising when there is at least one matching BGP route. + """ + bgp_signal_opts: Optional[BGPSignalOpts] = None cidr: Optional[str] = None @@ -68,10 +76,3 @@ class BGPPrefix(BaseModel): modified_at: Optional[datetime] = None on_demand: Optional[OnDemand] = None - - withdraw_if_no_route: Optional[bool] = None - """ - Controls whether the BGP prefix is automatically withdrawn when prefix is - withdrawn from Magic routing table (for Magic Transit customers using Direct - CNI) - """ diff --git a/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py b/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py index e7bba9bc9ef..f610ee9434f 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py +++ b/src/cloudflare/types/addressing/prefixes/bgp_prefix_edit_params.py @@ -17,15 +17,16 @@ class BGPPrefixEditParams(TypedDict, total=False): asn_prepend_count: int """Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute""" - on_demand: OnDemand - - withdraw_if_no_route: bool + auto_advertise_withdraw: bool """ - Controls whether the BGP prefix is automatically withdrawn when prefix is - withdrawn from Magic routing table (for Magic Transit customers using Direct - CNI) + Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no + matching BGP prefix in the Magic routing table. When true, Cloudflare will + automatically withdraw the BGP prefix when there are no matching BGP routes, and + will resume advertising when there is at least one matching BGP route. """ + on_demand: OnDemand + class OnDemand(TypedDict, total=False): advertised: bool diff --git a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py index f28e4f15ae9..0c0f362943e 100644 --- a/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py +++ b/tests/api_resources/addressing/prefixes/test_bgp_prefixes.py @@ -139,8 +139,8 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="2af39739cc4e3b5910c918468bb89828", asn_prepend_count=2, + auto_advertise_withdraw=True, on_demand={"advertised": True}, - withdraw_if_no_route=True, ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) @@ -382,8 +382,8 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) account_id="258def64c72dae45f3e4c8516e2111f2", prefix_id="2af39739cc4e3b5910c918468bb89828", asn_prepend_count=2, + auto_advertise_withdraw=True, on_demand={"advertised": True}, - withdraw_if_no_route=True, ) assert_matches_type(Optional[BGPPrefix], bgp_prefix, path=["response"]) From 2ca622eab7185f54f6605a4fb35aef57d2b4715b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 19:34:40 +0000 Subject: [PATCH 363/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fb093c49390..0b0bd9b1e82 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-39ccadcddaa1e181eb29efb2f50fc4d2df982a526c68bc31e34f28e8d4dc2c08.yml -openapi_spec_hash: 34225107db418f33a43166f75ff9c18a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7dbd2ac7bae53825fd3ded2997b259098d4c5dd987a66fb38b83ea09dee8d239.yml +openapi_spec_hash: cc9b3a584447a605d7c5f9ef40d57983 config_hash: a35e9eb0436652c704bebf7c0a38085b From 5e2c96f8e6be28763ba2ac27da7f14ffafe8a481 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 19:49:23 +0000 Subject: [PATCH 364/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0b0bd9b1e82..462bfc30d7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7dbd2ac7bae53825fd3ded2997b259098d4c5dd987a66fb38b83ea09dee8d239.yml -openapi_spec_hash: cc9b3a584447a605d7c5f9ef40d57983 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-098b42406d85453fbe5f6c8931277341f8979be9878b359cb56fc399ee7f5086.yml +openapi_spec_hash: add54049e6d4fbcbf98b8e3a0f1e8562 config_hash: a35e9eb0436652c704bebf7c0a38085b From 699825ed25a3be7b4f23fa863d49eecff8221377 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 20:17:52 +0000 Subject: [PATCH 365/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 462bfc30d7b..9830110ceb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-098b42406d85453fbe5f6c8931277341f8979be9878b359cb56fc399ee7f5086.yml -openapi_spec_hash: add54049e6d4fbcbf98b8e3a0f1e8562 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7b23ea3c9f7383673139b078fe639ae38801d0a68c7374f30376fa02a0bda758.yml +openapi_spec_hash: dd7cec948badb7be8e94d9c391f09bf4 config_hash: a35e9eb0436652c704bebf7c0a38085b From ae7588d0b75a63f629fe304f434c616d521b5f3d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 20:59:34 +0000 Subject: [PATCH 366/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/resources/zero_trust/gateway/locations.py | 8 ++++---- .../types/zero_trust/gateway/location_create_params.py | 2 +- .../types/zero_trust/gateway/location_update_params.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9830110ceb7..a302e9e7961 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7b23ea3c9f7383673139b078fe639ae38801d0a68c7374f30376fa02a0bda758.yml -openapi_spec_hash: dd7cec948badb7be8e94d9c391f09bf4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66ad1267235a1a436819d010460f34a9353d872bfee0f838bea4872f629dcf74.yml +openapi_spec_hash: 4c3dd18c52c008305ae377c0dd7734b7 config_hash: a35e9eb0436652c704bebf7c0a38085b diff --git a/src/cloudflare/resources/zero_trust/gateway/locations.py b/src/cloudflare/resources/zero_trust/gateway/locations.py index 39a5683c73b..b07477a0e67 100644 --- a/src/cloudflare/resources/zero_trust/gateway/locations.py +++ b/src/cloudflare/resources/zero_trust/gateway/locations.py @@ -54,7 +54,7 @@ def create( client_default: bool | NotGiven = NOT_GIVEN, dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, - endpoints: EndpointParam | NotGiven = NOT_GIVEN, + endpoints: Optional[EndpointParam] | NotGiven = NOT_GIVEN, networks: Optional[Iterable[location_create_params.Network]] | 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. @@ -129,7 +129,7 @@ def update( client_default: bool | NotGiven = NOT_GIVEN, dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, - endpoints: EndpointParam | NotGiven = NOT_GIVEN, + endpoints: Optional[EndpointParam] | NotGiven = NOT_GIVEN, networks: Optional[Iterable[location_update_params.Network]] | 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. @@ -340,7 +340,7 @@ async def create( client_default: bool | NotGiven = NOT_GIVEN, dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, - endpoints: EndpointParam | NotGiven = NOT_GIVEN, + endpoints: Optional[EndpointParam] | NotGiven = NOT_GIVEN, networks: Optional[Iterable[location_create_params.Network]] | 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. @@ -415,7 +415,7 @@ async def update( client_default: bool | NotGiven = NOT_GIVEN, dns_destination_ips_id: str | NotGiven = NOT_GIVEN, ecs_support: bool | NotGiven = NOT_GIVEN, - endpoints: EndpointParam | NotGiven = NOT_GIVEN, + endpoints: Optional[EndpointParam] | NotGiven = NOT_GIVEN, networks: Optional[Iterable[location_update_params.Network]] | 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. diff --git a/src/cloudflare/types/zero_trust/gateway/location_create_params.py b/src/cloudflare/types/zero_trust/gateway/location_create_params.py index 1db801a7c5b..df266be80db 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_create_params.py +++ b/src/cloudflare/types/zero_trust/gateway/location_create_params.py @@ -31,7 +31,7 @@ class LocationCreateParams(TypedDict, total=False): ecs_support: bool """True if the location needs to resolve EDNS queries.""" - endpoints: EndpointParam + endpoints: Optional[EndpointParam] """The destination endpoints configured for this location. When updating a location, if this field is absent or set with null, the diff --git a/src/cloudflare/types/zero_trust/gateway/location_update_params.py b/src/cloudflare/types/zero_trust/gateway/location_update_params.py index 76e8bb7f8a9..7c34d4b8801 100644 --- a/src/cloudflare/types/zero_trust/gateway/location_update_params.py +++ b/src/cloudflare/types/zero_trust/gateway/location_update_params.py @@ -31,7 +31,7 @@ class LocationUpdateParams(TypedDict, total=False): ecs_support: bool """True if the location needs to resolve EDNS queries.""" - endpoints: EndpointParam + endpoints: Optional[EndpointParam] """The destination endpoints configured for this location. When updating a location, if this field is absent or set with null, the From 65429f143eae4bc8a31b3acff98006fc335e8529 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 21:48:10 +0000 Subject: [PATCH 367/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a302e9e7961..3c09ca9db15 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66ad1267235a1a436819d010460f34a9353d872bfee0f838bea4872f629dcf74.yml -openapi_spec_hash: 4c3dd18c52c008305ae377c0dd7734b7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-20bfaaab2ac288ba55eb06e517261549b3233bb667f47e7acd549d79b94b441e.yml +openapi_spec_hash: e028533c4b565592871f70066dff3a55 config_hash: a35e9eb0436652c704bebf7c0a38085b From 97ca836bd70667c30283961bc9ac6e2e4d7f9da8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 22:04:50 +0000 Subject: [PATCH 368/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3c09ca9db15..c4cc66d1d78 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-20bfaaab2ac288ba55eb06e517261549b3233bb667f47e7acd549d79b94b441e.yml -openapi_spec_hash: e028533c4b565592871f70066dff3a55 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-086ef16f104ede15ec076d62462ded699d7de104bc6eecb86a27a46ab1ba7d66.yml +openapi_spec_hash: 28aaf21d2be023eb8f641e0f7a76c028 config_hash: a35e9eb0436652c704bebf7c0a38085b From 54d6d217d4f3b8ae2b87db2eb426819839f38315 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 23:00:53 +0000 Subject: [PATCH 369/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/types/zero_trust/gateway/rule_setting_param.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index c4cc66d1d78..9492a462b85 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-086ef16f104ede15ec076d62462ded699d7de104bc6eecb86a27a46ab1ba7d66.yml -openapi_spec_hash: 28aaf21d2be023eb8f641e0f7a76c028 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c2ed86779626c93ec8c0ef9d0100bf399b7339722e8f9f256db590a733b07d6f.yml +openapi_spec_hash: 48144f26df6a82c7bc8bb4baddc6e188 config_hash: a35e9eb0436652c704bebf7c0a38085b diff --git a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py index 87307dcffd4..5f1be21b13a 100644 --- a/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py +++ b/src/cloudflare/types/zero_trust/gateway/rule_setting_param.py @@ -213,7 +213,7 @@ class RuleSettingParam(TypedDict, total=False): audit_ssh: Optional[AuditSSH] """Settings for the Audit SSH action.""" - biso_admin_controls: Optional[BISOAdminControls] + biso_admin_controls: BISOAdminControls """Configure how browser isolation behaves.""" block_page: Optional[BlockPage] From 1a935f11a343cca19171cf5de8c38f58856ae738 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 23:13:34 +0000 Subject: [PATCH 370/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/resources/logpush/jobs.py | 24 +++++++++---------- .../types/logpush/job_create_params.py | 6 ++--- .../types/logpush/job_update_params.py | 6 ++--- src/cloudflare/types/logpush/logpush_job.py | 6 ++--- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9492a462b85..badc3f846e4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c2ed86779626c93ec8c0ef9d0100bf399b7339722e8f9f256db590a733b07d6f.yml -openapi_spec_hash: 48144f26df6a82c7bc8bb4baddc6e188 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a4f690382f570f545a035c6a1c0e0e77ec55d8070a52f245dc46b069fb3c6009.yml +openapi_spec_hash: 7fb90352e3acc8b7bad0718ec46e6c30 config_hash: a35e9eb0436652c704bebf7c0a38085b diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index 213ab5db651..54e630e567f 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -88,9 +88,9 @@ def create( frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, - max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -222,9 +222,9 @@ def update( frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, - max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -562,9 +562,9 @@ async def create( frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, - max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, @@ -696,9 +696,9 @@ async def update( frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, logpull_options: Optional[str] | NotGiven = NOT_GIVEN, - max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, - max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, - max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, + max_upload_bytes: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, + max_upload_interval_seconds: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, + max_upload_records: Union[Literal[0], int, None] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, ownership_challenge: str | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/logpush/job_create_params.py b/src/cloudflare/types/logpush/job_create_params.py index 29757863a77..499faa09c71 100644 --- a/src/cloudflare/types/logpush/job_create_params.py +++ b/src/cloudflare/types/logpush/job_create_params.py @@ -92,7 +92,7 @@ class JobCreateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Union[Literal[0], object, None] + max_upload_bytes: Union[Literal[0], int, None] """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note @@ -100,7 +100,7 @@ class JobCreateParams(TypedDict, total=False): smaller than this batch size. """ - max_upload_interval_seconds: Union[Literal[0], object, None] + max_upload_interval_seconds: Union[Literal[0], int, None] """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable @@ -108,7 +108,7 @@ class JobCreateParams(TypedDict, total=False): that log files may be sent in shorter intervals than this. """ - max_upload_records: Union[Literal[0], object, None] + max_upload_records: Union[Literal[0], int, None] """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. diff --git a/src/cloudflare/types/logpush/job_update_params.py b/src/cloudflare/types/logpush/job_update_params.py index 4f3357c76f1..bebb04f5cbb 100644 --- a/src/cloudflare/types/logpush/job_update_params.py +++ b/src/cloudflare/types/logpush/job_update_params.py @@ -58,7 +58,7 @@ class JobUpdateParams(TypedDict, total=False): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Union[Literal[0], object, None] + max_upload_bytes: Union[Literal[0], int, None] """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note @@ -66,7 +66,7 @@ class JobUpdateParams(TypedDict, total=False): smaller than this batch size. """ - max_upload_interval_seconds: Union[Literal[0], object, None] + max_upload_interval_seconds: Union[Literal[0], int, None] """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable @@ -74,7 +74,7 @@ class JobUpdateParams(TypedDict, total=False): that log files may be sent in shorter intervals than this. """ - max_upload_records: Union[Literal[0], object, None] + max_upload_records: Union[Literal[0], int, None] """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. diff --git a/src/cloudflare/types/logpush/logpush_job.py b/src/cloudflare/types/logpush/logpush_job.py index b89bb376d8b..49fca6784cf 100644 --- a/src/cloudflare/types/logpush/logpush_job.py +++ b/src/cloudflare/types/logpush/logpush_job.py @@ -107,7 +107,7 @@ class LogpushJob(BaseModel): keep on making this call for you, setting start and end times appropriately. """ - max_upload_bytes: Union[Literal[0], object, None] = None + max_upload_bytes: Union[Literal[0], int, None] = None """The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note @@ -115,7 +115,7 @@ class LogpushJob(BaseModel): smaller than this batch size. """ - max_upload_interval_seconds: Union[Literal[0], object, None] = None + max_upload_interval_seconds: Union[Literal[0], int, None] = None """The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable @@ -123,7 +123,7 @@ class LogpushJob(BaseModel): that log files may be sent in shorter intervals than this. """ - max_upload_records: Union[Literal[0], object, None] = None + max_upload_records: Union[Literal[0], int, None] = None """The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. From 5745f74557e1289536cb11fa6e701411b2621066 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 04:23:38 +0000 Subject: [PATCH 371/392] feat(api): api update --- .stats.yml | 4 ++-- src/cloudflare/types/zero_trust/gateway/endpoint.py | 10 ++++------ .../types/zero_trust/gateway/endpoint_param.py | 10 +++++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index badc3f846e4..f80a13d88cc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a4f690382f570f545a035c6a1c0e0e77ec55d8070a52f245dc46b069fb3c6009.yml -openapi_spec_hash: 7fb90352e3acc8b7bad0718ec46e6c30 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d07750284af5d32083cde2ea5f50c31f1d02b2eaf1b549fd5038ebc4e04aac3e.yml +openapi_spec_hash: c0969d735c1e7c616d8bece6c9954bfc config_hash: a35e9eb0436652c704bebf7c0a38085b diff --git a/src/cloudflare/types/zero_trust/gateway/endpoint.py b/src/cloudflare/types/zero_trust/gateway/endpoint.py index 9afb209057c..97c5d8a8e3a 100644 --- a/src/cloudflare/types/zero_trust/gateway/endpoint.py +++ b/src/cloudflare/types/zero_trust/gateway/endpoint.py @@ -1,7 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel from .doh_endpoint import DOHEndpoint from .dot_endpoint import DOTEndpoint @@ -12,10 +10,10 @@ class Endpoint(BaseModel): - doh: Optional[DOHEndpoint] = None + doh: DOHEndpoint - dot: Optional[DOTEndpoint] = None + dot: DOTEndpoint - ipv4: Optional[IPV4Endpoint] = None + ipv4: IPV4Endpoint - ipv6: Optional[IPV6Endpoint] = None + ipv6: IPV6Endpoint diff --git a/src/cloudflare/types/zero_trust/gateway/endpoint_param.py b/src/cloudflare/types/zero_trust/gateway/endpoint_param.py index 5494922cd67..3fc40f8abe4 100644 --- a/src/cloudflare/types/zero_trust/gateway/endpoint_param.py +++ b/src/cloudflare/types/zero_trust/gateway/endpoint_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Required, TypedDict from .doh_endpoint_param import DOHEndpointParam from .dot_endpoint_param import DOTEndpointParam @@ -13,10 +13,10 @@ class EndpointParam(TypedDict, total=False): - doh: DOHEndpointParam + doh: Required[DOHEndpointParam] - dot: DOTEndpointParam + dot: Required[DOTEndpointParam] - ipv4: IPV4EndpointParam + ipv4: Required[IPV4EndpointParam] - ipv6: IPV6EndpointParam + ipv6: Required[IPV6EndpointParam] From cc71494d1b8583143575915f7f269cbdde6f9b85 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 06:06:39 +0000 Subject: [PATCH 372/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f80a13d88cc..350fd4ebbda 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d07750284af5d32083cde2ea5f50c31f1d02b2eaf1b549fd5038ebc4e04aac3e.yml -openapi_spec_hash: c0969d735c1e7c616d8bece6c9954bfc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ee1f74ed9649f61cb6d532bd75a1154b1aa7163f104f71c1fdaddf4d0323d2b6.yml +openapi_spec_hash: 46e5a87acf60c3dbb6bbfd3ad1f38bc0 config_hash: a35e9eb0436652c704bebf7c0a38085b From 355317c9a54b3088ab8f4bd44c50593e96834306 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:09:53 +0000 Subject: [PATCH 373/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 350fd4ebbda..4280148faf8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ee1f74ed9649f61cb6d532bd75a1154b1aa7163f104f71c1fdaddf4d0323d2b6.yml -openapi_spec_hash: 46e5a87acf60c3dbb6bbfd3ad1f38bc0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-997d6ac2d82c716b9c52aa4512234c4f46f04d97f6b06454432a0212d9181a45.yml +openapi_spec_hash: e2490f45375d27f43927925013962de0 config_hash: a35e9eb0436652c704bebf7c0a38085b From 04d92fd15171a5bc3d88d90a94c15b81a260a8fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:23:01 +0000 Subject: [PATCH 374/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4280148faf8..372317ddc6c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-997d6ac2d82c716b9c52aa4512234c4f46f04d97f6b06454432a0212d9181a45.yml -openapi_spec_hash: e2490f45375d27f43927925013962de0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa87a510170ff77c7aa6353af59872ec50c23261354ab04c8c54c57f62e401ab.yml +openapi_spec_hash: 2b7ae60e34fd4d2a595e21f9cec0a129 config_hash: a35e9eb0436652c704bebf7c0a38085b From a531f54d476a17b6cd04574264029a04ddcb78d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:57:24 +0000 Subject: [PATCH 375/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 372317ddc6c..f80a13d88cc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aa87a510170ff77c7aa6353af59872ec50c23261354ab04c8c54c57f62e401ab.yml -openapi_spec_hash: 2b7ae60e34fd4d2a595e21f9cec0a129 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d07750284af5d32083cde2ea5f50c31f1d02b2eaf1b549fd5038ebc4e04aac3e.yml +openapi_spec_hash: c0969d735c1e7c616d8bece6c9954bfc config_hash: a35e9eb0436652c704bebf7c0a38085b From 08455a135a3810df6e0e1c2ce26aba6b3d9b09a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 11:31:55 +0000 Subject: [PATCH 376/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f80a13d88cc..0e866b2010f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d07750284af5d32083cde2ea5f50c31f1d02b2eaf1b549fd5038ebc4e04aac3e.yml -openapi_spec_hash: c0969d735c1e7c616d8bece6c9954bfc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d6bd4db9e997928ce840a5f7ea06357f057c26107366b2edc94115a6b1b1d71.yml +openapi_spec_hash: c0ba8bc429135aedb6a8a71b9a7885a8 config_hash: a35e9eb0436652c704bebf7c0a38085b From 181d1ef411c04039b6af54cb8be545ccaabdb961 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 11:58:33 +0000 Subject: [PATCH 377/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0e866b2010f..f80b7b451bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d6bd4db9e997928ce840a5f7ea06357f057c26107366b2edc94115a6b1b1d71.yml -openapi_spec_hash: c0ba8bc429135aedb6a8a71b9a7885a8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-37ba57715cc6fab6f930381e1698a1a5ead8662da38e20ecc7a903e9eef88de6.yml +openapi_spec_hash: a5f8daf79763209818b8fe4a280380cb config_hash: a35e9eb0436652c704bebf7c0a38085b From 15d3aa45b23152213d19172d29464810ff85b64a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:05:16 +0000 Subject: [PATCH 378/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f80b7b451bf..93e376fefdb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-37ba57715cc6fab6f930381e1698a1a5ead8662da38e20ecc7a903e9eef88de6.yml -openapi_spec_hash: a5f8daf79763209818b8fe4a280380cb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4dd01ef7125febc2e802576bf90e0e72ecb8274f5d7c8106d7742709bc5c0877.yml +openapi_spec_hash: f095759f7f2a9fda8626852b05c00e86 config_hash: a35e9eb0436652c704bebf7c0a38085b From 2cbfd662a2e88bf454939d9ba8d463e47d7568a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:24:57 +0000 Subject: [PATCH 379/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 93e376fefdb..cebfb78b4fd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4dd01ef7125febc2e802576bf90e0e72ecb8274f5d7c8106d7742709bc5c0877.yml -openapi_spec_hash: f095759f7f2a9fda8626852b05c00e86 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fe90498b1af1ae6857487527e7d640527ecc04677c90f916f141994848fccb56.yml +openapi_spec_hash: b0e2b8f4595bc6c809a62703461a3366 config_hash: a35e9eb0436652c704bebf7c0a38085b From b15c2a715567e16bd353b70c4f5b483794fe7a73 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:58:41 +0000 Subject: [PATCH 380/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cebfb78b4fd..516516dfed0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fe90498b1af1ae6857487527e7d640527ecc04677c90f916f141994848fccb56.yml -openapi_spec_hash: b0e2b8f4595bc6c809a62703461a3366 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd8a16a72645133e9f0352650b8aa3e733e25f68df33987af26b3146b978d5d5.yml +openapi_spec_hash: 9feb54928ff2dd5d0b30d394f574c12e config_hash: a35e9eb0436652c704bebf7c0a38085b From 5cd95d3a1227231a48da7431b2c6660f02ec7e48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 14:30:50 +0000 Subject: [PATCH 381/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 516516dfed0..fff0f2d338b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd8a16a72645133e9f0352650b8aa3e733e25f68df33987af26b3146b978d5d5.yml -openapi_spec_hash: 9feb54928ff2dd5d0b30d394f574c12e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e55a34665a45f59c0fcba5a5f7205e25d3974a03ffd6c26a100b8f5559a804f2.yml +openapi_spec_hash: e1a0d61d1059488b3659f8cd575f03cd config_hash: a35e9eb0436652c704bebf7c0a38085b From e5848459d2b7310568ca2f02ac8efdbd5c104dc2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 14:42:23 +0000 Subject: [PATCH 382/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fff0f2d338b..db83a287d41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e55a34665a45f59c0fcba5a5f7205e25d3974a03ffd6c26a100b8f5559a804f2.yml -openapi_spec_hash: e1a0d61d1059488b3659f8cd575f03cd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bddeedf66ade6409222f645befe0f629c46da0e5f791ec5550232db180ca9471.yml +openapi_spec_hash: 3fee717477ece51e9add6a31fab4de98 config_hash: a35e9eb0436652c704bebf7c0a38085b From 2a6d6abd4cf9ff930388ff09c6ef2af4012feec0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 14:53:43 +0000 Subject: [PATCH 383/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index db83a287d41..711ce7a9a78 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bddeedf66ade6409222f645befe0f629c46da0e5f791ec5550232db180ca9471.yml -openapi_spec_hash: 3fee717477ece51e9add6a31fab4de98 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7484ce9010ed66c1828f97b181539a0b5418d1a4cb6be789a12e06a00f4faa0c.yml +openapi_spec_hash: 6a8937b703b594465742ddf82652e181 config_hash: a35e9eb0436652c704bebf7c0a38085b From 0925597d91bfb6c529426f41d023be7f8b97ffd3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 15:28:14 +0000 Subject: [PATCH 384/392] feat(api): api update --- .stats.yml | 4 +- .../types/zero_trust/gateway/gateway_rule.py | 92 +++++++++---------- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/.stats.yml b/.stats.yml index 711ce7a9a78..a22bf87126e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7484ce9010ed66c1828f97b181539a0b5418d1a4cb6be789a12e06a00f4faa0c.yml -openapi_spec_hash: 6a8937b703b594465742ddf82652e181 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19d313507009812541708ad5f07abc94e1b76a04125edbb739349275e00200ee.yml +openapi_spec_hash: 913c40ac2c619698530376e0da8d6a6b config_hash: a35e9eb0436652c704bebf7c0a38085b diff --git a/src/cloudflare/types/zero_trust/gateway/gateway_rule.py b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py index 6212fef607a..dcfa9a1429c 100644 --- a/src/cloudflare/types/zero_trust/gateway/gateway_rule.py +++ b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py @@ -36,34 +36,56 @@ class Expiration(BaseModel): class GatewayRule(BaseModel): - id: Optional[str] = None - """The API resource UUID.""" - - action: Optional[ - Literal[ - "on", - "off", - "allow", - "block", - "scan", - "noscan", - "safesearch", - "ytrestricted", - "isolate", - "noisolate", - "override", - "l4_override", - "egress", - "resolve", - "quarantine", - "redirect", - ] - ] = None + action: Literal[ + "on", + "off", + "allow", + "block", + "scan", + "noscan", + "safesearch", + "ytrestricted", + "isolate", + "noisolate", + "override", + "l4_override", + "egress", + "resolve", + "quarantine", + "redirect", + ] """ The action to perform when the associated traffic, identity, and device posture expressions are either absent or evaluate to `true`. """ + enabled: bool + """True if the rule is enabled.""" + + filters: List[GatewayFilter] + """ + The protocol or layer to evaluate the traffic, identity, and device posture + expressions. + """ + + name: str + """The name of the rule.""" + + precedence: int + """Precedence sets the order of your rules. + + Lower values indicate higher precedence. At each processing phase, applicable + rules are evaluated in ascending order of this value. Refer to + [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform) + docs on how to manage precedence via Terraform. + """ + + traffic: str + """The wirefilter expression used for traffic matching.""" + + id: Optional[str] = None + """The API resource UUID.""" + created_at: Optional[datetime] = None deleted_at: Optional[datetime] = None @@ -75,9 +97,6 @@ class GatewayRule(BaseModel): device_posture: Optional[str] = None """The wirefilter expression used for device posture check matching.""" - enabled: Optional[bool] = None - """True if the rule is enabled.""" - expiration: Optional[Expiration] = None """The expiration time stamp and default duration of a DNS policy. @@ -86,30 +105,12 @@ class GatewayRule(BaseModel): This does not apply to HTTP or network policies. """ - filters: Optional[List[GatewayFilter]] = None - """ - The protocol or layer to evaluate the traffic, identity, and device posture - expressions. - """ - identity: Optional[str] = None """The wirefilter expression used for identity matching.""" - name: Optional[str] = None - """The name of the rule.""" - not_sharable: Optional[bool] = None """The rule cannot be shared via the Orgs API""" - precedence: Optional[int] = None - """Precedence sets the order of your rules. - - Lower values indicate higher precedence. At each processing phase, applicable - rules are evaluated in ascending order of this value. Refer to - [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform) - docs on how to manage precedence via Terraform. - """ - read_only: Optional[bool] = None """ The rule was shared via the Orgs API and cannot be edited by the current account @@ -127,9 +128,6 @@ class GatewayRule(BaseModel): source_account: Optional[str] = None """account tag of account that created the rule""" - traffic: Optional[str] = None - """The wirefilter expression used for traffic matching.""" - updated_at: Optional[datetime] = None version: Optional[int] = None From ba5f5baaa4e6f3a709860ab078f87dceba761353 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 15:39:57 +0000 Subject: [PATCH 385/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a22bf87126e..747ab697504 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-19d313507009812541708ad5f07abc94e1b76a04125edbb739349275e00200ee.yml -openapi_spec_hash: 913c40ac2c619698530376e0da8d6a6b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aab37cb84849907fc8ab8085493d6eea220dbca7d56f6ba60c110036308beb62.yml +openapi_spec_hash: 8fc60d7c347d88f3675e7898567334db config_hash: a35e9eb0436652c704bebf7c0a38085b From 4f456584807aab576e9b1614726af4724e1409b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 15:52:03 +0000 Subject: [PATCH 386/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 747ab697504..1011a0e82cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-aab37cb84849907fc8ab8085493d6eea220dbca7d56f6ba60c110036308beb62.yml -openapi_spec_hash: 8fc60d7c347d88f3675e7898567334db +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-82baac74c5e16f270edd35a2c506d5ae16a45d2180486cb8cc79b3794279ccc0.yml +openapi_spec_hash: 5583712ebf7b0a1d0b95288ee29cab44 config_hash: a35e9eb0436652c704bebf7c0a38085b From ac08ad1b11d435de2200846f0b8b2431836809a8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:04:28 +0000 Subject: [PATCH 387/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1011a0e82cf..2de069ba008 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-82baac74c5e16f270edd35a2c506d5ae16a45d2180486cb8cc79b3794279ccc0.yml -openapi_spec_hash: 5583712ebf7b0a1d0b95288ee29cab44 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-891506dc0c433a487d38684bf9df74c357aa8584fb265826731125a39436aa23.yml +openapi_spec_hash: e713302156c7ca1df84dee0eb049a65b config_hash: a35e9eb0436652c704bebf7c0a38085b From a02e27120b6928836cb9fbff41e60d92fea3b978 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:14:28 +0000 Subject: [PATCH 388/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2de069ba008..bdef65a3bfe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-891506dc0c433a487d38684bf9df74c357aa8584fb265826731125a39436aa23.yml -openapi_spec_hash: e713302156c7ca1df84dee0eb049a65b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eb01309e687cc50b692a896b9b6498d404aa10169dcb4eec73d9c60e89ea4410.yml +openapi_spec_hash: 61caedfb39d33da63eb905dea5edc1e5 config_hash: a35e9eb0436652c704bebf7c0a38085b From 516d25e92f75ad8b21b8e924910a665c23af03f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:26:05 +0000 Subject: [PATCH 389/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bdef65a3bfe..1d215b9ea72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eb01309e687cc50b692a896b9b6498d404aa10169dcb4eec73d9c60e89ea4410.yml -openapi_spec_hash: 61caedfb39d33da63eb905dea5edc1e5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-74100e43d1f1e33055a586ee43ee875d68d79aa5e5d328e5e60e419c24b5040d.yml +openapi_spec_hash: 42a59f61dbd5e5ab177e2b0c68e38a53 config_hash: a35e9eb0436652c704bebf7c0a38085b From 92d08732ebcf70d7477b6b0c8133db852025fb67 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:37:36 +0000 Subject: [PATCH 390/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1d215b9ea72..77c7c9ecd48 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-74100e43d1f1e33055a586ee43ee875d68d79aa5e5d328e5e60e419c24b5040d.yml -openapi_spec_hash: 42a59f61dbd5e5ab177e2b0c68e38a53 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b981591723b42ad37b5926897d57f9a412f809f1927de8f7bf43a0798cde5c42.yml +openapi_spec_hash: 08743068750f7f906b74ca605aa6e2bf config_hash: a35e9eb0436652c704bebf7c0a38085b From bd608b6b6f3a6a314a6ca7b1a273fd24b937f2e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:49:31 +0000 Subject: [PATCH 391/392] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 77c7c9ecd48..f4dcbe9f7b6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1777 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b981591723b42ad37b5926897d57f9a412f809f1927de8f7bf43a0798cde5c42.yml -openapi_spec_hash: 08743068750f7f906b74ca605aa6e2bf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-303d6b3a12762312df5b41fd3c78e4aa8c124898a550d6d1f79c796a90cf42d5.yml +openapi_spec_hash: b96deae37d1d1fd77660d71ddeccb755 config_hash: a35e9eb0436652c704bebf7c0a38085b From 7e80da5b95106cc91b0cfa219af4b5b7331bed7b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:51:30 +0000 Subject: [PATCH 392/392] release: 4.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 85 +++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/cloudflare/_version.py | 2 +- 4 files changed, 88 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 025a1cbcb11..934f2cc033c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.3.1" + ".": "4.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e63418f4e7a..0659a14a4a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,90 @@ # Changelog +## 4.4.0 (2025-07-23) + +Full Changelog: [v4.3.1...v4.4.0](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v4.4.0) + +### Features + +* **api:** Add DELETE and POST routes for Magic Connector ([42705d7](https://github.com/cloudflare/cloudflare-python/commit/42705d7ab89a26af0a185b8753aa009509780c76)) +* **api:** Add Radar Bots and Web Crawlers ([4d80c55](https://github.com/cloudflare/cloudflare-python/commit/4d80c5529a4680d0cb58e63073d90edc65b289a6)) +* **api:** api update ([0925597](https://github.com/cloudflare/cloudflare-python/commit/0925597d91bfb6c529426f41d023be7f8b97ffd3)) +* **api:** api update ([5745f74](https://github.com/cloudflare/cloudflare-python/commit/5745f74557e1289536cb11fa6e701411b2621066)) +* **api:** api update ([1a935f1](https://github.com/cloudflare/cloudflare-python/commit/1a935f11a343cca19171cf5de8c38f58856ae738)) +* **api:** api update ([54d6d21](https://github.com/cloudflare/cloudflare-python/commit/54d6d217d4f3b8ae2b87db2eb426819839f38315)) +* **api:** api update ([ae7588d](https://github.com/cloudflare/cloudflare-python/commit/ae7588d0b75a63f629fe304f434c616d521b5f3d)) +* **api:** api update ([7773d8a](https://github.com/cloudflare/cloudflare-python/commit/7773d8abc67e3a475fe2cd7c73301f3e9c7044bb)) +* **api:** api update ([d43aff4](https://github.com/cloudflare/cloudflare-python/commit/d43aff4a49f54e2b66cd1cf173a1bbbbd67e9de6)) +* **api:** api update ([90035b1](https://github.com/cloudflare/cloudflare-python/commit/90035b1ef5df466e26f5569005042342f34685a4)) +* **api:** api update ([4b25769](https://github.com/cloudflare/cloudflare-python/commit/4b2576975390342d64a58d6181e8a3f77f58e7b0)) +* **api:** api update ([4ab783f](https://github.com/cloudflare/cloudflare-python/commit/4ab783f798c1d2ac041afe9cc0f1829131a4cbba)) +* **api:** api update ([094a1c0](https://github.com/cloudflare/cloudflare-python/commit/094a1c0f2481b8e41ad5f06c12ada4d22776299f)) +* **api:** api update ([0084a4d](https://github.com/cloudflare/cloudflare-python/commit/0084a4d643e56ef69978eb3868b73beb4e9c24e2)) +* **api:** api update ([1bea8ae](https://github.com/cloudflare/cloudflare-python/commit/1bea8ae838936eab4da1b81092e6a184d4cbee38)) +* **api:** api update ([ad06dcd](https://github.com/cloudflare/cloudflare-python/commit/ad06dcd9de8fa91a2876359c865fd3441c7efee5)) +* **api:** api update ([b9c025b](https://github.com/cloudflare/cloudflare-python/commit/b9c025b2745b45eb9d4ce743dd4d4131d0b9034b)) +* **api:** api update ([20da11a](https://github.com/cloudflare/cloudflare-python/commit/20da11a728f7581238769b01e9b6dce525d7e235)) +* **api:** api update ([aef7eb7](https://github.com/cloudflare/cloudflare-python/commit/aef7eb77a0565f001bcef1d28e1adddcbdcda821)) +* **api:** api update ([5364bb7](https://github.com/cloudflare/cloudflare-python/commit/5364bb7fafdd4d85525232ee90c4e7b4dbae4488)) +* **api:** api update ([0d26a36](https://github.com/cloudflare/cloudflare-python/commit/0d26a36fbcd6c82968489f22c2db349aeb020878)) +* **api:** api update ([8a99cf5](https://github.com/cloudflare/cloudflare-python/commit/8a99cf5e25f69079acbef07f32f2b728a0f10849)) +* **api:** api update ([4ec7e83](https://github.com/cloudflare/cloudflare-python/commit/4ec7e833fd5ee4250b96231366343131d0008b72)) +* **api:** api update ([a46cf0d](https://github.com/cloudflare/cloudflare-python/commit/a46cf0d8fdfc88a45ce131656a0a7c3cb9c53fcc)) +* **api:** api update ([c6096ae](https://github.com/cloudflare/cloudflare-python/commit/c6096aeb9836a7d19c358d0a0217649d9e5455dd)) +* **api:** api update ([278a799](https://github.com/cloudflare/cloudflare-python/commit/278a7997b8107d50031886fe09b0039faed7d46c)) +* **api:** api update ([3dbbe9c](https://github.com/cloudflare/cloudflare-python/commit/3dbbe9c6d42f498d303173fc5bab1c4efba3a8a6)) +* **api:** api update ([f9365f8](https://github.com/cloudflare/cloudflare-python/commit/f9365f8e7f743cf24a80049662e1fa58233e6dc5)) +* **api:** api update ([0ddeaf4](https://github.com/cloudflare/cloudflare-python/commit/0ddeaf4caf2f93c2219496bf516c68709c44f2b5)) +* **api:** api update ([dcf06c8](https://github.com/cloudflare/cloudflare-python/commit/dcf06c8b08df6d6210dd58eb968b46ec56c02077)) +* **api:** api update ([d982424](https://github.com/cloudflare/cloudflare-python/commit/d982424f3f04cb7f6d13a1d12738cafb514be1bb)) +* **api:** api update ([493c628](https://github.com/cloudflare/cloudflare-python/commit/493c6287801e269227c5a6ce58748ed30040f16d)) +* **api:** api update ([f116592](https://github.com/cloudflare/cloudflare-python/commit/f1165925dbdd92232cfce87647c568c373a6c46f)) +* **api:** api update ([b4de192](https://github.com/cloudflare/cloudflare-python/commit/b4de1922aee64c681f492c3fac24fec414d5fb84)) +* **api:** api update ([3f94ddf](https://github.com/cloudflare/cloudflare-python/commit/3f94ddfeded1cd708596ffec9c7b63a3f78951b2)) +* **api:** api update ([2d31877](https://github.com/cloudflare/cloudflare-python/commit/2d3187794d5cc12d39dacfb58b51626b03495c12)) +* **api:** api update ([f96551d](https://github.com/cloudflare/cloudflare-python/commit/f96551d3275d2c8117705c84614f924eb62da98b)) +* **api:** api update ([c78996b](https://github.com/cloudflare/cloudflare-python/commit/c78996bbe8f0e33bedf4d928d9b8878b18ec81e6)) +* **api:** api update ([427f8f1](https://github.com/cloudflare/cloudflare-python/commit/427f8f1c4f8e6431e8593718658a954b9503d41d)) +* **api:** api update ([ec2e81c](https://github.com/cloudflare/cloudflare-python/commit/ec2e81ceae5ebb21bfedb8f5706a8ce51094340a)) +* **api:** api update ([16cdf47](https://github.com/cloudflare/cloudflare-python/commit/16cdf47bdb7be097bb7a83e9ccfbdc4b61e8405b)) +* **api:** api update ([fc20862](https://github.com/cloudflare/cloudflare-python/commit/fc20862274dcf03e7e90a90b37a5b812f3c63235)) +* **api:** api update ([18a6fde](https://github.com/cloudflare/cloudflare-python/commit/18a6fdeab07b6753252135f21304dcfc2fa1faf2)) +* **api:** api update ([23499df](https://github.com/cloudflare/cloudflare-python/commit/23499df3b54944c84a552a0e20ce09b075e4bc44)) +* **brand_protection:** Add new routes ([5d9961c](https://github.com/cloudflare/cloudflare-python/commit/5d9961ce4aba38d828f3279e7081b30b76db74ad)) +* clean up environment call outs ([f24f43d](https://github.com/cloudflare/cloudflare-python/commit/f24f43d8132d0efc31d49954209549932bba6f75)) +* **zero_trust_dlp:** Added individual resources and new routes ([96581bc](https://github.com/cloudflare/cloudflare-python/commit/96581bc4d785392715269ca32b09dfa8fce0ac51)) + + +### Bug Fixes + +* **api:** add missing `items` param ([f1eda00](https://github.com/cloudflare/cloudflare-python/commit/f1eda003cec7a593680d7e58106fad0e029cf5ee)) +* **ci:** correct conditional ([a071a9a](https://github.com/cloudflare/cloudflare-python/commit/a071a9ac7b25de7454f6ad37ee39af0f5dbcd2b0)) +* **ci:** release-doctor — report correct token name ([736bc3f](https://github.com/cloudflare/cloudflare-python/commit/736bc3f6a1009bdb69e3505c0f9116235914e4fb)) +* **client:** don't send Content-Type header on GET requests ([43041fb](https://github.com/cloudflare/cloudflare-python/commit/43041fba5e43c7e8022c5ece6d98d055e150a47b)) +* dns record example ([8f2f7a4](https://github.com/cloudflare/cloudflare-python/commit/8f2f7a4662883ae4cb85f956dda2b82a7ed952e4)) +* dns record example ([9085347](https://github.com/cloudflare/cloudflare-python/commit/908534756a4f8321407ced2dea94531e895989b8)) +* **parsing:** correctly handle nested discriminated unions ([9e6eb88](https://github.com/cloudflare/cloudflare-python/commit/9e6eb8890842b715b91c029ed3ad46b52d6fa9b3)) +* **parsing:** ignore empty metadata ([7569336](https://github.com/cloudflare/cloudflare-python/commit/7569336edf388157a87d85747180c925c9a4227a)) +* **parsing:** parse extra field types ([5c5c79d](https://github.com/cloudflare/cloudflare-python/commit/5c5c79d6d3d3601c38fc470d49d03d1e46716b7d)) +* radar types ([42c2209](https://github.com/cloudflare/cloudflare-python/commit/42c22098266df3dc6ebc0c19cfec97b6d851c9cd)) +* radar types ([234b609](https://github.com/cloudflare/cloudflare-python/commit/234b609b77d476c89f92fb289d02a1aaf6decf01)) +* **types:** add missing types ([8c44db9](https://github.com/cloudflare/cloudflare-python/commit/8c44db926c36c9734fcf7f07a7b82fc609f29297)) + + +### Chores + +* **api:** Skip broken prism test for updating custom DLP entries ([71baeb0](https://github.com/cloudflare/cloudflare-python/commit/71baeb0e4ca8145723f85233fa05cc42958a92e0)) +* **api:** skip broken prism tests ([c87b536](https://github.com/cloudflare/cloudflare-python/commit/c87b53618d2d3fde0d9f76e910bd9166d52b3b9a)) +* **api:** upload stainless config from cloudflare-config ([d00a8be](https://github.com/cloudflare/cloudflare-python/commit/d00a8be88733a8a5aa1af3abdb942e47befc2b47)) +* **ci:** change upload type ([88a9958](https://github.com/cloudflare/cloudflare-python/commit/88a99586b00f00557d5cf1b7f77979184e71034c)) +* **ci:** only run for pushes and fork pull requests ([9900f90](https://github.com/cloudflare/cloudflare-python/commit/9900f90f87f4a58b92c7f89d2b92a63be552c102)) +* **internal:** add breaking change detection ([1f93055](https://github.com/cloudflare/cloudflare-python/commit/1f930557c231be493e57c9780341916dd95bedfd)) +* **internal:** bump pinned h11 dep ([a151be0](https://github.com/cloudflare/cloudflare-python/commit/a151be01332015a572bfe280f9708a2abf82dbaf)) +* **internal:** codegen related update ([371845c](https://github.com/cloudflare/cloudflare-python/commit/371845cca805cc6fa3bb84680d4e5d698c38235e)) +* **package:** mark python 3.13 as supported ([9e18f39](https://github.com/cloudflare/cloudflare-python/commit/9e18f39e933b396a425b0a3f6976a1130e7218c2)) +* **readme:** fix version rendering on pypi ([d3d7dd6](https://github.com/cloudflare/cloudflare-python/commit/d3d7dd61af8899c760d066d53c69e5b0e4e99fe8)) +* **types:** rebuild Pydantic models after all types are defined ([cf574a4](https://github.com/cloudflare/cloudflare-python/commit/cf574a4c28ea55613d66da64bd55d89d1ffb8859)) + ## 4.3.1 (2025-06-16) Full Changelog: [v4.3.0...v4.3.1](https://github.com/cloudflare/cloudflare-python/compare/v4.3.0...v4.3.1) diff --git a/pyproject.toml b/pyproject.toml index 3b57b0e2800..5cc7b8ef6b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cloudflare" -version = "4.3.1" +version = "4.4.0" description = "The official Python library for the cloudflare API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/cloudflare/_version.py b/src/cloudflare/_version.py index 0d479c2e651..d584d122921 100644 --- a/src/cloudflare/_version.py +++ b/src/cloudflare/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "cloudflare" -__version__ = "4.3.1" # x-release-please-version +__version__ = "4.4.0" # x-release-please-version