cloudflare
Version:
The official TypeScript library for the Cloudflare API
36 lines • 1.57 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlwaysOnline = void 0;
const resource_1 = require("cloudflare/resource");
class AlwaysOnline 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.AlwaysOnline = AlwaysOnline;
(function (AlwaysOnline) {
})(AlwaysOnline = exports.AlwaysOnline || (exports.AlwaysOnline = {}));
//# sourceMappingURL=always-online.js.map