UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines • 1.51 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { SinglePage } from "../../../core/pagination.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseContentFindings = /* @__PURE__ */ (() => { class BaseContentFindings extends 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(path `/accounts/${account_id}/analytics/query/data-security/content-findings/top-n`, (SinglePage), { body, method: 'post', ...options }); } } BaseContentFindings._key = Object.freeze(['analyticsQuery', 'dataSecurity', 'contentFindings']); return BaseContentFindings; })(); export class ContentFindings extends BaseContentFindings { } //# sourceMappingURL=content-findings.mjs.map