@fastgpt-plugin/sdk-client 0.1.0-alpha.3 → 0.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +55 -27
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import z$1, { z } from "zod";
|
|
2
2
|
import { Readable } from "node:stream";
|
|
3
|
+
//#region ../../packages/domain/src/value-objects/plugin.vo.d.ts
|
|
4
|
+
declare const PluginUniqueIdSchema: z$1.ZodObject<{
|
|
5
|
+
pluginId: z$1.ZodString;
|
|
6
|
+
version: z$1.ZodString;
|
|
7
|
+
etag: z$1.ZodString;
|
|
8
|
+
}, z$1.core.$strip>;
|
|
9
|
+
type PluginUniqueIdType = z$1.infer<typeof PluginUniqueIdSchema>;
|
|
10
|
+
declare const PluginSourceSchema: z$1.ZodUnion<[z$1.ZodLiteral<"system">, z$1.ZodString]>;
|
|
11
|
+
type PluginSourceType = z$1.infer<typeof PluginSourceSchema>;
|
|
12
|
+
declare const PluginTagListSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
13
|
+
id: z$1.ZodString;
|
|
14
|
+
name: z$1.ZodObject<{
|
|
15
|
+
en: z$1.ZodString;
|
|
16
|
+
"zh-CN": z$1.ZodString;
|
|
17
|
+
"zh-Hant": z$1.ZodString;
|
|
18
|
+
}, z$1.core.$strip>;
|
|
19
|
+
}, z$1.core.$strip>>;
|
|
20
|
+
type PluginTagListType = z$1.infer<typeof PluginTagListSchema>;
|
|
21
|
+
//#endregion
|
|
3
22
|
//#region ../../packages/interface-adapter/src/contracts/dto/model.dto.d.ts
|
|
4
23
|
declare const ModelListDTOSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
24
|
type: z.ZodLiteral<"llm">;
|
|
6
25
|
maxContext: z.ZodNumber;
|
|
7
26
|
maxTokens: z.ZodNumber;
|
|
8
27
|
quoteMaxToken: z.ZodNumber;
|
|
9
|
-
maxTemperature: z.
|
|
28
|
+
maxTemperature: z.ZodOptional<z.ZodNumber>;
|
|
10
29
|
showTopP: z.ZodOptional<z.ZodBoolean>;
|
|
11
30
|
responseFormatList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
31
|
showStopSign: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -241,6 +260,25 @@ declare const PluginUploadResponseDTOSchema: z.ZodObject<{
|
|
|
241
260
|
}, z.core.$strip>;
|
|
242
261
|
}, z.core.$strip>>>;
|
|
243
262
|
}, z.core.$strip>;
|
|
263
|
+
declare const PluginConfirmResultDTOSchema: z.ZodObject<{
|
|
264
|
+
confirmed: z.ZodArray<z.ZodObject<{
|
|
265
|
+
pluginId: z.ZodString;
|
|
266
|
+
version: z.ZodString;
|
|
267
|
+
etag: z.ZodString;
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
|
+
failed: z.ZodArray<z.ZodObject<{
|
|
270
|
+
uniqueId: z.ZodObject<{
|
|
271
|
+
pluginId: z.ZodString;
|
|
272
|
+
version: z.ZodString;
|
|
273
|
+
etag: z.ZodString;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
reason: z.ZodObject<{
|
|
276
|
+
en: z.ZodString;
|
|
277
|
+
"zh-CN": z.ZodOptional<z.ZodString>;
|
|
278
|
+
"zh-Hant": z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
}, z.core.$strip>>;
|
|
281
|
+
}, z.core.$strip>;
|
|
244
282
|
declare const PluginPruneDisabledResponseDTOSchema: z.ZodObject<{
|
|
245
283
|
count: z.ZodNumber;
|
|
246
284
|
plugins: z.ZodArray<z.ZodObject<{
|
|
@@ -249,11 +287,16 @@ declare const PluginPruneDisabledResponseDTOSchema: z.ZodObject<{
|
|
|
249
287
|
etag: z.ZodString;
|
|
250
288
|
}, z.core.$strip>>;
|
|
251
289
|
}, z.core.$strip>;
|
|
252
|
-
declare const PluginDeleteParamsSchema: z.ZodObject<{
|
|
290
|
+
declare const PluginDeleteParamsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
253
291
|
pluginId: z.ZodString;
|
|
254
292
|
source: z.ZodString;
|
|
255
293
|
version: z.ZodString;
|
|
256
|
-
|
|
294
|
+
scope: z.ZodOptional<z.ZodLiteral<"version">>;
|
|
295
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
296
|
+
pluginId: z.ZodString;
|
|
297
|
+
source: z.ZodString;
|
|
298
|
+
scope: z.ZodLiteral<"allVersions">;
|
|
299
|
+
}, z.core.$strip>]>;
|
|
257
300
|
declare const PluginInstallFailureDTOSchema: z.ZodObject<{
|
|
258
301
|
url: z.ZodString;
|
|
259
302
|
reason: z.ZodObject<{
|
|
@@ -333,6 +376,7 @@ type PluginUploadFailureDTOType = z.infer<typeof PluginUploadFailureDTOSchema>;
|
|
|
333
376
|
type PluginUploadResponseDTOType = z.infer<typeof PluginUploadResponseDTOSchema>;
|
|
334
377
|
type PluginListDTOType = z.infer<typeof PluginListDTOSchema>;
|
|
335
378
|
type PluginListItemDTOType = z.infer<typeof PluginListItemDTOSchema>;
|
|
379
|
+
type PluginConfirmResultDTOType = z.infer<typeof PluginConfirmResultDTOSchema>;
|
|
336
380
|
type PluginPruneDisabledResponseDTOType = z.infer<typeof PluginPruneDisabledResponseDTOSchema>;
|
|
337
381
|
type PluginDeleteParamsDTOType = z.infer<typeof PluginDeleteParamsSchema>;
|
|
338
382
|
type PluginInstallFailureDTOType = z.infer<typeof PluginInstallFailureDTOSchema>;
|
|
@@ -735,7 +779,7 @@ declare const LLMModelItemSchema: z$1.ZodObject<{
|
|
|
735
779
|
maxContext: z$1.ZodNumber;
|
|
736
780
|
maxTokens: z$1.ZodNumber;
|
|
737
781
|
quoteMaxToken: z$1.ZodNumber;
|
|
738
|
-
maxTemperature: z$1.
|
|
782
|
+
maxTemperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
739
783
|
showTopP: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
740
784
|
responseFormatList: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
741
785
|
showStopSign: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -820,7 +864,7 @@ declare const ModelItemSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
|
820
864
|
maxContext: z$1.ZodNumber;
|
|
821
865
|
maxTokens: z$1.ZodNumber;
|
|
822
866
|
quoteMaxToken: z$1.ZodNumber;
|
|
823
|
-
maxTemperature: z$1.
|
|
867
|
+
maxTemperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
824
868
|
showTopP: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
825
869
|
responseFormatList: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
826
870
|
showStopSign: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -1002,25 +1046,6 @@ declare const I18nStringStrictSchema: z$1.ZodObject<{
|
|
|
1002
1046
|
}, z$1.core.$strip>;
|
|
1003
1047
|
type I18nStringStrictType = z$1.infer<typeof I18nStringStrictSchema>;
|
|
1004
1048
|
//#endregion
|
|
1005
|
-
//#region ../../packages/domain/src/value-objects/plugin.vo.d.ts
|
|
1006
|
-
declare const PluginUniqueIdSchema: z$1.ZodObject<{
|
|
1007
|
-
pluginId: z$1.ZodString;
|
|
1008
|
-
version: z$1.ZodString;
|
|
1009
|
-
etag: z$1.ZodString;
|
|
1010
|
-
}, z$1.core.$strip>;
|
|
1011
|
-
type PluginUniqueIdType = z$1.infer<typeof PluginUniqueIdSchema>;
|
|
1012
|
-
declare const PluginSourceSchema: z$1.ZodUnion<[z$1.ZodLiteral<"system">, z$1.ZodString]>;
|
|
1013
|
-
type PluginSourceType = z$1.infer<typeof PluginSourceSchema>;
|
|
1014
|
-
declare const PluginTagListSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1015
|
-
id: z$1.ZodString;
|
|
1016
|
-
name: z$1.ZodObject<{
|
|
1017
|
-
en: z$1.ZodString;
|
|
1018
|
-
"zh-CN": z$1.ZodString;
|
|
1019
|
-
"zh-Hant": z$1.ZodString;
|
|
1020
|
-
}, z$1.core.$strip>;
|
|
1021
|
-
}, z$1.core.$strip>>;
|
|
1022
|
-
type PluginTagListType = z$1.infer<typeof PluginTagListSchema>;
|
|
1023
|
-
//#endregion
|
|
1024
1049
|
//#region ../../packages/domain/src/value-objects/system-var.vo.d.ts
|
|
1025
1050
|
declare const SystemVarSchema: z$1.ZodObject<{
|
|
1026
1051
|
app: z$1.ZodObject<{
|
|
@@ -1098,6 +1123,7 @@ type PluginListParamsType = Partial<PluginListParamsDTOType>;
|
|
|
1098
1123
|
type PluginInstallFailureType = PluginInstallFailureDTOType;
|
|
1099
1124
|
type PluginInstallResultType = PluginInstallResponseDTOType;
|
|
1100
1125
|
type PluginDeleteParamsType = PluginDeleteParamsDTOType;
|
|
1126
|
+
type PluginConfirmResultType = PluginConfirmResultDTOType;
|
|
1101
1127
|
type PluginUploadFailureType = PluginUploadFailureDTOType;
|
|
1102
1128
|
type PluginTagListItemType = PluginTagListType[number];
|
|
1103
1129
|
type PluginPruneDisabledResultType = PluginPruneDisabledResponseDTOType;
|
|
@@ -1150,8 +1176,10 @@ declare class FastGPTPluginClient {
|
|
|
1150
1176
|
uploadPlugin(files: (Blob | {
|
|
1151
1177
|
file: Blob;
|
|
1152
1178
|
filename?: string;
|
|
1153
|
-
})[], requestOptions?: ClientRequestOptions
|
|
1154
|
-
|
|
1179
|
+
})[], requestOptions?: ClientRequestOptions & {
|
|
1180
|
+
source?: PluginSourceType;
|
|
1181
|
+
}): Promise<PluginUploadResultType>;
|
|
1182
|
+
confirmPlugin(uniqueIds: PluginUniqueIdType[], requestOptions?: PluginSourceRequestOptions): Promise<PluginConfirmResultType>;
|
|
1155
1183
|
pruneDisabledPlugins(requestOptions?: ClientRequestOptions): Promise<PluginPruneDisabledResultType>;
|
|
1156
1184
|
installPlugins(urls: string[], requestOptions?: PluginSourceRequestOptions): Promise<PluginInstallResultType>;
|
|
1157
1185
|
deletePlugin(params: PluginDeleteParamsType, requestOptions?: ClientRequestOptions): Promise<void>;
|
|
@@ -1265,5 +1293,5 @@ type AIProxyChannelsType = {
|
|
|
1265
1293
|
avatar: string;
|
|
1266
1294
|
}[];
|
|
1267
1295
|
//#endregion
|
|
1268
|
-
export { type AIProxyChannelsType, type AIProxyChannelItemType as AiproxyMapProviderItemType, type ClientRequestOptions, type EmbeddingModelItemType, FastGPTPluginClient, type FastGPTPluginClientOptions, type I18nStringStrictType, type I18nStringType, type JsonObject, type LLMModelItemType, type ModelItemType, type ModelListType, type ModelProviderItemType, type ModelProviderListType, type ParsePkgParams, type ParsedPkgFile, type ParsedPkgFiles, type PluginDebugSessionConnectionKeyExchangeParamsType, type PluginDebugSessionConnectionKeyExchangeResultType, type PluginDebugSessionCreateParamsType, type PluginDebugSessionCreateResultType, type PluginDebugSessionRevokeParamsType, type PluginDebugSessionRevokeResultType, type PluginDebugSessionStatusParamsType, type PluginDebugSessionStatusResultType, type PluginDebugSessionStatusType, type PluginDeleteParamsType, type PluginInstallFailureType, type PluginInstallResultType, type PluginListItemType, type PluginListParamsType, type PluginListType, PluginPermissionEnum, PluginPermissionEnumSchema, type PluginPermissionEnumType, type PluginPruneDisabledResultType, type PluginRuntimeConfigType, type PluginServiceFeaturesType, type PluginSourceRequestOptions, type PluginSourceType, type PluginSummaryType, type PluginTagListItemType, type PluginTagListType, type PluginTagType, type PluginTypeType, type PluginUniqueIdType, type PluginUploadFailureType, type PluginUploadResultType, type PluginVersionItemType, type PluginVersionListParamsType, type PluginVersionListType, type RerankModelItemType, type RunToolStreamParams, RunToolWithStream, type STTModelItemType, type SystemVarType, type TTSModelItemType, type ToolAnswerType, type ToolDetailType, type ToolGetParamsType, type ToolHandlerReturnType, type ToolListItemType, type ToolListParamsType, type ToolListType, type ToolRunInputType, type ToolStreamMessageType, type WorkflowListType, type WorkflowTemplateType, parsePkg, pluginTagList };
|
|
1296
|
+
export { type AIProxyChannelsType, type AIProxyChannelItemType as AiproxyMapProviderItemType, type ClientRequestOptions, type EmbeddingModelItemType, FastGPTPluginClient, type FastGPTPluginClientOptions, type I18nStringStrictType, type I18nStringType, type JsonObject, type LLMModelItemType, type ModelItemType, type ModelListType, type ModelProviderItemType, type ModelProviderListType, type ParsePkgParams, type ParsedPkgFile, type ParsedPkgFiles, type PluginConfirmResultType, type PluginDebugSessionConnectionKeyExchangeParamsType, type PluginDebugSessionConnectionKeyExchangeResultType, type PluginDebugSessionCreateParamsType, type PluginDebugSessionCreateResultType, type PluginDebugSessionRevokeParamsType, type PluginDebugSessionRevokeResultType, type PluginDebugSessionStatusParamsType, type PluginDebugSessionStatusResultType, type PluginDebugSessionStatusType, type PluginDeleteParamsType, type PluginInstallFailureType, type PluginInstallResultType, type PluginListItemType, type PluginListParamsType, type PluginListType, PluginPermissionEnum, PluginPermissionEnumSchema, type PluginPermissionEnumType, type PluginPruneDisabledResultType, type PluginRuntimeConfigType, type PluginServiceFeaturesType, type PluginSourceRequestOptions, type PluginSourceType, type PluginSummaryType, type PluginTagListItemType, type PluginTagListType, type PluginTagType, type PluginTypeType, type PluginUniqueIdType, type PluginUploadFailureType, type PluginUploadResultType, type PluginVersionItemType, type PluginVersionListParamsType, type PluginVersionListType, type RerankModelItemType, type RunToolStreamParams, RunToolWithStream, type STTModelItemType, type SystemVarType, type TTSModelItemType, type ToolAnswerType, type ToolDetailType, type ToolGetParamsType, type ToolHandlerReturnType, type ToolListItemType, type ToolListParamsType, type ToolListType, type ToolRunInputType, type ToolStreamMessageType, type WorkflowListType, type WorkflowTemplateType, parsePkg, pluginTagList };
|
|
1269
1297
|
//# sourceMappingURL=index.d.ts.map
|