cloudflare
Version:
The official TypeScript library for the Cloudflare API
72 lines • 2.65 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Content = exports.BaseContent = 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 BaseContent = /* @__PURE__ */ (() => {
class BaseContent extends resource_1.APIResource {
/**
* List DLP content findings
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const contentListResponse of client.zeroTrust.casb.posture.content.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/content`, (pagination_1.V4PagePaginationArray), { query, ...options });
}
/**
* Creates a CSV export for content and accepts optional filters in the payload.
*
* @example
* ```ts
* const response =
* await client.zeroTrust.casb.posture.content.export({
* account_id: '46148281d8a93d002ef242d8b0d5f9f6',
* dlp_profile_information: [
* {
* id: 'e91a2360-da51-4fdf-9711-bcdecd462614',
* entries: [
* {
* id: '55ba2c6c-8ef4-4b2e-9148-e75e8b6ccac1',
* name: 'Credit Card Numbers',
* profile_id:
* 'e91a2360-da51-4fdf-9711-bcdecd462614',
* },
* ],
* name: 'Financial Information',
* },
* ],
* });
* ```
*/
export(params, options) {
const { account_id, ...body } = params;
return this._client.post((0, path_1.path) `/accounts/${account_id}/data-security/posture/content/export`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseContent._key = Object.freeze([
'zeroTrust',
'casb',
'posture',
'content',
]);
return BaseContent;
})();
exports.BaseContent = BaseContent;
class Content extends BaseContent {
}
exports.Content = Content;
//# sourceMappingURL=content.js.map