cloudflare
Version:
The official TypeScript library for the Cloudflare API
56 lines • 2.03 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 BaseTotalTLS = /* @__PURE__ */ (() => {
class BaseTotalTLS extends APIResource {
/**
* Set Total TLS Settings or disable the feature for a Zone.
*
* @example
* ```ts
* const totalTLS = await client.acm.totalTLS.update({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* enabled: true,
* });
* ```
*/
update(params, options) {
const { zone_id, ...body } = params;
return this._client.post(path `/zones/${zone_id}/acm/total_tls`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Set Total TLS Settings or disable the feature for a Zone.
*
* @example
* ```ts
* const response = await client.acm.totalTLS.edit({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* enabled: true,
* });
* ```
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.post(path `/zones/${zone_id}/acm/total_tls`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Get Total TLS Settings for a Zone.
*
* @example
* ```ts
* const totalTLS = await client.acm.totalTLS.get({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(path `/zones/${zone_id}/acm/total_tls`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseTotalTLS._key = Object.freeze(['acm', 'totalTLS']);
return BaseTotalTLS;
})();
export class TotalTLS extends BaseTotalTLS {
}
//# sourceMappingURL=total-tls.mjs.map