@n8n/api-types 1.19.1 → 1.21.0

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.
Files changed (96) hide show
  1. package/dist/agent-builder-interactive.d.ts +159 -0
  2. package/dist/agent-builder-interactive.js +67 -0
  3. package/dist/agent-builder-interactive.js.map +1 -0
  4. package/dist/agent-sse.d.ts +83 -0
  5. package/dist/agent-sse.js +3 -0
  6. package/dist/agent-sse.js.map +1 -0
  7. package/dist/agents.d.ts +258 -0
  8. package/dist/agents.js +52 -0
  9. package/dist/agents.js.map +1 -0
  10. package/dist/build.tsbuildinfo +1 -1
  11. package/dist/chat-hub.d.ts +18 -18
  12. package/dist/dto/agents/agent-build-resume.dto.d.ts +61 -0
  13. package/dist/dto/agents/agent-build-resume.dto.js +14 -0
  14. package/dist/dto/agents/agent-build-resume.dto.js.map +1 -0
  15. package/dist/dto/agents/agent-chat-message.dto.d.ts +11 -0
  16. package/dist/dto/agents/agent-chat-message.dto.js +12 -0
  17. package/dist/dto/agents/agent-chat-message.dto.js.map +1 -0
  18. package/dist/dto/agents/agent-integration.dto.d.ts +11 -0
  19. package/dist/dto/agents/agent-integration.dto.js +12 -0
  20. package/dist/dto/agents/agent-integration.dto.js.map +1 -0
  21. package/dist/dto/agents/create-agent-skill.dto.d.ts +27 -0
  22. package/dist/dto/agents/create-agent-skill.dto.js +17 -0
  23. package/dist/dto/agents/create-agent-skill.dto.js.map +1 -0
  24. package/dist/dto/agents/create-agent.dto.d.ts +9 -0
  25. package/dist/dto/agents/create-agent.dto.js +11 -0
  26. package/dist/dto/agents/create-agent.dto.js.map +1 -0
  27. package/dist/dto/agents/update-agent-config.dto.d.ts +9 -0
  28. package/dist/dto/agents/update-agent-config.dto.js +11 -0
  29. package/dist/dto/agents/update-agent-config.dto.js.map +1 -0
  30. package/dist/dto/agents/update-agent-schedule.dto.d.ts +11 -0
  31. package/dist/dto/agents/update-agent-schedule.dto.js +12 -0
  32. package/dist/dto/agents/update-agent-schedule.dto.js.map +1 -0
  33. package/dist/dto/agents/update-agent-skill.dto.d.ts +12 -0
  34. package/dist/dto/agents/update-agent-skill.dto.js +13 -0
  35. package/dist/dto/agents/update-agent-skill.dto.js.map +1 -0
  36. package/dist/dto/agents/update-agent.dto.d.ts +13 -0
  37. package/dist/dto/agents/update-agent.dto.js +13 -0
  38. package/dist/dto/agents/update-agent.dto.js.map +1 -0
  39. package/dist/dto/ai/ai-build-request.dto.d.ts +6 -6
  40. package/dist/dto/ai/ai-gateway-config-response.dto.d.ts +2 -0
  41. package/dist/dto/ai/ai-gateway-config-response.dto.js +1 -0
  42. package/dist/dto/ai/ai-gateway-config-response.dto.js.map +1 -1
  43. package/dist/dto/encryption/encryption-key-response.dto.d.ts +2 -7
  44. package/dist/dto/encryption/list-encryption-keys-query.dto.d.ts +14 -2
  45. package/dist/dto/encryption/list-encryption-keys-query.dto.js +19 -2
  46. package/dist/dto/encryption/list-encryption-keys-query.dto.js.map +1 -1
  47. package/dist/dto/evaluations/evaluation-config.dto.d.ts +845 -0
  48. package/dist/dto/evaluations/evaluation-config.dto.js +96 -0
  49. package/dist/dto/evaluations/evaluation-config.dto.js.map +1 -0
  50. package/dist/dto/evaluations/evaluation-error-code.d.ts +38 -0
  51. package/dist/dto/evaluations/evaluation-error-code.js +29 -0
  52. package/dist/dto/evaluations/evaluation-error-code.js.map +1 -0
  53. package/dist/dto/evaluations/index.d.ts +2 -0
  54. package/dist/dto/evaluations/index.js +19 -0
  55. package/dist/dto/evaluations/index.js.map +1 -0
  56. package/dist/dto/folders/list-folder-query.dto.d.ts +2 -2
  57. package/dist/dto/index.d.ts +14 -4
  58. package/dist/dto/index.js +39 -1
  59. package/dist/dto/index.js.map +1 -1
  60. package/dist/dto/instance-ai/instance-ai-confirm-request.dto.d.ts +95 -42
  61. package/dist/dto/instance-ai/instance-ai-confirm-request.dto.js +47 -18
  62. package/dist/dto/instance-ai/instance-ai-confirm-request.dto.js.map +1 -1
  63. package/dist/dto/oauth/oauth-client.dto.d.ts +11 -0
  64. package/dist/dto/oauth/oauth-client.dto.js +8 -1
  65. package/dist/dto/oauth/oauth-client.dto.js.map +1 -1
  66. package/dist/dto/project/update-project.dto.d.ts +2 -2
  67. package/dist/dto/provisioning/config.dto.d.ts +2 -0
  68. package/dist/dto/source-control/push-work-folder-request.dto.d.ts +3 -3
  69. package/dist/dto/workflow-history/update-workflow-history-version.dto.d.ts +1 -1
  70. package/dist/dto/workflows/activate-workflow.dto.d.ts +1 -1
  71. package/dist/dto/workflows/create-workflow.dto.d.ts +2 -2
  72. package/dist/dto/workflows/update-workflow.dto.d.ts +2 -2
  73. package/dist/frontend-settings.d.ts +8 -1
  74. package/dist/index.d.ts +7 -2
  75. package/dist/index.js +29 -3
  76. package/dist/index.js.map +1 -1
  77. package/dist/instance-registry-types.d.ts +174 -69
  78. package/dist/instance-registry-types.js +15 -1
  79. package/dist/instance-registry-types.js.map +1 -1
  80. package/dist/schemas/agent-run-reducer.js +1 -0
  81. package/dist/schemas/agent-run-reducer.js.map +1 -1
  82. package/dist/schemas/breaking-changes.schema.d.ts +48 -48
  83. package/dist/schemas/encryption-key.schema.d.ts +70 -0
  84. package/dist/schemas/encryption-key.schema.js +17 -0
  85. package/dist/schemas/encryption-key.schema.js.map +1 -0
  86. package/dist/schemas/evaluations.schema.d.ts +18 -0
  87. package/dist/schemas/evaluations.schema.js +14 -0
  88. package/dist/schemas/evaluations.schema.js.map +1 -0
  89. package/dist/schemas/instance-ai.schema.d.ts +337 -166
  90. package/dist/schemas/instance-ai.schema.js +80 -8
  91. package/dist/schemas/instance-ai.schema.js.map +1 -1
  92. package/dist/schemas/secrets-provider.schema.d.ts +10 -10
  93. package/dist/schemas/source-controlled-file.schema.d.ts +2 -2
  94. package/dist/schemas/user.schema.d.ts +12 -12
  95. package/dist/schemas/workflow-execution-status.schema.d.ts +4 -4
  96. package/package.json +5 -5
@@ -0,0 +1,845 @@
1
+ import { z } from 'zod';
2
+ export declare const metricOutputTypeSchema: z.ZodEnum<["numeric", "boolean"]>;
3
+ export declare const expressionMetricConfigSchema: z.ZodObject<{
4
+ expression: z.ZodString;
5
+ outputType: z.ZodEnum<["numeric", "boolean"]>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ expression: string;
8
+ outputType: "boolean" | "numeric";
9
+ }, {
10
+ expression: string;
11
+ outputType: "boolean" | "numeric";
12
+ }>;
13
+ export declare const llmJudgeMetricPresetSchema: z.ZodEnum<["correctness", "helpfulness"]>;
14
+ export declare const llmJudgeMetricInputsSchema: z.ZodObject<{
15
+ actualAnswer: z.ZodString;
16
+ userQuery: z.ZodOptional<z.ZodString>;
17
+ expectedAnswer: z.ZodOptional<z.ZodString>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ actualAnswer: string;
20
+ userQuery?: string | undefined;
21
+ expectedAnswer?: string | undefined;
22
+ }, {
23
+ actualAnswer: string;
24
+ userQuery?: string | undefined;
25
+ expectedAnswer?: string | undefined;
26
+ }>;
27
+ export declare const llmJudgeMetricConfigSchema: z.ZodEffects<z.ZodObject<{
28
+ preset: z.ZodEnum<["correctness", "helpfulness"]>;
29
+ prompt: z.ZodString;
30
+ provider: z.ZodString;
31
+ credentialId: z.ZodString;
32
+ model: z.ZodString;
33
+ outputType: z.ZodEnum<["numeric", "boolean"]>;
34
+ inputs: z.ZodObject<{
35
+ actualAnswer: z.ZodString;
36
+ userQuery: z.ZodOptional<z.ZodString>;
37
+ expectedAnswer: z.ZodOptional<z.ZodString>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ actualAnswer: string;
40
+ userQuery?: string | undefined;
41
+ expectedAnswer?: string | undefined;
42
+ }, {
43
+ actualAnswer: string;
44
+ userQuery?: string | undefined;
45
+ expectedAnswer?: string | undefined;
46
+ }>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ provider: string;
49
+ model: string;
50
+ credentialId: string;
51
+ prompt: string;
52
+ outputType: "boolean" | "numeric";
53
+ preset: "correctness" | "helpfulness";
54
+ inputs: {
55
+ actualAnswer: string;
56
+ userQuery?: string | undefined;
57
+ expectedAnswer?: string | undefined;
58
+ };
59
+ }, {
60
+ provider: string;
61
+ model: string;
62
+ credentialId: string;
63
+ prompt: string;
64
+ outputType: "boolean" | "numeric";
65
+ preset: "correctness" | "helpfulness";
66
+ inputs: {
67
+ actualAnswer: string;
68
+ userQuery?: string | undefined;
69
+ expectedAnswer?: string | undefined;
70
+ };
71
+ }>, {
72
+ provider: string;
73
+ model: string;
74
+ credentialId: string;
75
+ prompt: string;
76
+ outputType: "boolean" | "numeric";
77
+ preset: "correctness" | "helpfulness";
78
+ inputs: {
79
+ actualAnswer: string;
80
+ userQuery?: string | undefined;
81
+ expectedAnswer?: string | undefined;
82
+ };
83
+ }, {
84
+ provider: string;
85
+ model: string;
86
+ credentialId: string;
87
+ prompt: string;
88
+ outputType: "boolean" | "numeric";
89
+ preset: "correctness" | "helpfulness";
90
+ inputs: {
91
+ actualAnswer: string;
92
+ userQuery?: string | undefined;
93
+ expectedAnswer?: string | undefined;
94
+ };
95
+ }>;
96
+ export type LlmJudgeMetricPreset = z.infer<typeof llmJudgeMetricPresetSchema>;
97
+ export type LlmJudgeMetricInputs = z.infer<typeof llmJudgeMetricInputsSchema>;
98
+ export declare const evaluationMetricSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
99
+ id: z.ZodString;
100
+ name: z.ZodString;
101
+ type: z.ZodLiteral<"expression">;
102
+ config: z.ZodObject<{
103
+ expression: z.ZodString;
104
+ outputType: z.ZodEnum<["numeric", "boolean"]>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ expression: string;
107
+ outputType: "boolean" | "numeric";
108
+ }, {
109
+ expression: string;
110
+ outputType: "boolean" | "numeric";
111
+ }>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ type: "expression";
114
+ id: string;
115
+ name: string;
116
+ config: {
117
+ expression: string;
118
+ outputType: "boolean" | "numeric";
119
+ };
120
+ }, {
121
+ type: "expression";
122
+ id: string;
123
+ name: string;
124
+ config: {
125
+ expression: string;
126
+ outputType: "boolean" | "numeric";
127
+ };
128
+ }>, z.ZodObject<{
129
+ id: z.ZodString;
130
+ name: z.ZodString;
131
+ type: z.ZodLiteral<"llm_judge">;
132
+ config: z.ZodEffects<z.ZodObject<{
133
+ preset: z.ZodEnum<["correctness", "helpfulness"]>;
134
+ prompt: z.ZodString;
135
+ provider: z.ZodString;
136
+ credentialId: z.ZodString;
137
+ model: z.ZodString;
138
+ outputType: z.ZodEnum<["numeric", "boolean"]>;
139
+ inputs: z.ZodObject<{
140
+ actualAnswer: z.ZodString;
141
+ userQuery: z.ZodOptional<z.ZodString>;
142
+ expectedAnswer: z.ZodOptional<z.ZodString>;
143
+ }, "strip", z.ZodTypeAny, {
144
+ actualAnswer: string;
145
+ userQuery?: string | undefined;
146
+ expectedAnswer?: string | undefined;
147
+ }, {
148
+ actualAnswer: string;
149
+ userQuery?: string | undefined;
150
+ expectedAnswer?: string | undefined;
151
+ }>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ provider: string;
154
+ model: string;
155
+ credentialId: string;
156
+ prompt: string;
157
+ outputType: "boolean" | "numeric";
158
+ preset: "correctness" | "helpfulness";
159
+ inputs: {
160
+ actualAnswer: string;
161
+ userQuery?: string | undefined;
162
+ expectedAnswer?: string | undefined;
163
+ };
164
+ }, {
165
+ provider: string;
166
+ model: string;
167
+ credentialId: string;
168
+ prompt: string;
169
+ outputType: "boolean" | "numeric";
170
+ preset: "correctness" | "helpfulness";
171
+ inputs: {
172
+ actualAnswer: string;
173
+ userQuery?: string | undefined;
174
+ expectedAnswer?: string | undefined;
175
+ };
176
+ }>, {
177
+ provider: string;
178
+ model: string;
179
+ credentialId: string;
180
+ prompt: string;
181
+ outputType: "boolean" | "numeric";
182
+ preset: "correctness" | "helpfulness";
183
+ inputs: {
184
+ actualAnswer: string;
185
+ userQuery?: string | undefined;
186
+ expectedAnswer?: string | undefined;
187
+ };
188
+ }, {
189
+ provider: string;
190
+ model: string;
191
+ credentialId: string;
192
+ prompt: string;
193
+ outputType: "boolean" | "numeric";
194
+ preset: "correctness" | "helpfulness";
195
+ inputs: {
196
+ actualAnswer: string;
197
+ userQuery?: string | undefined;
198
+ expectedAnswer?: string | undefined;
199
+ };
200
+ }>;
201
+ }, "strip", z.ZodTypeAny, {
202
+ type: "llm_judge";
203
+ id: string;
204
+ name: string;
205
+ config: {
206
+ provider: string;
207
+ model: string;
208
+ credentialId: string;
209
+ prompt: string;
210
+ outputType: "boolean" | "numeric";
211
+ preset: "correctness" | "helpfulness";
212
+ inputs: {
213
+ actualAnswer: string;
214
+ userQuery?: string | undefined;
215
+ expectedAnswer?: string | undefined;
216
+ };
217
+ };
218
+ }, {
219
+ type: "llm_judge";
220
+ id: string;
221
+ name: string;
222
+ config: {
223
+ provider: string;
224
+ model: string;
225
+ credentialId: string;
226
+ prompt: string;
227
+ outputType: "boolean" | "numeric";
228
+ preset: "correctness" | "helpfulness";
229
+ inputs: {
230
+ actualAnswer: string;
231
+ userQuery?: string | undefined;
232
+ expectedAnswer?: string | undefined;
233
+ };
234
+ };
235
+ }>]>;
236
+ export type EvaluationMetric = z.infer<typeof evaluationMetricSchema>;
237
+ export type MetricOutputType = z.infer<typeof metricOutputTypeSchema>;
238
+ export declare const dataTableDatasetRefSchema: z.ZodObject<{
239
+ dataTableId: z.ZodString;
240
+ }, "strip", z.ZodTypeAny, {
241
+ dataTableId: string;
242
+ }, {
243
+ dataTableId: string;
244
+ }>;
245
+ export declare const googleSheetsDatasetRefSchema: z.ZodObject<{
246
+ credentialId: z.ZodString;
247
+ spreadsheetId: z.ZodString;
248
+ sheetName: z.ZodString;
249
+ headerRow: z.ZodOptional<z.ZodNumber>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ credentialId: string;
252
+ spreadsheetId: string;
253
+ sheetName: string;
254
+ headerRow?: number | undefined;
255
+ }, {
256
+ credentialId: string;
257
+ spreadsheetId: string;
258
+ sheetName: string;
259
+ headerRow?: number | undefined;
260
+ }>;
261
+ export type DataTableDatasetRef = z.infer<typeof dataTableDatasetRefSchema>;
262
+ export type GoogleSheetsDatasetRef = z.infer<typeof googleSheetsDatasetRefSchema>;
263
+ export declare const datasetRefSchema: z.ZodDiscriminatedUnion<"datasetSource", [z.ZodObject<{
264
+ datasetSource: z.ZodLiteral<"data_table">;
265
+ datasetRef: z.ZodObject<{
266
+ dataTableId: z.ZodString;
267
+ }, "strip", z.ZodTypeAny, {
268
+ dataTableId: string;
269
+ }, {
270
+ dataTableId: string;
271
+ }>;
272
+ }, "strip", z.ZodTypeAny, {
273
+ datasetSource: "data_table";
274
+ datasetRef: {
275
+ dataTableId: string;
276
+ };
277
+ }, {
278
+ datasetSource: "data_table";
279
+ datasetRef: {
280
+ dataTableId: string;
281
+ };
282
+ }>, z.ZodObject<{
283
+ datasetSource: z.ZodLiteral<"google_sheets">;
284
+ datasetRef: z.ZodObject<{
285
+ credentialId: z.ZodString;
286
+ spreadsheetId: z.ZodString;
287
+ sheetName: z.ZodString;
288
+ headerRow: z.ZodOptional<z.ZodNumber>;
289
+ }, "strip", z.ZodTypeAny, {
290
+ credentialId: string;
291
+ spreadsheetId: string;
292
+ sheetName: string;
293
+ headerRow?: number | undefined;
294
+ }, {
295
+ credentialId: string;
296
+ spreadsheetId: string;
297
+ sheetName: string;
298
+ headerRow?: number | undefined;
299
+ }>;
300
+ }, "strip", z.ZodTypeAny, {
301
+ datasetSource: "google_sheets";
302
+ datasetRef: {
303
+ credentialId: string;
304
+ spreadsheetId: string;
305
+ sheetName: string;
306
+ headerRow?: number | undefined;
307
+ };
308
+ }, {
309
+ datasetSource: "google_sheets";
310
+ datasetRef: {
311
+ credentialId: string;
312
+ spreadsheetId: string;
313
+ sheetName: string;
314
+ headerRow?: number | undefined;
315
+ };
316
+ }>]>;
317
+ export type DatasetRef = z.infer<typeof datasetRefSchema>;
318
+ export declare const evaluationConfigStatusSchema: z.ZodEnum<["valid", "invalid"]>;
319
+ export type EvaluationConfigStatus = z.infer<typeof evaluationConfigStatusSchema>;
320
+ export declare const evaluationConfigSchema: z.ZodIntersection<z.ZodObject<{
321
+ id: z.ZodString;
322
+ workflowId: z.ZodString;
323
+ name: z.ZodString;
324
+ status: z.ZodEnum<["valid", "invalid"]>;
325
+ invalidReason: z.ZodNullable<z.ZodString>;
326
+ startNodeName: z.ZodString;
327
+ endNodeName: z.ZodString;
328
+ metrics: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
329
+ id: z.ZodString;
330
+ name: z.ZodString;
331
+ type: z.ZodLiteral<"expression">;
332
+ config: z.ZodObject<{
333
+ expression: z.ZodString;
334
+ outputType: z.ZodEnum<["numeric", "boolean"]>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ expression: string;
337
+ outputType: "boolean" | "numeric";
338
+ }, {
339
+ expression: string;
340
+ outputType: "boolean" | "numeric";
341
+ }>;
342
+ }, "strip", z.ZodTypeAny, {
343
+ type: "expression";
344
+ id: string;
345
+ name: string;
346
+ config: {
347
+ expression: string;
348
+ outputType: "boolean" | "numeric";
349
+ };
350
+ }, {
351
+ type: "expression";
352
+ id: string;
353
+ name: string;
354
+ config: {
355
+ expression: string;
356
+ outputType: "boolean" | "numeric";
357
+ };
358
+ }>, z.ZodObject<{
359
+ id: z.ZodString;
360
+ name: z.ZodString;
361
+ type: z.ZodLiteral<"llm_judge">;
362
+ config: z.ZodEffects<z.ZodObject<{
363
+ preset: z.ZodEnum<["correctness", "helpfulness"]>;
364
+ prompt: z.ZodString;
365
+ provider: z.ZodString;
366
+ credentialId: z.ZodString;
367
+ model: z.ZodString;
368
+ outputType: z.ZodEnum<["numeric", "boolean"]>;
369
+ inputs: z.ZodObject<{
370
+ actualAnswer: z.ZodString;
371
+ userQuery: z.ZodOptional<z.ZodString>;
372
+ expectedAnswer: z.ZodOptional<z.ZodString>;
373
+ }, "strip", z.ZodTypeAny, {
374
+ actualAnswer: string;
375
+ userQuery?: string | undefined;
376
+ expectedAnswer?: string | undefined;
377
+ }, {
378
+ actualAnswer: string;
379
+ userQuery?: string | undefined;
380
+ expectedAnswer?: string | undefined;
381
+ }>;
382
+ }, "strip", z.ZodTypeAny, {
383
+ provider: string;
384
+ model: string;
385
+ credentialId: string;
386
+ prompt: string;
387
+ outputType: "boolean" | "numeric";
388
+ preset: "correctness" | "helpfulness";
389
+ inputs: {
390
+ actualAnswer: string;
391
+ userQuery?: string | undefined;
392
+ expectedAnswer?: string | undefined;
393
+ };
394
+ }, {
395
+ provider: string;
396
+ model: string;
397
+ credentialId: string;
398
+ prompt: string;
399
+ outputType: "boolean" | "numeric";
400
+ preset: "correctness" | "helpfulness";
401
+ inputs: {
402
+ actualAnswer: string;
403
+ userQuery?: string | undefined;
404
+ expectedAnswer?: string | undefined;
405
+ };
406
+ }>, {
407
+ provider: string;
408
+ model: string;
409
+ credentialId: string;
410
+ prompt: string;
411
+ outputType: "boolean" | "numeric";
412
+ preset: "correctness" | "helpfulness";
413
+ inputs: {
414
+ actualAnswer: string;
415
+ userQuery?: string | undefined;
416
+ expectedAnswer?: string | undefined;
417
+ };
418
+ }, {
419
+ provider: string;
420
+ model: string;
421
+ credentialId: string;
422
+ prompt: string;
423
+ outputType: "boolean" | "numeric";
424
+ preset: "correctness" | "helpfulness";
425
+ inputs: {
426
+ actualAnswer: string;
427
+ userQuery?: string | undefined;
428
+ expectedAnswer?: string | undefined;
429
+ };
430
+ }>;
431
+ }, "strip", z.ZodTypeAny, {
432
+ type: "llm_judge";
433
+ id: string;
434
+ name: string;
435
+ config: {
436
+ provider: string;
437
+ model: string;
438
+ credentialId: string;
439
+ prompt: string;
440
+ outputType: "boolean" | "numeric";
441
+ preset: "correctness" | "helpfulness";
442
+ inputs: {
443
+ actualAnswer: string;
444
+ userQuery?: string | undefined;
445
+ expectedAnswer?: string | undefined;
446
+ };
447
+ };
448
+ }, {
449
+ type: "llm_judge";
450
+ id: string;
451
+ name: string;
452
+ config: {
453
+ provider: string;
454
+ model: string;
455
+ credentialId: string;
456
+ prompt: string;
457
+ outputType: "boolean" | "numeric";
458
+ preset: "correctness" | "helpfulness";
459
+ inputs: {
460
+ actualAnswer: string;
461
+ userQuery?: string | undefined;
462
+ expectedAnswer?: string | undefined;
463
+ };
464
+ };
465
+ }>]>, "many">;
466
+ }, "strip", z.ZodTypeAny, {
467
+ status: "valid" | "invalid";
468
+ workflowId: string;
469
+ id: string;
470
+ name: string;
471
+ invalidReason: string | null;
472
+ startNodeName: string;
473
+ endNodeName: string;
474
+ metrics: ({
475
+ type: "expression";
476
+ id: string;
477
+ name: string;
478
+ config: {
479
+ expression: string;
480
+ outputType: "boolean" | "numeric";
481
+ };
482
+ } | {
483
+ type: "llm_judge";
484
+ id: string;
485
+ name: string;
486
+ config: {
487
+ provider: string;
488
+ model: string;
489
+ credentialId: string;
490
+ prompt: string;
491
+ outputType: "boolean" | "numeric";
492
+ preset: "correctness" | "helpfulness";
493
+ inputs: {
494
+ actualAnswer: string;
495
+ userQuery?: string | undefined;
496
+ expectedAnswer?: string | undefined;
497
+ };
498
+ };
499
+ })[];
500
+ }, {
501
+ status: "valid" | "invalid";
502
+ workflowId: string;
503
+ id: string;
504
+ name: string;
505
+ invalidReason: string | null;
506
+ startNodeName: string;
507
+ endNodeName: string;
508
+ metrics: ({
509
+ type: "expression";
510
+ id: string;
511
+ name: string;
512
+ config: {
513
+ expression: string;
514
+ outputType: "boolean" | "numeric";
515
+ };
516
+ } | {
517
+ type: "llm_judge";
518
+ id: string;
519
+ name: string;
520
+ config: {
521
+ provider: string;
522
+ model: string;
523
+ credentialId: string;
524
+ prompt: string;
525
+ outputType: "boolean" | "numeric";
526
+ preset: "correctness" | "helpfulness";
527
+ inputs: {
528
+ actualAnswer: string;
529
+ userQuery?: string | undefined;
530
+ expectedAnswer?: string | undefined;
531
+ };
532
+ };
533
+ })[];
534
+ }>, z.ZodDiscriminatedUnion<"datasetSource", [z.ZodObject<{
535
+ datasetSource: z.ZodLiteral<"data_table">;
536
+ datasetRef: z.ZodObject<{
537
+ dataTableId: z.ZodString;
538
+ }, "strip", z.ZodTypeAny, {
539
+ dataTableId: string;
540
+ }, {
541
+ dataTableId: string;
542
+ }>;
543
+ }, "strip", z.ZodTypeAny, {
544
+ datasetSource: "data_table";
545
+ datasetRef: {
546
+ dataTableId: string;
547
+ };
548
+ }, {
549
+ datasetSource: "data_table";
550
+ datasetRef: {
551
+ dataTableId: string;
552
+ };
553
+ }>, z.ZodObject<{
554
+ datasetSource: z.ZodLiteral<"google_sheets">;
555
+ datasetRef: z.ZodObject<{
556
+ credentialId: z.ZodString;
557
+ spreadsheetId: z.ZodString;
558
+ sheetName: z.ZodString;
559
+ headerRow: z.ZodOptional<z.ZodNumber>;
560
+ }, "strip", z.ZodTypeAny, {
561
+ credentialId: string;
562
+ spreadsheetId: string;
563
+ sheetName: string;
564
+ headerRow?: number | undefined;
565
+ }, {
566
+ credentialId: string;
567
+ spreadsheetId: string;
568
+ sheetName: string;
569
+ headerRow?: number | undefined;
570
+ }>;
571
+ }, "strip", z.ZodTypeAny, {
572
+ datasetSource: "google_sheets";
573
+ datasetRef: {
574
+ credentialId: string;
575
+ spreadsheetId: string;
576
+ sheetName: string;
577
+ headerRow?: number | undefined;
578
+ };
579
+ }, {
580
+ datasetSource: "google_sheets";
581
+ datasetRef: {
582
+ credentialId: string;
583
+ spreadsheetId: string;
584
+ sheetName: string;
585
+ headerRow?: number | undefined;
586
+ };
587
+ }>]>>;
588
+ export type EvaluationConfigDto = z.infer<typeof evaluationConfigSchema>;
589
+ export declare const upsertEvaluationConfigSchema: z.ZodIntersection<z.ZodObject<{
590
+ name: z.ZodString;
591
+ startNodeName: z.ZodString;
592
+ endNodeName: z.ZodString;
593
+ metrics: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
594
+ id: z.ZodString;
595
+ name: z.ZodString;
596
+ type: z.ZodLiteral<"expression">;
597
+ config: z.ZodObject<{
598
+ expression: z.ZodString;
599
+ outputType: z.ZodEnum<["numeric", "boolean"]>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ expression: string;
602
+ outputType: "boolean" | "numeric";
603
+ }, {
604
+ expression: string;
605
+ outputType: "boolean" | "numeric";
606
+ }>;
607
+ }, "strip", z.ZodTypeAny, {
608
+ type: "expression";
609
+ id: string;
610
+ name: string;
611
+ config: {
612
+ expression: string;
613
+ outputType: "boolean" | "numeric";
614
+ };
615
+ }, {
616
+ type: "expression";
617
+ id: string;
618
+ name: string;
619
+ config: {
620
+ expression: string;
621
+ outputType: "boolean" | "numeric";
622
+ };
623
+ }>, z.ZodObject<{
624
+ id: z.ZodString;
625
+ name: z.ZodString;
626
+ type: z.ZodLiteral<"llm_judge">;
627
+ config: z.ZodEffects<z.ZodObject<{
628
+ preset: z.ZodEnum<["correctness", "helpfulness"]>;
629
+ prompt: z.ZodString;
630
+ provider: z.ZodString;
631
+ credentialId: z.ZodString;
632
+ model: z.ZodString;
633
+ outputType: z.ZodEnum<["numeric", "boolean"]>;
634
+ inputs: z.ZodObject<{
635
+ actualAnswer: z.ZodString;
636
+ userQuery: z.ZodOptional<z.ZodString>;
637
+ expectedAnswer: z.ZodOptional<z.ZodString>;
638
+ }, "strip", z.ZodTypeAny, {
639
+ actualAnswer: string;
640
+ userQuery?: string | undefined;
641
+ expectedAnswer?: string | undefined;
642
+ }, {
643
+ actualAnswer: string;
644
+ userQuery?: string | undefined;
645
+ expectedAnswer?: string | undefined;
646
+ }>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ provider: string;
649
+ model: string;
650
+ credentialId: string;
651
+ prompt: string;
652
+ outputType: "boolean" | "numeric";
653
+ preset: "correctness" | "helpfulness";
654
+ inputs: {
655
+ actualAnswer: string;
656
+ userQuery?: string | undefined;
657
+ expectedAnswer?: string | undefined;
658
+ };
659
+ }, {
660
+ provider: string;
661
+ model: string;
662
+ credentialId: string;
663
+ prompt: string;
664
+ outputType: "boolean" | "numeric";
665
+ preset: "correctness" | "helpfulness";
666
+ inputs: {
667
+ actualAnswer: string;
668
+ userQuery?: string | undefined;
669
+ expectedAnswer?: string | undefined;
670
+ };
671
+ }>, {
672
+ provider: string;
673
+ model: string;
674
+ credentialId: string;
675
+ prompt: string;
676
+ outputType: "boolean" | "numeric";
677
+ preset: "correctness" | "helpfulness";
678
+ inputs: {
679
+ actualAnswer: string;
680
+ userQuery?: string | undefined;
681
+ expectedAnswer?: string | undefined;
682
+ };
683
+ }, {
684
+ provider: string;
685
+ model: string;
686
+ credentialId: string;
687
+ prompt: string;
688
+ outputType: "boolean" | "numeric";
689
+ preset: "correctness" | "helpfulness";
690
+ inputs: {
691
+ actualAnswer: string;
692
+ userQuery?: string | undefined;
693
+ expectedAnswer?: string | undefined;
694
+ };
695
+ }>;
696
+ }, "strip", z.ZodTypeAny, {
697
+ type: "llm_judge";
698
+ id: string;
699
+ name: string;
700
+ config: {
701
+ provider: string;
702
+ model: string;
703
+ credentialId: string;
704
+ prompt: string;
705
+ outputType: "boolean" | "numeric";
706
+ preset: "correctness" | "helpfulness";
707
+ inputs: {
708
+ actualAnswer: string;
709
+ userQuery?: string | undefined;
710
+ expectedAnswer?: string | undefined;
711
+ };
712
+ };
713
+ }, {
714
+ type: "llm_judge";
715
+ id: string;
716
+ name: string;
717
+ config: {
718
+ provider: string;
719
+ model: string;
720
+ credentialId: string;
721
+ prompt: string;
722
+ outputType: "boolean" | "numeric";
723
+ preset: "correctness" | "helpfulness";
724
+ inputs: {
725
+ actualAnswer: string;
726
+ userQuery?: string | undefined;
727
+ expectedAnswer?: string | undefined;
728
+ };
729
+ };
730
+ }>]>, "many">;
731
+ }, "strip", z.ZodTypeAny, {
732
+ name: string;
733
+ startNodeName: string;
734
+ endNodeName: string;
735
+ metrics: ({
736
+ type: "expression";
737
+ id: string;
738
+ name: string;
739
+ config: {
740
+ expression: string;
741
+ outputType: "boolean" | "numeric";
742
+ };
743
+ } | {
744
+ type: "llm_judge";
745
+ id: string;
746
+ name: string;
747
+ config: {
748
+ provider: string;
749
+ model: string;
750
+ credentialId: string;
751
+ prompt: string;
752
+ outputType: "boolean" | "numeric";
753
+ preset: "correctness" | "helpfulness";
754
+ inputs: {
755
+ actualAnswer: string;
756
+ userQuery?: string | undefined;
757
+ expectedAnswer?: string | undefined;
758
+ };
759
+ };
760
+ })[];
761
+ }, {
762
+ name: string;
763
+ startNodeName: string;
764
+ endNodeName: string;
765
+ metrics: ({
766
+ type: "expression";
767
+ id: string;
768
+ name: string;
769
+ config: {
770
+ expression: string;
771
+ outputType: "boolean" | "numeric";
772
+ };
773
+ } | {
774
+ type: "llm_judge";
775
+ id: string;
776
+ name: string;
777
+ config: {
778
+ provider: string;
779
+ model: string;
780
+ credentialId: string;
781
+ prompt: string;
782
+ outputType: "boolean" | "numeric";
783
+ preset: "correctness" | "helpfulness";
784
+ inputs: {
785
+ actualAnswer: string;
786
+ userQuery?: string | undefined;
787
+ expectedAnswer?: string | undefined;
788
+ };
789
+ };
790
+ })[];
791
+ }>, z.ZodDiscriminatedUnion<"datasetSource", [z.ZodObject<{
792
+ datasetSource: z.ZodLiteral<"data_table">;
793
+ datasetRef: z.ZodObject<{
794
+ dataTableId: z.ZodString;
795
+ }, "strip", z.ZodTypeAny, {
796
+ dataTableId: string;
797
+ }, {
798
+ dataTableId: string;
799
+ }>;
800
+ }, "strip", z.ZodTypeAny, {
801
+ datasetSource: "data_table";
802
+ datasetRef: {
803
+ dataTableId: string;
804
+ };
805
+ }, {
806
+ datasetSource: "data_table";
807
+ datasetRef: {
808
+ dataTableId: string;
809
+ };
810
+ }>, z.ZodObject<{
811
+ datasetSource: z.ZodLiteral<"google_sheets">;
812
+ datasetRef: z.ZodObject<{
813
+ credentialId: z.ZodString;
814
+ spreadsheetId: z.ZodString;
815
+ sheetName: z.ZodString;
816
+ headerRow: z.ZodOptional<z.ZodNumber>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ credentialId: string;
819
+ spreadsheetId: string;
820
+ sheetName: string;
821
+ headerRow?: number | undefined;
822
+ }, {
823
+ credentialId: string;
824
+ spreadsheetId: string;
825
+ sheetName: string;
826
+ headerRow?: number | undefined;
827
+ }>;
828
+ }, "strip", z.ZodTypeAny, {
829
+ datasetSource: "google_sheets";
830
+ datasetRef: {
831
+ credentialId: string;
832
+ spreadsheetId: string;
833
+ sheetName: string;
834
+ headerRow?: number | undefined;
835
+ };
836
+ }, {
837
+ datasetSource: "google_sheets";
838
+ datasetRef: {
839
+ credentialId: string;
840
+ spreadsheetId: string;
841
+ sheetName: string;
842
+ headerRow?: number | undefined;
843
+ };
844
+ }>]>>;
845
+ export type UpsertEvaluationConfigDto = z.infer<typeof upsertEvaluationConfigSchema>;