UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

39 lines • 1.57 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import { buildHeaders } from "../../internal/headers.mjs"; import { path } from "../../internal/utils/path.mjs"; export var BaseManagedTransforms = /* @__PURE__ */ (() => { class BaseManagedTransforms extends APIResource { /** * Fetches a list of all Managed Transforms. */ list(params, options) { const { zone_id } = params; return this._client.get(path `/zones/${zone_id}/managed_headers`, options)._thenUnwrap((obj) => obj.result); } /** * Disables all Managed Transforms. */ delete(params, options) { const { zone_id } = params; return this._client.delete(path `/zones/${zone_id}/managed_headers`, { ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), }); } /** * Updates the status of one or more Managed Transforms. */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch(path `/zones/${zone_id}/managed_headers`, { body, ...options })._thenUnwrap((obj) => obj.result); } } BaseManagedTransforms._key = Object.freeze([ 'managedTransforms', ]); return BaseManagedTransforms; })(); export class ManagedTransforms extends BaseManagedTransforms { } //# sourceMappingURL=managed-transforms.mjs.map