cloudflare
Version:
The official TypeScript library for the Cloudflare API
43 lines • 2.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MaintenanceConfigs = exports.BaseMaintenanceConfigs = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../core/resource.js");
const path_1 = require("../../internal/utils/path.js");
var BaseMaintenanceConfigs = /* @__PURE__ */ (() => {
class BaseMaintenanceConfigs extends resource_1.APIResource {
/**
* Update the maintenance configuration for a catalog. This allows you to enable or
* disable compaction and adjust target file sizes for optimization.
*
* @deprecated Use `POST /accounts/{account_id}/basin-catalog/{bucket_name}/maintenance-configs` instead.
*/
update(bucketName, params, options) {
const { account_id, ...body } = params;
return this._client.post((0, path_1.path) `/accounts/${account_id}/r2-catalog/${bucketName}/maintenance-configs`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Retrieve the maintenance configuration for a specific catalog, including
* compaction settings and credential status.
*
* @deprecated Use `GET /accounts/{account_id}/basin-catalog/{bucket_name}/maintenance-configs` instead.
*/
get(bucketName, params, options) {
const { account_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/r2-catalog/${bucketName}/maintenance-configs`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseMaintenanceConfigs._key = Object.freeze([
'r2DataCatalog',
'maintenanceConfigs',
]);
return BaseMaintenanceConfigs;
})();
exports.BaseMaintenanceConfigs = BaseMaintenanceConfigs;
class MaintenanceConfigs extends BaseMaintenanceConfigs {
}
exports.MaintenanceConfigs = MaintenanceConfigs;
//# sourceMappingURL=maintenance-configs.js.map