50 lines
1.0 KiB
TypeScript
50 lines
1.0 KiB
TypeScript
|
import { RouteConfig } from 'vue-router';
|
||
|
import { Module } from 'vuex';
|
||
|
import { StateInterface } from 'src/store';
|
||
|
declare namespace FG_Plugin {
|
||
|
interface ShortCutLink {
|
||
|
link: string;
|
||
|
icon: string;
|
||
|
}
|
||
|
|
||
|
interface PluginRouteConfig extends RouteConfig {
|
||
|
shortcut?: boolean;
|
||
|
title: string;
|
||
|
icon: string;
|
||
|
children?: PluginRouteConfig[];
|
||
|
}
|
||
|
|
||
|
interface Plugin {
|
||
|
name: string;
|
||
|
mainRoutes?: PluginRouteConfig[];
|
||
|
outRoutes?: PluginRouteConfig[];
|
||
|
store?: Map<string, Module<any, StateInterface>>;
|
||
|
requiredModules: string[];
|
||
|
version: string;
|
||
|
}
|
||
|
|
||
|
interface PluginMainLink extends PluginChildLink {
|
||
|
children: PluginChildLink[];
|
||
|
}
|
||
|
|
||
|
interface PluginChildLink {
|
||
|
name: string;
|
||
|
title: string;
|
||
|
link: string;
|
||
|
icon: string;
|
||
|
}
|
||
|
|
||
|
interface LoadedPlugin {
|
||
|
name: string;
|
||
|
version: string;
|
||
|
}
|
||
|
|
||
|
interface LoadedPlugins {
|
||
|
plugins: LoadedPlugin[];
|
||
|
routes: RouteConfig[];
|
||
|
mainLinks: PluginMainLink[];
|
||
|
shortcuts: ShortCutLink[];
|
||
|
shortcutsOut: ShortCutLink[];
|
||
|
}
|
||
|
}
|