import { AnyZodObject, ZodTypeAny, input, TypeOf, ZodEffects } from 'zod'; import { Options } from 'zod-to-json-schema'; import { SchemaObject, Options as Options$1, ValidateFunction } from 'ajv'; import { FrameworkErrorOptions } from '../../errors.js'; import '../types.js'; import './guards.js'; /** * Copyright 2025 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ type AnyToolSchemaLike = AnyZodObject | SchemaObject; type AnySchemaLike = ZodTypeAny | SchemaObject; type FromSchemaLike = T extends ZodTypeAny ? TypeOf : unknown; type FromSchemaLikeRaw = T extends ZodTypeAny ? input : unknown; declare function validateSchema(schema: T | ZodEffects, errorOptions?: FrameworkErrorOptions): asserts schema is T; declare function toJsonSchema(schema: T, options?: Partial): SchemaObject; declare function createSchemaValidator(schema: T, options?: Options$1): ValidateFunction>; interface ParseBrokenJsonOptions { pair?: [string, string] | null; } declare function parseBrokenJson(input: string | undefined, options?: ParseBrokenJsonOptions): any; export { type AnySchemaLike, type AnyToolSchemaLike, type FromSchemaLike, type FromSchemaLikeRaw, createSchemaValidator, parseBrokenJson, toJsonSchema, validateSchema };