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

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
@@ -150,12 +150,12 @@ declare const PluginBaseDTOSchema: z.ZodObject<{
150
150
  }, z.core.$strip>>;
151
151
  }, z.core.$strip>;
152
152
  declare const PluginListItemDTOSchema: z.ZodObject<{
153
+ type: z.ZodString;
153
154
  name: z.ZodObject<{
154
155
  en: z.ZodString;
155
156
  "zh-CN": z.ZodOptional<z.ZodString>;
156
157
  "zh-Hant": z.ZodOptional<z.ZodString>;
157
158
  }, z.core.$strip>;
158
- type: z.ZodString;
159
159
  description: z.ZodOptional<z.ZodObject<{
160
160
  en: z.ZodString;
161
161
  "zh-CN": z.ZodOptional<z.ZodString>;
@@ -173,12 +173,12 @@ declare const PluginListItemDTOSchema: z.ZodObject<{
173
173
  source: z.ZodString;
174
174
  }, z.core.$strip>;
175
175
  declare const PluginListDTOSchema: z.ZodArray<z.ZodObject<{
176
+ type: z.ZodString;
176
177
  name: z.ZodObject<{
177
178
  en: z.ZodString;
178
179
  "zh-CN": z.ZodOptional<z.ZodString>;
179
180
  "zh-Hant": z.ZodOptional<z.ZodString>;
180
181
  }, z.core.$strip>;
181
- type: z.ZodString;
182
182
  description: z.ZodOptional<z.ZodObject<{
183
183
  en: z.ZodString;
184
184
  "zh-CN": z.ZodOptional<z.ZodString>;
@@ -249,6 +249,11 @@ declare const PluginPruneDisabledResponseDTOSchema: z.ZodObject<{
249
249
  etag: z.ZodString;
250
250
  }, z.core.$strip>>;
251
251
  }, z.core.$strip>;
252
+ declare const PluginDeleteParamsSchema: z.ZodObject<{
253
+ pluginId: z.ZodString;
254
+ source: z.ZodString;
255
+ version: z.ZodString;
256
+ }, z.core.$strip>;
252
257
  declare const PluginInstallFailureDTOSchema: z.ZodObject<{
253
258
  url: z.ZodString;
254
259
  reason: z.ZodObject<{
@@ -260,6 +265,7 @@ declare const PluginInstallFailureDTOSchema: z.ZodObject<{
260
265
  declare const PluginInstallDTOSchema: {
261
266
  request: z.ZodObject<{
262
267
  urls: z.ZodArray<z.ZodString>;
268
+ source: z.ZodDefault<z.ZodOptional<z.ZodString>>;
263
269
  }, z.core.$strip>;
264
270
  response: z.ZodObject<{
265
271
  failed: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -277,8 +283,8 @@ declare const PluginListParamsSchema: z.ZodObject<{
277
283
  tool: "tool";
278
284
  }>>>>;
279
285
  tags: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
280
- tools: "tools";
281
286
  search: "search";
287
+ tools: "tools";
282
288
  multimodal: "multimodal";
283
289
  communication: "communication";
284
290
  finance: "finance";
@@ -328,6 +334,7 @@ type PluginUploadResponseDTOType = z.infer<typeof PluginUploadResponseDTOSchema>
328
334
  type PluginListDTOType = z.infer<typeof PluginListDTOSchema>;
329
335
  type PluginListItemDTOType = z.infer<typeof PluginListItemDTOSchema>;
330
336
  type PluginPruneDisabledResponseDTOType = z.infer<typeof PluginPruneDisabledResponseDTOSchema>;
337
+ type PluginDeleteParamsDTOType = z.infer<typeof PluginDeleteParamsSchema>;
331
338
  type PluginInstallFailureDTOType = z.infer<typeof PluginInstallFailureDTOSchema>;
332
339
  type PluginInstallResponseDTOType = z.infer<typeof PluginInstallDTOSchema.response>;
333
340
  type PluginListParamsDTOType = z.infer<typeof PluginListParamsSchema>;
@@ -388,12 +395,12 @@ declare const PluginDebugSessionStatusResponseDTOSchema: z$1.ZodObject<{
388
395
  enabled: z$1.ZodBoolean;
389
396
  keyId: z$1.ZodOptional<z$1.ZodString>;
390
397
  plugins: z$1.ZodArray<z$1.ZodObject<{
398
+ type: z$1.ZodString;
391
399
  name: z$1.ZodObject<{
392
400
  en: z$1.ZodString;
393
401
  "zh-CN": z$1.ZodOptional<z$1.ZodString>;
394
402
  "zh-Hant": z$1.ZodOptional<z$1.ZodString>;
395
403
  }, z$1.core.$strip>;
396
- type: z$1.ZodString;
397
404
  description: z$1.ZodOptional<z$1.ZodObject<{
398
405
  en: z$1.ZodString;
399
406
  "zh-CN": z$1.ZodOptional<z$1.ZodString>;
@@ -482,12 +489,12 @@ declare const ToolListItemDTOSchema: z.ZodObject<{
482
489
  source: z.ZodUnion<[z.ZodLiteral<"system">, z.ZodString]>;
483
490
  isToolset: z.ZodBoolean;
484
491
  hasSecret: z.ZodBoolean;
492
+ type: z.ZodLiteral<"tool">;
485
493
  name: z.ZodObject<{
486
494
  en: z.ZodString;
487
495
  "zh-CN": z.ZodOptional<z.ZodString>;
488
496
  "zh-Hant": z.ZodOptional<z.ZodString>;
489
497
  }, z.core.$strip>;
490
- type: z.ZodLiteral<"tool">;
491
498
  description: z.ZodObject<{
492
499
  en: z.ZodString;
493
500
  "zh-CN": z.ZodOptional<z.ZodString>;
@@ -502,8 +509,8 @@ declare const ToolListItemDTOSchema: z.ZodObject<{
502
509
  tutorialUrl: z.ZodOptional<z.ZodURL>;
503
510
  readmeUrl: z.ZodOptional<z.ZodURL>;
504
511
  tags: z.ZodOptional<z.ZodArray<z.ZodEnum<{
505
- tools: "tools";
506
512
  search: "search";
513
+ tools: "tools";
507
514
  multimodal: "multimodal";
508
515
  communication: "communication";
509
516
  finance: "finance";
@@ -536,12 +543,12 @@ declare const ToolListDTOSchema: z.ZodArray<z.ZodObject<{
536
543
  source: z.ZodUnion<[z.ZodLiteral<"system">, z.ZodString]>;
537
544
  isToolset: z.ZodBoolean;
538
545
  hasSecret: z.ZodBoolean;
546
+ type: z.ZodLiteral<"tool">;
539
547
  name: z.ZodObject<{
540
548
  en: z.ZodString;
541
549
  "zh-CN": z.ZodOptional<z.ZodString>;
542
550
  "zh-Hant": z.ZodOptional<z.ZodString>;
543
551
  }, z.core.$strip>;
544
- type: z.ZodLiteral<"tool">;
545
552
  description: z.ZodObject<{
546
553
  en: z.ZodString;
547
554
  "zh-CN": z.ZodOptional<z.ZodString>;
@@ -556,8 +563,8 @@ declare const ToolListDTOSchema: z.ZodArray<z.ZodObject<{
556
563
  tutorialUrl: z.ZodOptional<z.ZodURL>;
557
564
  readmeUrl: z.ZodOptional<z.ZodURL>;
558
565
  tags: z.ZodOptional<z.ZodArray<z.ZodEnum<{
559
- tools: "tools";
560
566
  search: "search";
567
+ tools: "tools";
561
568
  multimodal: "multimodal";
562
569
  communication: "communication";
563
570
  finance: "finance";
@@ -617,8 +624,8 @@ declare const ToolDetailDTOSchema: z.ZodObject<{
617
624
  "zh-Hant": z.ZodOptional<z.ZodString>;
618
625
  }, z.core.$strip>;
619
626
  tags: z.ZodOptional<z.ZodArray<z.ZodEnum<{
620
- tools: "tools";
621
627
  search: "search";
628
+ tools: "tools";
622
629
  multimodal: "multimodal";
623
630
  communication: "communication";
624
631
  finance: "finance";
@@ -653,8 +660,8 @@ declare const ToolGetParamsDTOSchema: z.ZodObject<{
653
660
  type ToolGetParamsDTOType = z.infer<typeof ToolGetParamsDTOSchema>;
654
661
  declare const ToolListParamsDTOSchema: z.ZodObject<{
655
662
  tags: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
656
- tools: "tools";
657
663
  search: "search";
664
+ tools: "tools";
658
665
  multimodal: "multimodal";
659
666
  communication: "communication";
660
667
  finance: "finance";
@@ -929,8 +936,8 @@ declare const ToolSchema: z$1.ZodObject<{
929
936
  "zh-Hant": z$1.ZodOptional<z$1.ZodString>;
930
937
  }, z$1.core.$strip>;
931
938
  tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
932
- tools: "tools";
933
939
  search: "search";
940
+ tools: "tools";
934
941
  multimodal: "multimodal";
935
942
  communication: "communication";
936
943
  finance: "finance";
@@ -959,8 +966,8 @@ type ToolType = z$1.output<typeof ToolSchema>;
959
966
  //#endregion
960
967
  //#region ../../packages/domain/src/entities/plugin-base.entity.d.ts
961
968
  declare const PluginTagSchema: z$1.ZodEnum<{
962
- tools: "tools";
963
969
  search: "search";
970
+ tools: "tools";
964
971
  multimodal: "multimodal";
965
972
  communication: "communication";
966
973
  finance: "finance";
@@ -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 {
@@ -1140,9 +1151,10 @@ declare class FastGPTPluginClient {
1140
1151
  file: Blob;
1141
1152
  filename?: string;
1142
1153
  })[], requestOptions?: ClientRequestOptions): Promise<PluginUploadResultType>;
1143
- confirmPlugin(uniqueIds: PluginUniqueIdType[], requestOptions?: ClientRequestOptions): Promise<void>;
1154
+ confirmPlugin(uniqueIds: PluginUniqueIdType[], requestOptions?: PluginSourceRequestOptions): Promise<void>;
1144
1155
  pruneDisabledPlugins(requestOptions?: ClientRequestOptions): Promise<PluginPruneDisabledResultType>;
1145
- installPlugins(urls: string[], requestOptions?: ClientRequestOptions): Promise<PluginInstallResultType>;
1156
+ installPlugins(urls: string[], requestOptions?: PluginSourceRequestOptions): Promise<PluginInstallResultType>;
1157
+ deletePlugin(params: PluginDeleteParamsType, requestOptions?: ClientRequestOptions): Promise<void>;
1146
1158
  listPlugins(params?: PluginListParamsType, requestOptions?: ClientRequestOptions): Promise<PluginListType>;
1147
1159
  listPluginVersions(params: PluginVersionListParamsType, requestOptions?: ClientRequestOptions): Promise<PluginVersionListType>;
1148
1160
  listPluginTags(_requestOptions?: ClientRequestOptions): Promise<PluginTagListType>;
@@ -1253,5 +1265,5 @@ type AIProxyChannelsType = {
1253
1265
  avatar: string;
1254
1266
  }[];
1255
1267
  //#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 };
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 };
1257
1269
  //# sourceMappingURL=index.d.ts.map