Skip to content

Commit b458dde

Browse files
committed
✨ feat: add basic plugin types
1 parent fc8d3fa commit b458dde

File tree

3 files changed

+27
-23
lines changed

3 files changed

+27
-23
lines changed

src/types/index.ts

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,2 @@
1-
export interface PluginItem {
2-
createAt: string;
3-
homepage: string;
4-
meta: Meta;
5-
name: string;
6-
runtime: Runtime;
7-
schema: any;
8-
}
9-
10-
export interface Meta {
11-
avatar: string;
12-
tags: string[];
13-
}
14-
15-
export interface Runtime {
16-
endpoint: string;
17-
render?: string;
18-
}
19-
20-
export interface LobeChatPlugins {
21-
version: 1;
22-
plugins: PluginItem[];
23-
}
1+
export * from './manifest';
2+
export * from './market';

src/types/manifest.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface PluginManifest {
2+
createAt: string;
3+
endpoint: string;
4+
name: string;
5+
render?: string;
6+
7+
schema: any;
8+
}

src/types/market.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export interface PluginItem {
2+
createAt: string;
3+
homepage: string;
4+
manifest: string;
5+
meta: Meta;
6+
name: string;
7+
}
8+
9+
export interface Meta {
10+
avatar: string;
11+
tags: string[];
12+
}
13+
14+
export interface LobeChatPlugins {
15+
plugins: PluginItem[];
16+
version: 1;
17+
}

0 commit comments

Comments
 (0)