UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

32 lines 1.54 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; export class ChallengeTTL extends 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); } } (function (ChallengeTTL) { })(ChallengeTTL || (ChallengeTTL = {})); //# sourceMappingURL=challenge-ttl.mjs.map