import { type Schema as JTDSchemaJson } from '../jtd/index.js'; import type { SignalDescriptorJson, SignalFormatJson } from '../proto/index.js'; /** Generate a fuzzed (sample) value from a JTD schema. */ export declare function fuzzJTD(input: unknown, definitions?: Record, _depth?: number): unknown; /** * Validate a value against a JTD schema, returning an array of error messages. * Uses the shared RFC 8927 implementation. */ export declare function validateJsonAgainstJTD(schema: unknown, value: unknown, definitions?: Record): string[]; /** Validate a JSON value against a single SignalFormatJson. */ export declare function validateJsonAgainstSignal(format: SignalFormatJson, jsonValue: unknown): string[]; /** Validate a JSON value against a SignalDescriptorJson (valid if value matches ANY JTD format). */ export declare function validateJsonAgainstSignal(descriptor: SignalDescriptorJson, jsonValue: unknown): string[]; /** * Convert JTD (JSON Type Definition) schema to JSON Schema. * * Supports all 8 JTD schema forms per RFC 8927: * - Empty form: {} * - Ref form: { ref: "..." } * - Type form: { type: "..." } * - Enum form: { enum: [...] } * - Elements form: { elements: {...} } * - Properties form: { properties: {...}, optionalProperties: {...} } * - Values form: { values: {...} } * - Discriminator form: { discriminator: "...", mapping: {...} } * * JTD `metadata.description` is preserved as JSON Schema `description`. * Other metadata fields are appended to the description for context. * * Top-level `definitions` are emitted as JSON Schema `$defs` and * referenced via `$ref` (not inlined), keeping large schemas compact. */ export declare function jtdToJsonSchema(input: unknown, definitions?: Record, isRoot?: boolean): any; export declare const MAX_VALIDATION_DEPTH = 32; export declare const MAX_VALIDATION_ERRORS = 100; /** Validate that the input is a valid JTD schema. */ export declare function validateJTDSchema(schema: unknown): { valid: true; schema: JTDSchemaJson; } | { valid: false; error: string; }; /** Parse and validate a JSON string. */ export declare function validateJSON(jsonString: string): { valid: boolean; data?: unknown; error?: string; }; /** Parse a JSON string and validate it as a JTD schema. */ export declare function validateJTDSchemaString(schemaString: string): { valid: true; schema: JTDSchemaJson; } | { valid: false; error: string; }; /** Monaco editor JSON schema configuration for JTD schema IntelliSense and validation. */ export declare const JTD_SCHEMA_CONFIG: { uri: string; fileMatch: string[]; schema: { $schema: string; type: string; properties: { type: { description: string; enum: string[]; }; enum: { description: string; type: string; items: { type: string; }; }; elements: { description: string; $ref: string; }; properties: { description: string; type: string; additionalProperties: { $ref: string; }; }; optionalProperties: { description: string; type: string; additionalProperties: { $ref: string; }; }; values: { description: string; $ref: string; }; discriminator: { description: string; type: string; }; mapping: { description: string; type: string; additionalProperties: { $ref: string; }; }; ref: { description: string; type: string; }; definitions: { description: string; type: string; additionalProperties: { $ref: string; }; }; nullable: { description: string; type: string; }; metadata: { description: string; type: string; }; additionalProperties: { description: string; type: string; }; }; }; }; //# sourceMappingURL=index.d.ts.map