UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

39 lines • 1.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Cancel = exports.BaseCancel = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../../core/resource.js"); const path_1 = require("../../../../internal/utils/path.js"); var BaseCancel = /* @__PURE__ */ (() => { class BaseCancel extends resource_1.APIResource { /** * Cancels the job, marking it as cancelled and stopping any pending message * processing. The job record remains visible in list and detail endpoints. * * @example * ```ts * const cancel = * await client.emailSecurity.investigate.bulk.cancel.create( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ create(jobID, params, options) { const { account_id } = params; return this._client.post((0, path_1.path) `/accounts/${account_id}/email-security/investigate/bulk/${jobID}/cancel`, options)._thenUnwrap((obj) => obj.result); } } BaseCancel._key = Object.freeze([ 'emailSecurity', 'investigate', 'bulk', 'cancel', ]); return BaseCancel; })(); exports.BaseCancel = BaseCancel; class Cancel extends BaseCancel { } exports.Cancel = Cancel; //# sourceMappingURL=cancel.js.map