import { APIResource } from "../../../resource.js"; import * as Core from "../../../core.js"; export declare class Detections extends APIResource { /** * Returns detection details such as threat categories and sender information for * non-benign messages. * * @example * ```ts * const detection = * await client.emailSecurity.investigate.detections.get( * '4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(investigateId: string, params: DetectionGetParams, options?: Core.RequestOptions): Core.APIPromise; } export interface DetectionGetResponse { action: string; attachments: Array; findings: Array | null; headers: Array; links: Array; sender_info: DetectionGetResponse.SenderInfo; threat_categories: Array; validation: DetectionGetResponse.Validation; final_disposition?: 'MALICIOUS' | 'MALICIOUS-BEC' | 'SUSPICIOUS' | 'SPOOF' | 'SPAM' | 'BULK' | 'ENCRYPTED' | 'EXTERNAL' | 'UNKNOWN' | 'NONE'; } export declare namespace DetectionGetResponse { interface Attachment { /** * Size of the attachment in bytes */ size: number; /** * MIME type of the attachment */ content_type?: string | null; /** * Detection result for this attachment */ detection?: 'MALICIOUS' | 'MALICIOUS-BEC' | 'SUSPICIOUS' | 'SPOOF' | 'SPAM' | 'BULK' | 'ENCRYPTED' | 'EXTERNAL' | 'UNKNOWN' | 'NONE' | null; /** * Whether the attachment is encrypted */ encrypted?: boolean | null; /** * Name of the attached file */ filename?: string | null; /** * MD5 hash of the attachment */ md5?: string | null; /** * Attachment name (alternative to filename) */ name?: string | null; /** * SHA1 hash of the attachment */ sha1?: string | null; /** * SHA256 hash of the attachment */ sha256?: string | null; } interface Finding { attachment?: string | null; detail?: string | null; detection?: 'MALICIOUS' | 'MALICIOUS-BEC' | 'SUSPICIOUS' | 'SPOOF' | 'SPAM' | 'BULK' | 'ENCRYPTED' | 'EXTERNAL' | 'UNKNOWN' | 'NONE'; field?: string | null; name?: string | null; portion?: string | null; reason?: string | null; score?: number | null; value?: string | null; } interface Header { name: string; value: string; } interface Link { href: string; text?: string | null; } interface SenderInfo { /** * The name of the autonomous system. */ as_name?: string | null; /** * The number of the autonomous system. */ as_number?: number | null; geo?: string | null; ip?: string | null; pld?: string | null; } interface ThreatCategory { id?: number; description?: string | null; name?: string | null; } interface Validation { comment?: string | null; dkim?: 'pass' | 'neutral' | 'fail' | 'error' | 'none'; dmarc?: 'pass' | 'neutral' | 'fail' | 'error' | 'none'; spf?: 'pass' | 'neutral' | 'fail' | 'error' | 'none'; } } export interface DetectionGetParams { /** * Identifier. */ account_id: string; } export declare namespace Detections { export { type DetectionGetResponse as DetectionGetResponse, type DetectionGetParams as DetectionGetParams }; } //# sourceMappingURL=detections.d.ts.map