UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

42 lines • 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Aggregate = exports.BaseAggregate = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); const path_1 = require("../../../internal/utils/path.js"); var BaseAggregate = /* @__PURE__ */ (() => { class BaseAggregate extends resource_1.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((0, path_1.path) `/accounts/${account_id}/cloudforce-one/events/aggregate`, { query, ...options, }); } } BaseAggregate._key = Object.freeze([ 'cloudforceOne', 'threatEvents', 'aggregate', ]); return BaseAggregate; })(); exports.BaseAggregate = BaseAggregate; class Aggregate extends BaseAggregate { } exports.Aggregate = Aggregate; //# sourceMappingURL=aggregate.js.map