@flowrunner/cli 0.1.19-dev.2 → 0.1.19-dev.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/ai-docs/instructions/service-code-format/02-zod-types.md +6 -5
- package/ai-docs/instructions/service-code-format/17-client-certificates.md +4 -5
- package/dist/cli.js +96 -79
- package/dist/cli.js.map +3 -3
- package/dist/index.js +111 -91
- package/dist/index.js.map +3 -3
- package/dist/types/packages/cli/src/constants/testing.d.ts +13 -6
- package/dist/types/shared/src/constants/error-codes.d.ts +14 -0
- package/dist/types/shared/src/constants/flow-catalog.d.ts +54 -0
- package/dist/types/shared/src/constants/index.d.ts +1 -0
- package/dist/types/shared/src/errors/flow-catalog.d.ts +37 -0
- package/dist/types/shared/src/errors/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/flow-catalog/analysis.d.ts +190 -0
- package/dist/types/shared/src/scheme/flow-catalog/index.d.ts +6 -0
- package/dist/types/shared/src/scheme/flow-catalog/pack.d.ts +144 -0
- package/dist/types/shared/src/scheme/flow-catalog/requests.d.ts +664 -0
- package/dist/types/shared/src/scheme/flow-catalog/summary.d.ts +69 -0
- package/dist/types/shared/src/scheme/flow-catalog/version.d.ts +132 -0
- package/dist/types/shared/src/scheme/flowrunner/java.dto.d.ts +76 -0
- package/dist/types/shared/src/scheme/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/knowledge-base/dto.d.ts +12 -12
- package/dist/types/shared/src/scheme/properties/index.d.ts +1 -0
- package/dist/types/shared/src/scheme/properties/secret.d.ts +12 -0
- package/dist/types/shared/src/scheme/remote-mcp-server/dto.d.ts +0 -11
- package/dist/types/shared/src/scheme/shared-extensions/config.d.ts +20 -2
- package/dist/types/shared/src/scheme/shared-extensions/rest.d.ts +1 -0
- package/dist/types/shared/src/scheme/shared-extensions/usage-stats.d.ts +6 -6
- package/package.json +1 -4
- package/project-files/sandbox/nock-mock.js +61 -5
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PackSummaryDTOSchema: z.ZodObject<{
|
|
3
|
+
packId: z.ZodString;
|
|
4
|
+
versionHash: z.ZodString;
|
|
5
|
+
versionName: z.ZodNumber;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
flows: z.ZodArray<z.ZodObject<{
|
|
9
|
+
packFlowKey: z.ZodString;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
flowHash: z.ZodString;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
enabled: z.ZodBoolean;
|
|
14
|
+
requirements: z.ZodObject<{
|
|
15
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
16
|
+
hostType: z.ZodEnum<{
|
|
17
|
+
APP: "APP";
|
|
18
|
+
SHARED: "SHARED";
|
|
19
|
+
}>;
|
|
20
|
+
packageId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
serviceId: z.ZodString;
|
|
22
|
+
label: z.ZodString;
|
|
23
|
+
usedBy: z.ZodArray<z.ZodObject<{
|
|
24
|
+
elementId: z.ZodString;
|
|
25
|
+
elementName: z.ZodString;
|
|
26
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
subFlowName: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
aiKeys: z.ZodArray<z.ZodObject<{
|
|
31
|
+
providerId: z.ZodString;
|
|
32
|
+
label: z.ZodString;
|
|
33
|
+
usedBy: z.ZodArray<z.ZodObject<{
|
|
34
|
+
elementId: z.ZodString;
|
|
35
|
+
elementName: z.ZodString;
|
|
36
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
37
|
+
subFlowName: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
placeholders: z.ZodArray<z.ZodObject<{
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
type: z.ZodString;
|
|
43
|
+
description: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
sharedExtensions: z.ZodArray<z.ZodObject<{
|
|
46
|
+
serviceId: z.ZodString;
|
|
47
|
+
packageId: z.ZodOptional<z.ZodString>;
|
|
48
|
+
label: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
source: z.ZodObject<{
|
|
52
|
+
workspaceId: z.ZodString;
|
|
53
|
+
flowId: z.ZodString;
|
|
54
|
+
flowVersionId: z.ZodString;
|
|
55
|
+
flowName: z.ZodString;
|
|
56
|
+
versionNumber: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
publisherId: z.ZodString;
|
|
59
|
+
publisherName: z.ZodString;
|
|
60
|
+
_id: z.ZodString;
|
|
61
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
62
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
63
|
+
status: z.ZodEnum<{
|
|
64
|
+
readonly PUBLISHED: "published";
|
|
65
|
+
readonly UNPUBLISHED: "unpublished";
|
|
66
|
+
}>;
|
|
67
|
+
versionsCount: z.ZodNumber;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type PackSummaryDTO = z.infer<typeof PackSummaryDTOSchema>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PackVersionSourceSchema: z.ZodObject<{
|
|
3
|
+
workspaceId: z.ZodString;
|
|
4
|
+
flowId: z.ZodString;
|
|
5
|
+
flowVersionId: z.ZodString;
|
|
6
|
+
flowName: z.ZodString;
|
|
7
|
+
versionNumber: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const PackVersionSchema: z.ZodObject<{
|
|
10
|
+
packId: z.ZodString;
|
|
11
|
+
versionHash: z.ZodString;
|
|
12
|
+
versionName: z.ZodNumber;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
description: z.ZodString;
|
|
15
|
+
flows: z.ZodArray<z.ZodObject<{
|
|
16
|
+
packFlowKey: z.ZodString;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
flowHash: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
enabled: z.ZodBoolean;
|
|
21
|
+
requirements: z.ZodObject<{
|
|
22
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
23
|
+
hostType: z.ZodEnum<{
|
|
24
|
+
APP: "APP";
|
|
25
|
+
SHARED: "SHARED";
|
|
26
|
+
}>;
|
|
27
|
+
packageId: z.ZodOptional<z.ZodString>;
|
|
28
|
+
serviceId: z.ZodString;
|
|
29
|
+
label: z.ZodString;
|
|
30
|
+
usedBy: z.ZodArray<z.ZodObject<{
|
|
31
|
+
elementId: z.ZodString;
|
|
32
|
+
elementName: z.ZodString;
|
|
33
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
34
|
+
subFlowName: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
aiKeys: z.ZodArray<z.ZodObject<{
|
|
38
|
+
providerId: z.ZodString;
|
|
39
|
+
label: z.ZodString;
|
|
40
|
+
usedBy: z.ZodArray<z.ZodObject<{
|
|
41
|
+
elementId: z.ZodString;
|
|
42
|
+
elementName: z.ZodString;
|
|
43
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
44
|
+
subFlowName: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
placeholders: z.ZodArray<z.ZodObject<{
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
type: z.ZodString;
|
|
50
|
+
description: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
sharedExtensions: z.ZodArray<z.ZodObject<{
|
|
53
|
+
serviceId: z.ZodString;
|
|
54
|
+
packageId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
label: z.ZodString;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
source: z.ZodObject<{
|
|
59
|
+
workspaceId: z.ZodString;
|
|
60
|
+
flowId: z.ZodString;
|
|
61
|
+
flowVersionId: z.ZodString;
|
|
62
|
+
flowName: z.ZodString;
|
|
63
|
+
versionNumber: z.ZodNumber;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
publisherId: z.ZodString;
|
|
66
|
+
publisherName: z.ZodString;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export declare const PackVersionDTOSchema: z.ZodObject<{
|
|
69
|
+
packId: z.ZodString;
|
|
70
|
+
versionHash: z.ZodString;
|
|
71
|
+
versionName: z.ZodNumber;
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
description: z.ZodString;
|
|
74
|
+
flows: z.ZodArray<z.ZodObject<{
|
|
75
|
+
packFlowKey: z.ZodString;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
flowHash: z.ZodString;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
enabled: z.ZodBoolean;
|
|
80
|
+
requirements: z.ZodObject<{
|
|
81
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
82
|
+
hostType: z.ZodEnum<{
|
|
83
|
+
APP: "APP";
|
|
84
|
+
SHARED: "SHARED";
|
|
85
|
+
}>;
|
|
86
|
+
packageId: z.ZodOptional<z.ZodString>;
|
|
87
|
+
serviceId: z.ZodString;
|
|
88
|
+
label: z.ZodString;
|
|
89
|
+
usedBy: z.ZodArray<z.ZodObject<{
|
|
90
|
+
elementId: z.ZodString;
|
|
91
|
+
elementName: z.ZodString;
|
|
92
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
93
|
+
subFlowName: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
aiKeys: z.ZodArray<z.ZodObject<{
|
|
97
|
+
providerId: z.ZodString;
|
|
98
|
+
label: z.ZodString;
|
|
99
|
+
usedBy: z.ZodArray<z.ZodObject<{
|
|
100
|
+
elementId: z.ZodString;
|
|
101
|
+
elementName: z.ZodString;
|
|
102
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
103
|
+
subFlowName: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
placeholders: z.ZodArray<z.ZodObject<{
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
type: z.ZodString;
|
|
109
|
+
description: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
sharedExtensions: z.ZodArray<z.ZodObject<{
|
|
112
|
+
serviceId: z.ZodString;
|
|
113
|
+
packageId: z.ZodOptional<z.ZodString>;
|
|
114
|
+
label: z.ZodString;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
source: z.ZodObject<{
|
|
118
|
+
workspaceId: z.ZodString;
|
|
119
|
+
flowId: z.ZodString;
|
|
120
|
+
flowVersionId: z.ZodString;
|
|
121
|
+
flowName: z.ZodString;
|
|
122
|
+
versionNumber: z.ZodNumber;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
publisherId: z.ZodString;
|
|
125
|
+
publisherName: z.ZodString;
|
|
126
|
+
_id: z.ZodString;
|
|
127
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
128
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type PackVersionSource = z.infer<typeof PackVersionSourceSchema>;
|
|
131
|
+
export type PackVersion = z.infer<typeof PackVersionSchema>;
|
|
132
|
+
export type PackVersionDTO = z.infer<typeof PackVersionDTOSchema>;
|
|
@@ -158,6 +158,7 @@ export interface FlowVersionJavaDto {
|
|
|
158
158
|
serverFields: {
|
|
159
159
|
hasResult: boolean;
|
|
160
160
|
configId?: string | null;
|
|
161
|
+
systemTags?: string[];
|
|
161
162
|
};
|
|
162
163
|
metaInfo: {
|
|
163
164
|
errorMessage: string | null;
|
|
@@ -172,6 +173,81 @@ export interface FlowVersionJavaDto {
|
|
|
172
173
|
groups: FlowElementJavaDto[];
|
|
173
174
|
}
|
|
174
175
|
export type UpdateFlowVersionJavaDto = FlowVersionJavaDto;
|
|
176
|
+
export type FlowVersionExportBodyJavaDto = Pick<FlowVersionJavaDto, 'id' | 'description' | 'firstElementId' | 'clientMetadata' | 'groups'> & {
|
|
177
|
+
elements?: FlowElementJavaDto[];
|
|
178
|
+
metaInfo: Partial<FlowVersionJavaDto['metaInfo']> & {
|
|
179
|
+
[key: string]: unknown;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
export type ExportSubFlowJavaDto = {
|
|
183
|
+
subFlow: {
|
|
184
|
+
id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
};
|
|
187
|
+
subFlowVersion: FlowVersionExportBodyJavaDto;
|
|
188
|
+
elementsTestData: Array<{
|
|
189
|
+
elementId: string;
|
|
190
|
+
data: Record<string, unknown>;
|
|
191
|
+
}>;
|
|
192
|
+
elementsLearnedData: Array<Record<string, unknown>>;
|
|
193
|
+
};
|
|
194
|
+
export type FlowVersionExportJavaDto = {
|
|
195
|
+
flow: {
|
|
196
|
+
id: string;
|
|
197
|
+
name: string;
|
|
198
|
+
};
|
|
199
|
+
flowVersion: FlowVersionExportBodyJavaDto;
|
|
200
|
+
subFlows: ExportSubFlowJavaDto[];
|
|
201
|
+
elementsTestData: Array<{
|
|
202
|
+
elementId: string;
|
|
203
|
+
data: Record<string, unknown>;
|
|
204
|
+
}>;
|
|
205
|
+
elementsLearnedData: Array<Record<string, unknown>>;
|
|
206
|
+
slaGoals: Array<Record<string, unknown>>;
|
|
207
|
+
slaCalendars: Array<Record<string, unknown>>;
|
|
208
|
+
exportDate?: string;
|
|
209
|
+
};
|
|
210
|
+
export type InternalExportVersionFieldsJavaDto = {
|
|
211
|
+
status: FlowStatuses;
|
|
212
|
+
version: number;
|
|
213
|
+
serverFields: {
|
|
214
|
+
systemTags: string[];
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
export type FlowVersionTagsJavaDto = {
|
|
218
|
+
versionId: string;
|
|
219
|
+
version: number;
|
|
220
|
+
status: FlowStatuses | null;
|
|
221
|
+
systemTags: string[];
|
|
222
|
+
};
|
|
223
|
+
export type InternalFlowVersionExportJavaDto = Omit<FlowVersionExportJavaDto, 'flowVersion' | 'subFlows'> & {
|
|
224
|
+
flowVersion: FlowVersionExportBodyJavaDto & InternalExportVersionFieldsJavaDto;
|
|
225
|
+
subFlows: Array<Omit<ExportSubFlowJavaDto, 'subFlowVersion'> & {
|
|
226
|
+
subFlowVersion: FlowVersionExportBodyJavaDto & InternalExportVersionFieldsJavaDto;
|
|
227
|
+
}>;
|
|
228
|
+
versions: FlowVersionTagsJavaDto[];
|
|
229
|
+
};
|
|
230
|
+
export type SystemTagsChangeJavaDto = {
|
|
231
|
+
exclude?: string[];
|
|
232
|
+
add?: string[];
|
|
233
|
+
};
|
|
234
|
+
export type InternalFlowImportJavaDto = {
|
|
235
|
+
flows: Array<{
|
|
236
|
+
key: string;
|
|
237
|
+
name: string;
|
|
238
|
+
systemTags?: SystemTagsChangeJavaDto;
|
|
239
|
+
export: FlowVersionExportJavaDto;
|
|
240
|
+
}>;
|
|
241
|
+
skipActivity?: boolean;
|
|
242
|
+
};
|
|
243
|
+
export type InternalFlowImportResultJavaDto = {
|
|
244
|
+
flows: Array<{
|
|
245
|
+
key: string;
|
|
246
|
+
flowId: string;
|
|
247
|
+
versionId: string;
|
|
248
|
+
status: FlowStatuses;
|
|
249
|
+
}>;
|
|
250
|
+
};
|
|
175
251
|
export type SubFlowVersionJavaDto = FlowVersionJavaDto;
|
|
176
252
|
export type UpdateSubFlowVersionJavaDto = SubFlowVersionJavaDto;
|
|
177
253
|
export declare const InstanceStatusJava: {
|
|
@@ -9,6 +9,7 @@ export * from './billing';
|
|
|
9
9
|
export * from './crm';
|
|
10
10
|
export * from './dynamic-forms';
|
|
11
11
|
export * from './extensions';
|
|
12
|
+
export * from './flow-catalog';
|
|
12
13
|
export * from './flowrunner';
|
|
13
14
|
export * from './integration-connection';
|
|
14
15
|
export * from './knowledge-base';
|
|
@@ -459,16 +459,6 @@ export declare const KnowledgeBaseEntitySchema: z.ZodObject<{
|
|
|
459
459
|
}>;
|
|
460
460
|
title: z.ZodString;
|
|
461
461
|
description: z.ZodString;
|
|
462
|
-
embedding: z.ZodObject<{
|
|
463
|
-
provider: z.ZodString;
|
|
464
|
-
model: z.ZodString;
|
|
465
|
-
dimension: z.ZodNullable<z.ZodNumber>;
|
|
466
|
-
aiApiKey: z.ZodString;
|
|
467
|
-
}, z.core.$strip>;
|
|
468
|
-
chunkingOptions: z.ZodObject<{
|
|
469
|
-
chunkSize: z.ZodNumber;
|
|
470
|
-
chunkOverlap: z.ZodNumber;
|
|
471
|
-
}, z.core.$strip>;
|
|
472
462
|
vectorStorage: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
473
463
|
adapter: z.ZodLiteral<"QDRANT">;
|
|
474
464
|
config: z.ZodObject<{
|
|
@@ -543,6 +533,16 @@ export declare const KnowledgeBaseEntitySchema: z.ZodObject<{
|
|
|
543
533
|
searchInFullCollection: z.ZodBoolean;
|
|
544
534
|
}, z.core.$strip>;
|
|
545
535
|
}, z.core.$strip>], "adapter">;
|
|
536
|
+
embedding: z.ZodObject<{
|
|
537
|
+
provider: z.ZodString;
|
|
538
|
+
model: z.ZodString;
|
|
539
|
+
dimension: z.ZodNullable<z.ZodNumber>;
|
|
540
|
+
aiApiKey: z.ZodString;
|
|
541
|
+
}, z.core.$strip>;
|
|
542
|
+
chunkingOptions: z.ZodObject<{
|
|
543
|
+
chunkSize: z.ZodNumber;
|
|
544
|
+
chunkOverlap: z.ZodNumber;
|
|
545
|
+
}, z.core.$strip>;
|
|
546
546
|
files: z.ZodArray<z.ZodObject<{
|
|
547
547
|
fileName: z.ZodString;
|
|
548
548
|
fileSize: z.ZodNumber;
|
|
@@ -607,8 +607,8 @@ export declare const FileProcessingInfoDTOSchema: z.ZodObject<{
|
|
|
607
607
|
}>;
|
|
608
608
|
fileName: z.ZodString;
|
|
609
609
|
fileId: z.ZodOptional<z.ZodString>;
|
|
610
|
-
fileSize: z.ZodNumber;
|
|
611
610
|
mimeType: z.ZodString;
|
|
611
|
+
fileSize: z.ZodNumber;
|
|
612
612
|
uploadedAt: z.ZodString;
|
|
613
613
|
}, z.core.$strip>;
|
|
614
614
|
export declare const UploadFilesResponseDTOSchema: z.ZodObject<{
|
|
@@ -622,8 +622,8 @@ export declare const UploadFilesResponseDTOSchema: z.ZodObject<{
|
|
|
622
622
|
}>;
|
|
623
623
|
fileName: z.ZodString;
|
|
624
624
|
fileId: z.ZodOptional<z.ZodString>;
|
|
625
|
-
fileSize: z.ZodNumber;
|
|
626
625
|
mimeType: z.ZodString;
|
|
626
|
+
fileSize: z.ZodNumber;
|
|
627
627
|
uploadedAt: z.ZodString;
|
|
628
628
|
}, z.core.$strip>>;
|
|
629
629
|
}, z.core.$strip>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StoredSecretSchema: z.ZodObject<{
|
|
3
|
+
value: z.ZodString;
|
|
4
|
+
hint: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const SecretHintSchema: z.ZodObject<{
|
|
7
|
+
hint: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const SecretInputSchema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
export type StoredSecret = z.infer<typeof StoredSecretSchema>;
|
|
11
|
+
export type SecretHint = z.infer<typeof SecretHintSchema>;
|
|
12
|
+
export type SecretInput = z.infer<typeof SecretInputSchema>;
|
|
@@ -7,13 +7,6 @@ export declare const McpServerLogoSchema: z.ZodObject<{
|
|
|
7
7
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
8
|
color: z.ZodString;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
|
-
export declare const McpServerStoredSecretSchema: z.ZodObject<{
|
|
11
|
-
value: z.ZodString;
|
|
12
|
-
hint: z.ZodString;
|
|
13
|
-
}, z.core.$strip>;
|
|
14
|
-
export declare const McpServerSecretFieldSchema: z.ZodObject<{
|
|
15
|
-
hint: z.ZodString;
|
|
16
|
-
}, z.core.$strip>;
|
|
17
10
|
export declare const McpServerClientCredentialsSchema: z.ZodObject<{
|
|
18
11
|
clientId: z.ZodString;
|
|
19
12
|
clientSecret: z.ZodString;
|
|
@@ -137,19 +130,15 @@ export declare const RemoteMCPServerDTOSchema: z.ZodObject<{
|
|
|
137
130
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
138
131
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
139
132
|
}, z.core.$strip>;
|
|
140
|
-
export declare const McpServerSecretInputSchema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
133
|
export declare const McpServerHeadersInputSchema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
|
|
142
134
|
export declare const McpServerClientCredentialsInputSchema: z.ZodObject<{
|
|
143
135
|
clientId: z.ZodString;
|
|
144
136
|
clientSecret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
145
137
|
}, z.core.$strip>;
|
|
146
|
-
export type McpServerStoredSecret = z.infer<typeof McpServerStoredSecretSchema>;
|
|
147
|
-
export type McpServerSecretField = z.infer<typeof McpServerSecretFieldSchema>;
|
|
148
138
|
export type McpServerClientCredentials = z.infer<typeof McpServerClientCredentialsSchema>;
|
|
149
139
|
export type McpServerClientCredentialsDoc = z.infer<typeof McpServerClientCredentialsDocSchema>;
|
|
150
140
|
export type McpServerClientCredentialsPublic = z.infer<typeof McpServerClientCredentialsPublicSchema>;
|
|
151
141
|
export type McpServerOAuthConfigDoc = z.infer<typeof McpServerOAuthConfigDocSchema>;
|
|
152
|
-
export type McpServerSecretInput = z.infer<typeof McpServerSecretInputSchema>;
|
|
153
142
|
export type McpServerHeadersInput = z.infer<typeof McpServerHeadersInputSchema>;
|
|
154
143
|
export type McpServerClientCredentialsInput = z.infer<typeof McpServerClientCredentialsInputSchema>;
|
|
155
144
|
export type RemoteMCPServerDoc = z.infer<typeof RemoteMCPServerDocSchema>;
|
|
@@ -66,12 +66,23 @@ export declare const FlowExtensionConfigItemSourceSchema: z.ZodObject<{
|
|
|
66
66
|
displayName: z.ZodOptional<z.ZodString>;
|
|
67
67
|
}, z.core.$strip>;
|
|
68
68
|
export declare const FlowExtensionConfigValuesSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
69
|
-
export declare const
|
|
69
|
+
export declare const ExtensionConfigValuesSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
70
|
+
export declare const ConfigValueStateSchema: z.ZodObject<{
|
|
71
|
+
encrypted: z.ZodLiteral<true>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export declare const ConfigValuesStateSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
74
|
+
encrypted: z.ZodLiteral<true>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
export declare const ExtensionConfigValuesViewSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
77
|
+
export declare const ExtensionConfigValuesInputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
70
78
|
export declare const SharedExtensionConfigsDTOSchema: z.ZodObject<{
|
|
71
79
|
_id: z.ZodString;
|
|
72
80
|
serviceId: z.ZodString;
|
|
73
81
|
legacyServiceId: z.ZodString;
|
|
74
82
|
configValues: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
83
|
+
configValuesState: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
84
|
+
encrypted: z.ZodLiteral<true>;
|
|
85
|
+
}, z.core.$strip>>>;
|
|
75
86
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
76
87
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
77
88
|
}, z.core.$strip>;
|
|
@@ -80,6 +91,9 @@ export declare const FlowExtensionsConfigsDTOSchema: z.ZodObject<{
|
|
|
80
91
|
serviceId: z.ZodString;
|
|
81
92
|
legacyServiceId: z.ZodString;
|
|
82
93
|
configValues: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
94
|
+
configValuesState: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
95
|
+
encrypted: z.ZodLiteral<true>;
|
|
96
|
+
}, z.core.$strip>>>;
|
|
83
97
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
84
98
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
85
99
|
hostType: z.ZodEnum<{
|
|
@@ -92,5 +106,9 @@ export type FlowExtensionsConfigsDTO = z.infer<typeof FlowExtensionsConfigsDTOSc
|
|
|
92
106
|
export type FlowExtensionConfigValues = z.infer<typeof FlowExtensionConfigValuesSchema>;
|
|
93
107
|
export type SharedExtensionConfigItem = z.infer<typeof SharedExtensionConfigItemSchema>;
|
|
94
108
|
export type SharedExtensionConfigItemSource = z.infer<typeof FlowExtensionConfigItemSourceSchema>;
|
|
95
|
-
export type
|
|
109
|
+
export type ConfigValueState = z.infer<typeof ConfigValueStateSchema>;
|
|
110
|
+
export type ConfigValuesState = z.infer<typeof ConfigValuesStateSchema>;
|
|
111
|
+
export type ExtensionConfigValuesView = z.infer<typeof ExtensionConfigValuesViewSchema>;
|
|
112
|
+
export type ExtensionConfigValuesInput = z.infer<typeof ExtensionConfigValuesInputSchema>;
|
|
113
|
+
export type ExtensionConfigValues = z.infer<typeof ExtensionConfigValuesSchema>;
|
|
96
114
|
export type SharedExtensionConfigsDTO = z.infer<typeof SharedExtensionConfigsDTOSchema>;
|
|
@@ -5,5 +5,6 @@ export declare const UpdateSharedExtensionEnabledSchema: z.ZodObject<{
|
|
|
5
5
|
export declare const UpdateSharedExtensionConfigsSchema: z.ZodObject<{
|
|
6
6
|
configValues: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
|
+
export declare const SharedExtensionConfigValuesViewResponseSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
8
9
|
export type UpdateSharedExtensionEnabled = z.infer<typeof UpdateSharedExtensionEnabledSchema>;
|
|
9
10
|
export type UpdateSharedExtensionConfigs = z.infer<typeof UpdateSharedExtensionConfigsSchema>;
|
|
@@ -2,8 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const SHARED_EXTENSIONS_USAGE_MAX_LIMIT = 500;
|
|
3
3
|
export declare const SHARED_EXTENSIONS_USAGE_DEFAULT_LIMIT = 50;
|
|
4
4
|
export declare const SharedExtensionCallSourceSchema: z.ZodEnum<{
|
|
5
|
-
UNKNOWN: "UNKNOWN";
|
|
6
5
|
FLOW: "FLOW";
|
|
6
|
+
UNKNOWN: "UNKNOWN";
|
|
7
7
|
AI_AGENT: "AI_AGENT";
|
|
8
8
|
FLOW_BUILDER: "FLOW_BUILDER";
|
|
9
9
|
MCP: "MCP";
|
|
@@ -27,8 +27,8 @@ export declare const SharedExtensionUsageMetricSortSchema: z.ZodEnum<{
|
|
|
27
27
|
}>;
|
|
28
28
|
export declare const SharedExtensionUsageSortFieldSchema: z.ZodEnum<{
|
|
29
29
|
method: "method";
|
|
30
|
-
kind: "kind";
|
|
31
30
|
count: "count";
|
|
31
|
+
kind: "kind";
|
|
32
32
|
service: "service";
|
|
33
33
|
source: "source";
|
|
34
34
|
day: "day";
|
|
@@ -47,8 +47,8 @@ export declare const SharedExtensionUsageQuerySchema: z.ZodObject<{
|
|
|
47
47
|
methodName: z.ZodOptional<z.ZodString>;
|
|
48
48
|
kind: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
49
|
source: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
50
|
-
UNKNOWN: "UNKNOWN";
|
|
51
50
|
FLOW: "FLOW";
|
|
51
|
+
UNKNOWN: "UNKNOWN";
|
|
52
52
|
AI_AGENT: "AI_AGENT";
|
|
53
53
|
FLOW_BUILDER: "FLOW_BUILDER";
|
|
54
54
|
MCP: "MCP";
|
|
@@ -64,8 +64,8 @@ export declare const SharedExtensionUsageQuerySchema: z.ZodObject<{
|
|
|
64
64
|
}>>>;
|
|
65
65
|
sortBy: z.ZodDefault<z.ZodEnum<{
|
|
66
66
|
method: "method";
|
|
67
|
-
kind: "kind";
|
|
68
67
|
count: "count";
|
|
68
|
+
kind: "kind";
|
|
69
69
|
service: "service";
|
|
70
70
|
source: "source";
|
|
71
71
|
day: "day";
|
|
@@ -105,8 +105,8 @@ export declare const SharedExtensionUsageRowSchema: z.ZodObject<{
|
|
|
105
105
|
methodName: z.ZodOptional<z.ZodString>;
|
|
106
106
|
kind: z.ZodOptional<z.ZodString>;
|
|
107
107
|
source: z.ZodOptional<z.ZodEnum<{
|
|
108
|
-
UNKNOWN: "UNKNOWN";
|
|
109
108
|
FLOW: "FLOW";
|
|
109
|
+
UNKNOWN: "UNKNOWN";
|
|
110
110
|
AI_AGENT: "AI_AGENT";
|
|
111
111
|
FLOW_BUILDER: "FLOW_BUILDER";
|
|
112
112
|
MCP: "MCP";
|
|
@@ -138,8 +138,8 @@ export declare const SharedExtensionUsageResultSchema: z.ZodObject<{
|
|
|
138
138
|
methodName: z.ZodOptional<z.ZodString>;
|
|
139
139
|
kind: z.ZodOptional<z.ZodString>;
|
|
140
140
|
source: z.ZodOptional<z.ZodEnum<{
|
|
141
|
-
UNKNOWN: "UNKNOWN";
|
|
142
141
|
FLOW: "FLOW";
|
|
142
|
+
UNKNOWN: "UNKNOWN";
|
|
143
143
|
AI_AGENT: "AI_AGENT";
|
|
144
144
|
FLOW_BUILDER: "FLOW_BUILDER";
|
|
145
145
|
MCP: "MCP";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowrunner/cli",
|
|
3
|
-
"version": "0.1.19-dev.
|
|
3
|
+
"version": "0.1.19-dev.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@types/node": "^20.0.0",
|
|
37
37
|
"adm-zip": "^0.6.1",
|
|
38
|
-
"archiver": "^7.0.0",
|
|
39
38
|
"commander": "^12.0.0",
|
|
40
39
|
"zod": "^4.6.2"
|
|
41
40
|
},
|
|
@@ -43,10 +42,8 @@
|
|
|
43
42
|
"@asteasolutions/zod-to-openapi": "^8.4.0",
|
|
44
43
|
"@flowrunner/flow-extension-runner": "*",
|
|
45
44
|
"@types/adm-zip": "^0.5.7",
|
|
46
|
-
"@types/archiver": "^6.0.0",
|
|
47
45
|
"esbuild": "^0.28.2",
|
|
48
46
|
"nock": "^14.0.17",
|
|
49
|
-
"query-string": "^7.1.3",
|
|
50
47
|
"tsconfig-paths": "^4.2.0",
|
|
51
48
|
"tsx": "^4.0.0",
|
|
52
49
|
"typescript": "^5.4.0"
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
|
|
43
43
|
const http = require('http')
|
|
44
44
|
const nock = require('nock')
|
|
45
|
-
const queryString = require('query-string')
|
|
46
45
|
|
|
47
46
|
/** Live mocks for THIS test file, oldest first. The newest one with a matching handler wins. */
|
|
48
47
|
const liveMocks = []
|
|
@@ -174,9 +173,66 @@ function urlMatches(handlerUrl, record) {
|
|
|
174
173
|
* A parameter repeated in the query becomes an array (`arrayFormat: 'none'`, the default).
|
|
175
174
|
*/
|
|
176
175
|
function parseQuery(search) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
return parseUrlEncoded(search, retype)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Decodes `a=1&b=x&b=y&c` into `{ a: '1', b: ['x', 'y'], c: null }`, passing every value through
|
|
181
|
+
* `mapValue`.
|
|
182
|
+
*
|
|
183
|
+
* Hand-written rather than `URLSearchParams`, which cannot tell a bare `c` from an empty `c=`: the
|
|
184
|
+
* first reads as `null`, the second as `''`. A `+` is a space, and a malformed `%` escape is kept as
|
|
185
|
+
* written rather than failing the whole parse. The result is a plain object, so it reads the same
|
|
186
|
+
* under `toStrictEqual` as one a test writes by hand.
|
|
187
|
+
*/
|
|
188
|
+
function parseUrlEncoded(input, mapValue = value => value) {
|
|
189
|
+
const result = Object.create(null)
|
|
190
|
+
|
|
191
|
+
for (const pair of input.trim().replace(/^[?#&]/, '').split('&')) {
|
|
192
|
+
if (pair === '') {
|
|
193
|
+
continue
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const separator = pair.indexOf('=')
|
|
197
|
+
const key = decodeComponent(separator === -1 ? pair : pair.slice(0, separator))
|
|
198
|
+
const value = mapValue(separator === -1 ? null : decodeComponent(pair.slice(separator + 1)))
|
|
199
|
+
|
|
200
|
+
result[key] = key in result ? [].concat(result[key], value) : value
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return { ...result }
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function decodeComponent(text) {
|
|
207
|
+
const spaced = text.replace(/\+/g, ' ')
|
|
208
|
+
|
|
209
|
+
try {
|
|
210
|
+
return decodeURIComponent(spaced)
|
|
211
|
+
} catch (error) {
|
|
212
|
+
// Decode what can be decoded and keep the rest — `100%` stays `100%`.
|
|
213
|
+
return spaced.replace(/(%[0-9a-f]{2})+/gi, run => {
|
|
214
|
+
try {
|
|
215
|
+
return decodeURIComponent(run)
|
|
216
|
+
} catch (runError) {
|
|
217
|
+
return run
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** A number or a boolean by shape; anything else, `null` included, as it is. */
|
|
224
|
+
function retype(value) {
|
|
225
|
+
if (typeof value !== 'string') {
|
|
226
|
+
return value
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (value.trim() !== '' && !Number.isNaN(Number(value))) {
|
|
230
|
+
return Number(value)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const lower = value.toLowerCase()
|
|
234
|
+
|
|
235
|
+
return lower === 'true' || lower === 'false' ? lower === 'true' : value
|
|
180
236
|
}
|
|
181
237
|
|
|
182
238
|
/**
|
|
@@ -302,7 +358,7 @@ function parseBody(rawBody, contentType) {
|
|
|
302
358
|
// query params: form bodies overwhelmingly carry ids and flags the service already stringified,
|
|
303
359
|
// and re-typing them turned `company_id: '142'` into `142`.
|
|
304
360
|
if (String(contentType || '').startsWith('application/x-www-form-urlencoded')) {
|
|
305
|
-
return
|
|
361
|
+
return parseUrlEncoded(rawBody)
|
|
306
362
|
}
|
|
307
363
|
|
|
308
364
|
try {
|