From 36f8b5711d1c812c8ee3a216df6350141bf8f010 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 30 Sep 2024 15:29:53 +0800 Subject: [PATCH] feat: plugin types --- web/app/components/plugins/types.ts | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 web/app/components/plugins/types.ts diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts new file mode 100644 index 0000000000..f01eab6357 --- /dev/null +++ b/web/app/components/plugins/types.ts @@ -0,0 +1,47 @@ +export enum PluginType { + plugin = 'plugin', + model = 'model', + extension = 'Extension', +} + +export type Endpoint = { + 'api_key': { + 'default': null + 'helper': null + 'label': { + 'en_US': string + 'zh_Hans': string + } + 'name': '' + 'options': null + 'placeholder': { + 'en_US': string + 'zh_Hans': string + } + 'required': true + 'scope': null + 'type': string + 'url': null + } +} + +export type Plugin = { + 'type': PluginType + 'org': string + 'name': string + 'latest_version': string + 'icon': string + 'label': { + 'en_US': string + 'zh_Hans': string + } + 'brief': { + 'en_US': string + 'zh_Hans': string + } + // Repo readme.md content + 'introduction': string + 'repository': string + 'category': string + 'endpoint': Endpoint +}