From 3ee59ab6bb3b0d015fb12ac3162e2121fe49b949 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 03:52:41 +0000 Subject: [PATCH] fix(internal): remove port scans pending path fixes --- .stats.yml | 2 +- src/cloudflare/resources/abuse_reports.py | 2689 ++++++++++++++++- .../abuse_report_create_params.py | 1277 +++++++- src/cloudflare/types/shared/error_data.py | 10 +- tests/api_resources/test_abuse_reports.py | 1488 ++++++++- 5 files changed, 5242 insertions(+), 224 deletions(-) diff --git a/.stats.yml b/.stats.yml index 726dc413ce7..fba0f266de1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1570 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4ef7459c0be2e1b6d28303982b9691909dadc52b214cb490fcce792ba09b5089.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ffe03665c4798e7ab37d35bd83bef596085067a302eb616e434136543f34d235.yml diff --git a/src/cloudflare/resources/abuse_reports.py b/src/cloudflare/resources/abuse_reports.py index a90898c5109..09f63ae53af 100644 --- a/src/cloudflare/resources/abuse_reports.py +++ b/src/cloudflare/resources/abuse_reports.py @@ -3,12 +3,13 @@ from __future__ import annotations from typing import Type, cast -from typing_extensions import Literal +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, ) @@ -48,6 +49,7 @@ def with_streaming_response(self) -> AbuseReportsResourceWithStreamingResponse: """ return AbuseReportsResourceWithStreamingResponse(self) + @overload def create( self, report_type: Literal[ @@ -62,6 +64,2246 @@ def create( ], *, account_id: str, + address1: str, + agent_name: str, + agree: Literal[0, 1], + city: str, + country: str, + host_notification: Literal["send", "send-anon", "none"], + original_work: str, + owner_notification: Literal["send", "send-anon", "none"], + signature: str, + state: str, + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + comments: str | NotGiven = NOT_GIVEN, + company: str | NotGiven = NOT_GIVEN, + destination_ips: str | NotGiven = NOT_GIVEN, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + justification: str | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, + ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, + ports_protocols: str | NotGiven = NOT_GIVEN, + source_ips: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + 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/). + + 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/). + + country: 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. + + 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. + + 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 + + state: Text not exceeding 255 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). + + act: The abuse report type + + 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/). + + 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 + + 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` + + 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/). + + 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. + + 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. + + 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 + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + owner_notification: Literal["send", "send-anon", "none"], + trademark_number: str, + trademark_office: str, + trademark_symbol: str, + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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 + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + trademark_number: Text not exceeding 1000 characters + + trademark_office: Text not exceeding 1000 characters + + trademark_symbol: Text not exceeding 1000 characters + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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 + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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 + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + ncmec_notification: Literal["send", "send-anon", "none"], + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, + original_work: str | NotGiven = NOT_GIVEN, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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. + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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 + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, + justification: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + ncsei_subject_representation: bool, + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + justification: str | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, + original_work: str | NotGiven = NOT_GIVEN, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + host_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. + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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` + + 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/). + + ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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. + + 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 + + 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/). + + 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", + "address1", + "agent_name", + "agree", + "city", + "country", + "host_notification", + "original_work", + "owner_notification", + "signature", + "state", + ], + [ + "account_id", + "host_notification", + "justification", + "owner_notification", + "trademark_number", + "trademark_office", + "trademark_symbol", + ], + ["account_id", "host_notification", "justification", "owner_notification"], + ["account_id", "host_notification", "justification", "ncmec_notification", "owner_notification"], + ["account_id", "owner_notification"], + ["account_id", "host_notification", "ncsei_subject_representation", "owner_notification"], + ) + def create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + address1: str | NotGiven = NOT_GIVEN, + agent_name: str | NotGiven = NOT_GIVEN, + agree: Literal[0, 1] | NotGiven = NOT_GIVEN, + city: str | NotGiven = NOT_GIVEN, + country: str | NotGiven = NOT_GIVEN, + host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, + original_work: str | NotGiven = NOT_GIVEN, + owner_notification: Literal["send", "send-anon", "none"], + signature: str | NotGiven = NOT_GIVEN, + state: str | NotGiven = NOT_GIVEN, + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + comments: str | NotGiven = NOT_GIVEN, + company: str | NotGiven = NOT_GIVEN, + destination_ips: str | NotGiven = NOT_GIVEN, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + justification: str | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, + ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, + ports_protocols: str | NotGiven = NOT_GIVEN, + source_ips: 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, + urls: 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, + ) -> str: + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") + if not report_type: + raise ValueError(f"Expected a non-empty value for `report_type` but received {report_type!r}") + return self._post( + f"/accounts/{account_id}/abuse-reports/{report_type}", + body=maybe_transform( + { + "address1": address1, + "agent_name": agent_name, + "agree": agree, + "city": city, + "country": country, + "host_notification": host_notification, + "original_work": original_work, + "owner_notification": owner_notification, + "signature": signature, + "state": state, + "act": act, + "comments": comments, + "company": company, + "destination_ips": destination_ips, + "email": email, + "email2": email2, + "justification": justification, + "name": name, + "ncmec_notification": ncmec_notification, + "ncsei_subject_representation": ncsei_subject_representation, + "ports_protocols": ports_protocols, + "source_ips": source_ips, + "tele": tele, + "title": title, + "trademark_number": trademark_number, + "trademark_office": trademark_office, + "trademark_symbol": trademark_symbol, + "urls": urls, + }, + abuse_report_create_params.AbuseReportCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[AbuseReportCreateResponse]._unwrapper, + ), + cast_to=cast(Type[str], ResultWrapper[str]), + ) + + +class AsyncAbuseReportsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncAbuseReportsResourceWithRawResponse: + """ + 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 AsyncAbuseReportsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncAbuseReportsResourceWithStreamingResponse: + """ + 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 AsyncAbuseReportsResourceWithStreamingResponse(self) + + @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", + ], + *, + account_id: str, + address1: str, + agent_name: str, + agree: Literal[0, 1], + city: str, + country: str, + host_notification: Literal["send", "send-anon", "none"], + original_work: str, + owner_notification: Literal["send", "send-anon", "none"], + signature: str, + state: str, + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + comments: str | NotGiven = NOT_GIVEN, + company: str | NotGiven = NOT_GIVEN, + destination_ips: str | NotGiven = NOT_GIVEN, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + justification: str | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, + ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, + ports_protocols: str | NotGiven = NOT_GIVEN, + source_ips: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + 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/). + + 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/). + + country: 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. + + 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. + + 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 + + state: Text not exceeding 255 characters. This field may be released by Cloudflare to + third parties such as the Lumen Database (https://lumendatabase.org/). + + act: The abuse report type + + 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/). + + 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 + + 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` + + 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/). + + 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. + + 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. + + 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 + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + owner_notification: Literal["send", "send-anon", "none"], + trademark_number: str, + trademark_office: str, + trademark_symbol: str, + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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 + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + trademark_number: Text not exceeding 1000 characters + + trademark_office: Text not exceeding 1000 characters + + trademark_symbol: Text not exceeding 1000 characters + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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 + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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 + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + ncmec_notification: Literal["send", "send-anon", "none"], + owner_notification: Literal["send", "send-anon", "none"], + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, + original_work: str | NotGiven = NOT_GIVEN, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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. + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + host_notification: Literal["send", "send-anon", "none"], + justification: str, + owner_notification: Literal["send", "send-anon", "none"], act: Literal[ "abuse_dmca", "abuse_trademark", @@ -71,23 +2313,180 @@ def create( "abuse_threat", "abuse_registrar_whois", "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + name: 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, + ports_protocols: 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, + urls: 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, + ) -> str: + """ + Submit the Abuse Report of a particular type + + Args: + report_type: The abuse report type + + 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 + + owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. + + 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/). + + 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 + + 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/). + + 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/). + + 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. + + 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 + + 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/). + + 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 create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", ], - agree: Literal[0, 1], - email: str, - email2: str, - host_notification: Literal["send", "send-anon", "none"], - ncmec_notification: Literal["send", "send-anon", "none"], + *, + account_id: str, owner_notification: Literal["send", "send-anon", "none"], - urls: str, + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, justification: str | NotGiven = NOT_GIVEN, name: 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, ports_protocols: str | NotGiven = NOT_GIVEN, @@ -99,6 +2498,7 @@ def create( trademark_number: str | NotGiven = NOT_GIVEN, trademark_office: str | NotGiven = NOT_GIVEN, trademark_symbol: str | NotGiven = NOT_GIVEN, + urls: 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, @@ -112,28 +2512,10 @@ def create( Args: report_type: The abuse report type - act: The abuse report type - - agree: Can be `0` for false or `1` for true - - 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. - - ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark - reports cannot be anonymous. - owner_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/). + 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/). @@ -142,6 +2524,8 @@ def create( 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/). @@ -157,6 +2541,14 @@ def create( destination IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique + 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 @@ -164,7 +2556,10 @@ 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/). - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report + 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/). @@ -196,6 +2591,11 @@ def create( trademark_symbol: Text not exceeding 1000 characters + 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/). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -204,76 +2604,9 @@ def create( 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 report_type: - raise ValueError(f"Expected a non-empty value for `report_type` but received {report_type!r}") - return self._post( - f"/accounts/{account_id}/abuse-reports/{report_type}", - body=maybe_transform( - { - "act": act, - "agree": agree, - "email": email, - "email2": email2, - "host_notification": host_notification, - "ncmec_notification": ncmec_notification, - "owner_notification": owner_notification, - "urls": urls, - "address1": address1, - "agent_name": agent_name, - "city": city, - "comments": comments, - "company": company, - "country": country, - "destination_ips": destination_ips, - "justification": justification, - "name": name, - "ncsei_subject_representation": ncsei_subject_representation, - "original_work": original_work, - "ports_protocols": ports_protocols, - "signature": signature, - "source_ips": source_ips, - "state": state, - "tele": tele, - "title": title, - "trademark_number": trademark_number, - "trademark_office": trademark_office, - "trademark_symbol": trademark_symbol, - }, - abuse_report_create_params.AbuseReportCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper[AbuseReportCreateResponse]._unwrapper, - ), - cast_to=cast(Type[str], ResultWrapper[str]), - ) - - -class AsyncAbuseReportsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAbuseReportsResourceWithRawResponse: - """ - 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 AsyncAbuseReportsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAbuseReportsResourceWithStreamingResponse: - """ - 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 AsyncAbuseReportsResourceWithStreamingResponse(self) + ... + @overload async def create( self, report_type: Literal[ @@ -288,6 +2621,9 @@ async def create( ], *, account_id: str, + host_notification: Literal["send", "send-anon", "none"], + ncsei_subject_representation: bool, + owner_notification: Literal["send", "send-anon", "none"], act: Literal[ "abuse_dmca", "abuse_trademark", @@ -297,24 +2633,21 @@ async def create( "abuse_threat", "abuse_registrar_whois", "abuse_ncsei", - ], - agree: Literal[0, 1], - email: str, - email2: str, - host_notification: Literal["send", "send-anon", "none"], - ncmec_notification: Literal["send", "send-anon", "none"], - owner_notification: Literal["send", "send-anon", "none"], - urls: str, + ] + | NotGiven = NOT_GIVEN, 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, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, justification: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, - ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, + ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, original_work: str | NotGiven = NOT_GIVEN, ports_protocols: str | NotGiven = NOT_GIVEN, signature: str | NotGiven = NOT_GIVEN, @@ -325,6 +2658,7 @@ async def create( trademark_number: str | NotGiven = NOT_GIVEN, trademark_office: str | NotGiven = NOT_GIVEN, trademark_symbol: str | NotGiven = NOT_GIVEN, + urls: 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, @@ -338,28 +2672,15 @@ async def create( Args: report_type: The abuse report type - act: The abuse report type - - agree: Can be `0` for false or `1` for true - - 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. - 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. owner_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/). + 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/). @@ -368,6 +2689,8 @@ async def create( 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/). @@ -383,6 +2706,11 @@ async def create( destination IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique + 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` + 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 @@ -390,7 +2718,8 @@ 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/). - ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report + ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark + reports cannot be anonymous. 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/). @@ -422,6 +2751,11 @@ async def create( trademark_symbol: Text not exceeding 1000 characters + 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/). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -430,6 +2764,95 @@ async def create( timeout: Override the client-level default timeout for this request, in seconds """ + ... + + @required_args( + [ + "account_id", + "address1", + "agent_name", + "agree", + "city", + "country", + "host_notification", + "original_work", + "owner_notification", + "signature", + "state", + ], + [ + "account_id", + "host_notification", + "justification", + "owner_notification", + "trademark_number", + "trademark_office", + "trademark_symbol", + ], + ["account_id", "host_notification", "justification", "owner_notification"], + ["account_id", "host_notification", "justification", "ncmec_notification", "owner_notification"], + ["account_id", "owner_notification"], + ["account_id", "host_notification", "ncsei_subject_representation", "owner_notification"], + ) + async def create( + self, + report_type: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ], + *, + account_id: str, + address1: str | NotGiven = NOT_GIVEN, + agent_name: str | NotGiven = NOT_GIVEN, + agree: Literal[0, 1] | NotGiven = NOT_GIVEN, + city: str | NotGiven = NOT_GIVEN, + country: str | NotGiven = NOT_GIVEN, + host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, + original_work: str | NotGiven = NOT_GIVEN, + owner_notification: Literal["send", "send-anon", "none"], + signature: str | NotGiven = NOT_GIVEN, + state: str | NotGiven = NOT_GIVEN, + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + | NotGiven = NOT_GIVEN, + comments: str | NotGiven = NOT_GIVEN, + company: str | NotGiven = NOT_GIVEN, + destination_ips: str | NotGiven = NOT_GIVEN, + email: str | NotGiven = NOT_GIVEN, + email2: str | NotGiven = NOT_GIVEN, + justification: str | NotGiven = NOT_GIVEN, + name: str | NotGiven = NOT_GIVEN, + ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN, + ncsei_subject_representation: bool | NotGiven = NOT_GIVEN, + ports_protocols: str | NotGiven = NOT_GIVEN, + source_ips: 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, + urls: 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, + ) -> str: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not report_type: @@ -438,34 +2861,34 @@ async def create( f"/accounts/{account_id}/abuse-reports/{report_type}", body=await async_maybe_transform( { - "act": act, - "agree": agree, - "email": email, - "email2": email2, - "host_notification": host_notification, - "ncmec_notification": ncmec_notification, - "owner_notification": owner_notification, - "urls": urls, "address1": address1, "agent_name": agent_name, + "agree": agree, "city": city, + "country": country, + "host_notification": host_notification, + "original_work": original_work, + "owner_notification": owner_notification, + "signature": signature, + "state": state, + "act": act, "comments": comments, "company": company, - "country": country, "destination_ips": destination_ips, + "email": email, + "email2": email2, "justification": justification, "name": name, + "ncmec_notification": ncmec_notification, "ncsei_subject_representation": ncsei_subject_representation, - "original_work": original_work, "ports_protocols": ports_protocols, - "signature": signature, "source_ips": source_ips, - "state": state, "tele": tele, "title": title, "trademark_number": trademark_number, "trademark_office": trademark_office, "trademark_symbol": trademark_symbol, + "urls": urls, }, abuse_report_create_params.AbuseReportCreateParams, ), 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 19b904614bf..bd80fd83251 100644 --- a/src/cloudflare/types/abuse_reports/abuse_report_create_params.py +++ b/src/cloudflare/types/abuse_reports/abuse_report_create_params.py @@ -2,60 +2,1218 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from typing_extensions import Literal, Required, TypeAlias, TypedDict -__all__ = ["AbuseReportCreateParams"] +__all__ = [ + "AbuseReportCreateParams", + "AbuseReportsDmcaReport", + "AbuseReportsTrademarkReport", + "AbuseReportsGeneralReport", + "AbuseReportsPhishingReport", + "AbuseReportsChildrenAbuseReport", + "AbuseReportsThreatReport", + "AbuseReportsRegistrarWhoisReport", + "AbuseReportsNcseiReport", +] -class AbuseReportCreateParams(TypedDict, total=False): +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", - ] + 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: 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: Required[Literal[0, 1]] + """Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports""" + + 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/). + """ + + 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/). + """ + + host_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + 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: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + 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 + """ + + state: 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/). + """ + + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + """The abuse report type""" + + 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/). + """ + + 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 + """ + + email: 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: str + """Should match the value provided in `email`""" + + 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 + """ + + name: 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"] + """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.""" + + 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. + """ + + 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 + """ + + 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""" + + urls: 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/). + """ + + +class AbuseReportsTrademarkReport(TypedDict, total=False): + account_id: Required[str] + + host_notification: Required[Literal["send", "send-anon", "none"]] + """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 + """ + + owner_notification: Required[Literal["send", "send-anon", "none"]] + """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""" + + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + """The abuse report type""" + + 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 + """ + + email: 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: str + """Should match the value provided in `email`""" + + name: 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"] + """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/). + """ + + 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. + """ + + 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""" + + urls: 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/). + """ + + +class AbuseReportsGeneralReport(TypedDict, total=False): + account_id: Required[str] + + host_notification: Required[Literal["send", "send-anon", "none"]] + """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 + """ + + owner_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + """The abuse report type""" + + 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 + """ + + email: 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: str + """Should match the value provided in `email`""" + + name: 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"] + """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/). + """ + + 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. + """ + + 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""" + + urls: 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/). + """ + + +class AbuseReportsPhishingReport(TypedDict, total=False): + account_id: Required[str] + + host_notification: Required[Literal["send", "send-anon", "none"]] + """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 + """ + + owner_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + """The abuse report type""" + + 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 + """ + + email: 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: str + """Should match the value provided in `email`""" + + name: 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"] + """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/). + """ + + 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. + """ + + 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""" + + urls: 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/). + """ + + +class AbuseReportsChildrenAbuseReport(TypedDict, total=False): + account_id: Required[str] + + host_notification: Required[Literal["send", "send-anon", "none"]] + """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 + """ + + ncmec_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + owner_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + """The abuse report type""" + + 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 + """ + + email: 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: str + """Should match the value provided in `email`""" + + name: str + """Text not exceeding 255 characters. + + 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 + """Text not exceeding 255 characters. + + This field may be released by Cloudflare to third parties such as the Lumen + Database (https://lumendatabase.org/). + """ + + 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. + """ + + 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""" + + urls: 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/). + """ + + +class AbuseReportsThreatReport(TypedDict, total=False): + account_id: Required[str] + + host_notification: Required[Literal["send", "send-anon", "none"]] + """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 + """ + + owner_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + """The abuse report type""" + + 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 + """ + + email: 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: str + """Should match the value provided in `email`""" + + name: 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"] + """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/). + """ + + 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. + """ + + 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""" + + urls: 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/). + """ + + +class AbuseReportsRegistrarWhoisReport(TypedDict, total=False): + account_id: Required[str] + + owner_notification: Required[Literal["send", "send-anon", "none"]] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ + + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", ] """The abuse report type""" - agree: Required[Literal[0, 1]] - """Can be `0` for false or `1` for true""" + 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 + """ - email: Required[str] + email: 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] + email2: str """Should match the value provided in `email`""" - host_notification: Required[Literal["send", "send-anon", "none"]] + host_notification: Literal["send", "send-anon", "none"] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - ncmec_notification: Required[Literal["send", "send-anon", "none"]] - """Notification type based on the abuse type. + 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 + """ - NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + name: 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: Required[Literal["send", "send-anon", "none"]] + ncmec_notification: Literal["send", "send-anon", "none"] """Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. """ - urls: Required[str] + 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/). + """ + + 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. + """ + + 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""" + + urls: 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 @@ -63,6 +1221,37 @@ class AbuseReportCreateParams(TypedDict, total=False): third parties such as the Lumen Database (https://lumendatabase.org/). """ + +class AbuseReportsNcseiReport(TypedDict, total=False): + account_id: Required[str] + + host_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: 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. + """ + + act: Literal[ + "abuse_dmca", + "abuse_trademark", + "abuse_general", + "abuse_phishing", + "abuse_children", + "abuse_threat", + "abuse_registrar_whois", + "abuse_ncsei", + ] + """The abuse report type""" + address1: str """Text not exceeding 100 characters. @@ -77,6 +1266,9 @@ class AbuseReportCreateParams(TypedDict, total=False): 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. @@ -108,6 +1300,16 @@ class AbuseReportCreateParams(TypedDict, total=False): IP addresses ought to be unique """ + email: 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: str + """Should match the value provided in `email`""" + justification: str """ A detailed description of the infringement, including any necessary access @@ -122,8 +1324,11 @@ class AbuseReportCreateParams(TypedDict, total=False): Database (https://lumendatabase.org/). """ - ncsei_subject_representation: bool - """If the submitter is the target of NCSEI in the URLs of the abuse report""" + ncmec_notification: Literal["send", "send-anon", "none"] + """Notification type based on the abuse type. + + NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. + """ original_work: str """Text not exceeding 255 characters. @@ -179,3 +1384,23 @@ class AbuseReportCreateParams(TypedDict, total=False): trademark_symbol: str """Text not exceeding 1000 characters""" + + urls: 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/). + """ + + +AbuseReportCreateParams: TypeAlias = Union[ + AbuseReportsDmcaReport, + AbuseReportsTrademarkReport, + AbuseReportsGeneralReport, + AbuseReportsPhishingReport, + AbuseReportsChildrenAbuseReport, + AbuseReportsThreatReport, + AbuseReportsRegistrarWhoisReport, + AbuseReportsNcseiReport, +] diff --git a/src/cloudflare/types/shared/error_data.py b/src/cloudflare/types/shared/error_data.py index e7621bcad3f..ad03d978862 100644 --- a/src/cloudflare/types/shared/error_data.py +++ b/src/cloudflare/types/shared/error_data.py @@ -4,10 +4,18 @@ from ..._models import BaseModel -__all__ = ["ErrorData"] +__all__ = ["ErrorData", "Source"] + + +class Source(BaseModel): + pointer: Optional[str] = None class ErrorData(BaseModel): code: Optional[int] = None + documentation_url: Optional[str] = None + message: Optional[str] = None + + source: Optional[Source] = None diff --git a/tests/api_resources/test_abuse_reports.py b/tests/api_resources/test_abuse_reports.py index 690fbab3c05..b055c780ed8 100644 --- a/tests/api_resources/test_abuse_reports.py +++ b/tests/api_resources/test_abuse_reports.py @@ -18,43 +18,1258 @@ class TestAbuseReports: @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - def test_method_create(self, client: Cloudflare) -> None: + def test_method_create_overload_1(self, client: Cloudflare) -> None: abuse_report = client.abuse_reports.create( report_type="abuse_dmca", account_id="023e105f4ecef8ad9ca31a8372d0c353", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: + abuse_report = client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + act="abuse_dmca", + comments="x", + company="x", + destination_ips="destination_ips", + email="email", + email2="email2", + justification="x", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + ports_protocols="ports_protocols", + source_ips="source_ips", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: + response = client.abuse_reports.with_raw_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: + with client.abuse_reports.with_streaming_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: + abuse_report = client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: + response = client.abuse_reports.with_raw_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: + with client.abuse_reports.with_streaming_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: + abuse_report = client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: + response = client.abuse_reports.with_raw_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: + with client.abuse_reports.with_streaming_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: + abuse_report = client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: + response = client.abuse_reports.with_raw_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: + with client.abuse_reports.with_streaming_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + ncmec_notification="send", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: + abuse_report = client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + ncmec_notification="send", + owner_notification="send", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + name="x", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: + response = client.abuse_reports.with_raw_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + ncmec_notification="send", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: + with client.abuse_reports.with_streaming_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + ncmec_notification="send", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + ncmec_notification="send", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: + abuse_report = client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: + response = client.abuse_reports.with_raw_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: + with client.abuse_reports.with_streaming_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: + abuse_report = client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + owner_notification="send", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + host_notification="send", + justification="x", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: + response = client.abuse_reports.with_raw_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: + with client.abuse_reports.with_streaming_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + ncsei_subject_representation=True, + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: + abuse_report = client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + ncsei_subject_representation=True, + owner_notification="send", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + justification="x", + name="x", + ncmec_notification="send", + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: + response = client.abuse_reports.with_raw_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + ncsei_subject_representation=True, + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: + with client.abuse_reports.with_streaming_response.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + ncsei_subject_representation=True, + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + ncsei_subject_representation=True, + owner_notification="send", + ) + + +class TestAsyncAbuseReports: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: + abuse_report = await async_client.abuse_reports.create( + report_type="abuse_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + act="abuse_dmca", + comments="x", + company="x", + destination_ips="destination_ips", + email="email", + email2="email2", + justification="x", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + ports_protocols="ports_protocols", + source_ips="source_ips", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + address1="x", + agent_name="x", + agree=0, + city="x", + country="x", + host_notification="send", + original_work="x", + owner_notification="send", + signature="signature", + state="x", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + owner_notification="send", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + act="abuse_dmca", + address1="x", + agent_name="x", + agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", + email="email", + email2="email2", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", act="abuse_dmca", + address1="x", + agent_name="x", agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", email="email", email2="email2", + name="x", + ncmec_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", + urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", host_notification="send", + justification="x", ncmec_notification="send", owner_notification="send", - urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - def test_method_create_with_all_params(self, client: Cloudflare) -> None: - abuse_report = client.abuse_reports.create( + 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_dmca", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - agree=0, - email="email", - email2="email2", host_notification="send", + justification="x", ncmec_notification="send", owner_notification="send", - urls="urls", + act="abuse_dmca", address1="x", agent_name="x", + agree=0, city="x", comments="x", company="x", country="x", destination_ips="destination_ips", - justification="x", + email="email", + email2="email2", name="x", ncsei_subject_representation=True, original_work="x", @@ -67,115 +1282,276 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: trademark_number="x", trademark_office="x", trademark_symbol="x", + urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - def test_raw_response_create(self, client: Cloudflare) -> None: - response = client.abuse_reports.with_raw_response.create( + 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_dmca", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - agree=0, - email="email", - email2="email2", host_notification="send", + justification="x", ncmec_notification="send", owner_notification="send", - urls="urls", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - abuse_report = response.parse() + abuse_report = await response.parse() assert_matches_type(str, abuse_report, path=["response"]) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - def test_streaming_response_create(self, client: Cloudflare) -> None: - with client.abuse_reports.with_streaming_response.create( + 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_dmca", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - agree=0, - email="email", - email2="email2", host_notification="send", + justification="x", ncmec_notification="send", owner_notification="send", - urls="urls", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - abuse_report = response.parse() + abuse_report = await response.parse() assert_matches_type(str, abuse_report, path=["response"]) assert cast(Any, response.is_closed) is True @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - def test_path_params_create(self, client: Cloudflare) -> None: + 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 ''"): - client.abuse_reports.with_raw_response.create( + await async_client.abuse_reports.with_raw_response.create( report_type="abuse_dmca", account_id="", - act="abuse_dmca", - agree=0, - email="email", - email2="email2", host_notification="send", + justification="x", ncmec_notification="send", owner_notification="send", - urls="urls", ) - -class TestAsyncAbuseReports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - async def test_method_create(self, async_client: AsyncCloudflare) -> None: + 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_dmca", account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", act="abuse_dmca", + address1="x", + agent_name="x", agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", email="email", email2="email2", - host_notification="send", + name="x", ncmec_notification="send", - owner_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: + 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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + justification="x", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + host_notification="send", + justification="x", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", account_id="023e105f4ecef8ad9ca31a8372d0c353", + owner_notification="send", act="abuse_dmca", + address1="x", + agent_name="x", agree=0, + city="x", + comments="x", + company="x", + country="x", + destination_ips="destination_ips", email="email", email2="email2", host_notification="send", + justification="x", + name="x", ncmec_notification="send", - owner_notification="send", + ncsei_subject_representation=True, + original_work="x", + ports_protocols="ports_protocols", + signature="signature", + source_ips="source_ips", + state="x", + tele="x", + title="x", + trademark_number="x", + trademark_office="x", + trademark_symbol="x", urls="urls", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + owner_notification="send", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + owner_notification="send", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + abuse_report = await response.parse() + assert_matches_type(str, abuse_report, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @parametrize + 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_dmca", + account_id="", + owner_notification="send", + ) + + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + ncsei_subject_representation=True, + owner_notification="send", + ) + assert_matches_type(str, abuse_report, path=["response"]) + + @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") + @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_dmca", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + host_notification="send", + ncsei_subject_representation=True, + owner_notification="send", + act="abuse_dmca", address1="x", agent_name="x", + agree=0, city="x", comments="x", company="x", country="x", destination_ips="destination_ips", + email="email", + email2="email2", justification="x", name="x", - ncsei_subject_representation=True, + ncmec_notification="send", original_work="x", ports_protocols="ports_protocols", signature="signature", @@ -186,23 +1562,19 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare trademark_number="x", trademark_office="x", trademark_symbol="x", + urls="urls", ) assert_matches_type(str, abuse_report, path=["response"]) @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + 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_dmca", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - agree=0, - email="email", - email2="email2", host_notification="send", - ncmec_notification="send", + ncsei_subject_representation=True, owner_notification="send", - urls="urls", ) assert response.is_closed is True @@ -212,18 +1584,13 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + 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_dmca", account_id="023e105f4ecef8ad9ca31a8372d0c353", - act="abuse_dmca", - agree=0, - email="email", - email2="email2", host_notification="send", - ncmec_notification="send", + ncsei_subject_representation=True, owner_notification="send", - urls="urls", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -235,17 +1602,12 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> @pytest.mark.skip(reason="TODO: investigate unauthorized HTTP response") @parametrize - async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: + 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_dmca", account_id="", - act="abuse_dmca", - agree=0, - email="email", - email2="email2", host_notification="send", - ncmec_notification="send", + ncsei_subject_representation=True, owner_notification="send", - urls="urls", )