@fastgpt-plugin/helpers 0.0.1-alpha.8 → 0.0.1-alpha.9
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/events/schemas.d.ts
CHANGED
|
@@ -36,17 +36,15 @@ type FileInput = z.infer<typeof FileInputSchema>;
|
|
|
36
36
|
*/
|
|
37
37
|
declare const Cherrio2MdInputSchema: z.ZodObject<{
|
|
38
38
|
fetchUrl: z.ZodURL;
|
|
39
|
-
html: z.ZodString;
|
|
40
39
|
selector: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
41
40
|
}, z.core.$strip>;
|
|
42
|
-
type Cherrio2MdInput = z.
|
|
41
|
+
type Cherrio2MdInput = z.input<typeof Cherrio2MdInputSchema>;
|
|
43
42
|
/**
|
|
44
43
|
* Cheerio 转 Markdown 结果
|
|
45
44
|
*/
|
|
46
45
|
declare const Cherrio2MdResultSchema: z.ZodObject<{
|
|
47
46
|
markdown: z.ZodString;
|
|
48
47
|
title: z.ZodString;
|
|
49
|
-
usedSelector: z.ZodString;
|
|
50
48
|
}, z.core.$strip>;
|
|
51
49
|
type Cherrio2MdResult = z.infer<typeof Cherrio2MdResultSchema>;
|
|
52
50
|
type EventDataType<T extends EventEnumType> = T extends 'file-upload' ? FileInput : T extends 'stream-response' ? StreamDataType : T extends 'html2md' ? {
|
package/dist/events/schemas.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"zod";const t=e.enum([`file-upload`,`stream-response`,`html2md`,`cherrio2md`,`invoke`]),n=t.enum,r=e.object({url:e.url(`Invalid URL format`).optional(),path:e.string().min(1,`File path cannot be empty`).optional(),base64:e.string().min(1,`Base64 data cannot be empty`).optional(),buffer:e.union([e.instanceof(Buffer,{error:`Buffer is required`}),e.instanceof(Uint8Array,{error:`Uint8Array is required`})]).transform(e=>e instanceof Uint8Array&&!(e instanceof Buffer)?Buffer.from(e):e).optional(),defaultFilename:e.string().optional(),prefix:e.string().optional(),keepRawFilename:e.boolean().optional(),contentType:e.string().optional(),expireMins:e.number().optional()}).refine(e=>[e.url,e.path,e.base64,e.buffer].filter(Boolean).length===1&&(!(e.base64||e.buffer)||e.defaultFilename),{error:`Provide exactly one input method. Filename required for base64/buffer inputs.`}),i=e.object({fetchUrl:e.url(`Invalid URL format`),
|
|
1
|
+
import e from"zod";const t=e.enum([`file-upload`,`stream-response`,`html2md`,`cherrio2md`,`invoke`]),n=t.enum,r=e.object({url:e.url(`Invalid URL format`).optional(),path:e.string().min(1,`File path cannot be empty`).optional(),base64:e.string().min(1,`Base64 data cannot be empty`).optional(),buffer:e.union([e.instanceof(Buffer,{error:`Buffer is required`}),e.instanceof(Uint8Array,{error:`Uint8Array is required`})]).transform(e=>e instanceof Uint8Array&&!(e instanceof Buffer)?Buffer.from(e):e).optional(),defaultFilename:e.string().optional(),prefix:e.string().optional(),keepRawFilename:e.boolean().optional(),contentType:e.string().optional(),expireMins:e.number().optional()}).refine(e=>[e.url,e.path,e.base64,e.buffer].filter(Boolean).length===1&&(!(e.base64||e.buffer)||e.defaultFilename),{error:`Provide exactly one input method. Filename required for base64/buffer inputs.`}),i=e.object({fetchUrl:e.url(`Invalid URL format`),selector:e.string().optional().default(`body`)}),a=e.object({markdown:e.string(),title:e.string()});export{i as Cherrio2MdInputSchema,a as Cherrio2MdResultSchema,n as EventEnum,t as EventEnumSchema,r as FileInputSchema};
|
package/dist/tools/helper.d.ts
CHANGED
|
@@ -29,8 +29,8 @@ declare const exportTool: <I, O>({
|
|
|
29
29
|
inputs: {
|
|
30
30
|
key: string;
|
|
31
31
|
label: string;
|
|
32
|
-
renderTypeList: ("
|
|
33
|
-
valueType: "string" | "number" | "boolean" | "object" | "
|
|
32
|
+
renderTypeList: ("custom" | "input" | "hidden" | "reference" | "textarea" | "numberInput" | "switch" | "select" | "multipleSelect" | "JSONEditor" | "addInputParam" | "selectApp" | "customVariable" | "selectLLMModel" | "settingLLMModel" | "selectDataset" | "selectDatasetParamsModal" | "settingDatasetQuotePrompt" | "fileSelect")[];
|
|
33
|
+
valueType: "string" | "number" | "boolean" | "object" | "any" | "selectApp" | "selectDataset" | "arrayString" | "arrayNumber" | "arrayBoolean" | "arrayObject" | "arrayAny" | "chatHistory" | "datasetQuote" | "dynamic";
|
|
34
34
|
referencePlaceholder?: string | undefined;
|
|
35
35
|
placeholder?: string | undefined;
|
|
36
36
|
defaultValue?: any;
|
|
@@ -74,7 +74,7 @@ declare const exportTool: <I, O>({
|
|
|
74
74
|
}[];
|
|
75
75
|
outputs: {
|
|
76
76
|
key: string;
|
|
77
|
-
valueType: "string" | "number" | "boolean" | "object" | "
|
|
77
|
+
valueType: "string" | "number" | "boolean" | "object" | "any" | "selectApp" | "selectDataset" | "arrayString" | "arrayNumber" | "arrayBoolean" | "arrayObject" | "arrayAny" | "chatHistory" | "datasetQuote" | "dynamic";
|
|
78
78
|
id?: string | undefined;
|
|
79
79
|
type?: "hidden" | "dynamic" | "source" | "static" | "error" | undefined;
|
|
80
80
|
valueDesc?: string | undefined;
|
|
@@ -113,7 +113,6 @@ declare const exportTool: <I, O>({
|
|
|
113
113
|
value: string;
|
|
114
114
|
}[] | undefined;
|
|
115
115
|
}[] | undefined;
|
|
116
|
-
parentId?: string | undefined;
|
|
117
116
|
permission?: ("userInfo:read" | "teamInfo:read" | "model:read" | "dataset:read")[] | undefined;
|
|
118
117
|
};
|
|
119
118
|
declare const exportToolSet: ({
|
|
@@ -149,7 +148,6 @@ declare const exportToolSet: ({
|
|
|
149
148
|
value: string;
|
|
150
149
|
}[] | undefined;
|
|
151
150
|
}[] | undefined;
|
|
152
|
-
readmeUrl?: string | undefined;
|
|
153
151
|
permission?: ("userInfo:read" | "teamInfo:read" | "model:read" | "dataset:read")[] | undefined;
|
|
154
152
|
};
|
|
155
153
|
//#endregion
|
|
@@ -2,8 +2,10 @@ import z from "zod";
|
|
|
2
2
|
|
|
3
3
|
//#region src/tools/schemas/fastgpt.d.ts
|
|
4
4
|
declare const FlowNodeInputTypeSchema: z.ZodEnum<{
|
|
5
|
-
|
|
5
|
+
custom: "custom";
|
|
6
6
|
input: "input";
|
|
7
|
+
hidden: "hidden";
|
|
8
|
+
reference: "reference";
|
|
7
9
|
textarea: "textarea";
|
|
8
10
|
numberInput: "numberInput";
|
|
9
11
|
switch: "switch";
|
|
@@ -18,13 +20,13 @@ declare const FlowNodeInputTypeSchema: z.ZodEnum<{
|
|
|
18
20
|
selectDataset: "selectDataset";
|
|
19
21
|
selectDatasetParamsModal: "selectDatasetParamsModal";
|
|
20
22
|
settingDatasetQuotePrompt: "settingDatasetQuotePrompt";
|
|
21
|
-
hidden: "hidden";
|
|
22
|
-
custom: "custom";
|
|
23
23
|
fileSelect: "fileSelect";
|
|
24
24
|
}>;
|
|
25
25
|
declare const FlowNodeInputTypeEnum: {
|
|
26
|
-
|
|
26
|
+
custom: "custom";
|
|
27
27
|
input: "input";
|
|
28
|
+
hidden: "hidden";
|
|
29
|
+
reference: "reference";
|
|
28
30
|
textarea: "textarea";
|
|
29
31
|
numberInput: "numberInput";
|
|
30
32
|
switch: "switch";
|
|
@@ -39,8 +41,6 @@ declare const FlowNodeInputTypeEnum: {
|
|
|
39
41
|
selectDataset: "selectDataset";
|
|
40
42
|
selectDatasetParamsModal: "selectDatasetParamsModal";
|
|
41
43
|
settingDatasetQuotePrompt: "settingDatasetQuotePrompt";
|
|
42
|
-
hidden: "hidden";
|
|
43
|
-
custom: "custom";
|
|
44
44
|
fileSelect: "fileSelect";
|
|
45
45
|
};
|
|
46
46
|
declare const WorkflowIOValueTypeSchema: z.ZodEnum<{
|
|
@@ -48,9 +48,9 @@ declare const WorkflowIOValueTypeSchema: z.ZodEnum<{
|
|
|
48
48
|
number: "number";
|
|
49
49
|
boolean: "boolean";
|
|
50
50
|
object: "object";
|
|
51
|
+
any: "any";
|
|
51
52
|
selectApp: "selectApp";
|
|
52
53
|
selectDataset: "selectDataset";
|
|
53
|
-
any: "any";
|
|
54
54
|
arrayString: "arrayString";
|
|
55
55
|
arrayNumber: "arrayNumber";
|
|
56
56
|
arrayBoolean: "arrayBoolean";
|
|
@@ -65,9 +65,9 @@ declare const WorkflowIOValueTypeEnum: {
|
|
|
65
65
|
number: "number";
|
|
66
66
|
boolean: "boolean";
|
|
67
67
|
object: "object";
|
|
68
|
+
any: "any";
|
|
68
69
|
selectApp: "selectApp";
|
|
69
70
|
selectDataset: "selectDataset";
|
|
70
|
-
any: "any";
|
|
71
71
|
arrayString: "arrayString";
|
|
72
72
|
arrayNumber: "arrayNumber";
|
|
73
73
|
arrayBoolean: "arrayBoolean";
|
|
@@ -130,8 +130,10 @@ declare const InputSchema: z.ZodObject<{
|
|
|
130
130
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
131
131
|
selectedTypeIndex: z.ZodOptional<z.ZodNumber>;
|
|
132
132
|
renderTypeList: z.ZodArray<z.ZodEnum<{
|
|
133
|
-
|
|
133
|
+
custom: "custom";
|
|
134
134
|
input: "input";
|
|
135
|
+
hidden: "hidden";
|
|
136
|
+
reference: "reference";
|
|
135
137
|
textarea: "textarea";
|
|
136
138
|
numberInput: "numberInput";
|
|
137
139
|
switch: "switch";
|
|
@@ -146,8 +148,6 @@ declare const InputSchema: z.ZodObject<{
|
|
|
146
148
|
selectDataset: "selectDataset";
|
|
147
149
|
selectDatasetParamsModal: "selectDatasetParamsModal";
|
|
148
150
|
settingDatasetQuotePrompt: "settingDatasetQuotePrompt";
|
|
149
|
-
hidden: "hidden";
|
|
150
|
-
custom: "custom";
|
|
151
151
|
fileSelect: "fileSelect";
|
|
152
152
|
}>>;
|
|
153
153
|
valueType: z.ZodEnum<{
|
|
@@ -155,9 +155,9 @@ declare const InputSchema: z.ZodObject<{
|
|
|
155
155
|
number: "number";
|
|
156
156
|
boolean: "boolean";
|
|
157
157
|
object: "object";
|
|
158
|
+
any: "any";
|
|
158
159
|
selectApp: "selectApp";
|
|
159
160
|
selectDataset: "selectDataset";
|
|
160
|
-
any: "any";
|
|
161
161
|
arrayString: "arrayString";
|
|
162
162
|
arrayNumber: "arrayNumber";
|
|
163
163
|
arrayBoolean: "arrayBoolean";
|
|
@@ -230,9 +230,9 @@ declare const OutputSchema: z.ZodObject<{
|
|
|
230
230
|
number: "number";
|
|
231
231
|
boolean: "boolean";
|
|
232
232
|
object: "object";
|
|
233
|
+
any: "any";
|
|
233
234
|
selectApp: "selectApp";
|
|
234
235
|
selectDataset: "selectDataset";
|
|
235
|
-
any: "any";
|
|
236
236
|
arrayString: "arrayString";
|
|
237
237
|
arrayNumber: "arrayNumber";
|
|
238
238
|
arrayBoolean: "arrayBoolean";
|
|
@@ -555,17 +555,17 @@ declare const ToolSetSchema: z$1.ZodObject<{
|
|
|
555
555
|
"dataset:read": "dataset:read";
|
|
556
556
|
}>>>;
|
|
557
557
|
}, z$1.core.$strip>>;
|
|
558
|
-
|
|
558
|
+
description: z$1.ZodObject<{
|
|
559
559
|
en: z$1.ZodString;
|
|
560
560
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
561
561
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
562
562
|
}, z$1.core.$strip>;
|
|
563
|
-
|
|
563
|
+
toolDescription: z$1.ZodString;
|
|
564
|
+
name: z$1.ZodObject<{
|
|
564
565
|
en: z$1.ZodString;
|
|
565
566
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
566
567
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
567
568
|
}, z$1.core.$strip>;
|
|
568
|
-
toolDescription: z$1.ZodString;
|
|
569
569
|
tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
570
570
|
tools: "tools";
|
|
571
571
|
search: "search";
|
|
@@ -805,17 +805,17 @@ declare const UnifiedToolSchema: z$1.ZodObject<{
|
|
|
805
805
|
"dataset:read": "dataset:read";
|
|
806
806
|
}>>>;
|
|
807
807
|
}, z$1.core.$strip>>;
|
|
808
|
-
|
|
808
|
+
description: z$1.ZodObject<{
|
|
809
809
|
en: z$1.ZodString;
|
|
810
810
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
811
811
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
812
812
|
}, z$1.core.$strip>;
|
|
813
|
-
|
|
813
|
+
toolDescription: z$1.ZodString;
|
|
814
|
+
name: z$1.ZodObject<{
|
|
814
815
|
en: z$1.ZodString;
|
|
815
816
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
816
817
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
817
818
|
}, z$1.core.$strip>;
|
|
818
|
-
toolDescription: z$1.ZodString;
|
|
819
819
|
tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
820
820
|
tools: "tools";
|
|
821
821
|
search: "search";
|
|
@@ -1133,18 +1133,18 @@ declare const ToolDistSchema: z$1.ZodObject<{
|
|
|
1133
1133
|
}, z$1.core.$strip>>>;
|
|
1134
1134
|
children: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
1135
1135
|
icon: z$1.ZodOptional<z$1.ZodString>;
|
|
1136
|
-
|
|
1136
|
+
description: z$1.ZodObject<{
|
|
1137
1137
|
en: z$1.ZodString;
|
|
1138
1138
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1139
1139
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1140
1140
|
}, z$1.core.$strip>;
|
|
1141
|
-
|
|
1141
|
+
toolDescription: z$1.ZodString;
|
|
1142
|
+
name: z$1.ZodObject<{
|
|
1142
1143
|
en: z$1.ZodString;
|
|
1143
1144
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1144
1145
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1145
1146
|
}, z$1.core.$strip>;
|
|
1146
1147
|
toolId: z$1.ZodString;
|
|
1147
|
-
toolDescription: z$1.ZodString;
|
|
1148
1148
|
versionList: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
1149
1149
|
value: z$1.ZodString;
|
|
1150
1150
|
description: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -1320,18 +1320,18 @@ declare const ToolDistSchema: z$1.ZodObject<{
|
|
|
1320
1320
|
"dataset:read": "dataset:read";
|
|
1321
1321
|
}>>>;
|
|
1322
1322
|
}, z$1.core.$strip>>>;
|
|
1323
|
-
|
|
1323
|
+
description: z$1.ZodObject<{
|
|
1324
1324
|
en: z$1.ZodString;
|
|
1325
1325
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1326
1326
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1327
1327
|
}, z$1.core.$strip>;
|
|
1328
|
-
|
|
1328
|
+
toolDescription: z$1.ZodString;
|
|
1329
|
+
name: z$1.ZodObject<{
|
|
1329
1330
|
en: z$1.ZodString;
|
|
1330
1331
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1331
1332
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1332
1333
|
}, z$1.core.$strip>;
|
|
1333
1334
|
toolId: z$1.ZodString;
|
|
1334
|
-
toolDescription: z$1.ZodString;
|
|
1335
1335
|
tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
1336
1336
|
tools: "tools";
|
|
1337
1337
|
search: "search";
|
|
@@ -1549,17 +1549,16 @@ declare const ToolConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
1549
1549
|
value: z$1.ZodString;
|
|
1550
1550
|
}, z$1.core.$strip>>>;
|
|
1551
1551
|
}, z$1.core.$strip>>>;
|
|
1552
|
-
|
|
1552
|
+
description: z$1.ZodObject<{
|
|
1553
1553
|
en: z$1.ZodString;
|
|
1554
1554
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1555
1555
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1556
1556
|
}, z$1.core.$strip>;
|
|
1557
|
-
|
|
1557
|
+
name: z$1.ZodObject<{
|
|
1558
1558
|
en: z$1.ZodString;
|
|
1559
1559
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1560
1560
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1561
1561
|
}, z$1.core.$strip>;
|
|
1562
|
-
parentId: z$1.ZodOptional<z$1.ZodString>;
|
|
1563
1562
|
permission: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
1564
1563
|
"userInfo:read": "userInfo:read";
|
|
1565
1564
|
"teamInfo:read": "teamInfo:read";
|
|
@@ -1630,12 +1629,12 @@ declare const ToolConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
1630
1629
|
}[];
|
|
1631
1630
|
description?: string | undefined;
|
|
1632
1631
|
}[];
|
|
1633
|
-
|
|
1632
|
+
description: {
|
|
1634
1633
|
en: string;
|
|
1635
1634
|
'zh-CN'?: string | undefined;
|
|
1636
1635
|
'zh-Hant'?: string | undefined;
|
|
1637
1636
|
};
|
|
1638
|
-
|
|
1637
|
+
name: {
|
|
1639
1638
|
en: string;
|
|
1640
1639
|
'zh-CN'?: string | undefined;
|
|
1641
1640
|
'zh-Hant'?: string | undefined;
|
|
@@ -1657,7 +1656,6 @@ declare const ToolConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
1657
1656
|
value: string;
|
|
1658
1657
|
}[] | undefined;
|
|
1659
1658
|
}[] | undefined;
|
|
1660
|
-
parentId?: string | undefined;
|
|
1661
1659
|
permission?: ("userInfo:read" | "teamInfo:read" | "model:read" | "dataset:read")[] | undefined;
|
|
1662
1660
|
}, {
|
|
1663
1661
|
versionList: {
|
|
@@ -1722,12 +1720,12 @@ declare const ToolConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
1722
1720
|
}[];
|
|
1723
1721
|
description?: string | undefined;
|
|
1724
1722
|
}[];
|
|
1725
|
-
|
|
1723
|
+
description: {
|
|
1726
1724
|
en: string;
|
|
1727
1725
|
'zh-CN'?: string | undefined;
|
|
1728
1726
|
'zh-Hant'?: string | undefined;
|
|
1729
1727
|
};
|
|
1730
|
-
|
|
1728
|
+
name: {
|
|
1731
1729
|
en: string;
|
|
1732
1730
|
'zh-CN'?: string | undefined;
|
|
1733
1731
|
'zh-Hant'?: string | undefined;
|
|
@@ -1750,7 +1748,6 @@ declare const ToolConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
1750
1748
|
value: string;
|
|
1751
1749
|
}[] | undefined;
|
|
1752
1750
|
}[] | undefined;
|
|
1753
|
-
parentId?: string | undefined;
|
|
1754
1751
|
permission?: ("userInfo:read" | "teamInfo:read" | "model:read" | "dataset:read")[] | undefined;
|
|
1755
1752
|
}>>;
|
|
1756
1753
|
type ToolConfigType = z$1.infer<typeof ToolConfigSchema>;
|
|
@@ -1795,17 +1792,16 @@ declare const ToolSetConfigSchema: z$1.ZodObject<{
|
|
|
1795
1792
|
value: z$1.ZodString;
|
|
1796
1793
|
}, z$1.core.$strip>>>;
|
|
1797
1794
|
}, z$1.core.$strip>>>;
|
|
1798
|
-
|
|
1795
|
+
description: z$1.ZodObject<{
|
|
1799
1796
|
en: z$1.ZodString;
|
|
1800
1797
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1801
1798
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1802
1799
|
}, z$1.core.$strip>;
|
|
1803
|
-
|
|
1800
|
+
name: z$1.ZodObject<{
|
|
1804
1801
|
en: z$1.ZodString;
|
|
1805
1802
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1806
1803
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1807
1804
|
}, z$1.core.$strip>;
|
|
1808
|
-
readmeUrl: z$1.ZodOptional<z$1.ZodURL>;
|
|
1809
1805
|
permission: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
|
|
1810
1806
|
"userInfo:read": "userInfo:read";
|
|
1811
1807
|
"teamInfo:read": "teamInfo:read";
|
|
@@ -1815,19 +1811,19 @@ declare const ToolSetConfigSchema: z$1.ZodObject<{
|
|
|
1815
1811
|
}, z$1.core.$strip>;
|
|
1816
1812
|
type ToolSetConfigType = z$1.infer<typeof ToolSetConfigSchema>;
|
|
1817
1813
|
declare const ToolDetailSchema: z$1.ZodObject<{
|
|
1818
|
-
|
|
1814
|
+
description: z$1.ZodObject<{
|
|
1819
1815
|
en: z$1.ZodString;
|
|
1820
1816
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1821
1817
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1822
1818
|
}, z$1.core.$strip>;
|
|
1823
|
-
|
|
1819
|
+
toolDescription: z$1.ZodString;
|
|
1820
|
+
name: z$1.ZodObject<{
|
|
1824
1821
|
en: z$1.ZodString;
|
|
1825
1822
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
1826
1823
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
1827
1824
|
}, z$1.core.$strip>;
|
|
1828
1825
|
toolId: z$1.ZodString;
|
|
1829
1826
|
parentId: z$1.ZodOptional<z$1.ZodString>;
|
|
1830
|
-
toolDescription: z$1.ZodString;
|
|
1831
1827
|
versionList: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
1832
1828
|
value: z$1.ZodString;
|
|
1833
1829
|
description: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -2005,12 +2001,12 @@ declare const ToolDetailSchema: z$1.ZodObject<{
|
|
|
2005
2001
|
}, z$1.core.$strip>;
|
|
2006
2002
|
type ToolDetailType = z$1.infer<typeof ToolDetailSchema>;
|
|
2007
2003
|
declare const ToolSimpleSchema: z$1.ZodObject<{
|
|
2008
|
-
|
|
2004
|
+
description: z$1.ZodObject<{
|
|
2009
2005
|
en: z$1.ZodString;
|
|
2010
2006
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
2011
2007
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
2012
2008
|
}, z$1.core.$strip>;
|
|
2013
|
-
|
|
2009
|
+
name: z$1.ZodObject<{
|
|
2014
2010
|
en: z$1.ZodString;
|
|
2015
2011
|
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
2016
2012
|
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I18nStringSchema as e}from"../../common/schemas/i18n.js";import{InputSchema as t,OutputSchema as n,SecretInputItemSchema as r}from"./fastgpt.js";import{ToolPermissionEnumSchema as i}from"./permission.js";import{z as a}from"zod";const o=a.enum([`tools`,`search`,`multimodal`,`communication`,`finance`,`design`,`productivity`,`news`,`entertainment`,`social`,`scientific`,`other`]),s=o.enum,c=a.object({value:a.string(),description:a.string().optional(),inputs:a.array(t),outputs:a.array(n)}),l=a.object({toolId:a.string(),parentId:a.string().optional(),name:e,description:e,toolDescription:a.string(),versionList:a.array(c).optional(),tags:a.array(o).optional(),icon:a.string(),author:a.string().optional(),tutorialUrl:a.url().optional(),readmeUrl:a.url().optional(),secretInputConfig:a.array(r).optional(),handler:a.any(),filename:a.string(),etag:a.string().nonempty().optional(),permission:a.array(i).optional()}),u=a.object({...l.omit({parentId:!0,versionList:!0,handler:!0}).shape,toolId:a.string().refine(e=>!e.includes(`/`)),children:a.array(l).min(1)}),d=a.object({...l.shape,...u.shape}),f=a.object({...u.omit({readmeUrl:!0}).shape,icon:a.string().optional(),versionList:a.array(c).optional(),children:a.array(a.object({...l.omit({parentId:!0,readmeUrl:!0}).shape,icon:a.string().optional()})).optional()}),p=a.object({...l.omit({filename:!0,readmeUrl:!0,handler:!0,etag:!0}).shape,toolId:a.string().optional(),toolDescription:a.string().optional(),versionList:a.array(c).min(1),tags:a.array(o).optional(),icon:a.string().optional(),author:a.string().optional(),tutorialUrl:a.url().optional(),secretInputConfig:a.array(r).optional()}).transform(e=>({...e,toolDescription:e.toolDescription??e.description.en})),m=a.object({...u.omit({filename:!0,etag:!0,children:!0}).shape,toolId:a.string().optional(),toolDescription:a.string().optional(),tags:a.array(o).optional(),icon:a.string().optional(),author:a.string().optional(),tutorialUrl:a.url().optional(),secretInputConfig:a.array(r).optional()}),h=d.pick({toolId:!0,parentId:!0,name:!0,description:!0,toolDescription:!0,author:!0,tags:!0,icon:!0,tutorialUrl:!0,readmeUrl:!0,secretInputConfig:!0,etag:!0,versionList:!0,permission:!0}),g=h.omit({secretInputConfig:!0,toolDescription:!0,versionList:!0});export{p as ToolConfigSchema,h as ToolDetailSchema,f as ToolDistSchema,l as ToolSchema,m as ToolSetConfigSchema,u as ToolSetSchema,g as ToolSimpleSchema,s as ToolTagEnum,o as ToolTagSchema,d as UnifiedToolSchema,c as VersionListItemSchema};
|
|
1
|
+
import{I18nStringSchema as e}from"../../common/schemas/i18n.js";import{InputSchema as t,OutputSchema as n,SecretInputItemSchema as r}from"./fastgpt.js";import{ToolPermissionEnumSchema as i}from"./permission.js";import{z as a}from"zod";const o=a.enum([`tools`,`search`,`multimodal`,`communication`,`finance`,`design`,`productivity`,`news`,`entertainment`,`social`,`scientific`,`other`]),s=o.enum,c=a.object({value:a.string(),description:a.string().optional(),inputs:a.array(t),outputs:a.array(n)}),l=a.object({toolId:a.string(),parentId:a.string().optional(),name:e,description:e,toolDescription:a.string(),versionList:a.array(c).optional(),tags:a.array(o).optional(),icon:a.string(),author:a.string().optional(),tutorialUrl:a.url().optional(),readmeUrl:a.url().optional(),secretInputConfig:a.array(r).optional(),handler:a.any(),filename:a.string(),etag:a.string().nonempty().optional(),permission:a.array(i).optional()}),u=a.object({...l.omit({parentId:!0,versionList:!0,handler:!0}).shape,toolId:a.string().refine(e=>!e.includes(`/`)),children:a.array(l).min(1)}),d=a.object({...l.shape,...u.shape}),f=a.object({...u.omit({readmeUrl:!0}).shape,icon:a.string().optional(),versionList:a.array(c).optional(),children:a.array(a.object({...l.omit({parentId:!0,readmeUrl:!0}).shape,icon:a.string().optional()})).optional()}),p=a.object({...l.omit({filename:!0,readmeUrl:!0,handler:!0,etag:!0,parentId:!0}).shape,toolId:a.string().optional(),toolDescription:a.string().optional(),versionList:a.array(c).min(1),tags:a.array(o).optional(),icon:a.string().optional(),author:a.string().optional(),tutorialUrl:a.url().optional(),secretInputConfig:a.array(r).optional()}).transform(e=>({...e,toolDescription:e.toolDescription??e.description.en})),m=a.object({...u.omit({filename:!0,etag:!0,children:!0,readmeUrl:!0}).shape,toolId:a.string().optional(),toolDescription:a.string().optional(),tags:a.array(o).optional(),icon:a.string().optional(),author:a.string().optional(),tutorialUrl:a.url().optional(),secretInputConfig:a.array(r).optional()}),h=d.pick({toolId:!0,parentId:!0,name:!0,description:!0,toolDescription:!0,author:!0,tags:!0,icon:!0,tutorialUrl:!0,readmeUrl:!0,secretInputConfig:!0,etag:!0,versionList:!0,permission:!0}),g=h.omit({secretInputConfig:!0,toolDescription:!0,versionList:!0});export{p as ToolConfigSchema,h as ToolDetailSchema,f as ToolDistSchema,l as ToolSchema,m as ToolSetConfigSchema,u as ToolSetSchema,g as ToolSimpleSchema,s as ToolTagEnum,o as ToolTagSchema,d as UnifiedToolSchema,c as VersionListItemSchema};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastgpt-plugin/helpers",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"dev": "tsdown --watch",
|
|
23
|
-
"build": "tsdown"
|
|
23
|
+
"build": "tsdown",
|
|
24
|
+
"prepublishOnly": "npm run build"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"@fastgpt-sdk/invoke": "^0.0.1-alpha.2",
|