feat(ui): list plugins

This commit is contained in:
Junyan Qin
2025-07-13 22:03:47 +08:00
parent 65814a4644
commit 4380041c7f
5 changed files with 79 additions and 30 deletions
+17 -16
View File
@@ -2,6 +2,7 @@ import { IDynamicFormItemSchema } from '@/app/infra/entities/form/dynamic';
import { PipelineConfigTab } from '@/app/infra/entities/pipeline';
import { I18nLabel } from '@/app/infra/entities/common';
import { Message } from '@/app/infra/entities/message';
import { Plugin } from '@/app/infra/entities/plugin';
export interface ApiResponse<T> {
code: number;
@@ -119,22 +120,22 @@ export interface ApiRespPlugin {
plugin: Plugin;
}
export interface Plugin {
author: string;
name: string;
description: I18nLabel;
label: I18nLabel;
version: string;
enabled: boolean;
priority: number;
status: string;
tools: object[];
event_handlers: object;
main_file: string;
pkg_path: string;
repository: string;
config_schema: IDynamicFormItemSchema[];
}
// export interface Plugin {
// author: string;
// name: string;
// description: I18nLabel;
// label: I18nLabel;
// version: string;
// enabled: boolean;
// priority: number;
// status: string;
// tools: object[];
// event_handlers: object;
// main_file: string;
// pkg_path: string;
// repository: string;
// config_schema: IDynamicFormItemSchema[];
// }
export interface ApiRespPluginConfig {
config: object;
+15
View File
@@ -3,3 +3,18 @@ export interface I18nLabel {
zh_Hans: string;
ja_JP?: string;
}
export interface ComponentManifest {
apiVersion: string;
kind: string;
metadata: {
name: string;
label: I18nLabel;
description?: I18nLabel;
icon?: string;
repository?: string;
version?: string;
author?: string;
};
spec: object;
}
@@ -0,0 +1,17 @@
import { ComponentManifest } from '@/app/infra/entities/common';
export interface Plugin {
status: 'intialized' | 'mounted' | 'unmounted';
priority: number;
plugin_config: object;
manifest: {
manifest: ComponentManifest;
};
enabled: boolean;
components: {
component_config: object;
manifest: {
manifest: ComponentManifest;
};
};
}