cloudflare
Version:
The official TypeScript library for the Cloudflare API
55 lines • 2.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Exports = exports.BaseExports = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../../core/resource.js");
const pagination_1 = require("../../../../core/pagination.js");
const path_1 = require("../../../../internal/utils/path.js");
var BaseExports = /* @__PURE__ */ (() => {
class BaseExports extends resource_1.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((0, path_1.path) `/accounts/${account_id}/data-security/posture/exports`, (pagination_1.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((0, path_1.path) `/accounts/${account_id}/data-security/posture/exports/${id}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseExports._key = Object.freeze([
'zeroTrust',
'casb',
'posture',
'exports',
]);
return BaseExports;
})();
exports.BaseExports = BaseExports;
class Exports extends BaseExports {
}
exports.Exports = Exports;
//# sourceMappingURL=exports.js.map