@fastgpt-plugin/sdk-client 0.1.0-alpha.2 → 0.1.0-alpha.4

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 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.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>;
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>;
@@ -150,12 +169,12 @@ declare const PluginBaseDTOSchema: z.ZodObject<{
150
169
  }, z.core.$strip>>;
151
170
  }, z.core.$strip>;
152
171
  declare const PluginListItemDTOSchema: z.ZodObject<{
172
+ type: z.ZodString;
153
173
  name: z.ZodObject<{
154
174
  en: z.ZodString;
155
175
  "zh-CN": z.ZodOptional<z.ZodString>;
156
176
  "zh-Hant": z.ZodOptional<z.ZodString>;
157
177
  }, z.core.$strip>;
158
- type: z.ZodString;
159
178
  description: z.ZodOptional<z.ZodObject<{
160
179
  en: z.ZodString;
161
180
  "zh-CN": z.ZodOptional<z.ZodString>;
@@ -173,12 +192,12 @@ declare const PluginListItemDTOSchema: z.ZodObject<{
173
192
  source: z.ZodString;
174
193
  }, z.core.$strip>;
175
194
  declare const PluginListDTOSchema: z.ZodArray<z.ZodObject<{
195
+ type: z.ZodString;
176
196
  name: z.ZodObject<{
177
197
  en: z.ZodString;
178
198
  "zh-CN": z.ZodOptional<z.ZodString>;
179
199
  "zh-Hant": z.ZodOptional<z.ZodString>;
180
200
  }, z.core.$strip>;
181
- type: z.ZodString;
182
201
  description: z.ZodOptional<z.ZodObject<{
183
202
  en: z.ZodString;
184
203
  "zh-CN": z.ZodOptional<z.ZodString>;
@@ -249,6 +268,11 @@ declare const PluginPruneDisabledResponseDTOSchema: z.ZodObject<{
249
268
  etag: z.ZodString;
250
269
  }, z.core.$strip>>;
251
270
  }, z.core.$strip>;
271
+ declare const PluginDeleteParamsSchema: z.ZodObject<{
272
+ pluginId: z.ZodString;
273
+ source: z.ZodString;
274
+ version: z.ZodString;
275
+ }, z.core.$strip>;
252
276
  declare const PluginInstallFailureDTOSchema: z.ZodObject<{
253
277
  url: z.ZodString;
254
278
  reason: z.ZodObject<{
@@ -260,6 +284,7 @@ declare const PluginInstallFailureDTOSchema: z.ZodObject<{
260
284
  declare const PluginInstallDTOSchema: {
261
285
  request: z.ZodObject<{
262
286
  urls: z.ZodArray<z.ZodString>;
287
+ source: z.ZodDefault<z.ZodOptional<z.ZodString>>;
263
288
  }, z.core.$strip>;
264
289
  response: z.ZodObject<{
265
290
  failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -277,8 +302,8 @@ declare const PluginListParamsSchema: z.ZodObject<{
277
302
  tool: "tool";
278
303
  }>>>>;
279
304
  tags: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
280
- tools: "tools";
281
305
  search: "search";
306
+ tools: "tools";
282
307
  multimodal: "multimodal";
283
308
  communication: "communication";
284
309
  finance: "finance";
@@ -328,6 +353,7 @@ type PluginUploadResponseDTOType = z.infer<typeof PluginUploadResponseDTOSchema>
328
353
  type PluginListDTOType = z.infer<typeof PluginListDTOSchema>;
329
354
  type PluginListItemDTOType = z.infer<typeof PluginListItemDTOSchema>;
330
355
  type PluginPruneDisabledResponseDTOType = z.infer<typeof PluginPruneDisabledResponseDTOSchema>;
356
+ type PluginDeleteParamsDTOType = z.infer<typeof PluginDeleteParamsSchema>;
331
357
  type PluginInstallFailureDTOType = z.infer<typeof PluginInstallFailureDTOSchema>;
332
358
  type PluginInstallResponseDTOType = z.infer<typeof PluginInstallDTOSchema.response>;
333
359
  type PluginListParamsDTOType = z.infer<typeof PluginListParamsSchema>;
@@ -388,12 +414,12 @@ declare const PluginDebugSessionStatusResponseDTOSchema: z$1.ZodObject<{
388
414
  enabled: z$1.ZodBoolean;
389
415
  keyId: z$1.ZodOptional<z$1.ZodString>;
390
416
  plugins: z$1.ZodArray<z$1.ZodObject<{
417
+ type: z$1.ZodString;
391
418
  name: z$1.ZodObject<{
392
419
  en: z$1.ZodString;
393
420
  "zh-CN": z$1.ZodOptional<z$1.ZodString>;
394
421
  "zh-Hant": z$1.ZodOptional<z$1.ZodString>;
395
422
  }, z$1.core.$strip>;
396
- type: z$1.ZodString;
397
423
  description: z$1.ZodOptional<z$1.ZodObject<{
398
424
  en: z$1.ZodString;
399
425
  "zh-CN": z$1.ZodOptional<z$1.ZodString>;
@@ -482,12 +508,12 @@ declare const ToolListItemDTOSchema: z.ZodObject<{
482
508
  source: z.ZodUnion<[z.ZodLiteral<"system">, z.ZodString]>;
483
509
  isToolset: z.ZodBoolean;
484
510
  hasSecret: z.ZodBoolean;
511
+ type: z.ZodLiteral<"tool">;
485
512
  name: z.ZodObject<{
486
513
  en: z.ZodString;
487
514
  "zh-CN": z.ZodOptional<z.ZodString>;
488
515
  "zh-Hant": z.ZodOptional<z.ZodString>;
489
516
  }, z.core.$strip>;
490
- type: z.ZodLiteral<"tool">;
491
517
  description: z.ZodObject<{
492
518
  en: z.ZodString;
493
519
  "zh-CN": z.ZodOptional<z.ZodString>;
@@ -502,8 +528,8 @@ declare const ToolListItemDTOSchema: z.ZodObject<{
502
528
  tutorialUrl: z.ZodOptional<z.ZodURL>;
503
529
  readmeUrl: z.ZodOptional<z.ZodURL>;
504
530
  tags: z.ZodOptional<z.ZodArray<z.ZodEnum<{
505
- tools: "tools";
506
531
  search: "search";
532
+ tools: "tools";
507
533
  multimodal: "multimodal";
508
534
  communication: "communication";
509
535
  finance: "finance";
@@ -536,12 +562,12 @@ declare const ToolListDTOSchema: z.ZodArray<z.ZodObject<{
536
562
  source: z.ZodUnion<[z.ZodLiteral<"system">, z.ZodString]>;
537
563
  isToolset: z.ZodBoolean;
538
564
  hasSecret: z.ZodBoolean;
565
+ type: z.ZodLiteral<"tool">;
539
566
  name: z.ZodObject<{
540
567
  en: z.ZodString;
541
568
  "zh-CN": z.ZodOptional<z.ZodString>;
542
569
  "zh-Hant": z.ZodOptional<z.ZodString>;
543
570
  }, z.core.$strip>;
544
- type: z.ZodLiteral<"tool">;
545
571
  description: z.ZodObject<{
546
572
  en: z.ZodString;
547
573
  "zh-CN": z.ZodOptional<z.ZodString>;
@@ -556,8 +582,8 @@ declare const ToolListDTOSchema: z.ZodArray<z.ZodObject<{
556
582
  tutorialUrl: z.ZodOptional<z.ZodURL>;
557
583
  readmeUrl: z.ZodOptional<z.ZodURL>;
558
584
  tags: z.ZodOptional<z.ZodArray<z.ZodEnum<{
559
- tools: "tools";
560
585
  search: "search";
586
+ tools: "tools";
561
587
  multimodal: "multimodal";
562
588
  communication: "communication";
563
589
  finance: "finance";
@@ -617,8 +643,8 @@ declare const ToolDetailDTOSchema: z.ZodObject<{
617
643
  "zh-Hant": z.ZodOptional<z.ZodString>;
618
644
  }, z.core.$strip>;
619
645
  tags: z.ZodOptional<z.ZodArray<z.ZodEnum<{
620
- tools: "tools";
621
646
  search: "search";
647
+ tools: "tools";
622
648
  multimodal: "multimodal";
623
649
  communication: "communication";
624
650
  finance: "finance";
@@ -653,8 +679,8 @@ declare const ToolGetParamsDTOSchema: z.ZodObject<{
653
679
  type ToolGetParamsDTOType = z.infer<typeof ToolGetParamsDTOSchema>;
654
680
  declare const ToolListParamsDTOSchema: z.ZodObject<{
655
681
  tags: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
656
- tools: "tools";
657
682
  search: "search";
683
+ tools: "tools";
658
684
  multimodal: "multimodal";
659
685
  communication: "communication";
660
686
  finance: "finance";
@@ -728,7 +754,7 @@ declare const LLMModelItemSchema: z$1.ZodObject<{
728
754
  maxContext: z$1.ZodNumber;
729
755
  maxTokens: z$1.ZodNumber;
730
756
  quoteMaxToken: z$1.ZodNumber;
731
- maxTemperature: z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodNull]>;
757
+ maxTemperature: z$1.ZodOptional<z$1.ZodNumber>;
732
758
  showTopP: z$1.ZodOptional<z$1.ZodBoolean>;
733
759
  responseFormatList: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
734
760
  showStopSign: z$1.ZodOptional<z$1.ZodBoolean>;
@@ -813,7 +839,7 @@ declare const ModelItemSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
813
839
  maxContext: z$1.ZodNumber;
814
840
  maxTokens: z$1.ZodNumber;
815
841
  quoteMaxToken: z$1.ZodNumber;
816
- maxTemperature: z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodNull]>;
842
+ maxTemperature: z$1.ZodOptional<z$1.ZodNumber>;
817
843
  showTopP: z$1.ZodOptional<z$1.ZodBoolean>;
818
844
  responseFormatList: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
819
845
  showStopSign: z$1.ZodOptional<z$1.ZodBoolean>;
@@ -929,8 +955,8 @@ declare const ToolSchema: z$1.ZodObject<{
929
955
  "zh-Hant": z$1.ZodOptional<z$1.ZodString>;
930
956
  }, z$1.core.$strip>;
931
957
  tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
932
- tools: "tools";
933
958
  search: "search";
959
+ tools: "tools";
934
960
  multimodal: "multimodal";
935
961
  communication: "communication";
936
962
  finance: "finance";
@@ -959,8 +985,8 @@ type ToolType = z$1.output<typeof ToolSchema>;
959
985
  //#endregion
960
986
  //#region ../../packages/domain/src/entities/plugin-base.entity.d.ts
961
987
  declare const PluginTagSchema: z$1.ZodEnum<{
962
- tools: "tools";
963
988
  search: "search";
989
+ tools: "tools";
964
990
  multimodal: "multimodal";
965
991
  communication: "communication";
966
992
  finance: "finance";
@@ -995,25 +1021,6 @@ declare const I18nStringStrictSchema: z$1.ZodObject<{
995
1021
  }, z$1.core.$strip>;
996
1022
  type I18nStringStrictType = z$1.infer<typeof I18nStringStrictSchema>;
997
1023
  //#endregion
998
- //#region ../../packages/domain/src/value-objects/plugin.vo.d.ts
999
- declare const PluginUniqueIdSchema: z$1.ZodObject<{
1000
- pluginId: z$1.ZodString;
1001
- version: z$1.ZodString;
1002
- etag: z$1.ZodString;
1003
- }, z$1.core.$strip>;
1004
- type PluginUniqueIdType = z$1.infer<typeof PluginUniqueIdSchema>;
1005
- declare const PluginSourceSchema: z$1.ZodUnion<[z$1.ZodLiteral<"system">, z$1.ZodString]>;
1006
- type PluginSourceType = z$1.infer<typeof PluginSourceSchema>;
1007
- declare const PluginTagListSchema: z$1.ZodArray<z$1.ZodObject<{
1008
- id: z$1.ZodString;
1009
- name: z$1.ZodObject<{
1010
- en: z$1.ZodString;
1011
- "zh-CN": z$1.ZodString;
1012
- "zh-Hant": z$1.ZodString;
1013
- }, z$1.core.$strip>;
1014
- }, z$1.core.$strip>>;
1015
- type PluginTagListType = z$1.infer<typeof PluginTagListSchema>;
1016
- //#endregion
1017
1024
  //#region ../../packages/domain/src/value-objects/system-var.vo.d.ts
1018
1025
  declare const SystemVarSchema: z$1.ZodObject<{
1019
1026
  app: z$1.ZodObject<{
@@ -1090,6 +1097,7 @@ type PluginListItemType = PluginListItemDTOType;
1090
1097
  type PluginListParamsType = Partial<PluginListParamsDTOType>;
1091
1098
  type PluginInstallFailureType = PluginInstallFailureDTOType;
1092
1099
  type PluginInstallResultType = PluginInstallResponseDTOType;
1100
+ type PluginDeleteParamsType = PluginDeleteParamsDTOType;
1093
1101
  type PluginUploadFailureType = PluginUploadFailureDTOType;
1094
1102
  type PluginTagListItemType = PluginTagListType[number];
1095
1103
  type PluginPruneDisabledResultType = PluginPruneDisabledResponseDTOType;
@@ -1125,6 +1133,9 @@ type FastGPTPluginClientOptions = {
1125
1133
  type ClientRequestOptions = {
1126
1134
  signal?: AbortSignal;
1127
1135
  };
1136
+ type PluginSourceRequestOptions = ClientRequestOptions & {
1137
+ source?: PluginSourceType;
1138
+ };
1128
1139
  //#endregion
1129
1140
  //#region src/client.d.ts
1130
1141
  declare class FastGPTPluginClient {
@@ -1139,10 +1150,13 @@ declare class FastGPTPluginClient {
1139
1150
  uploadPlugin(files: (Blob | {
1140
1151
  file: Blob;
1141
1152
  filename?: string;
1142
- })[], requestOptions?: ClientRequestOptions): Promise<PluginUploadResultType>;
1143
- confirmPlugin(uniqueIds: PluginUniqueIdType[], requestOptions?: ClientRequestOptions): Promise<void>;
1153
+ })[], requestOptions?: ClientRequestOptions & {
1154
+ source?: PluginSourceType;
1155
+ }): Promise<PluginUploadResultType>;
1156
+ confirmPlugin(uniqueIds: PluginUniqueIdType[], requestOptions?: PluginSourceRequestOptions): Promise<void>;
1144
1157
  pruneDisabledPlugins(requestOptions?: ClientRequestOptions): Promise<PluginPruneDisabledResultType>;
1145
- installPlugins(urls: string[], requestOptions?: ClientRequestOptions): Promise<PluginInstallResultType>;
1158
+ installPlugins(urls: string[], requestOptions?: PluginSourceRequestOptions): Promise<PluginInstallResultType>;
1159
+ deletePlugin(params: PluginDeleteParamsType, requestOptions?: ClientRequestOptions): Promise<void>;
1146
1160
  listPlugins(params?: PluginListParamsType, requestOptions?: ClientRequestOptions): Promise<PluginListType>;
1147
1161
  listPluginVersions(params: PluginVersionListParamsType, requestOptions?: ClientRequestOptions): Promise<PluginVersionListType>;
1148
1162
  listPluginTags(_requestOptions?: ClientRequestOptions): Promise<PluginTagListType>;
@@ -1253,5 +1267,5 @@ type AIProxyChannelsType = {
1253
1267
  avatar: string;
1254
1268
  }[];
1255
1269
  //#endregion
1256
- 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 PluginInstallFailureType, type PluginInstallResultType, type PluginListItemType, type PluginListParamsType, type PluginListType, PluginPermissionEnum, PluginPermissionEnumSchema, type PluginPermissionEnumType, type PluginPruneDisabledResultType, type PluginRuntimeConfigType, type PluginServiceFeaturesType, 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 };
1270
+ 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 };
1257
1271
  //# sourceMappingURL=index.d.ts.map