Skip to content

Commit

Permalink
feat(api): api update (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and meorphis committed Jan 13, 2025
1 parent 63a6fc3 commit b3cf0be
Show file tree
Hide file tree
Showing 33 changed files with 221 additions and 605 deletions.
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1490
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6eed6659daa87db188a6095d59dbc3f6a84c1f63ca4e1b958283301d61cb16e5.yml
configured_endpoints: 1488
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07e0195c449648b13153ed513e99af896a19aa031245e6541b32e077d6536300.yml
10 changes: 0 additions & 10 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6741,12 +6741,10 @@ Methods:

Types:

- <code><a href="./src/resources/origin-post-quantum-encryption.ts">OriginPostQuantumEncryptionEditResponse</a></code>
- <code><a href="./src/resources/origin-post-quantum-encryption.ts">OriginPostQuantumEncryptionGetResponse</a></code>

Methods:

- <code title="patch /zones/{zone_id}/cache/origin_post_quantum_encryption">client.originPostQuantumEncryption.<a href="./src/resources/origin-post-quantum-encryption.ts">edit</a>({ ...params }) -> OriginPostQuantumEncryptionEditResponse</code>
- <code title="get /zones/{zone_id}/cache/origin_post_quantum_encryption">client.originPostQuantumEncryption.<a href="./src/resources/origin-post-quantum-encryption.ts">get</a>({ ...params }) -> OriginPostQuantumEncryptionGetResponse</code>

# Speed
Expand Down Expand Up @@ -7317,14 +7315,6 @@ Methods:

# AbuseReports

Types:

- <code><a href="./src/resources/abuse-reports.ts">AbuseReportCreateResponse</a></code>

Methods:

- <code title="post /accounts/{account_id}/v1/abuse-reports/{report_type}">client.abuseReports.<a href="./src/resources/abuse-reports.ts">create</a>(reportType, { ...params }) -> AbuseReportCreateResponse</code>

# AI

Types:
Expand Down
206 changes: 1 addition & 205 deletions src/resources/abuse-reports.ts
Original file line number Diff line number Diff line change
@@ -1,209 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../resource';
import * as Core from '../core';

export class AbuseReports extends APIResource {
/**
* Submit the Abuse Report of a particular type
*/
create(
reportType:
| 'abuse_dmca'
| 'abuse_trademark'
| 'abuse_general'
| 'abuse_phishing'
| 'abuse_children'
| 'abuse_threat'
| 'abuse_registrar_whois'
| 'abuse_ncsei',
params: AbuseReportCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<AbuseReportCreateResponse> {
const { account_id, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/v1/abuse-reports/${reportType}`, {
body,
...options,
}) as Core.APIPromise<{ result: AbuseReportCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
}

/**
* The result should be 'success' for successful response
*/
export type AbuseReportCreateResponse = string;

export interface AbuseReportCreateParams {
/**
* Path param: The account ID of the submitter.
*/
account_id: 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';

/**
* Body param: A valid email of the abuse reporter
*/
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.
*/
host_notification: 'send' | 'send-anon' | 'none';

/**
* 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: 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 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
*/
urls: string;

/**
* Body param: Text not exceeding 100 characters
*/
address1?: string;

/**
* Body param: The name of the copyright holder. Text not exceeding 60 characters.
*/
agent_name?: string;

/**
* Body param: Can be 0 or 1
*/
agree?: 0 | 1;

/**
* Body param: Text not exceeding 255 characters
*/
city?: string;

/**
* Body param: Any additional comments about the infringement not exceeding 2000
* characters
*/
comments?: string;

/**
* Body param: Text not exceeding 100 characters
*/
company?: string;

/**
* Body param: Text not exceeding 255 characters
*/
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
* addresses ought to be unique
*/
destination_ips?: 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
*/
justification?: string;

/**
* Body param: Text not exceeding 255 characters
*/
name?: string;

/**
* 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
*/
original_work?: string;

/**
* 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
* port/protocol should not exceed 100 characters. The list should not have more
* than 30 unique ports and protocols.
*/
ports_protocols?: 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
* addresses ought to be unique
*/
source_ips?: string;

/**
* Body param: Text not exceeding 255 characters
*/
state?: string;

/**
* Body param: Text not exceeding 20 characters
*/
tele?: string;

/**
* Body param: Text not exceeding 255 characters
*/
title?: string;

/**
* Body param: Text not exceeding 1000 characters
*/
trademark_number?: string;

/**
* Body param: Text not exceeding 1000 characters
*/
trademark_office?: string;

/**
* Body param: Text not exceeding 1000 characters
*/
trademark_symbol?: string;
}
export class AbuseReports extends APIResource {}
4 changes: 2 additions & 2 deletions src/resources/addressing/address-maps/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export namespace AccountDeleteResponse {

export interface AccountUpdateParams {
/**
* Path param: Identifier
* Path param: Identifier of a Cloudflare account.
*/
account_id: string;

Expand All @@ -124,7 +124,7 @@ export interface AccountUpdateParams {

export interface AccountDeleteParams {
/**
* Identifier
* Identifier of a Cloudflare account.
*/
account_id: string;
}
Expand Down
16 changes: 8 additions & 8 deletions src/resources/addressing/address-maps/address-maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class AddressMapsSinglePage extends SinglePage<AddressMap> {}

export interface AddressMap {
/**
* Identifier
* Identifier of an Address Map.
*/
id?: string;

Expand Down Expand Up @@ -160,7 +160,7 @@ export type KindParam = 'zone' | 'account';

export interface AddressMapCreateResponse {
/**
* Identifier
* Identifier of an Address Map.
*/
id?: string;

Expand Down Expand Up @@ -282,7 +282,7 @@ export namespace AddressMapDeleteResponse {

export interface AddressMapGetResponse {
/**
* Identifier
* Identifier of an Address Map.
*/
id?: string;

Expand Down Expand Up @@ -367,7 +367,7 @@ export namespace AddressMapGetResponse {

export interface AddressMapCreateParams {
/**
* Path param: Identifier
* Path param: Identifier of a Cloudflare account.
*/
account_id: string;

Expand Down Expand Up @@ -411,21 +411,21 @@ export namespace AddressMapCreateParams {

export interface AddressMapListParams {
/**
* Identifier
* Identifier of a Cloudflare account.
*/
account_id: string;
}

export interface AddressMapDeleteParams {
/**
* Identifier
* Identifier of a Cloudflare account.
*/
account_id: string;
}

export interface AddressMapEditParams {
/**
* Path param: Identifier
* Path param: Identifier of a Cloudflare account.
*/
account_id: string;

Expand Down Expand Up @@ -453,7 +453,7 @@ export interface AddressMapEditParams {

export interface AddressMapGetParams {
/**
* Identifier
* Identifier of a Cloudflare account.
*/
account_id: string;
}
Expand Down
4 changes: 2 additions & 2 deletions src/resources/addressing/address-maps/ips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export namespace IPDeleteResponse {

export interface IPUpdateParams {
/**
* Path param: Identifier
* Path param: Identifier of a Cloudflare account.
*/
account_id: string;

Expand All @@ -126,7 +126,7 @@ export interface IPUpdateParams {

export interface IPDeleteParams {
/**
* Identifier
* Identifier of a Cloudflare account.
*/
account_id: string;
}
Expand Down
8 changes: 4 additions & 4 deletions src/resources/addressing/address-maps/zones.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ export namespace ZoneDeleteResponse {

export interface ZoneUpdateParams {
/**
* Path param: Identifier
* Path param: Identifier of a zone.
*/
zone_id: string;

/**
* Path param: Identifier
* Path param: Identifier of a Cloudflare account.
*/
account_id: string;

Expand All @@ -129,12 +129,12 @@ export interface ZoneUpdateParams {

export interface ZoneDeleteParams {
/**
* Identifier
* Identifier of a zone.
*/
zone_id: string;

/**
* Identifier
* Identifier of a Cloudflare account.
*/
account_id: string;
}
Expand Down
Loading

0 comments on commit b3cf0be

Please sign in to comment.