UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines • 1.45 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 BaseBulkOperations = /* @__PURE__ */ (() => { class BaseBulkOperations extends APIResource { /** * Gets the current status of an asynchronous operation on a list. * * The `status` property can have one of the following values: `pending`, * `running`, `completed`, or `failed`. If the status is `failed`, the `error` * property will contain a message describing the error. * * @example * ```ts * const bulkOperation = * await client.rules.lists.bulkOperations.get( * '4da8780eeb215e6cb7f48dd981c4ea02', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(operationID, params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/rules/lists/bulk_operations/${operationID}`, options)._thenUnwrap((obj) => obj.result); } } BaseBulkOperations._key = Object.freeze([ 'rules', 'lists', 'bulkOperations', ]); return BaseBulkOperations; })(); export class BulkOperations extends BaseBulkOperations { } //# sourceMappingURL=bulk-operations.mjs.map