cloudflare
Version:
The official TypeScript library for the Cloudflare API
53 lines • 2.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TLS = exports.BaseTLS = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../core/resource.js");
const pagination_1 = require("../../../core/pagination.js");
const path_1 = require("../../../internal/utils/path.js");
var BaseTLS = /* @__PURE__ */ (() => {
class BaseTLS extends resource_1.APIResource {
/**
* Update the tls setting value for the hostname.
*/
update(hostname, params, options) {
const { zone_id, setting_id, ...body } = params;
return this._client.put((0, path_1.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((0, path_1.path) `/zones/${zone_id}/hostnames/settings/${settingID}`, (pagination_1.SinglePage), options);
}
/**
* Delete the tls setting value for the hostname.
*/
delete(hostname, params, options) {
const { zone_id, setting_id } = params;
return this._client.delete((0, path_1.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((0, path_1.path) `/zones/${zone_id}/hostnames/settings/${setting_id}/${hostname}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseTLS._key = Object.freeze([
'hostnames',
'settings',
'tls',
]);
return BaseTLS;
})();
exports.BaseTLS = BaseTLS;
class TLS extends BaseTLS {
}
exports.TLS = TLS;
//# sourceMappingURL=tls.js.map