UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

55 lines • 2.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ByDataset = exports.BaseByDataset = void 0; const tslib_1 = require("../../../../../internal/tslib.js"); // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../../../core/resource.js"); const TagsAPI = tslib_1.__importStar(require("./tags.js")); const tags_1 = require("./tags.js"); const path_1 = require("../../../../../internal/utils/path.js"); var BaseByDataset = /* @__PURE__ */ (() => { class BaseByDataset extends resource_1.APIResource { /** * This method is deprecated. Please use /events/indicators to retrieve a paginated * list of indicators. * * @deprecated Use indicators.list instead (GET /accounts/{account_id}/cloudforce-one/events/indicators). */ list(datasetID, params, options) { const { account_id, ...query } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/cloudforce-one/events/dataset/${datasetID}/indicators`, { query, ...options }); } /** * Retrieves a specific indicator by its UUID. * * @example * ```ts * const byDataset = * await client.cloudforceOne.threatEvents.indicators.byDataset.get( * 'indicator_id', * { account_id: 'account_id', dataset_id: 'dataset_id' }, * ); * ``` */ get(indicatorID, params, options) { const { account_id, dataset_id } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/cloudforce-one/events/dataset/${dataset_id}/indicators/${indicatorID}`, options); } } BaseByDataset._key = Object.freeze(['cloudforceOne', 'threatEvents', 'indicators', 'byDataset']); return BaseByDataset; })(); exports.BaseByDataset = BaseByDataset; var ByDataset = /* @__PURE__ */ (() => { class ByDataset extends BaseByDataset { constructor() { super(...arguments); this.tags = new TagsAPI.Tags(this._client); } } ByDataset.Tags = tags_1.Tags; ByDataset.BaseTags = tags_1.BaseTags; return ByDataset; })(); exports.ByDataset = ByDataset; //# sourceMappingURL=by-dataset.js.map