UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

106 lines • 4.74 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Investigate = exports.BaseInvestigate = void 0; const tslib_1 = require("../../../internal/tslib.js"); // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); const DetectionsAPI = tslib_1.__importStar(require("./detections.js")); const detections_1 = require("./detections.js"); const MoveAPI = tslib_1.__importStar(require("./move.js")); const move_1 = require("./move.js"); const PreviewAPI = tslib_1.__importStar(require("./preview.js")); const preview_1 = require("./preview.js"); const RawAPI = tslib_1.__importStar(require("./raw.js")); const raw_1 = require("./raw.js"); const ReclassifyAPI = tslib_1.__importStar(require("./reclassify.js")); const reclassify_1 = require("./reclassify.js"); const ReleaseAPI = tslib_1.__importStar(require("./release.js")); const release_1 = require("./release.js"); const TraceAPI = tslib_1.__importStar(require("./trace.js")); const trace_1 = require("./trace.js"); const BulkAPI = tslib_1.__importStar(require("./bulk/bulk.js")); const bulk_1 = require("./bulk/bulk.js"); const pagination_1 = require("../../../core/pagination.js"); const path_1 = require("../../../internal/utils/path.js"); var BaseInvestigate = /* @__PURE__ */ (() => { class BaseInvestigate extends resource_1.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((0, path_1.path) `/accounts/${account_id}/email-security/investigate`, (pagination_1.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((0, path_1.path) `/accounts/${account_id}/email-security/investigate/${investigateID}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseInvestigate._key = Object.freeze([ 'emailSecurity', 'investigate', ]); return BaseInvestigate; })(); exports.BaseInvestigate = BaseInvestigate; 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_1.Detections; Investigate.BaseDetections = detections_1.BaseDetections; Investigate.Preview = preview_1.Preview; Investigate.BasePreview = preview_1.BasePreview; Investigate.Raw = raw_1.Raw; Investigate.BaseRaw = raw_1.BaseRaw; Investigate.Trace = trace_1.Trace; Investigate.BaseTrace = trace_1.BaseTrace; Investigate.Move = move_1.Move; Investigate.BaseMove = move_1.BaseMove; Investigate.Reclassify = reclassify_1.Reclassify; Investigate.BaseReclassify = reclassify_1.BaseReclassify; Investigate.Release = release_1.Release; Investigate.BaseRelease = release_1.BaseRelease; Investigate.Bulk = bulk_1.Bulk; Investigate.BaseBulk = bulk_1.BaseBulk; return Investigate; })(); exports.Investigate = Investigate; //# sourceMappingURL=investigate.js.map