cloudflare
Version:
The official TypeScript library for the Cloudflare API
63 lines • 2.08 kB
JavaScript
// 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 BaseConfig = /* @__PURE__ */ (() => {
class BaseConfig extends APIResource {
/**
* Updates CMB config.
*
* @example
* ```ts
* const cmbConfig =
* await client.logs.control.cmb.config.create({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
create(params, options) {
const { account_id, ...body } = params;
return this._client.post(path `/accounts/${account_id}/logs/control/cmb/config`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Deletes CMB config.
*
* @example
* ```ts
* const config = await client.logs.control.cmb.config.delete({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
delete(params, options) {
const { account_id } = params;
return this._client.delete(path `/accounts/${account_id}/logs/control/cmb/config`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Gets CMB config.
*
* @example
* ```ts
* const cmbConfig = await client.logs.control.cmb.config.get({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
get(params, options) {
const { account_id } = params;
return this._client.get(path `/accounts/${account_id}/logs/control/cmb/config`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseConfig._key = Object.freeze([
'logs',
'control',
'cmb',
'config',
]);
return BaseConfig;
})();
export class Config extends BaseConfig {
}
//# sourceMappingURL=config.mjs.map