UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

50 lines 1.66 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Datasets = void 0; const resource_1 = require("../../../resource.js"); class Datasets extends resource_1.APIResource { /** * Creates a dataset */ create(params, options) { const { account_id, ...body } = params; return this._client.post(`/accounts/${account_id}/cloudforce-one/events/dataset/create`, { body, ...options, }); } /** * Lists all datasets in an account */ list(params, options) { const { account_id } = params; return this._client.get(`/accounts/${account_id}/cloudforce-one/events/dataset`, options); } /** * Updates an existing dataset */ edit(datasetId, params, options) { const { account_id, ...body } = params; return this._client.patch(`/accounts/${account_id}/cloudforce-one/events/dataset/${datasetId}`, { body, ...options, }); } /** * Reads a dataset */ get(datasetId, params, options) { const { account_id } = params; return this._client.get(`/accounts/${account_id}/cloudforce-one/events/dataset/${datasetId}`, options); } /** * Reads data for a raw event */ raw(datasetId, eventId, params, options) { const { account_id } = params; return this._client.get(`/accounts/${account_id}/cloudforce-one/events/raw/${datasetId}/${eventId}`, options); } } exports.Datasets = Datasets; //# sourceMappingURL=datasets.js.map