UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines 1.98 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.DevelopmentModeResource = void 0; const resource_1 = require("cloudflare/resource"); class DevelopmentModeResource extends resource_1.APIResource { /** * Development Mode temporarily allows you to enter development mode for your * websites if you need to make changes to your site. This will bypass Cloudflare's * accelerated cache and slow down your site, but is useful if you are making * changes to cacheable content (like images, css, or JavaScript) and would like to * see those changes right away. Once entered, development mode will last for 3 * hours and then automatically toggle off. */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch(`/zones/${zone_id}/settings/development_mode`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * Development Mode temporarily allows you to enter development mode for your * websites if you need to make changes to your site. This will bypass Cloudflare's * accelerated cache and slow down your site, but is useful if you are making * changes to cacheable content (like images, css, or JavaScript) and would like to * see those changes right away. Once entered, development mode will last for 3 * hours and then automatically toggle off. */ get(params, options) { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/settings/development_mode`, options)._thenUnwrap((obj) => obj.result); } } exports.DevelopmentModeResource = DevelopmentModeResource; (function (DevelopmentModeResource) { })(DevelopmentModeResource = exports.DevelopmentModeResource || (exports.DevelopmentModeResource = {})); //# sourceMappingURL=development-mode.js.map