UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

58 lines • 2.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TransformationsC2paResource = exports.BaseTransformationsC2paResource = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../core/resource.js"); const path_1 = require("../../internal/utils/path.js"); var BaseTransformationsC2paResource = /* @__PURE__ */ (() => { class BaseTransformationsC2paResource extends resource_1.APIResource { /** * C2PA (Coalition for Content Provenance and Authenticity) signing adds * cryptographic metadata to images processed through Cloudflare Image * Transformations, enabling verification of image authenticity and provenance. * * @example * ```ts * const transformationsC2pa = * await client.zones.transformationsC2pa.edit({ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * value: 'off', * }); * ``` */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch((0, path_1.path) `/zones/${zone_id}/settings/transformations_c2pa`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * C2PA (Coalition for Content Provenance and Authenticity) signing adds * cryptographic metadata to images processed through Cloudflare Image * Transformations, enabling verification of image authenticity and provenance. * * @example * ```ts * const transformationsC2pa = * await client.zones.transformationsC2pa.get({ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ get(params, options) { const { zone_id } = params; return this._client.get((0, path_1.path) `/zones/${zone_id}/settings/transformations_c2pa`, options)._thenUnwrap((obj) => obj.result); } } BaseTransformationsC2paResource._key = Object.freeze([ 'zones', 'transformationsC2pa', ]); return BaseTransformationsC2paResource; })(); exports.BaseTransformationsC2paResource = BaseTransformationsC2paResource; class TransformationsC2paResource extends BaseTransformationsC2paResource { } exports.TransformationsC2paResource = TransformationsC2paResource; //# sourceMappingURL=transformations-c2pa.js.map