/** * This module provides utilities for ensuring JSON schemas conform to a strict standard. * * Functions: * ensureStrictJsonSchema: Ensures a given JSON schema adheres to the strict standard. * resolveRef: Resolves JSON Schema $ref pointers within a schema object. * isDict: Type guard to check if an object is a JSON-style dictionary. * isList: Type guard to check if an object is a list of items. * hasMoreThanNKeys: Checks if a dictionary has more than a specified number of keys. * validateJson: Validates and parses JSON strings using a schema. */ /** * Type guard to check if an object is a JSON-style dictionary. */ export declare function isDict(obj: unknown): obj is Record; /** * Type guard to check if an object is a list of items. */ export declare function isList(obj: unknown): obj is unknown[]; /** * Checks if a dictionary has more than a specified number of keys. */ export declare function hasMoreThanNKeys(obj: Record, n: number): boolean; /** * Ensures a given JSON schema adheres to the strict standard. * * This mutates the given JSON schema to ensure it conforms to the `strict` * standard that the OpenAI API expects. * * @param schema - The JSON schema to make strict. * @returns The strict JSON schema. */ export declare function ensureStrictJsonSchema(schema: Record): Record; /** * Resolves JSON Schema $ref pointers within a schema object. * * @param schema - The schema object to resolve. * @param root - The root schema object for resolving references. * @returns The resolved schema. */ export declare function resolveRef(schema: Record, root: Record): Record; /** * Validates and parses a JSON string using a schema. * * @param jsonStr - The JSON string to validate and parse. * @param schema - The schema to validate against. * @param partial - Whether to allow partial JSON parsing. * @returns The parsed and validated object. */ export declare function validateJson(jsonStr: string, schema: Record): unknown; //# sourceMappingURL=schema.d.ts.map