diff --git a/declarations.d.ts b/declarations.d.ts new file mode 100644 index 0000000..a4b35d7 --- /dev/null +++ b/declarations.d.ts @@ -0,0 +1,46 @@ +/** + * Module declarations for packages not yet published. + * Remove entries as packages become available on Verdaccio. + */ + +declare module '@lilith/database-snapshot-tools' { + export interface DatabaseConfig { + host: string; + port: number; + database: string; + username: string; + password?: string; + schema: string; + } + + export enum SnapshotFormat { + SQL = 'sql', + JSON = 'json', + Markdown = 'markdown', + } + + export interface SnapshotOptions { + format: SnapshotFormat; + outputPath: string; + includeTimescaleDB?: boolean; + includeViews?: boolean; + includeFunctions?: boolean; + includeIndexes?: boolean; + } + + export interface SnapshotResult { + success: boolean; + error?: string; + metadata: { + tableCount: number; + totalIndexes: number; + }; + } + + export function generatePgDumpSnapshot( + config: DatabaseConfig, + options: SnapshotOptions, + ): Promise; + + export function validatePgDumpAvailable(): Promise; +}