cloudflare
Version:
The official TypeScript library for the Cloudflare API
34 lines • 1.76 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class DevelopmentModeResource extends 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);
}
}
(function (DevelopmentModeResource) {
})(DevelopmentModeResource || (DevelopmentModeResource = {}));
//# sourceMappingURL=development-mode.mjs.map