UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

34 lines 1.34 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Entries = void 0; const resource_1 = require("../../../../../resource.js"); class Entries extends resource_1.APIResource { /** * This is used for multi-column EDMv2 datasets. The EDMv2 format can only be * created in the Cloudflare dashboard. * * @example * ```ts * const entry = * await client.zeroTrust.dlp.datasets.versions.entries.create( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * 0, * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * fs.createReadStream('path/to/file'), * { account_id: 'account_id' }, * ); * ``` */ create(datasetId, version, entryId, datasetVersionEntry, params, options) { const { account_id } = params; return this._client.post(`/accounts/${account_id}/dlp/datasets/${datasetId}/versions/${version}/entries/${entryId}`, { body: datasetVersionEntry, ...options, headers: { 'Content-Type': 'application/octet-stream', ...options?.headers }, __binaryRequest: true, })._thenUnwrap((obj) => obj.result); } } exports.Entries = Entries; //# sourceMappingURL=entries.js.map