cloudflare
Version:
The official TypeScript library for the Cloudflare API
21 lines • 856 B
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class Upload extends 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);
}
}
(function (Upload) {
})(Upload || (Upload = {}));
//# sourceMappingURL=upload.mjs.map