UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines 1.63 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.AlwaysOnlineResource = void 0; const resource_1 = require("cloudflare/resource"); class AlwaysOnlineResource extends resource_1.APIResource { /** * When enabled, Cloudflare serves limited copies of web pages available from the * [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is * offline. Refer to * [Always Online](https://developers.cloudflare.com/cache/about/always-online) for * more information. */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch(`/zones/${zone_id}/settings/always_online`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * When enabled, Cloudflare serves limited copies of web pages available from the * [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is * offline. Refer to * [Always Online](https://developers.cloudflare.com/cache/about/always-online) for * more information. */ get(params, options) { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/settings/always_online`, options)._thenUnwrap((obj) => obj.result); } } exports.AlwaysOnlineResource = AlwaysOnlineResource; (function (AlwaysOnlineResource) { })(AlwaysOnlineResource = exports.AlwaysOnlineResource || (exports.AlwaysOnlineResource = {})); //# sourceMappingURL=always-online.js.map