Skip to content

Commit

Permalink
feat(api): api update (#2127)
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 93b93d8 commit c5ec717
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .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-238bdc2301e165198e92ece05a86c3b80aa6653c5cd7334b3dc59fd9d687acce.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c64fbec9a1e17ca560abf251c26a4adb4d60123dbe3f7dcc10819494cd97a6f.yml
40 changes: 19 additions & 21 deletions src/resources/email-security/investigate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../p

export class Investigate extends APIResource {
/**
* This endpoint returns information for each email that matches the search
* parameter(s).
* Returns information for each email that matches the search parameter(s).
*/
list(
params: InvestigateListParams,
Expand All @@ -22,8 +21,8 @@ export class Investigate extends APIResource {
}

/**
* For emails that have a detection, this endpoint returns detection details such
* as threat categories, sender information, and links.
* Returns detection details such as threat categories and sender information for
* non-benign messages.
*/
detections(
postfixId: string,
Expand Down Expand Up @@ -57,8 +56,8 @@ export class Investigate extends APIResource {
}

/**
* For emails that have a detection, this endpoint returns a preview of the message
* body as a base64 encoded PNG image.
* Returns a preview of the message body as a base64 encoded PNG image for
* non-benign messages.
*/
preview(
postfixId: string,
Expand All @@ -75,8 +74,7 @@ export class Investigate extends APIResource {
}

/**
* For emails that have a detection, this endpoint returns the raw email as an EML
* file.
* Returns the raw eml of any non-benign message.
*/
raw(
postfixId: string,
Expand Down Expand Up @@ -126,7 +124,7 @@ export interface InvestigateListResponse {
is_quarantined: boolean;

/**
* Message identifier
* The identifier of the message.
*/
postfix_id: string;

Expand Down Expand Up @@ -261,12 +259,12 @@ export namespace InvestigateDetectionsResponse {

export interface SenderInfo {
/**
* Name of the autonomous system
* The name of the autonomous system.
*/
as_name?: string | null;

/**
* Number of the autonomous system
* The number of the autonomous system.
*/
as_number?: number | null;

Expand Down Expand Up @@ -310,7 +308,7 @@ export interface InvestigateGetResponse {
is_quarantined: boolean;

/**
* Message identifier
* The identifier of the message.
*/
postfix_id: string;

Expand Down Expand Up @@ -380,14 +378,14 @@ export namespace InvestigateGetResponse {

export interface InvestigatePreviewResponse {
/**
* Base64 encoded PNG image
* A base64 encoded PNG image of the email.
*/
screenshot: string;
}

export interface InvestigateRawResponse {
/**
* UTF-8 encoded eml file
* A UTF-8 encoded eml file of the email.
*/
raw: string;
}
Expand Down Expand Up @@ -435,8 +433,7 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams {
account_id: string;

/**
* Query param: Controls whether the message action log in included in the
* response.
* Query param: Determines if the message action log is included in the response.
*/
action_log?: boolean;

Expand All @@ -446,12 +443,12 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams {
alert_id?: string;

/**
* Query param: If `false`, the search includes non-detections.
* Query param: Determines if the search results will include detections or not.
*/
detections_only?: boolean;

/**
* Query param: Filter by the sender domain
* Query param: The sender domains the search filters by.
*/
domain?: string;

Expand All @@ -461,12 +458,12 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams {
end?: string;

/**
* Query param: Filter messages by the provided disposition.
* Query param: The dispositions the search filters by.
*/
final_disposition?: 'MALICIOUS' | 'SUSPICIOUS' | 'SPOOF' | 'SPAM' | 'BULK';

/**
* Query param: Filter messages by actions applied to them
* Query param: The message actions the search filters by.
*/
message_action?: 'PREVIEW' | 'QUARANTINE_RELEASED' | 'MOVED';

Expand All @@ -481,7 +478,8 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams {
metric?: string;

/**
* Query param: Space delimited query term(s). The search is case-insensitive.
* Query param: The space-delimited term used in the query. The search is
* case-insensitive.
*
* The content of the following email metadata fields are searched:
*
Expand Down
2 changes: 1 addition & 1 deletion src/resources/email-security/settings/allow-patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class AllowPatterns extends APIResource {
}

/**
* List, search, and sort an accounts's email allow patterns.
* Lists, searches, and sorts an account’s email allow patterns.
*/
list(
params: AllowPatternListParams,
Expand Down
15 changes: 7 additions & 8 deletions src/resources/email-security/settings/domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../.

export class Domains extends APIResource {
/**
* List, search, and sort an account's email domains.
* Lists, searches, and sorts an accounts email domains.
*/
list(
params: DomainListParams,
Expand Down Expand Up @@ -59,7 +59,7 @@ export class DomainListResponsesV4PagePaginationArray extends V4PagePaginationAr

export interface DomainListResponse {
/**
* Unique domain identifier
* The unique identifier for the domain.
*/
id: number;

Expand All @@ -82,14 +82,14 @@ export interface DomainListResponse {

export interface DomainDeleteResponse {
/**
* Unique domain identifier
* The unique identifier for the domain.
*/
id: number;
}

export interface DomainEditResponse {
/**
* Unique domain identifier
* The unique identifier for the domain.
*/
id: number;

Expand Down Expand Up @@ -117,8 +117,7 @@ export interface DomainListParams extends V4PagePaginationArrayParams {
account_id: string;

/**
* Query param: If present, the response contains only domains with the provided
* delivery mode.
* Query param: Filters response to domains with the provided delivery mode.
*/
allowed_delivery_mode?: 'DIRECT' | 'BCC' | 'JOURNAL' | 'API' | 'RETRO_SCAN';

Expand All @@ -128,8 +127,8 @@ export interface DomainListParams extends V4PagePaginationArrayParams {
direction?: 'asc' | 'desc';

/**
* Query param: Filter result by the provided domains. Allows for multiple
* occurrences, e.g., `domain=example.com&domain=example.xyz`.
* Query param: Filters results by the provided domains, allowing for multiple
* occurrences.
*/
domain?: Array<string>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ImpersonationRegistry extends APIResource {
}

/**
* List, search, and sort entries in impersonation registry.
* Lists, searches, and sorts entries in the impersonation registry.
*/
list(
params: ImpersonationRegistryListParams,
Expand Down
2 changes: 1 addition & 1 deletion src/resources/email-security/settings/trusted-domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class TrustedDomains extends APIResource {
}

/**
* List, search, and sort an account's trusted email domains.
* Lists, searches, and sorts an accounts trusted email domains.
*/
list(
params: TrustedDomainListParams,
Expand Down

0 comments on commit c5ec717

Please sign in to comment.