Skip to content

Commit

Permalink
feat(api): api update (#2147)
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 d5ed817 commit f100cae
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 786 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: 1417
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4c49562d088783434a838d9fb04f3a71514aaf0ee9096dabf65e3ae0825b8756.yml
configured_endpoints: 1411
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8a11058191753bacee9c070940904a1318942d364a2420ad1e253bd450b2bcf.yml
24 changes: 0 additions & 24 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1052,34 +1052,10 @@ Methods:

## Phishguard

Types:

- <code><a href="./src/resources/email-security/phishguard.ts">PhishguardListResponse</a></code>

Methods:

- <code title="get /accounts/{account_id}/email-security/phishguard/reports">client.emailSecurity.phishguard.<a href="./src/resources/email-security/phishguard.ts">list</a>({ ...params }) -> PhishguardListResponsesSinglePage</code>

## Settings

### AllowPatterns

Types:

- <code><a href="./src/resources/email-security/settings/allow-patterns.ts">AllowPatternCreateResponse</a></code>
- <code><a href="./src/resources/email-security/settings/allow-patterns.ts">AllowPatternListResponse</a></code>
- <code><a href="./src/resources/email-security/settings/allow-patterns.ts">AllowPatternDeleteResponse</a></code>
- <code><a href="./src/resources/email-security/settings/allow-patterns.ts">AllowPatternEditResponse</a></code>
- <code><a href="./src/resources/email-security/settings/allow-patterns.ts">AllowPatternGetResponse</a></code>

Methods:

- <code title="post /accounts/{account_id}/email-security/settings/allow_patterns">client.emailSecurity.settings.allowPatterns.<a href="./src/resources/email-security/settings/allow-patterns.ts">create</a>({ ...params }) -> AllowPatternCreateResponse</code>
- <code title="get /accounts/{account_id}/email-security/settings/allow_patterns">client.emailSecurity.settings.allowPatterns.<a href="./src/resources/email-security/settings/allow-patterns.ts">list</a>({ ...params }) -> AllowPatternListResponsesV4PagePaginationArray</code>
- <code title="delete /accounts/{account_id}/email-security/settings/allow_patterns/{pattern_id}">client.emailSecurity.settings.allowPatterns.<a href="./src/resources/email-security/settings/allow-patterns.ts">delete</a>(patternId, { ...params }) -> AllowPatternDeleteResponse</code>
- <code title="patch /accounts/{account_id}/email-security/settings/allow_patterns/{pattern_id}">client.emailSecurity.settings.allowPatterns.<a href="./src/resources/email-security/settings/allow-patterns.ts">edit</a>(patternId, { ...params }) -> AllowPatternEditResponse</code>
- <code title="get /accounts/{account_id}/email-security/settings/allow_patterns/{pattern_id}">client.emailSecurity.settings.allowPatterns.<a href="./src/resources/email-security/settings/allow-patterns.ts">get</a>(patternId, { ...params }) -> AllowPatternGetResponse</code>

### BlockSenders

Types:
Expand Down
15 changes: 2 additions & 13 deletions src/resources/email-security/email-security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ import {
InvestigateTraceResponse,
} from './investigate';
import * as PhishguardAPI from './phishguard';
import {
Phishguard,
PhishguardListParams,
PhishguardListResponse,
PhishguardListResponsesSinglePage,
} from './phishguard';
import { Phishguard } from './phishguard';
import * as SettingsAPI from './settings/settings';
import { Settings } from './settings/settings';

Expand All @@ -37,7 +32,6 @@ export class EmailSecurity extends APIResource {
EmailSecurity.Investigate = Investigate;
EmailSecurity.InvestigateListResponsesV4PagePaginationArray = InvestigateListResponsesV4PagePaginationArray;
EmailSecurity.Phishguard = Phishguard;
EmailSecurity.PhishguardListResponsesSinglePage = PhishguardListResponsesSinglePage;
EmailSecurity.Settings = Settings;

export declare namespace EmailSecurity {
Expand All @@ -58,12 +52,7 @@ export declare namespace EmailSecurity {
type InvestigateTraceParams as InvestigateTraceParams,
};

export {
Phishguard as Phishguard,
type PhishguardListResponse as PhishguardListResponse,
PhishguardListResponsesSinglePage as PhishguardListResponsesSinglePage,
type PhishguardListParams as PhishguardListParams,
};
export { Phishguard as Phishguard };

export { Settings as Settings };
}
7 changes: 1 addition & 6 deletions src/resources/email-security/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,5 @@ export {
type InvestigateRawParams,
type InvestigateTraceParams,
} from './investigate';
export {
PhishguardListResponsesSinglePage,
Phishguard,
type PhishguardListResponse,
type PhishguardListParams,
} from './phishguard';
export { Phishguard } from './phishguard';
export { Settings } from './settings/index';
94 changes: 1 addition & 93 deletions src/resources/email-security/phishguard.ts
Original file line number Diff line number Diff line change
@@ -1,97 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

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

export class Phishguard extends APIResource {
/**
* Get PhishGuard reports
*/
list(
params: PhishguardListParams,
options?: Core.RequestOptions,
): Core.PagePromise<PhishguardListResponsesSinglePage, PhishguardListResponse> {
const { account_id, ...query } = params;
return this._client.getAPIList(
`/accounts/${account_id}/email-security/phishguard/reports`,
PhishguardListResponsesSinglePage,
{ query, ...options },
);
}
}

export class PhishguardListResponsesSinglePage extends SinglePage<PhishguardListResponse> {}

export interface PhishguardListResponse {
id: number;

content: string;

disposition:
| 'MALICIOUS'
| 'MALICIOUS-BEC'
| 'SUSPICIOUS'
| 'SPOOF'
| 'SPAM'
| 'BULK'
| 'ENCRYPTED'
| 'EXTERNAL'
| 'UNKNOWN'
| 'NONE';

fields: PhishguardListResponse.Fields;

priority: string;

title: string;

ts: string;

tags?: Array<PhishguardListResponse.Tag> | null;
}

export namespace PhishguardListResponse {
export interface Fields {
postfix_id: string;

to: Array<string>;

ts: string;

from?: string | null;
}

export interface Tag {
category: string;

value: string;
}
}

export interface PhishguardListParams {
/**
* Path param: Account Identifier
*/
account_id: string;

/**
* Query param:
*/
from_date: string;

/**
* Query param:
*/
to_date: string;
}

Phishguard.PhishguardListResponsesSinglePage = PhishguardListResponsesSinglePage;

export declare namespace Phishguard {
export {
type PhishguardListResponse as PhishguardListResponse,
PhishguardListResponsesSinglePage as PhishguardListResponsesSinglePage,
type PhishguardListParams as PhishguardListParams,
};
}
export class Phishguard extends APIResource {}
Loading

0 comments on commit f100cae

Please sign in to comment.