cloudflare
Version:
The official TypeScript library for the Cloudflare API
36 lines • 1.72 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChallengeTTL = void 0;
const resource_1 = require("cloudflare/resource");
class ChallengeTTL extends resource_1.APIResource {
/**
* Specify how long a visitor is allowed access to your site after successfully
* completing a challenge (such as a CAPTCHA). After the TTL has expired the
* visitor will have to complete a new challenge. We recommend a 15 - 45 minute
* setting and will attempt to honor any setting above 45 minutes.
* (https://support.cloudflare.com/hc/en-us/articles/200170136).
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/settings/challenge_ttl`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Specify how long a visitor is allowed access to your site after successfully
* completing a challenge (such as a CAPTCHA). After the TTL has expired the
* visitor will have to complete a new challenge. We recommend a 15 - 45 minute
* setting and will attempt to honor any setting above 45 minutes.
* (https://support.cloudflare.com/hc/en-us/articles/200170136).
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/settings/challenge_ttl`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.ChallengeTTL = ChallengeTTL;
(function (ChallengeTTL) {
})(ChallengeTTL = exports.ChallengeTTL || (exports.ChallengeTTL = {}));
//# sourceMappingURL=challenge-ttl.js.map