UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

63 lines • 3.13 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { path } from "../../../internal/utils/path.mjs"; /** * @deprecated Please use the [Schema Validation Operations Settings](https://developers.cloudflare.com/api/resources/schema_validation/subresources/settings/subresources/operations/) APIs instead */ export var BaseSchemaValidation = /* @__PURE__ */ (() => { /** * @deprecated Please use the [Schema Validation Operations Settings](https://developers.cloudflare.com/api/resources/schema_validation/subresources/settings/subresources/operations/) APIs instead */ class BaseSchemaValidation extends APIResource { /** * Updates operation-level schema validation settings on the zone. Deprecated; use * `/zones/{zone_id}/schema_validation/settings/operations/{operation_id}` instead. * * @deprecated Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. */ update(operationID, params, options) { const { zone_id, ...body } = params; return this._client.put(path `/zones/${zone_id}/api_gateway/operations/${operationID}/schema_validation`, { body, ...options, }); } /** * Updates multiple operation-level schema validation settings on the zone. * Deprecated; use `/zones/{zone_id}/schema_validation/settings/operations` * instead. * * @deprecated Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. */ edit(params, options) { const { zone_id, settings_multiple_request } = params; return this._client.patch(path `/zones/${zone_id}/api_gateway/operations/schema_validation`, { body: settings_multiple_request, ...options, })._thenUnwrap((obj) => obj.result); } /** * Retrieves operation-level schema validation settings on the zone. Deprecated; * use `/zones/{zone_id}/schema_validation/settings/operations/{operation_id}` * instead. * * @deprecated Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. */ get(operationID, params, options) { const { zone_id } = params; return this._client.get(path `/zones/${zone_id}/api_gateway/operations/${operationID}/schema_validation`, options); } } BaseSchemaValidation._key = Object.freeze([ 'apiGateway', 'operations', 'schemaValidation', ]); return BaseSchemaValidation; })(); /** * @deprecated Please use the [Schema Validation Operations Settings](https://developers.cloudflare.com/api/resources/schema_validation/subresources/settings/subresources/operations/) APIs instead */ export class SchemaValidation extends BaseSchemaValidation { } //# sourceMappingURL=schema-validation.mjs.map