UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

100 lines • 4.22 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import * as DetectionsAPI from "./detections.mjs"; import { BaseDetections, Detections } from "./detections.mjs"; import * as MoveAPI from "./move.mjs"; import { BaseMove, Move, } from "./move.mjs"; import * as PreviewAPI from "./preview.mjs"; import { BasePreview, Preview, } from "./preview.mjs"; import * as RawAPI from "./raw.mjs"; import { BaseRaw, Raw } from "./raw.mjs"; import * as ReclassifyAPI from "./reclassify.mjs"; import { BaseReclassify, Reclassify } from "./reclassify.mjs"; import * as ReleaseAPI from "./release.mjs"; import { BaseRelease, Release, } from "./release.mjs"; import * as TraceAPI from "./trace.mjs"; import { BaseTrace, Trace } from "./trace.mjs"; import * as BulkAPI from "./bulk/bulk.mjs"; import { BaseBulk, Bulk, } from "./bulk/bulk.mjs"; import { V4PagePaginationArray, } from "../../../core/pagination.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseInvestigate = /* @__PURE__ */ (() => { class BaseInvestigate extends APIResource { /** * Returns information for each email that matches the provided search parameters. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const investigateListResponse of client.emailSecurity.investigate.list( * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ list(params, options) { const { account_id, ...query } = params; return this._client.getAPIList(path `/accounts/${account_id}/email-security/investigate`, (V4PagePaginationArray), { query, ...options }); } /** * Retrieves comprehensive details for a specific email message including headers, * recipients, sender information, and current quarantine status. Use the * investigate_id from search results to fetch detailed information. * * @example * ```ts * const investigate = * await client.emailSecurity.investigate.get( * '4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(investigateID, params, options) { const { account_id, ...query } = params; return this._client.get(path `/accounts/${account_id}/email-security/investigate/${investigateID}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseInvestigate._key = Object.freeze([ 'emailSecurity', 'investigate', ]); return BaseInvestigate; })(); export var Investigate = /* @__PURE__ */ (() => { class Investigate extends BaseInvestigate { constructor() { super(...arguments); this.detections = new DetectionsAPI.Detections(this._client); this.preview = new PreviewAPI.Preview(this._client); this.raw = new RawAPI.Raw(this._client); this.trace = new TraceAPI.Trace(this._client); this.move = new MoveAPI.Move(this._client); this.reclassify = new ReclassifyAPI.Reclassify(this._client); this.release = new ReleaseAPI.Release(this._client); this.bulk = new BulkAPI.Bulk(this._client); } } Investigate.Detections = Detections; Investigate.BaseDetections = BaseDetections; Investigate.Preview = Preview; Investigate.BasePreview = BasePreview; Investigate.Raw = Raw; Investigate.BaseRaw = BaseRaw; Investigate.Trace = Trace; Investigate.BaseTrace = BaseTrace; Investigate.Move = Move; Investigate.BaseMove = BaseMove; Investigate.Reclassify = Reclassify; Investigate.BaseReclassify = BaseReclassify; Investigate.Release = Release; Investigate.BaseRelease = BaseRelease; Investigate.Bulk = Bulk; Investigate.BaseBulk = BaseBulk; return Investigate; })(); //# sourceMappingURL=investigate.mjs.map