import { z } from 'zod'; /** * Core Zod validation schemas for all Matimo tool properties. * These schemas ensure YAML tools conform to the spec on load. */ export declare const ParameterSchema: z.ZodObject<{ type: z.ZodEnum<{ string: "string"; number: "number"; boolean: "boolean"; object: "object"; array: "array"; }>; description: z.ZodString; required: z.ZodOptional; enum: z.ZodOptional>; default: z.ZodOptional; examples: z.ZodOptional>; }, z.core.$strip>; export type Parameter = z.infer; export declare const AuthConfigSchema: z.ZodObject<{ type: z.ZodOptional>; location: z.ZodOptional>; name: z.ZodOptional; provider: z.ZodOptional; required: z.ZodOptional; username_env: z.ZodOptional; password_env: z.ZodOptional; }, z.core.$strip>; export type AuthConfig = z.infer; export declare const ExecutionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"command">; command: z.ZodString; args: z.ZodOptional>; cwd: z.ZodOptional; shell: z.ZodOptional; timeout: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"http">; method: z.ZodEnum<{ GET: "GET"; POST: "POST"; PUT: "PUT"; DELETE: "DELETE"; PATCH: "PATCH"; }>; url: z.ZodString; headers: z.ZodOptional>; body: z.ZodOptional; query_params: z.ZodOptional>; parameter_encoding: z.ZodOptional; target: z.ZodString; encoding: z.ZodString; options: z.ZodOptional>; }, z.core.$strip>>>; timeout: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"function">; code: z.ZodString; timeout: z.ZodOptional; }, z.core.$strip>], "type">; export type ExecutionConfig = z.infer; export declare const OutputSchemaSchema: z.ZodObject<{ type: z.ZodOptional, z.ZodString]>>; properties: z.ZodOptional>>>; required: z.ZodOptional>; description: z.ZodOptional; }, z.core.$strip>; export type OutputSchema = z.infer; export declare const ErrorHandlingSchema: z.ZodObject<{ retry: z.ZodOptional; backoff_type: z.ZodOptional>; initial_delay_ms: z.ZodOptional; max_delay_ms: z.ZodOptional; }, z.core.$strip>; export type ErrorHandling = z.infer; export declare const RateLimitingSchema: z.ZodObject<{ enabled: z.ZodOptional; requests_per_minute: z.ZodOptional; burst_size: z.ZodOptional; quota_per_hour: z.ZodOptional; }, z.core.$strip>; export type RateLimiting = z.infer; export declare const ToolDefinitionSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodString; version: z.ZodString; parameters: z.ZodOptional; description: z.ZodString; required: z.ZodOptional; enum: z.ZodOptional>; default: z.ZodOptional; examples: z.ZodOptional>; }, z.core.$strip>>>; execution: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"command">; command: z.ZodString; args: z.ZodOptional>; cwd: z.ZodOptional; shell: z.ZodOptional; timeout: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"http">; method: z.ZodEnum<{ GET: "GET"; POST: "POST"; PUT: "PUT"; DELETE: "DELETE"; PATCH: "PATCH"; }>; url: z.ZodString; headers: z.ZodOptional>; body: z.ZodOptional; query_params: z.ZodOptional>; parameter_encoding: z.ZodOptional; target: z.ZodString; encoding: z.ZodString; options: z.ZodOptional>; }, z.core.$strip>>>; timeout: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"function">; code: z.ZodString; timeout: z.ZodOptional; }, z.core.$strip>], "type">; authentication: z.ZodOptional>; location: z.ZodOptional>; name: z.ZodOptional; provider: z.ZodOptional; required: z.ZodOptional; username_env: z.ZodOptional; password_env: z.ZodOptional; }, z.core.$strip>>; output_schema: z.ZodOptional, z.ZodString]>>; properties: z.ZodOptional>>>; required: z.ZodOptional>; description: z.ZodOptional; }, z.core.$strip>>; error_handling: z.ZodOptional; backoff_type: z.ZodOptional>; initial_delay_ms: z.ZodOptional; max_delay_ms: z.ZodOptional; }, z.core.$strip>>; rate_limiting: z.ZodOptional; requests_per_minute: z.ZodOptional; burst_size: z.ZodOptional; quota_per_hour: z.ZodOptional; }, z.core.$strip>>; requires_approval: z.ZodOptional; risk: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; deprecated: z.ZodOptional; tags: z.ZodOptional>; deprecation_message: z.ZodOptional; status: z.ZodOptional>; }, z.core.$strip>; export type ToolDefinition = z.infer & { /** * Internal metadata indicating where this tool definition was loaded from. * Not part of the external schema; added programmatically after validation. */ _definitionPath?: string; }; export declare const OAuth2EndpointsSchema: z.ZodObject<{ authorizationUrl: z.ZodString; tokenUrl: z.ZodString; revokeUrl: z.ZodOptional; }, z.core.$strip>; export type OAuth2Endpoints = z.infer; export declare const ProviderDefinitionSchema: z.ZodObject<{ name: z.ZodString; type: z.ZodLiteral<"provider">; version: z.ZodString; description: z.ZodOptional; provider: z.ZodObject<{ name: z.ZodString; displayName: z.ZodOptional; endpoints: z.ZodObject<{ authorizationUrl: z.ZodString; tokenUrl: z.ZodString; revokeUrl: z.ZodOptional; }, z.core.$strip>; defaultScopes: z.ZodOptional>; documentation: z.ZodOptional; learnMore: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; export type ProviderDefinition = z.infer; /** * Validate a tool definition against the schema * Provides detailed error messages for validation failures * * @param tool - Tool definition to validate * @returns Validated tool definition * @throws {Error} If validation fails with detailed error information * * @example * ```typescript * import { getGlobalMatimoLogger } from '../logging.js'; * * try { * const tool = validateToolDefinition(parsedYAML); * } catch (error) { * const logger = getGlobalMatimoLogger(); * logger.error('Invalid tool definition', { * details: error.message * }); * throw error; * } * ``` */ export declare function validateToolDefinition(tool: unknown): ToolDefinition; /** * Validate a provider definition against the schema * Provides detailed error messages for validation failures * * @param provider - Provider definition to validate * @returns Validated provider definition * @throws {MatimoError} If validation fails with detailed error information */ export declare function validateProviderDefinition(provider: unknown): ProviderDefinition; //# sourceMappingURL=schema.d.ts.map