UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

48 lines • 1.95 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { SinglePage } from "../../../core/pagination.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseTLS = /* @__PURE__ */ (() => { class BaseTLS extends APIResource { /** * Update the tls setting value for the hostname. */ update(hostname, params, options) { const { zone_id, setting_id, ...body } = params; return this._client.put(path `/zones/${zone_id}/hostnames/settings/${setting_id}/${hostname}`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * List the requested TLS setting for the hostnames under this zone. */ list(settingID, params, options) { const { zone_id } = params; return this._client.getAPIList(path `/zones/${zone_id}/hostnames/settings/${settingID}`, (SinglePage), options); } /** * Delete the tls setting value for the hostname. */ delete(hostname, params, options) { const { zone_id, setting_id } = params; return this._client.delete(path `/zones/${zone_id}/hostnames/settings/${setting_id}/${hostname}`, options)._thenUnwrap((obj) => obj.result); } /** * Get the requested TLS setting for the hostname. */ get(hostname, params, options) { const { zone_id, setting_id } = params; return this._client.get(path `/zones/${zone_id}/hostnames/settings/${setting_id}/${hostname}`, options)._thenUnwrap((obj) => obj.result); } } BaseTLS._key = Object.freeze([ 'hostnames', 'settings', 'tls', ]); return BaseTLS; })(); export class TLS extends BaseTLS { } //# sourceMappingURL=tls.mjs.map