wrekenfile-converter
Version:
Convert OpenAPI and Postman specs to Wrekenfile format with mini-chunking for vector DB storage
12 lines (11 loc) • 1.04 kB
TypeScript
type Primitive = 'STRING' | 'INT' | 'FLOAT' | 'BOOL' | 'TIMESTAMP' | 'DATE' | 'ANY' | 'UUID';
declare function mapType(value: any): Primitive;
declare function parseJsonExample(jsonStr: string): any;
declare function extractFieldsFromObject(obj: any, depth?: number, prefix?: string): any[];
declare function loadEnvironmentFile(envPath: string): Record<string, string>;
declare function extractCollectionVariables(collection: any): Record<string, string>;
declare function resolveVariables(value: string, variables: Record<string, string>): string;
declare function extractStructs(collection: any, variables: Record<string, string>): Record<string, any[]>;
declare function extractOperations(collection: any, variables: Record<string, string>): any[];
declare function generateWrekenfile(collection: any, variables: Record<string, string>): string;
export { generateWrekenfile, extractStructs, extractOperations, mapType, parseJsonExample, extractFieldsFromObject, loadEnvironmentFile, extractCollectionVariables, resolveVariables, };