UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

33 lines 1.78 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.CacheLevelResource = void 0; const resource_1 = require("cloudflare/resource"); class CacheLevelResource extends resource_1.APIResource { /** * Cache Level functions based off the setting level. The basic setting will cache * most static resources (i.e., css, images, and JavaScript). The simplified * setting will ignore the query string when delivering a cached resource. The * aggressive setting will cache all static resources, including ones with a query * string. (https://support.cloudflare.com/hc/en-us/articles/200168256). */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch(`/zones/${zone_id}/settings/cache_level`, { body, ...options })._thenUnwrap((obj) => obj.result); } /** * Cache Level functions based off the setting level. The basic setting will cache * most static resources (i.e., css, images, and JavaScript). The simplified * setting will ignore the query string when delivering a cached resource. The * aggressive setting will cache all static resources, including ones with a query * string. (https://support.cloudflare.com/hc/en-us/articles/200168256). */ get(params, options) { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/settings/cache_level`, options)._thenUnwrap((obj) => obj.result); } } exports.CacheLevelResource = CacheLevelResource; (function (CacheLevelResource) { })(CacheLevelResource = exports.CacheLevelResource || (exports.CacheLevelResource = {})); //# sourceMappingURL=cache-level.js.map