cloudflare
Version:
The official TypeScript library for the Cloudflare API
25 lines • 1.01 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Upload = void 0;
const resource_1 = require("cloudflare/resource");
class Upload extends resource_1.APIResource {
/**
* Prepare to upload a new version of a dataset.
*/
create(datasetId, params, options) {
const { account_id } = params;
return this._client.post(`/accounts/${account_id}/dlp/datasets/${datasetId}/upload`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Upload a new version of a dataset.
*/
edit(datasetId, version, params, options) {
const { account_id } = params;
return this._client.post(`/accounts/${account_id}/dlp/datasets/${datasetId}/upload/${version}`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.Upload = Upload;
(function (Upload) {
})(Upload = exports.Upload || (exports.Upload = {}));
//# sourceMappingURL=upload.js.map