UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

64 lines • 2.61 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { SinglePage } from "../../../core/pagination.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseMove = /* @__PURE__ */ (() => { class BaseMove extends APIResource { /** * Moves a single message to a specified mailbox folder (Inbox, JunkEmail, * DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires * active integration. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const moveCreateResponse of client.emailSecurity.investigate.move.create( * '4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * destination: 'Inbox', * }, * )) { * // ... * } * ``` */ create(investigateID, params, options) { const { account_id, ...body } = params; return this._client.getAPIList(path `/accounts/${account_id}/email-security/investigate/${investigateID}/move`, (SinglePage), { body, method: 'post', ...options }); } /** * Moves one or more messages to a specified mailbox folder (Inbox, JunkEmail, * DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires * active integration. Operates on an explicit list of messages; to move all * messages matching a search, create a bulk action job instead. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const moveBulkResponse of client.emailSecurity.investigate.move.bulk( * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * destination: 'Inbox', * ids: ['4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678'], * }, * )) { * // ... * } * ``` */ bulk(params, options) { const { account_id, ...body } = params; return this._client.getAPIList(path `/accounts/${account_id}/email-security/investigate/move`, (SinglePage), { body, method: 'post', ...options }); } } BaseMove._key = Object.freeze([ 'emailSecurity', 'investigate', 'move', ]); return BaseMove; })(); export class Move extends BaseMove { } //# sourceMappingURL=move.mjs.map