UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

61 lines • 2.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TotalTLS = exports.BaseTotalTLS = 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 BaseTotalTLS = /* @__PURE__ */ (() => { class BaseTotalTLS extends resource_1.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((0, path_1.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((0, path_1.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((0, path_1.path) `/zones/${zone_id}/acm/total_tls`, options)._thenUnwrap((obj) => obj.result); } } BaseTotalTLS._key = Object.freeze(['acm', 'totalTLS']); return BaseTotalTLS; })(); exports.BaseTotalTLS = BaseTotalTLS; class TotalTLS extends BaseTotalTLS { } exports.TotalTLS = TotalTLS; //# sourceMappingURL=total-tls.js.map