UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

34 lines • 1.29 kB
// 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 BaseCancel = /* @__PURE__ */ (() => { class BaseCancel extends 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(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; })(); export class Cancel extends BaseCancel { } //# sourceMappingURL=cancel.mjs.map