UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

50 lines • 1.85 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../core/resource.mjs"; import { V4PagePaginationArray, } from "../../../../core/pagination.mjs"; import { path } from "../../../../internal/utils/path.mjs"; export var BaseExports = /* @__PURE__ */ (() => { class BaseExports extends APIResource { /** * List all export jobs for a given requestor's organization * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const exportListResponse of client.zeroTrust.casb.posture.exports.list( * { account_id: '46148281d8a93d002ef242d8b0d5f9f6' }, * )) { * // ... * } * ``` */ list(params, options) { const { account_id, ...query } = params; return this._client.getAPIList(path `/accounts/${account_id}/data-security/posture/exports`, (V4PagePaginationArray), { query, ...options }); } /** * Retrieves a single export job by its unique identifier * * @example * ```ts * const _export = * await client.zeroTrust.casb.posture.exports.get('id', { * account_id: '46148281d8a93d002ef242d8b0d5f9f6', * }); * ``` */ get(id, params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/data-security/posture/exports/${id}`, options)._thenUnwrap((obj) => obj.result); } } BaseExports._key = Object.freeze([ 'zeroTrust', 'casb', 'posture', 'exports', ]); return BaseExports; })(); export class Exports extends BaseExports { } //# sourceMappingURL=exports.mjs.map