mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
v4.6.2-alpah (#511)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { ModuleTemplateTypeEnum } from '../module/constants';
|
||||
import { ModuleItemType } from '../module/type';
|
||||
|
||||
export const defaultModules: ModuleItemType[] = [
|
||||
{
|
||||
moduleId: 'fph4s3',
|
||||
moduleId: 'custom-output',
|
||||
name: '自定义输出',
|
||||
flowType: 'pluginOutput',
|
||||
showStatus: false,
|
||||
@@ -14,7 +15,7 @@ export const defaultModules: ModuleItemType[] = [
|
||||
outputs: []
|
||||
},
|
||||
{
|
||||
moduleId: 'w09v30',
|
||||
moduleId: 'custom-input',
|
||||
name: '自定义输入',
|
||||
flowType: 'pluginInput',
|
||||
showStatus: false,
|
||||
@@ -26,3 +27,14 @@ export const defaultModules: ModuleItemType[] = [
|
||||
outputs: []
|
||||
}
|
||||
];
|
||||
|
||||
export enum PluginTypeEnum {
|
||||
personal = 'personal',
|
||||
community = 'community',
|
||||
commercial = 'commercial'
|
||||
}
|
||||
export const PluginType2TemplateTypeMap = {
|
||||
[PluginTypeEnum.personal]: ModuleTemplateTypeEnum.personalPlugin,
|
||||
[PluginTypeEnum.community]: ModuleTemplateTypeEnum.communityPlugin,
|
||||
[PluginTypeEnum.commercial]: ModuleTemplateTypeEnum.commercialPlugin
|
||||
};
|
||||
|
13
packages/global/core/plugin/type.d.ts
vendored
13
packages/global/core/plugin/type.d.ts
vendored
@@ -1,4 +1,6 @@
|
||||
import { ModuleTemplateTypeEnum } from 'core/module/constants';
|
||||
import type { ModuleItemType } from '../module/type.d';
|
||||
import { PluginTypeEnum } from './constants';
|
||||
|
||||
export type PluginItemSchema = {
|
||||
_id: string;
|
||||
@@ -11,3 +13,14 @@ export type PluginItemSchema = {
|
||||
updateTime: Date;
|
||||
modules: ModuleItemType[];
|
||||
};
|
||||
|
||||
/* plugin template */
|
||||
export type PluginTemplateType = {
|
||||
id: string;
|
||||
type: `${PluginTypeEnum}`;
|
||||
name: string;
|
||||
avatar: string;
|
||||
intro: string;
|
||||
modules: ModuleItemType[];
|
||||
templateType?: `${ModuleTemplateTypeEnum}`;
|
||||
};
|
||||
|
Reference in New Issue
Block a user