import { RelationalDatabaseSchema } from "./databaseSchema.model"; export declare enum DataSourceType { postgres = "postgres", mysql = "mysql", mariadb = "mariadb", mssql = "mssql", mongodb = "mongodb", sqlite = "sqlite", firebase = "firebase" } export declare enum DataSourceAdapterType { knex_pg = "knex_pg",// PostgreSQL knex_mysql2 = "knex_mysql2",// MySQL, MariaDB knex_tedious = "knex_tedious",// MSSQL knex_better_sqlite3 = "knex_better_sqlite3" } export interface DataSourceTypeInfo { type: DataSourceType; name: string; icon: string; isActive: boolean; bgColor?: string; } declare enum DataSourceStatus { idle = "idle", loading = "loading", loaded = "loaded", error = "error" } export interface DataSource { type: DataSourceType; name: string; adapter: T; tablesConfig: DataSourceTablesConfig; status: keyof typeof DataSourceStatus; databaseSchemas?: string[]; } export interface PublicDataSource extends Omit { name: string; adapterType: DataSourceAdapterType; databaseSchema?: RelationalDatabaseSchema; } export type DataSourceTablesConfig = Record; export type DataSourceTableConfig = { /** Exclude the table */ excluded?: boolean; /** Include the table */ included?: boolean; /** Exclude the columns */ excludedColumns?: string[]; /** Forbid insertions on the table */ preventInsert?: boolean; /** Forbid updates on the table */ preventUpdate?: boolean; /** Forbid deletions on the table */ preventDelete?: boolean; }; export {};