cloudflare
Version:
The official TypeScript library for the Cloudflare API
33 lines • 1.27 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { path } from "../../../internal/utils/path.mjs";
export var BaseDetections = /* @__PURE__ */ (() => {
class BaseDetections extends APIResource {
/**
* Returns detection details such as threat categories and sender information for
* messages with a detection.
*
* @example
* ```ts
* const detection =
* await client.emailSecurity.investigate.detections.get(
* '4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
get(investigateID, params, options) {
const { account_id } = params;
return this._client.get(path `/accounts/${account_id}/email-security/investigate/${investigateID}/detections`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseDetections._key = Object.freeze([
'emailSecurity',
'investigate',
'detections',
]);
return BaseDetections;
})();
export class Detections extends BaseDetections {
}
//# sourceMappingURL=detections.mjs.map