From df026da6471cc46106825b7d8f9814b0cbd007e7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:42:30 +0000 Subject: [PATCH] feat(api): api update --- .stats.yml | 4 +- src/resources/abuse-reports.ts | 734 +++++++++++----------- tests/api-resources/abuse-reports.test.ts | 37 +- 3 files changed, 385 insertions(+), 390 deletions(-) diff --git a/.stats.yml b/.stats.yml index e6c6af12af..13b71361d0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1707 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3e03f71406670e2384aa5c3bf2bea707a896e4957b4ec5f9427182fbaa0f85b4.yml -openapi_spec_hash: 40d67d20dcbb7925f96d686d41ad2916 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-93f98a3beb10acb3b428aaf13ab29fd80c31373cad60635fab5c0d4bc13b1a62.yml +openapi_spec_hash: 45a8bb16d460539bc265dc9d89dd9914 config_hash: e30b863eac83985d5919f958f3cd8993 diff --git a/src/resources/abuse-reports.ts b/src/resources/abuse-reports.ts index c6d74772ca..4fda744212 100644 --- a/src/resources/abuse-reports.ts +++ b/src/resources/abuse-reports.ts @@ -53,84 +53,71 @@ export declare namespace AbuseReportCreateParams { account_id: string; /** - * Body param: Text not exceeding 100 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). - */ - address1: string; - - /** - * Body param: 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/). + * Body param: The abuse report type */ - agent_name: string; + act: + | 'abuse_dmca' + | 'abuse_trademark' + | 'abuse_general' + | 'abuse_phishing' + | 'abuse_children' + | 'abuse_threat' + | 'abuse_registrar_whois' + | 'abuse_ncsei'; /** - * Body param: Can be `0` for false or `1` for true. Must be value: 1 for DMCA - * reports + * Body param: 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/). */ - agree: 0 | 1; + email: string; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: Should match the value provided in `email` */ - city: string; + email2: string; /** * Body param: Text not exceeding 255 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database * (https://lumendatabase.org/). */ - country: string; + name: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: A list of valid URLs separated by ‘ ’ (new line character). The list + * of the URLs should not exceed 250 URLs. All URLs should have the same hostname. + * Each URL should be unique. This field may be released by Cloudflare to third + * parties such as the Lumen Database (https://lumendatabase.org/). */ - host_notification: 'send' | 'send-anon' | 'none'; + urls: string; /** - * Body param: Text not exceeding 255 characters. This field may be released by + * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database * (https://lumendatabase.org/). */ - original_work: string; + address1?: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: 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/). */ - owner_notification: 'send' | 'send-anon' | 'none'; + agent_name?: string; /** - * Body param: 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 + * Body param: Can be `0` for false or `1` for true. Must be value: 1 for DMCA + * reports */ - signature: string; + agree?: 0 | 1; /** * Body param: Text not exceeding 255 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database * (https://lumendatabase.org/). */ - state: string; - - /** - * Body param: The abuse report type - */ - act?: - | 'abuse_dmca' - | 'abuse_trademark' - | 'abuse_general' - | 'abuse_phishing' - | 'abuse_children' - | 'abuse_threat' - | 'abuse_registrar_whois' - | 'abuse_ncsei'; + city?: string; /** * Body param: Any additional comments about the infringement not exceeding 2000 @@ -145,6 +132,13 @@ export declare namespace AbuseReportCreateParams { */ company?: string; + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + country?: string; + /** * Body param: 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 @@ -153,16 +147,10 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** * Body param: A detailed description of the infringement, including any necessary @@ -171,13 +159,6 @@ export declare namespace AbuseReportCreateParams { */ justification?: string; - /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). - */ - name?: string; - /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) * and Trademark reports cannot be anonymous. @@ -190,6 +171,19 @@ export declare namespace AbuseReportCreateParams { */ ncsei_subject_representation?: boolean; + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + original_work?: string; + + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -208,6 +202,13 @@ export declare namespace AbuseReportCreateParams { */ reported_user_agent?: string; + /** + * Body param: 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 + */ + signature?: string; + /** * Body param: 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 @@ -215,6 +216,13 @@ export declare namespace AbuseReportCreateParams { */ source_ips?: string; + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + state?: string; + /** * Body param: Text not exceeding 20 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -241,14 +249,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsTrademarkReport { @@ -258,51 +258,44 @@ export declare namespace AbuseReportCreateParams { account_id: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters - */ - justification: string; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: The abuse report type */ - owner_notification: 'send' | 'send-anon' | 'none'; + act: + | 'abuse_dmca' + | 'abuse_trademark' + | 'abuse_general' + | 'abuse_phishing' + | 'abuse_children' + | 'abuse_threat' + | 'abuse_registrar_whois' + | 'abuse_ncsei'; /** - * Body param: Text not exceeding 1000 characters + * Body param: 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/). */ - trademark_number: string; + email: string; /** - * Body param: Text not exceeding 1000 characters + * Body param: Should match the value provided in `email` */ - trademark_office: string; + email2: string; /** - * Body param: Text not exceeding 1000 characters + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). */ - trademark_symbol: string; + name: string; /** - * Body param: The abuse report type + * Body param: 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?: - | 'abuse_dmca' - | 'abuse_trademark' - | 'abuse_general' - | 'abuse_phishing' - | 'abuse_children' - | 'abuse_threat' - | 'abuse_registrar_whois' - | 'abuse_ncsei'; + urls: string; /** * Body param: Text not exceeding 100 characters. This field may be released by @@ -359,23 +352,17 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: 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?: string; + justification?: string; /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) @@ -396,6 +383,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -448,43 +441,31 @@ export declare namespace AbuseReportCreateParams { title?: string; /** - * Body param: 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/). - */ - urls?: string; - } - - export interface AbuseReportsGeneralReport { - /** - * Path param: The account ID of the submitter. + * Body param: Text not exceeding 1000 characters */ - account_id: string; + trademark_number?: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: Text not exceeding 1000 characters */ - host_notification: 'send' | 'send-anon' | 'none'; + trademark_office?: string; /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters + * Body param: Text not exceeding 1000 characters */ - justification: string; + trademark_symbol?: string; + } + export interface AbuseReportsGeneralReport { /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Path param: The account ID of the submitter. */ - owner_notification: 'send' | 'send-anon' | 'none'; + account_id: string; /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -494,6 +475,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -549,23 +557,17 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: 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?: string; + justification?: string; /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) @@ -586,6 +588,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -651,14 +659,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsPhishingReport { @@ -667,29 +667,10 @@ export declare namespace AbuseReportCreateParams { */ account_id: string; - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters - */ - justification: string; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - owner_notification: 'send' | 'send-anon' | 'none'; - /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -699,6 +680,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -754,23 +762,17 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: 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?: string; + justification?: string; /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) @@ -791,6 +793,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -853,54 +861,21 @@ export declare namespace AbuseReportCreateParams { trademark_office?: string; /** - * Body param: Text not exceeding 1000 characters - */ - trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; - } - - export interface AbuseReportsChildrenAbuseReport { - /** - * Path param: The account ID of the submitter. - */ - account_id: string; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters - */ - justification: string; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: Text not exceeding 1000 characters */ - ncmec_notification: 'send' | 'send-anon' | 'none'; + trademark_symbol?: string; + } + export interface AbuseReportsChildrenAbuseReport { /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Path param: The account ID of the submitter. */ - owner_notification: 'send' | 'send-anon' | 'none'; + account_id: string; /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -910,6 +885,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -965,23 +967,23 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Should match the value provided in `email` + * Body param: A detailed description of the infringement, including any necessary + * access details and the exact steps needed to view the content, not exceeding + * 5000 characters */ - email2?: string; + justification?: string; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - name?: string; + ncmec_notification?: 'send' | 'send-anon' | 'none'; /** * Body param: If the submitter is the target of NCSEI in the URLs of the abuse @@ -996,6 +998,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -1061,14 +1069,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsThreatReport { @@ -1077,29 +1077,10 @@ export declare namespace AbuseReportCreateParams { */ account_id: string; - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters - */ - justification: string; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - owner_notification: 'send' | 'send-anon' | 'none'; - /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -1109,6 +1090,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -1164,23 +1172,17 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: 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?: string; + justification?: string; /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) @@ -1201,6 +1203,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -1266,14 +1274,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsRegistrarWhoisReport { @@ -1282,16 +1282,10 @@ export declare namespace AbuseReportCreateParams { */ account_id: string; - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - owner_notification: 'send' | 'send-anon' | 'none'; - /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -1301,6 +1295,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -1355,18 +1376,6 @@ export declare namespace AbuseReportCreateParams { */ destination_ips?: string; - /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` - */ - email2?: string; - /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) * and Trademark reports cannot be anonymous. @@ -1380,13 +1389,6 @@ export declare namespace AbuseReportCreateParams { */ justification?: string; - /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). - */ - name?: string; - /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) * and Trademark reports cannot be anonymous. @@ -1406,6 +1408,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -1471,14 +1479,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsNcseiReport { @@ -1487,28 +1487,10 @@ export declare namespace AbuseReportCreateParams { */ account_id: string; - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: If the submitter is the target of NCSEI in the URLs of the abuse - * report. - */ - ncsei_subject_representation: boolean; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - owner_notification: 'send' | 'send-anon' | 'none'; - /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -1518,6 +1500,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -1573,16 +1582,10 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** * Body param: A detailed description of the infringement, including any necessary @@ -1591,19 +1594,18 @@ export declare namespace AbuseReportCreateParams { */ justification?: string; - /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). - */ - name?: string; - /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) * and Trademark reports cannot be anonymous. */ ncmec_notification?: 'send' | 'send-anon' | 'none'; + /** + * Body param: If the submitter is the target of NCSEI in the URLs of the abuse + * report. + */ + ncsei_subject_representation?: boolean; + /** * Body param: Text not exceeding 255 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -1611,6 +1613,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -1676,14 +1684,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } } diff --git a/tests/api-resources/abuse-reports.test.ts b/tests/api-resources/abuse-reports.test.ts index f26e4c84f0..dba90c7f42 100644 --- a/tests/api-resources/abuse-reports.test.ts +++ b/tests/api-resources/abuse-reports.test.ts @@ -14,16 +14,11 @@ describe('resource abuseReports', () => { test.skip('create: only required params', async () => { const responsePromise = client.abuseReports.create('abuse_general', { 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_general', + email: 'email', + email2: 'email2', + name: 'x', + urls: 'urls', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -38,36 +33,36 @@ describe('resource abuseReports', () => { test.skip('create: required and optional params', async () => { const response = await client.abuseReports.create('abuse_general', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', + act: 'abuse_general', + email: 'email', + email2: 'email2', + name: 'x', + urls: 'urls', 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_general', 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', + owner_notification: 'send', ports_protocols: 'ports_protocols', reported_country: 'xx', reported_user_agent: 'x', + signature: 'signature', source_ips: 'source_ips', + state: 'x', tele: 'x', title: 'x', trademark_number: 'x', trademark_office: 'x', trademark_symbol: 'x', - urls: 'urls', }); }); });