import { JSONSchema7Definition } from "json-schema"; import { ConverterOptions, IRNode, SignatureOccurrences } from "../types.js"; /** * Normalizes the `x-named-type` keyword value into a single external type name. * * This is the one widen-able boundary for the keyword: today only the string * form is supported. A future per-language object form (e.g. * `{ ts, kotlin, swift }`) would be resolved here without touching the IR shape * or any emitter. */ export declare function normalizeNamedType(value: unknown): string | undefined; /** * JSONSchemaConverter converts a JSON Schema (Draft-07) into an * intermediate representation (IR) that can later be transformed * into target language code via a language plugin. * * This implementation now supports internal definitions via both * "$defs" and "definitions", and resolves local "$ref" pointers. */ export declare class JSONSchemaConverter { private opts?; private ir; private rootSchema; private signatureOccurrences; private resolving; get irNode(): IRNode; get signatureOccurrencesMap(): SignatureOccurrences; constructor(schema: JSONSchema7Definition, opts?: ConverterOptions | undefined); private calcObjSignatureOccurrences; /** * Recursively converts a JSON Schema definition into an IRNode. */ private convertSchema; /** * Converts a JSON Schema definition to an IRNode. */ convertToIRSchema(schema: JSONSchema7Definition): IRNode; private validateSchema; /** * A placeholder for reference resolution. In a more advanced implementation, * this method might inline external references or perform more complex processing. * ie: fetching a remote/url $def */ private resolveReferences; private convertToIR; private getNameFromPath; private getNextObjectSequence; /** * Generates a unique signature for a schema. * Uses a stable JSON.stringify that sorts keys to ensure that * semantically equivalent schemas produce the same string. */ private getSchemaSignature; private getTypeName; /** * Resolves a local $ref using the stored root schema. */ private resolveRef; /** * Resolves a JSON Pointer (RFC 6901) within the given document. */ private resolvePointer; private simpleHash; private applyMetadata; private augmentWithApplicators; }