mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 14:56:01 +00:00
51 lines
1.1 KiB
TypeScript
51 lines
1.1 KiB
TypeScript
import { EngineDriver } from './engines';
|
|
|
|
export interface FileFormatDefinition {
|
|
storageType: string;
|
|
extension: string;
|
|
extensions?: string[];
|
|
name: string;
|
|
readerFunc?: string;
|
|
writerFunc?: string;
|
|
args?: any[];
|
|
addFileToSourceList?: (
|
|
file: {
|
|
fileName: string;
|
|
shortName: string;
|
|
},
|
|
newSources: string[],
|
|
newValues: {
|
|
[key: string]: any;
|
|
}
|
|
) => void;
|
|
getDefaultOutputName?: (sourceName, values) => string;
|
|
getOutputParams?: (sourceName, values) => any;
|
|
}
|
|
|
|
export interface ThemeDefinition {
|
|
themeClassName: string;
|
|
themeName: string;
|
|
themeType: 'light' | 'dark';
|
|
themeCss?: string;
|
|
}
|
|
|
|
export interface PluginDefinition {
|
|
packageName: string;
|
|
manifest: any;
|
|
content: any;
|
|
}
|
|
|
|
export interface QuickExportDefinition {
|
|
label: string;
|
|
createWriter: (fileName: string) => { functionName: string; props: any };
|
|
extension: string;
|
|
}
|
|
|
|
export interface ExtensionsDirectory {
|
|
plugins: PluginDefinition[];
|
|
fileFormats: FileFormatDefinition[];
|
|
quickExports: QuickExportDefinition[];
|
|
drivers: EngineDriver[];
|
|
themes: ThemeDefinition[];
|
|
}
|