UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

37 lines • 1.32 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseAggregate = /* @__PURE__ */ (() => { class BaseAggregate extends APIResource { /** * Aggregate threat events by one or more columns (e.g., attacker, targetIndustry) * with optional date filtering and daily grouping. Supports multi-dimensional * aggregation for cross-analysis. * * @example * ```ts * const aggregates = * await client.cloudforceOne.threatEvents.aggregate.list({ * account_id: 'account_id', * aggregateBy: 'aggregateBy', * }); * ``` */ list(params, options) { const { account_id, ...query } = params; return this._client.get(path `/accounts/${account_id}/cloudforce-one/events/aggregate`, { query, ...options, }); } } BaseAggregate._key = Object.freeze([ 'cloudforceOne', 'threatEvents', 'aggregate', ]); return BaseAggregate; })(); export class Aggregate extends BaseAggregate { } //# sourceMappingURL=aggregate.mjs.map