import { APIResource } from "../../../../core/resource.mjs"; import * as HealthAPI from "./health.mjs"; import { BaseHealth, Health } from "./health.mjs"; import { APIPromise } from "../../../../core/api-promise.mjs"; import { RequestOptions } from "../../../../internal/request-options.mjs"; export declare class BaseDatasets extends APIResource { static readonly _key: readonly ['cloudforceOne', 'threatEvents', 'datasets']; /** * Creates a dataset * * @example * ```ts * const dataset = * await client.cloudforceOne.threatEvents.datasets.create({ * account_id: 'account_id', * isPublic: true, * name: 'x', * }); * ``` */ create(params: DatasetCreateParams, options?: RequestOptions): APIPromise; /** * Lists all datasets in an account * * @example * ```ts * const datasets = * await client.cloudforceOne.threatEvents.datasets.list({ * account_id: 'account_id', * }); * ``` */ list(params: DatasetListParams, options?: RequestOptions): APIPromise; /** * Updates an existing dataset * * @example * ```ts * const response = * await client.cloudforceOne.threatEvents.datasets.edit( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { * account_id: 'account_id', * isPublic: true, * name: 'x', * }, * ); * ``` */ edit(datasetID: string, params: DatasetEditParams, options?: RequestOptions): APIPromise; /** * Reads a dataset * * @example * ```ts * const dataset = * await client.cloudforceOne.threatEvents.datasets.get( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ get(datasetID: string, params: DatasetGetParams, options?: RequestOptions): APIPromise; /** * Retrieves the raw data associated with an event. Searches across all shards in * the dataset. * * @example * ```ts * const response = * await client.cloudforceOne.threatEvents.datasets.raw( * 'event_id', * { account_id: 'account_id', dataset_id: 'dataset_id' }, * ); * ``` */ raw(eventID: string, params: DatasetRawParams, options?: RequestOptions): APIPromise; } export declare class Datasets extends BaseDatasets { health: HealthAPI.Health; } export interface DatasetCreateResponse { isPublic: boolean; name: string; uuid: string; deletedAt?: string; } export type DatasetListResponse = Array; export declare namespace DatasetListResponse { interface DatasetListResponseItem { isPublic: boolean; name: string; uuid: string; deletedAt?: string; } } export interface DatasetEditResponse { isPublic: boolean; name: string; uuid: string; deletedAt?: string; } export interface DatasetGetResponse { isPublic: boolean; name: string; uuid: string; deletedAt?: string; } export interface DatasetRawResponse { id: number; accountId: number; created: string; data: string; source: string; tlp: string; } export interface DatasetCreateParams { /** * Path param: Account ID. */ account_id: string; /** * Body param: If true, then anyone can search the dataset. If false, then its * limited to the account. */ isPublic: boolean; /** * Body param: Used to describe the dataset within the account context. */ name: string; } export interface DatasetListParams { /** * Path param: Account ID. */ account_id: string; /** * Query param: When true, include soft-deleted datasets in the response. Each item * includes a `deletedAt` field (ISO 8601 or null). Default: false. */ includeDeleted?: boolean; } export interface DatasetEditParams { /** * Path param: Account ID. */ account_id: string; /** * Body param: If true, then anyone can search the dataset. If false, then its * limited to the account. */ isPublic: boolean; /** * Body param: Used to describe the dataset within the account context. */ name: string; } export interface DatasetGetParams { /** * Account ID. */ account_id: string; } export interface DatasetRawParams { /** * Account ID. */ account_id: string; /** * Dataset ID. */ dataset_id: string; } export declare namespace Datasets { export { type DatasetCreateResponse as DatasetCreateResponse, type DatasetListResponse as DatasetListResponse, type DatasetEditResponse as DatasetEditResponse, type DatasetGetResponse as DatasetGetResponse, type DatasetRawResponse as DatasetRawResponse, type DatasetCreateParams as DatasetCreateParams, type DatasetListParams as DatasetListParams, type DatasetEditParams as DatasetEditParams, type DatasetGetParams as DatasetGetParams, type DatasetRawParams as DatasetRawParams, }; export { Health as Health, BaseHealth as BaseHealth }; } //# sourceMappingURL=datasets.d.mts.map