UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

49 lines • 2.04 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../../core/resource.mjs"; import * as TagsAPI from "./tags.mjs"; import { BaseTags, Tags } from "./tags.mjs"; import { path } from "../../../../../internal/utils/path.mjs"; export var BaseByDataset = /* @__PURE__ */ (() => { class BaseByDataset extends 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(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(path `/accounts/${account_id}/cloudforce-one/events/dataset/${dataset_id}/indicators/${indicatorID}`, options); } } BaseByDataset._key = Object.freeze(['cloudforceOne', 'threatEvents', 'indicators', 'byDataset']); return BaseByDataset; })(); export var ByDataset = /* @__PURE__ */ (() => { class ByDataset extends BaseByDataset { constructor() { super(...arguments); this.tags = new TagsAPI.Tags(this._client); } } ByDataset.Tags = Tags; ByDataset.BaseTags = BaseTags; return ByDataset; })(); //# sourceMappingURL=by-dataset.mjs.map