cloudflare
Version:
The official TypeScript library for the Cloudflare API
34 lines • 1.62 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecurityLevelResource = void 0;
const resource_1 = require("cloudflare/resource");
class SecurityLevelResource extends resource_1.APIResource {
/**
* Choose the appropriate security profile for your website, which will
* automatically adjust each of the security settings. If you choose to customize
* an individual security setting, the profile will become Custom.
* (https://support.cloudflare.com/hc/en-us/articles/200170056).
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/settings/security_level`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Choose the appropriate security profile for your website, which will
* automatically adjust each of the security settings. If you choose to customize
* an individual security setting, the profile will become Custom.
* (https://support.cloudflare.com/hc/en-us/articles/200170056).
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/settings/security_level`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.SecurityLevelResource = SecurityLevelResource;
(function (SecurityLevelResource) {
})(SecurityLevelResource = exports.SecurityLevelResource || (exports.SecurityLevelResource = {}));
//# sourceMappingURL=security-level.js.map