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.cjs';
import '../types.cjs';
import './guards.cjs';

/**
 * 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> = T extends ZodTypeAny ? TypeOf<T> : unknown;
type FromSchemaLikeRaw<T> = T extends ZodTypeAny ? input<T> : unknown;
declare function validateSchema<T extends AnySchemaLike>(schema: T | ZodEffects<any>, errorOptions?: FrameworkErrorOptions): asserts schema is T;
declare function toJsonSchema<T extends AnySchemaLike>(schema: T, options?: Partial<Options>): SchemaObject;
declare function createSchemaValidator<T extends AnySchemaLike>(schema: T, options?: Options$1): ValidateFunction<FromSchemaLike<T>>;
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 };
