@proofhound/shared 0.1.6

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 (98) hide show
  1. package/LICENSE +190 -0
  2. package/dist/classification-options.d.ts +9 -0
  3. package/dist/classification-options.d.ts.map +1 -0
  4. package/dist/classification-options.js +121 -0
  5. package/dist/classification-options.js.map +1 -0
  6. package/dist/dto/annotation.dto.d.ts +291 -0
  7. package/dist/dto/annotation.dto.d.ts.map +1 -0
  8. package/dist/dto/annotation.dto.js +127 -0
  9. package/dist/dto/annotation.dto.js.map +1 -0
  10. package/dist/dto/canary-release.dto.d.ts +483 -0
  11. package/dist/dto/canary-release.dto.d.ts.map +1 -0
  12. package/dist/dto/canary-release.dto.js +276 -0
  13. package/dist/dto/canary-release.dto.js.map +1 -0
  14. package/dist/dto/connector.dto.d.ts +1568 -0
  15. package/dist/dto/connector.dto.d.ts.map +1 -0
  16. package/dist/dto/connector.dto.js +472 -0
  17. package/dist/dto/connector.dto.js.map +1 -0
  18. package/dist/dto/dataset-import.dto.d.ts +128 -0
  19. package/dist/dto/dataset-import.dto.d.ts.map +1 -0
  20. package/dist/dto/dataset-import.dto.js +53 -0
  21. package/dist/dto/dataset-import.dto.js.map +1 -0
  22. package/dist/dto/dataset-modality.d.ts +9 -0
  23. package/dist/dto/dataset-modality.d.ts.map +1 -0
  24. package/dist/dto/dataset-modality.js +17 -0
  25. package/dist/dto/dataset-modality.js.map +1 -0
  26. package/dist/dto/dataset.dto.d.ts +240 -0
  27. package/dist/dto/dataset.dto.d.ts.map +1 -0
  28. package/dist/dto/dataset.dto.js +110 -0
  29. package/dist/dto/dataset.dto.js.map +1 -0
  30. package/dist/dto/experiment.dto.d.ts +393 -0
  31. package/dist/dto/experiment.dto.d.ts.map +1 -0
  32. package/dist/dto/experiment.dto.js +121 -0
  33. package/dist/dto/experiment.dto.js.map +1 -0
  34. package/dist/dto/model.dto.d.ts +356 -0
  35. package/dist/dto/model.dto.d.ts.map +1 -0
  36. package/dist/dto/model.dto.js +183 -0
  37. package/dist/dto/model.dto.js.map +1 -0
  38. package/dist/dto/monitoring.dto.d.ts +354 -0
  39. package/dist/dto/monitoring.dto.d.ts.map +1 -0
  40. package/dist/dto/monitoring.dto.js +102 -0
  41. package/dist/dto/monitoring.dto.js.map +1 -0
  42. package/dist/dto/optimization.dto.d.ts +2086 -0
  43. package/dist/dto/optimization.dto.d.ts.map +1 -0
  44. package/dist/dto/optimization.dto.js +418 -0
  45. package/dist/dto/optimization.dto.js.map +1 -0
  46. package/dist/dto/production-release.dto.d.ts +317 -0
  47. package/dist/dto/production-release.dto.d.ts.map +1 -0
  48. package/dist/dto/production-release.dto.js +146 -0
  49. package/dist/dto/production-release.dto.js.map +1 -0
  50. package/dist/dto/prompt.dto.d.ts +469 -0
  51. package/dist/dto/prompt.dto.d.ts.map +1 -0
  52. package/dist/dto/prompt.dto.js +177 -0
  53. package/dist/dto/prompt.dto.js.map +1 -0
  54. package/dist/dto/quick-start.dto.d.ts +450 -0
  55. package/dist/dto/quick-start.dto.d.ts.map +1 -0
  56. package/dist/dto/quick-start.dto.js +106 -0
  57. package/dist/dto/quick-start.dto.js.map +1 -0
  58. package/dist/dto/release-line.dto.d.ts +1099 -0
  59. package/dist/dto/release-line.dto.d.ts.map +1 -0
  60. package/dist/dto/release-line.dto.js +190 -0
  61. package/dist/dto/release-line.dto.js.map +1 -0
  62. package/dist/dto/run-result.dto.d.ts +419 -0
  63. package/dist/dto/run-result.dto.d.ts.map +1 -0
  64. package/dist/dto/run-result.dto.js +200 -0
  65. package/dist/dto/run-result.dto.js.map +1 -0
  66. package/dist/dto/token.dto.d.ts +80 -0
  67. package/dist/dto/token.dto.d.ts.map +1 -0
  68. package/dist/dto/token.dto.js +65 -0
  69. package/dist/dto/token.dto.js.map +1 -0
  70. package/dist/index.d.ts +22 -0
  71. package/dist/index.d.ts.map +1 -0
  72. package/dist/index.js +41 -0
  73. package/dist/index.js.map +1 -0
  74. package/dist/model-presets.d.ts +28 -0
  75. package/dist/model-presets.d.ts.map +1 -0
  76. package/dist/model-presets.js +295 -0
  77. package/dist/model-presets.js.map +1 -0
  78. package/dist/output-format/build.d.ts +18 -0
  79. package/dist/output-format/build.d.ts.map +1 -0
  80. package/dist/output-format/build.js +126 -0
  81. package/dist/output-format/build.js.map +1 -0
  82. package/dist/output-format/index.d.ts +3 -0
  83. package/dist/output-format/index.d.ts.map +1 -0
  84. package/dist/output-format/index.js +9 -0
  85. package/dist/output-format/index.js.map +1 -0
  86. package/dist/output-format/schema-bridge.d.ts +14 -0
  87. package/dist/output-format/schema-bridge.d.ts.map +1 -0
  88. package/dist/output-format/schema-bridge.js +58 -0
  89. package/dist/output-format/schema-bridge.js.map +1 -0
  90. package/dist/project-context.d.ts +13 -0
  91. package/dist/project-context.d.ts.map +1 -0
  92. package/dist/project-context.js +9 -0
  93. package/dist/project-context.js.map +1 -0
  94. package/dist/run-result-failure.d.ts +4 -0
  95. package/dist/run-result-failure.d.ts.map +1 -0
  96. package/dist/run-result-failure.js +16 -0
  97. package/dist/run-result-failure.js.map +1 -0
  98. package/package.json +45 -0
@@ -0,0 +1,469 @@
1
+ import { z } from 'zod';
2
+ export declare const promptIdParamSchema: z.ZodString;
3
+ export declare const promptVersionIdParamSchema: z.ZodString;
4
+ export declare const promptVersionStatusSchema: z.ZodEnum<{
5
+ editable: "editable";
6
+ frozen: "frozen";
7
+ }>;
8
+ export type PromptVersionStatusDto = z.infer<typeof promptVersionStatusSchema>;
9
+ export declare const reservedPromptVersionLabelSchema: z.ZodEnum<{
10
+ latest: "latest";
11
+ gray: "gray";
12
+ production: "production";
13
+ }>;
14
+ export type ReservedPromptVersionLabelDto = z.infer<typeof reservedPromptVersionLabelSchema>;
15
+ export declare const PROMPT_VERSION_LABEL_NAME_PATTERN: RegExp;
16
+ export declare const promptVersionLabelNameSchema: z.ZodString;
17
+ export declare const promptVersionLabelTypeSchema: z.ZodEnum<{
18
+ system: "system";
19
+ custom: "custom";
20
+ }>;
21
+ export type PromptVersionLabelTypeDto = z.infer<typeof promptVersionLabelTypeSchema>;
22
+ export declare const promptVersionLabelSchema: z.ZodObject<{
23
+ name: z.ZodString;
24
+ type: z.ZodEnum<{
25
+ system: "system";
26
+ custom: "custom";
27
+ }>;
28
+ }, z.core.$strip>;
29
+ export type PromptVersionLabelDto = z.infer<typeof promptVersionLabelSchema>;
30
+ export declare const promptListCustomLabelSchema: z.ZodObject<{
31
+ name: z.ZodString;
32
+ versionNumber: z.ZodNumber;
33
+ }, z.core.$strip>;
34
+ export type PromptListCustomLabelDto = z.infer<typeof promptListCustomLabelSchema>;
35
+ export declare const DEFAULT_PROMPT_LANGUAGE: "zh-CN";
36
+ export declare const promptLanguageSchema: z.ZodEnum<{
37
+ "zh-CN": "zh-CN";
38
+ "en-US": "en-US";
39
+ }>;
40
+ export type PromptLanguageDto = z.infer<typeof promptLanguageSchema>;
41
+ export declare const promptVariableTypeSchema: z.ZodEnum<{
42
+ number: "number";
43
+ text: "text";
44
+ image: "image";
45
+ image_url: "image_url";
46
+ image_base64: "image_base64";
47
+ }>;
48
+ export type PromptVariableTypeDto = z.infer<typeof promptVariableTypeSchema>;
49
+ export declare const promptVariableSchema: z.ZodObject<{
50
+ name: z.ZodString;
51
+ type: z.ZodEnum<{
52
+ number: "number";
53
+ text: "text";
54
+ image: "image";
55
+ image_url: "image_url";
56
+ image_base64: "image_base64";
57
+ }>;
58
+ required: z.ZodBoolean;
59
+ description: z.ZodOptional<z.ZodString>;
60
+ datasetField: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>;
62
+ export type PromptVariableDto = z.infer<typeof promptVariableSchema>;
63
+ export declare const promptOutputSchemaFieldSchema: z.ZodObject<{
64
+ key: z.ZodString;
65
+ value: z.ZodDefault<z.ZodString>;
66
+ isJudgment: z.ZodDefault<z.ZodBoolean>;
67
+ }, z.core.$strip>;
68
+ export type PromptOutputSchemaFieldDto = z.infer<typeof promptOutputSchemaFieldSchema>;
69
+ export declare const promptOutputSchema: z.ZodNullable<z.ZodObject<{
70
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
71
+ key: z.ZodString;
72
+ value: z.ZodDefault<z.ZodString>;
73
+ isJudgment: z.ZodDefault<z.ZodBoolean>;
74
+ }, z.core.$strip>>>;
75
+ }, z.core.$strip>>;
76
+ export type PromptOutputSchemaDto = z.infer<typeof promptOutputSchema>;
77
+ export declare const promptJudgmentRulesSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
78
+ export type PromptJudgmentRulesDto = z.infer<typeof promptJudgmentRulesSchema>;
79
+ export declare const promptVersionSchema: z.ZodObject<{
80
+ id: z.ZodString;
81
+ promptId: z.ZodString;
82
+ versionNumber: z.ZodNumber;
83
+ status: z.ZodEnum<{
84
+ editable: "editable";
85
+ frozen: "frozen";
86
+ }>;
87
+ body: z.ZodString;
88
+ variables: z.ZodArray<z.ZodObject<{
89
+ name: z.ZodString;
90
+ type: z.ZodEnum<{
91
+ number: "number";
92
+ text: "text";
93
+ image: "image";
94
+ image_url: "image_url";
95
+ image_base64: "image_base64";
96
+ }>;
97
+ required: z.ZodBoolean;
98
+ description: z.ZodOptional<z.ZodString>;
99
+ datasetField: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strip>>;
101
+ outputSchema: z.ZodNullable<z.ZodObject<{
102
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
103
+ key: z.ZodString;
104
+ value: z.ZodDefault<z.ZodString>;
105
+ isJudgment: z.ZodDefault<z.ZodBoolean>;
106
+ }, z.core.$strip>>>;
107
+ }, z.core.$strip>>;
108
+ judgmentRules: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
109
+ promptLanguage: z.ZodDefault<z.ZodEnum<{
110
+ "zh-CN": "zh-CN";
111
+ "en-US": "en-US";
112
+ }>>;
113
+ parentVersionId: z.ZodNullable<z.ZodString>;
114
+ generatedByOptimizationId: z.ZodNullable<z.ZodString>;
115
+ changeReason: z.ZodNullable<z.ZodString>;
116
+ labels: z.ZodDefault<z.ZodArray<z.ZodObject<{
117
+ name: z.ZodString;
118
+ type: z.ZodEnum<{
119
+ system: "system";
120
+ custom: "custom";
121
+ }>;
122
+ }, z.core.$strip>>>;
123
+ isFrozen: z.ZodBoolean;
124
+ createdBy: z.ZodString;
125
+ createdByDisplayName: z.ZodNullable<z.ZodString>;
126
+ createdAt: z.ZodString;
127
+ frozenAt: z.ZodNullable<z.ZodString>;
128
+ }, z.core.$strip>;
129
+ export type PromptVersionDto = z.infer<typeof promptVersionSchema>;
130
+ export declare const promptListItemSchema: z.ZodObject<{
131
+ id: z.ZodString;
132
+ projectId: z.ZodString;
133
+ name: z.ZodString;
134
+ defaultDatasetId: z.ZodNullable<z.ZodString>;
135
+ defaultDatasetName: z.ZodNullable<z.ZodString>;
136
+ latestVersionNumber: z.ZodNumber;
137
+ currentOnlineVersionNumber: z.ZodNullable<z.ZodNumber>;
138
+ currentGrayVersionNumber: z.ZodNullable<z.ZodNumber>;
139
+ customLabels: z.ZodDefault<z.ZodArray<z.ZodObject<{
140
+ name: z.ZodString;
141
+ versionNumber: z.ZodNumber;
142
+ }, z.core.$strip>>>;
143
+ latestVersionStatus: z.ZodEnum<{
144
+ editable: "editable";
145
+ frozen: "frozen";
146
+ }>;
147
+ createdBy: z.ZodString;
148
+ createdByDisplayName: z.ZodNullable<z.ZodString>;
149
+ createdAt: z.ZodString;
150
+ updatedAt: z.ZodString;
151
+ deletedAt: z.ZodNullable<z.ZodString>;
152
+ activeReferences: z.ZodNumber;
153
+ }, z.core.$strip>;
154
+ export type PromptListItemDto = z.infer<typeof promptListItemSchema>;
155
+ export declare const promptDetailSchema: z.ZodObject<{
156
+ id: z.ZodString;
157
+ projectId: z.ZodString;
158
+ name: z.ZodString;
159
+ defaultDatasetId: z.ZodNullable<z.ZodString>;
160
+ defaultDatasetName: z.ZodNullable<z.ZodString>;
161
+ latestVersionNumber: z.ZodNumber;
162
+ currentOnlineVersionNumber: z.ZodNullable<z.ZodNumber>;
163
+ currentGrayVersionNumber: z.ZodNullable<z.ZodNumber>;
164
+ customLabels: z.ZodDefault<z.ZodArray<z.ZodObject<{
165
+ name: z.ZodString;
166
+ versionNumber: z.ZodNumber;
167
+ }, z.core.$strip>>>;
168
+ latestVersionStatus: z.ZodEnum<{
169
+ editable: "editable";
170
+ frozen: "frozen";
171
+ }>;
172
+ createdBy: z.ZodString;
173
+ createdByDisplayName: z.ZodNullable<z.ZodString>;
174
+ createdAt: z.ZodString;
175
+ updatedAt: z.ZodString;
176
+ deletedAt: z.ZodNullable<z.ZodString>;
177
+ activeReferences: z.ZodNumber;
178
+ versions: z.ZodArray<z.ZodObject<{
179
+ id: z.ZodString;
180
+ promptId: z.ZodString;
181
+ versionNumber: z.ZodNumber;
182
+ status: z.ZodEnum<{
183
+ editable: "editable";
184
+ frozen: "frozen";
185
+ }>;
186
+ body: z.ZodString;
187
+ variables: z.ZodArray<z.ZodObject<{
188
+ name: z.ZodString;
189
+ type: z.ZodEnum<{
190
+ number: "number";
191
+ text: "text";
192
+ image: "image";
193
+ image_url: "image_url";
194
+ image_base64: "image_base64";
195
+ }>;
196
+ required: z.ZodBoolean;
197
+ description: z.ZodOptional<z.ZodString>;
198
+ datasetField: z.ZodOptional<z.ZodString>;
199
+ }, z.core.$strip>>;
200
+ outputSchema: z.ZodNullable<z.ZodObject<{
201
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
202
+ key: z.ZodString;
203
+ value: z.ZodDefault<z.ZodString>;
204
+ isJudgment: z.ZodDefault<z.ZodBoolean>;
205
+ }, z.core.$strip>>>;
206
+ }, z.core.$strip>>;
207
+ judgmentRules: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
208
+ promptLanguage: z.ZodDefault<z.ZodEnum<{
209
+ "zh-CN": "zh-CN";
210
+ "en-US": "en-US";
211
+ }>>;
212
+ parentVersionId: z.ZodNullable<z.ZodString>;
213
+ generatedByOptimizationId: z.ZodNullable<z.ZodString>;
214
+ changeReason: z.ZodNullable<z.ZodString>;
215
+ labels: z.ZodDefault<z.ZodArray<z.ZodObject<{
216
+ name: z.ZodString;
217
+ type: z.ZodEnum<{
218
+ system: "system";
219
+ custom: "custom";
220
+ }>;
221
+ }, z.core.$strip>>>;
222
+ isFrozen: z.ZodBoolean;
223
+ createdBy: z.ZodString;
224
+ createdByDisplayName: z.ZodNullable<z.ZodString>;
225
+ createdAt: z.ZodString;
226
+ frozenAt: z.ZodNullable<z.ZodString>;
227
+ }, z.core.$strip>>;
228
+ }, z.core.$strip>;
229
+ export type PromptDetailDto = z.infer<typeof promptDetailSchema>;
230
+ export declare const createPromptSchema: z.ZodObject<{
231
+ name: z.ZodString;
232
+ defaultDatasetId: z.ZodOptional<z.ZodString>;
233
+ promptLanguage: z.ZodDefault<z.ZodEnum<{
234
+ "zh-CN": "zh-CN";
235
+ "en-US": "en-US";
236
+ }>>;
237
+ }, z.core.$strip>;
238
+ export type CreatePromptDto = z.input<typeof createPromptSchema>;
239
+ export declare const updatePromptSchema: z.ZodObject<{
240
+ defaultDatasetId: z.ZodString;
241
+ }, z.core.$strip>;
242
+ export type UpdatePromptDto = z.infer<typeof updatePromptSchema>;
243
+ export declare const updatePromptDraftVersionSchema: z.ZodObject<{
244
+ body: z.ZodString;
245
+ variables: z.ZodArray<z.ZodObject<{
246
+ name: z.ZodString;
247
+ type: z.ZodEnum<{
248
+ number: "number";
249
+ text: "text";
250
+ image: "image";
251
+ image_url: "image_url";
252
+ image_base64: "image_base64";
253
+ }>;
254
+ required: z.ZodBoolean;
255
+ description: z.ZodOptional<z.ZodString>;
256
+ datasetField: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strip>>;
258
+ outputSchema: z.ZodNullable<z.ZodObject<{
259
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
260
+ key: z.ZodString;
261
+ value: z.ZodDefault<z.ZodString>;
262
+ isJudgment: z.ZodDefault<z.ZodBoolean>;
263
+ }, z.core.$strip>>>;
264
+ }, z.core.$strip>>;
265
+ judgmentRules: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
266
+ promptLanguage: z.ZodDefault<z.ZodEnum<{
267
+ "zh-CN": "zh-CN";
268
+ "en-US": "en-US";
269
+ }>>;
270
+ changeReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
271
+ }, z.core.$strip>;
272
+ export type UpdatePromptDraftVersionDto = z.input<typeof updatePromptDraftVersionSchema>;
273
+ export declare const createPromptDraftVersionSchema: z.ZodObject<{
274
+ sourceVersionId: z.ZodOptional<z.ZodString>;
275
+ changeReason: z.ZodOptional<z.ZodString>;
276
+ }, z.core.$strip>;
277
+ export type CreatePromptDraftVersionDto = z.infer<typeof createPromptDraftVersionSchema>;
278
+ export declare const updatePromptVersionLabelSchema: z.ZodObject<{
279
+ label: z.ZodString;
280
+ versionId: z.ZodNullable<z.ZodString>;
281
+ }, z.core.$strip>;
282
+ export type UpdatePromptVersionLabelDto = z.infer<typeof updatePromptVersionLabelSchema>;
283
+ export declare const promptDeletionImpactItemSchema: z.ZodObject<{
284
+ id: z.ZodString;
285
+ kind: z.ZodEnum<{
286
+ experiment: "experiment";
287
+ optimization: "optimization";
288
+ canary_release: "canary_release";
289
+ production_release: "production_release";
290
+ }>;
291
+ name: z.ZodNullable<z.ZodString>;
292
+ status: z.ZodNullable<z.ZodString>;
293
+ promptId: z.ZodNullable<z.ZodString>;
294
+ promptVersionId: z.ZodNullable<z.ZodString>;
295
+ promptVersionNumber: z.ZodNullable<z.ZodNumber>;
296
+ createdAt: z.ZodNullable<z.ZodString>;
297
+ }, z.core.$strip>;
298
+ export type PromptDeletionImpactItemDto = z.infer<typeof promptDeletionImpactItemSchema>;
299
+ export declare const promptDeletionImpactSchema: z.ZodObject<{
300
+ promptId: z.ZodString;
301
+ versionId: z.ZodNullable<z.ZodString>;
302
+ experiments: z.ZodArray<z.ZodObject<{
303
+ id: z.ZodString;
304
+ kind: z.ZodEnum<{
305
+ experiment: "experiment";
306
+ optimization: "optimization";
307
+ canary_release: "canary_release";
308
+ production_release: "production_release";
309
+ }>;
310
+ name: z.ZodNullable<z.ZodString>;
311
+ status: z.ZodNullable<z.ZodString>;
312
+ promptId: z.ZodNullable<z.ZodString>;
313
+ promptVersionId: z.ZodNullable<z.ZodString>;
314
+ promptVersionNumber: z.ZodNullable<z.ZodNumber>;
315
+ createdAt: z.ZodNullable<z.ZodString>;
316
+ }, z.core.$strip>>;
317
+ optimizations: z.ZodArray<z.ZodObject<{
318
+ id: z.ZodString;
319
+ kind: z.ZodEnum<{
320
+ experiment: "experiment";
321
+ optimization: "optimization";
322
+ canary_release: "canary_release";
323
+ production_release: "production_release";
324
+ }>;
325
+ name: z.ZodNullable<z.ZodString>;
326
+ status: z.ZodNullable<z.ZodString>;
327
+ promptId: z.ZodNullable<z.ZodString>;
328
+ promptVersionId: z.ZodNullable<z.ZodString>;
329
+ promptVersionNumber: z.ZodNullable<z.ZodNumber>;
330
+ createdAt: z.ZodNullable<z.ZodString>;
331
+ }, z.core.$strip>>;
332
+ canaryReleases: z.ZodArray<z.ZodObject<{
333
+ id: z.ZodString;
334
+ kind: z.ZodEnum<{
335
+ experiment: "experiment";
336
+ optimization: "optimization";
337
+ canary_release: "canary_release";
338
+ production_release: "production_release";
339
+ }>;
340
+ name: z.ZodNullable<z.ZodString>;
341
+ status: z.ZodNullable<z.ZodString>;
342
+ promptId: z.ZodNullable<z.ZodString>;
343
+ promptVersionId: z.ZodNullable<z.ZodString>;
344
+ promptVersionNumber: z.ZodNullable<z.ZodNumber>;
345
+ createdAt: z.ZodNullable<z.ZodString>;
346
+ }, z.core.$strip>>;
347
+ productionReleases: z.ZodArray<z.ZodObject<{
348
+ id: z.ZodString;
349
+ kind: z.ZodEnum<{
350
+ experiment: "experiment";
351
+ optimization: "optimization";
352
+ canary_release: "canary_release";
353
+ production_release: "production_release";
354
+ }>;
355
+ name: z.ZodNullable<z.ZodString>;
356
+ status: z.ZodNullable<z.ZodString>;
357
+ promptId: z.ZodNullable<z.ZodString>;
358
+ promptVersionId: z.ZodNullable<z.ZodString>;
359
+ promptVersionNumber: z.ZodNullable<z.ZodNumber>;
360
+ createdAt: z.ZodNullable<z.ZodString>;
361
+ }, z.core.$strip>>;
362
+ total: z.ZodNumber;
363
+ }, z.core.$strip>;
364
+ export type PromptDeletionImpactDto = z.infer<typeof promptDeletionImpactSchema>;
365
+ export declare const promptVersionMetricsItemSchema: z.ZodObject<{
366
+ promptVersionId: z.ZodString;
367
+ versionNumber: z.ZodNumber;
368
+ status: z.ZodEnum<{
369
+ editable: "editable";
370
+ frozen: "frozen";
371
+ }>;
372
+ labels: z.ZodArray<z.ZodObject<{
373
+ name: z.ZodString;
374
+ type: z.ZodEnum<{
375
+ system: "system";
376
+ custom: "custom";
377
+ }>;
378
+ }, z.core.$strip>>;
379
+ runCount: z.ZodNumber;
380
+ successCount: z.ZodNumber;
381
+ errorCount: z.ZodNumber;
382
+ correctCount: z.ZodNumber;
383
+ incorrectCount: z.ZodNumber;
384
+ accuracy: z.ZodNullable<z.ZodNumber>;
385
+ medianLatencyMs: z.ZodNullable<z.ZodNumber>;
386
+ medianInputTokens: z.ZodNullable<z.ZodNumber>;
387
+ medianOutputTokens: z.ZodNullable<z.ZodNumber>;
388
+ totalInputTokens: z.ZodNumber;
389
+ totalOutputTokens: z.ZodNumber;
390
+ totalCostEstimate: z.ZodNumber;
391
+ firstRunAt: z.ZodNullable<z.ZodString>;
392
+ lastRunAt: z.ZodNullable<z.ZodString>;
393
+ }, z.core.$strip>;
394
+ export type PromptVersionMetricsItemDto = z.infer<typeof promptVersionMetricsItemSchema>;
395
+ export declare const promptMetricsSummarySchema: z.ZodObject<{
396
+ runCount: z.ZodNumber;
397
+ successCount: z.ZodNumber;
398
+ errorCount: z.ZodNumber;
399
+ totalInputTokens: z.ZodNumber;
400
+ totalOutputTokens: z.ZodNumber;
401
+ totalCostEstimate: z.ZodNumber;
402
+ }, z.core.$strip>;
403
+ export type PromptMetricsSummaryDto = z.infer<typeof promptMetricsSummarySchema>;
404
+ export declare const promptMetricsSchema: z.ZodObject<{
405
+ promptId: z.ZodString;
406
+ versions: z.ZodArray<z.ZodObject<{
407
+ promptVersionId: z.ZodString;
408
+ versionNumber: z.ZodNumber;
409
+ status: z.ZodEnum<{
410
+ editable: "editable";
411
+ frozen: "frozen";
412
+ }>;
413
+ labels: z.ZodArray<z.ZodObject<{
414
+ name: z.ZodString;
415
+ type: z.ZodEnum<{
416
+ system: "system";
417
+ custom: "custom";
418
+ }>;
419
+ }, z.core.$strip>>;
420
+ runCount: z.ZodNumber;
421
+ successCount: z.ZodNumber;
422
+ errorCount: z.ZodNumber;
423
+ correctCount: z.ZodNumber;
424
+ incorrectCount: z.ZodNumber;
425
+ accuracy: z.ZodNullable<z.ZodNumber>;
426
+ medianLatencyMs: z.ZodNullable<z.ZodNumber>;
427
+ medianInputTokens: z.ZodNullable<z.ZodNumber>;
428
+ medianOutputTokens: z.ZodNullable<z.ZodNumber>;
429
+ totalInputTokens: z.ZodNumber;
430
+ totalOutputTokens: z.ZodNumber;
431
+ totalCostEstimate: z.ZodNumber;
432
+ firstRunAt: z.ZodNullable<z.ZodString>;
433
+ lastRunAt: z.ZodNullable<z.ZodString>;
434
+ }, z.core.$strip>>;
435
+ totals: z.ZodObject<{
436
+ runCount: z.ZodNumber;
437
+ successCount: z.ZodNumber;
438
+ errorCount: z.ZodNumber;
439
+ totalInputTokens: z.ZodNumber;
440
+ totalOutputTokens: z.ZodNumber;
441
+ totalCostEstimate: z.ZodNumber;
442
+ }, z.core.$strip>;
443
+ }, z.core.$strip>;
444
+ export type PromptMetricsDto = z.infer<typeof promptMetricsSchema>;
445
+ export declare const promptTryRunRequestSchema: z.ZodObject<{
446
+ promptVersionId: z.ZodString;
447
+ modelId: z.ZodString;
448
+ variables: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
449
+ temperature: z.ZodOptional<z.ZodNumber>;
450
+ maxTokens: z.ZodOptional<z.ZodNumber>;
451
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
452
+ }, z.core.$strip>;
453
+ export type PromptTryRunRequestDto = z.infer<typeof promptTryRunRequestSchema>;
454
+ export declare const promptTryRunResponseSchema: z.ZodObject<{
455
+ status: z.ZodEnum<{
456
+ error: "error";
457
+ success: "success";
458
+ }>;
459
+ rawOutput: z.ZodNullable<z.ZodString>;
460
+ parsedOutput: z.ZodNullable<z.ZodUnknown>;
461
+ latencyMs: z.ZodNumber;
462
+ inputTokens: z.ZodNumber;
463
+ outputTokens: z.ZodNumber;
464
+ costEstimate: z.ZodNumber;
465
+ errorClass: z.ZodNullable<z.ZodString>;
466
+ errorMessage: z.ZodNullable<z.ZodString>;
467
+ }, z.core.$strip>;
468
+ export type PromptTryRunResponseDto = z.infer<typeof promptTryRunResponseSchema>;
469
+ //# sourceMappingURL=prompt.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.dto.d.ts","sourceRoot":"","sources":["../../src/dto/prompt.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,aAAoB,CAAC;AACrD,eAAO,MAAM,0BAA0B,aAAoB,CAAC;AAE5D,eAAO,MAAM,yBAAyB;;;EAAiC,CAAC;AACxE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE/E,eAAO,MAAM,gCAAgC;;;;EAA2C,CAAC;AACzF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE7F,eAAO,MAAM,iCAAiC,QAA6D,CAAC;AAE5G,eAAO,MAAM,4BAA4B,aAA4E,CAAC;AAEtH,eAAO,MAAM,4BAA4B;;;EAA+B,CAAC;AACzE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQrC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBzC,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEzF,eAAO,MAAM,0BAA0B;;;;;;;iBAOrC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI9B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEnE,eAAO,MAAM,yBAAyB;;;;;;;iBAOpC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE/E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;iBAUrC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.promptTryRunResponseSchema = exports.promptTryRunRequestSchema = exports.promptMetricsSchema = exports.promptMetricsSummarySchema = exports.promptVersionMetricsItemSchema = exports.promptDeletionImpactSchema = exports.promptDeletionImpactItemSchema = exports.updatePromptVersionLabelSchema = exports.createPromptDraftVersionSchema = exports.updatePromptDraftVersionSchema = exports.updatePromptSchema = exports.createPromptSchema = exports.promptDetailSchema = exports.promptListItemSchema = exports.promptVersionSchema = exports.promptJudgmentRulesSchema = exports.promptOutputSchema = exports.promptOutputSchemaFieldSchema = exports.promptVariableSchema = exports.promptVariableTypeSchema = exports.promptLanguageSchema = exports.DEFAULT_PROMPT_LANGUAGE = exports.promptListCustomLabelSchema = exports.promptVersionLabelSchema = exports.promptVersionLabelTypeSchema = exports.promptVersionLabelNameSchema = exports.PROMPT_VERSION_LABEL_NAME_PATTERN = exports.reservedPromptVersionLabelSchema = exports.promptVersionStatusSchema = exports.promptVersionIdParamSchema = exports.promptIdParamSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.promptIdParamSchema = zod_1.z.string().uuid();
6
+ exports.promptVersionIdParamSchema = zod_1.z.string().uuid();
7
+ exports.promptVersionStatusSchema = zod_1.z.enum(['editable', 'frozen']);
8
+ exports.reservedPromptVersionLabelSchema = zod_1.z.enum(['latest', 'gray', 'production']);
9
+ exports.PROMPT_VERSION_LABEL_NAME_PATTERN = /^[A-Za-z0-9\u4E00-\u9FFF][A-Za-z0-9\u4E00-\u9FFF_.:-]*$/u;
10
+ exports.promptVersionLabelNameSchema = zod_1.z.string().trim().min(1).max(64).regex(exports.PROMPT_VERSION_LABEL_NAME_PATTERN);
11
+ exports.promptVersionLabelTypeSchema = zod_1.z.enum(['system', 'custom']);
12
+ exports.promptVersionLabelSchema = zod_1.z.object({
13
+ name: exports.promptVersionLabelNameSchema,
14
+ type: exports.promptVersionLabelTypeSchema,
15
+ });
16
+ exports.promptListCustomLabelSchema = zod_1.z.object({
17
+ name: exports.promptVersionLabelNameSchema,
18
+ versionNumber: zod_1.z.number().int().positive(),
19
+ });
20
+ exports.DEFAULT_PROMPT_LANGUAGE = 'zh-CN';
21
+ exports.promptLanguageSchema = zod_1.z.enum(['zh-CN', 'en-US']);
22
+ exports.promptVariableTypeSchema = zod_1.z.enum(['text', 'image', 'image_url', 'image_base64', 'number']);
23
+ exports.promptVariableSchema = zod_1.z.object({
24
+ name: zod_1.z.string().trim().min(1).max(120),
25
+ type: exports.promptVariableTypeSchema,
26
+ required: zod_1.z.boolean(),
27
+ description: zod_1.z.string().trim().max(500).optional(),
28
+ datasetField: zod_1.z.string().trim().max(160).optional(),
29
+ });
30
+ exports.promptOutputSchemaFieldSchema = zod_1.z.object({
31
+ key: zod_1.z.string().trim().min(1).max(160),
32
+ value: zod_1.z.string().trim().max(2000).default(''),
33
+ isJudgment: zod_1.z.boolean().default(false),
34
+ });
35
+ exports.promptOutputSchema = zod_1.z
36
+ .object({
37
+ fields: zod_1.z.array(exports.promptOutputSchemaFieldSchema).max(50).default([]),
38
+ })
39
+ .nullable();
40
+ exports.promptJudgmentRulesSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).nullable();
41
+ exports.promptVersionSchema = zod_1.z.object({
42
+ id: zod_1.z.string().uuid(),
43
+ promptId: zod_1.z.string().uuid(),
44
+ versionNumber: zod_1.z.number().int().positive(),
45
+ status: exports.promptVersionStatusSchema,
46
+ body: zod_1.z.string(),
47
+ variables: zod_1.z.array(exports.promptVariableSchema),
48
+ outputSchema: exports.promptOutputSchema,
49
+ judgmentRules: exports.promptJudgmentRulesSchema,
50
+ promptLanguage: exports.promptLanguageSchema.default(exports.DEFAULT_PROMPT_LANGUAGE),
51
+ parentVersionId: zod_1.z.string().uuid().nullable(),
52
+ generatedByOptimizationId: zod_1.z.string().uuid().nullable(),
53
+ changeReason: zod_1.z.string().nullable(),
54
+ labels: zod_1.z.array(exports.promptVersionLabelSchema).default([]),
55
+ isFrozen: zod_1.z.boolean(),
56
+ createdBy: zod_1.z.string().uuid(),
57
+ createdByDisplayName: zod_1.z.string().nullable(),
58
+ createdAt: zod_1.z.string().datetime(),
59
+ frozenAt: zod_1.z.string().datetime().nullable(),
60
+ });
61
+ exports.promptListItemSchema = zod_1.z.object({
62
+ id: zod_1.z.string().uuid(),
63
+ projectId: zod_1.z.string().uuid(),
64
+ name: zod_1.z.string(),
65
+ defaultDatasetId: zod_1.z.string().uuid().nullable(),
66
+ defaultDatasetName: zod_1.z.string().nullable(),
67
+ latestVersionNumber: zod_1.z.number().int().positive(),
68
+ currentOnlineVersionNumber: zod_1.z.number().int().positive().nullable(),
69
+ currentGrayVersionNumber: zod_1.z.number().int().positive().nullable(),
70
+ customLabels: zod_1.z.array(exports.promptListCustomLabelSchema).default([]),
71
+ latestVersionStatus: exports.promptVersionStatusSchema,
72
+ createdBy: zod_1.z.string().uuid(),
73
+ createdByDisplayName: zod_1.z.string().nullable(),
74
+ createdAt: zod_1.z.string().datetime(),
75
+ updatedAt: zod_1.z.string().datetime(),
76
+ deletedAt: zod_1.z.string().datetime().nullable(),
77
+ activeReferences: zod_1.z.number().int().nonnegative(),
78
+ });
79
+ exports.promptDetailSchema = exports.promptListItemSchema.extend({
80
+ versions: zod_1.z.array(exports.promptVersionSchema),
81
+ });
82
+ exports.createPromptSchema = zod_1.z.object({
83
+ name: zod_1.z.string().trim().min(1).max(160),
84
+ defaultDatasetId: zod_1.z.string().uuid().optional(),
85
+ promptLanguage: exports.promptLanguageSchema.default(exports.DEFAULT_PROMPT_LANGUAGE),
86
+ });
87
+ exports.updatePromptSchema = zod_1.z.object({
88
+ defaultDatasetId: zod_1.z.string().uuid(),
89
+ });
90
+ exports.updatePromptDraftVersionSchema = zod_1.z.object({
91
+ body: zod_1.z.string(),
92
+ variables: zod_1.z.array(exports.promptVariableSchema).max(200),
93
+ outputSchema: exports.promptOutputSchema,
94
+ judgmentRules: exports.promptJudgmentRulesSchema,
95
+ promptLanguage: exports.promptLanguageSchema.default(exports.DEFAULT_PROMPT_LANGUAGE),
96
+ changeReason: zod_1.z.string().trim().max(1000).optional().nullable(),
97
+ });
98
+ exports.createPromptDraftVersionSchema = zod_1.z.object({
99
+ sourceVersionId: exports.promptVersionIdParamSchema.optional(),
100
+ changeReason: zod_1.z.string().trim().max(1000).optional(),
101
+ });
102
+ exports.updatePromptVersionLabelSchema = zod_1.z.object({
103
+ label: exports.promptVersionLabelNameSchema,
104
+ versionId: exports.promptVersionIdParamSchema.nullable(),
105
+ });
106
+ exports.promptDeletionImpactItemSchema = zod_1.z.object({
107
+ id: zod_1.z.string().uuid(),
108
+ kind: zod_1.z.enum(['experiment', 'optimization', 'canary_release', 'production_release']),
109
+ name: zod_1.z.string().nullable(),
110
+ status: zod_1.z.string().nullable(),
111
+ promptId: zod_1.z.string().uuid().nullable(),
112
+ promptVersionId: zod_1.z.string().uuid().nullable(),
113
+ promptVersionNumber: zod_1.z.number().int().positive().nullable(),
114
+ createdAt: zod_1.z.string().datetime().nullable(),
115
+ });
116
+ exports.promptDeletionImpactSchema = zod_1.z.object({
117
+ promptId: zod_1.z.string().uuid(),
118
+ versionId: zod_1.z.string().uuid().nullable(),
119
+ experiments: zod_1.z.array(exports.promptDeletionImpactItemSchema),
120
+ optimizations: zod_1.z.array(exports.promptDeletionImpactItemSchema),
121
+ canaryReleases: zod_1.z.array(exports.promptDeletionImpactItemSchema),
122
+ productionReleases: zod_1.z.array(exports.promptDeletionImpactItemSchema),
123
+ total: zod_1.z.number().int().nonnegative(),
124
+ });
125
+ exports.promptVersionMetricsItemSchema = zod_1.z.object({
126
+ promptVersionId: zod_1.z.string().uuid(),
127
+ versionNumber: zod_1.z.number().int().positive(),
128
+ status: exports.promptVersionStatusSchema,
129
+ labels: zod_1.z.array(exports.promptVersionLabelSchema),
130
+ runCount: zod_1.z.number().int().nonnegative(),
131
+ successCount: zod_1.z.number().int().nonnegative(),
132
+ errorCount: zod_1.z.number().int().nonnegative(),
133
+ correctCount: zod_1.z.number().int().nonnegative(),
134
+ incorrectCount: zod_1.z.number().int().nonnegative(),
135
+ accuracy: zod_1.z.number().min(0).max(1).nullable(),
136
+ medianLatencyMs: zod_1.z.number().nonnegative().nullable(),
137
+ medianInputTokens: zod_1.z.number().nonnegative().nullable(),
138
+ medianOutputTokens: zod_1.z.number().nonnegative().nullable(),
139
+ totalInputTokens: zod_1.z.number().int().nonnegative(),
140
+ totalOutputTokens: zod_1.z.number().int().nonnegative(),
141
+ totalCostEstimate: zod_1.z.number().nonnegative(),
142
+ firstRunAt: zod_1.z.string().datetime().nullable(),
143
+ lastRunAt: zod_1.z.string().datetime().nullable(),
144
+ });
145
+ exports.promptMetricsSummarySchema = zod_1.z.object({
146
+ runCount: zod_1.z.number().int().nonnegative(),
147
+ successCount: zod_1.z.number().int().nonnegative(),
148
+ errorCount: zod_1.z.number().int().nonnegative(),
149
+ totalInputTokens: zod_1.z.number().int().nonnegative(),
150
+ totalOutputTokens: zod_1.z.number().int().nonnegative(),
151
+ totalCostEstimate: zod_1.z.number().nonnegative(),
152
+ });
153
+ exports.promptMetricsSchema = zod_1.z.object({
154
+ promptId: zod_1.z.string().uuid(),
155
+ versions: zod_1.z.array(exports.promptVersionMetricsItemSchema),
156
+ totals: exports.promptMetricsSummarySchema,
157
+ });
158
+ exports.promptTryRunRequestSchema = zod_1.z.object({
159
+ promptVersionId: exports.promptVersionIdParamSchema,
160
+ modelId: zod_1.z.string().uuid(),
161
+ variables: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).default({}),
162
+ temperature: zod_1.z.number().min(0).max(2).optional(),
163
+ maxTokens: zod_1.z.number().int().positive().max(32000).optional(),
164
+ timeoutSeconds: zod_1.z.number().int().positive().max(600).optional(),
165
+ });
166
+ exports.promptTryRunResponseSchema = zod_1.z.object({
167
+ status: zod_1.z.enum(['success', 'error']),
168
+ rawOutput: zod_1.z.string().nullable(),
169
+ parsedOutput: zod_1.z.unknown().nullable(),
170
+ latencyMs: zod_1.z.number().int().nonnegative(),
171
+ inputTokens: zod_1.z.number().int().nonnegative(),
172
+ outputTokens: zod_1.z.number().int().nonnegative(),
173
+ costEstimate: zod_1.z.number().nonnegative(),
174
+ errorClass: zod_1.z.string().nullable(),
175
+ errorMessage: zod_1.z.string().nullable(),
176
+ });
177
+ //# sourceMappingURL=prompt.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.dto.js","sourceRoot":"","sources":["../../src/dto/prompt.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;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