From cd03795f2c98833cf07f4704f655b21cea882883 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 8 Oct 2024 15:44:52 +0800 Subject: [PATCH] chore: add endpoint types --- web/app/components/plugins/types.ts | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index f01eab6357..47eb6331c0 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -1,30 +1,11 @@ +import type { CredentialFormSchemaBase } from '../header/account-setting/model-provider-page/declarations' + 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 @@ -43,5 +24,8 @@ export type Plugin = { 'introduction': string 'repository': string 'category': string - 'endpoint': Endpoint + 'install_count': number + 'endpoint': { + settings: CredentialFormSchemaBase[] + } }