UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

20 lines 942 B
import { JSONSchema7 } from 'json-schema'; export declare class JsonUtils { private constructor(); static getJsonSchemaFromTypeName(typeName: string): JSONSchema7 | undefined; static objectToJson(object: any): any; static readResourceAsJson(source: string): unknown; static jsonStringToJsonObject(jsonString: string): any | null; /** * Post-process the given schema to conform with OpenAI constraints * @see https://platform.openai.com/docs/guides/structured-outputs/additionalproperties-false-must-always-be-set-in-objects */ private static postProcessJsonSchema; /** * Ensures the given file path exists. If the file does not initially exist, * all directories to it will be created and the file will be created with a * value of an empty JSON object (AKA {}). */ static maybeInitEmptyJsonFile(filePath: string): Promise<void>; } //# sourceMappingURL=JsonUtils.d.ts.map