cloudflare
Version:
The official TypeScript library for the Cloudflare API
41 lines • 1.77 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContentFindings = exports.BaseContentFindings = 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 BaseContentFindings = /* @__PURE__ */ (() => {
class BaseContentFindings extends resource_1.APIResource {
/**
* Returns the top N integrations ranked by total content findings.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const contentFindingTopNResponse of client.analyticsQuery.dataSecurity.contentFindings.topN(
* {
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* filters: [],
* from: '2024-11-01T00:00:00Z',
* n: 10,
* to: '2024-11-08T00:00:00Z',
* },
* )) {
* // ...
* }
* ```
*/
topN(params, options) {
const { account_id, ...body } = params;
return this._client.getAPIList((0, path_1.path) `/accounts/${account_id}/analytics/query/data-security/content-findings/top-n`, (pagination_1.SinglePage), { body, method: 'post', ...options });
}
}
BaseContentFindings._key = Object.freeze(['analyticsQuery', 'dataSecurity', 'contentFindings']);
return BaseContentFindings;
})();
exports.BaseContentFindings = BaseContentFindings;
class ContentFindings extends BaseContentFindings {
}
exports.ContentFindings = ContentFindings;
//# sourceMappingURL=content-findings.js.map