/** * Database Schema Extractor * * Parses ORM schema definitions from source files using regex-based analysis. * Supports Prisma, TypeORM, Drizzle ORM, and SQLAlchemy. * * Audit fields (createdAt, updatedAt, created_at, updated_at, deletedAt, * deleted_at) are excluded from field lists to keep output concise. * * Uses regex-based analysis without requiring tree-sitter. */ export interface SchemaField { name: string; type: string; nullable: boolean; } export type OrmType = 'prisma' | 'typeorm' | 'drizzle' | 'sqlalchemy' | 'jpa' | 'unknown'; export interface SchemaTable { /** Model / table name */ name: string; /** Path relative to project root */ file: string; /** ORM that owns this schema */ orm: OrmType; /** Extracted fields (audit fields excluded) */ fields: SchemaField[]; /** 1-based line of the model declaration */ line: number; } /** * Extract database schema tables from a list of absolute file paths. * * @param filePaths - Absolute paths to source files * @param rootDir - Project root used to compute relative paths in output */ export declare function extractSchemas(filePaths: string[], rootDir: string): Promise; /** * Summarise schema tables by ORM for display / artifact embedding. */ export declare function summarizeSchemas(tables: SchemaTable[]): Record; //# sourceMappingURL=schema-extractor.d.ts.map