46 lines
1,013 B
TypeScript
46 lines
1,013 B
TypeScript
/**
|
|
* 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<SnapshotResult>;
|
|
|
|
export function validatePgDumpAvailable(): Promise<boolean>;
|
|
}
|