UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

32 lines • 1.94 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../core/resource.mjs"; import { path } from "../../../../internal/utils/path.mjs"; export var BaseMaintenanceConfigs = /* @__PURE__ */ (() => { class BaseMaintenanceConfigs extends APIResource { /** * Update the maintenance configuration for a specific table. 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}/namespaces/{namespace}/tables/{table_name}/maintenance-configs` instead. */ update(tableName, params, options) { const { account_id, bucket_name, namespace, ...body } = params; return this._client.post(path `/accounts/${account_id}/r2-catalog/${bucket_name}/namespaces/${namespace}/tables/${tableName}/maintenance-configs`, { body, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieve the maintenance configuration for a specific table, including * compaction settings. * * @deprecated Use `GET /accounts/{account_id}/basin-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs` instead. */ get(tableName, params, options) { const { account_id, bucket_name, namespace } = params; return this._client.get(path `/accounts/${account_id}/r2-catalog/${bucket_name}/namespaces/${namespace}/tables/${tableName}/maintenance-configs`, options)._thenUnwrap((obj) => obj.result); } } BaseMaintenanceConfigs._key = Object.freeze(['r2DataCatalog', 'namespaces', 'tables', 'maintenanceConfigs']); return BaseMaintenanceConfigs; })(); export class MaintenanceConfigs extends BaseMaintenanceConfigs { } //# sourceMappingURL=maintenance-configs.mjs.map