@proofhound/api-client 0.1.8 → 0.1.10

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.
@@ -1,4 +1,4 @@
1
- import type { UpdateReleaseLineRunConfigInputDto, UpdateReleaseLineTrafficRatioInputDto } from '@proofhound/shared';
1
+ import type { ArchiveReleaseLineInputDto, DeleteReleaseLineInputDto, RestoreReleaseLineHistoryInputDto, StartReleaseLineInputDto, StopReleaseLineInputDto, UnarchiveReleaseLineInputDto, UpdateReleaseLineInputRouteInputDto, UpdateReleaseLineOutputRouteInputDto, UpdateReleaseLineRunConfigInputDto, UpdateReleaseLineTrafficRatioInputDto } from '@proofhound/shared';
2
2
  export declare const releaseLineClient: {
3
3
  list: (_projectId: string) => Promise<{
4
4
  data: {
@@ -13,20 +13,23 @@ export declare const releaseLineClient: {
13
13
  inputConnectorName: string | null;
14
14
  inputConnectorType: string | null;
15
15
  inputConnectorSnapshot: Record<string, unknown>;
16
- status: "production" | "canary" | "archived" | "stopped" | "production_with_canary";
16
+ status: "archived" | "running" | "stopped";
17
17
  currentProductionEventId: string | null;
18
18
  activeCanaryEventId: string | null;
19
19
  currentProductionEvent: {
20
20
  id: string;
21
21
  projectId: string;
22
22
  releaseLineId: string;
23
- releaseVariantId: string | null;
24
- releaseVariantNumber: number | null;
25
- releaseVariantLabel: string | null;
23
+ releaseVersionId: string | null;
24
+ releaseVersionKind: "production" | "candidate" | null;
25
+ releaseVersionLabel: string | null;
26
+ releaseVersionProductionNumber: number | null;
27
+ releaseVersionTargetProductionNumber: number | null;
28
+ releaseVersionCandidateNumber: number | null;
26
29
  annotationTaskId: string | null;
27
30
  laneType: "production" | "canary";
28
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
29
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
31
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
32
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
30
33
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
31
34
  sourceEventId: string | null;
32
35
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -63,7 +66,8 @@ export declare const releaseLineClient: {
63
66
  variableMapping: unknown;
64
67
  outputMapping: unknown;
65
68
  filterRules: unknown;
66
- recordMode: "all" | "correct_only";
69
+ recordMode: "all" | "selected_categories" | "correct_only";
70
+ recordCategories: string[];
67
71
  externalIdField: string | null;
68
72
  retentionDays: number | null;
69
73
  sourceExperimentId: string | null;
@@ -86,13 +90,16 @@ export declare const releaseLineClient: {
86
90
  id: string;
87
91
  projectId: string;
88
92
  releaseLineId: string;
89
- releaseVariantId: string | null;
90
- releaseVariantNumber: number | null;
91
- releaseVariantLabel: string | null;
93
+ releaseVersionId: string | null;
94
+ releaseVersionKind: "production" | "candidate" | null;
95
+ releaseVersionLabel: string | null;
96
+ releaseVersionProductionNumber: number | null;
97
+ releaseVersionTargetProductionNumber: number | null;
98
+ releaseVersionCandidateNumber: number | null;
92
99
  annotationTaskId: string | null;
93
100
  laneType: "production" | "canary";
94
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
95
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
101
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
102
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
96
103
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
97
104
  sourceEventId: string | null;
98
105
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -129,7 +136,8 @@ export declare const releaseLineClient: {
129
136
  variableMapping: unknown;
130
137
  outputMapping: unknown;
131
138
  filterRules: unknown;
132
- recordMode: "all" | "correct_only";
139
+ recordMode: "all" | "selected_categories" | "correct_only";
140
+ recordCategories: string[];
133
141
  externalIdField: string | null;
134
142
  retentionDays: number | null;
135
143
  sourceExperimentId: string | null;
@@ -148,11 +156,15 @@ export declare const releaseLineClient: {
148
156
  createdAt: string;
149
157
  updatedAt: string;
150
158
  } | null;
151
- variants: {
159
+ versions: {
152
160
  id: string;
153
161
  projectId: string;
154
162
  releaseLineId: string;
155
- variantNumber: number;
163
+ kind: "production" | "candidate";
164
+ productionVersionNumber: number | null;
165
+ targetProductionVersionNumber: number;
166
+ candidateNumber: number | null;
167
+ promotedFromReleaseVersionId: string | null;
156
168
  label: string;
157
169
  promptId: string | null;
158
170
  promptName: string;
@@ -178,13 +190,16 @@ export declare const releaseLineClient: {
178
190
  id: string;
179
191
  projectId: string;
180
192
  releaseLineId: string;
181
- releaseVariantId: string | null;
182
- releaseVariantNumber: number | null;
183
- releaseVariantLabel: string | null;
193
+ releaseVersionId: string | null;
194
+ releaseVersionKind: "production" | "candidate" | null;
195
+ releaseVersionLabel: string | null;
196
+ releaseVersionProductionNumber: number | null;
197
+ releaseVersionTargetProductionNumber: number | null;
198
+ releaseVersionCandidateNumber: number | null;
184
199
  annotationTaskId: string | null;
185
200
  laneType: "production" | "canary";
186
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
187
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
201
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
202
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
188
203
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
189
204
  sourceEventId: string | null;
190
205
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -221,7 +236,8 @@ export declare const releaseLineClient: {
221
236
  variableMapping: unknown;
222
237
  outputMapping: unknown;
223
238
  filterRules: unknown;
224
- recordMode: "all" | "correct_only";
239
+ recordMode: "all" | "selected_categories" | "correct_only";
240
+ recordCategories: string[];
225
241
  externalIdField: string | null;
226
242
  retentionDays: number | null;
227
243
  sourceExperimentId: string | null;
@@ -259,20 +275,23 @@ export declare const releaseLineClient: {
259
275
  inputConnectorName: string | null;
260
276
  inputConnectorType: string | null;
261
277
  inputConnectorSnapshot: Record<string, unknown>;
262
- status: "production" | "canary" | "archived" | "stopped" | "production_with_canary";
278
+ status: "archived" | "running" | "stopped";
263
279
  currentProductionEventId: string | null;
264
280
  activeCanaryEventId: string | null;
265
281
  currentProductionEvent: {
266
282
  id: string;
267
283
  projectId: string;
268
284
  releaseLineId: string;
269
- releaseVariantId: string | null;
270
- releaseVariantNumber: number | null;
271
- releaseVariantLabel: string | null;
285
+ releaseVersionId: string | null;
286
+ releaseVersionKind: "production" | "candidate" | null;
287
+ releaseVersionLabel: string | null;
288
+ releaseVersionProductionNumber: number | null;
289
+ releaseVersionTargetProductionNumber: number | null;
290
+ releaseVersionCandidateNumber: number | null;
272
291
  annotationTaskId: string | null;
273
292
  laneType: "production" | "canary";
274
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
275
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
293
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
294
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
276
295
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
277
296
  sourceEventId: string | null;
278
297
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -309,7 +328,8 @@ export declare const releaseLineClient: {
309
328
  variableMapping: unknown;
310
329
  outputMapping: unknown;
311
330
  filterRules: unknown;
312
- recordMode: "all" | "correct_only";
331
+ recordMode: "all" | "selected_categories" | "correct_only";
332
+ recordCategories: string[];
313
333
  externalIdField: string | null;
314
334
  retentionDays: number | null;
315
335
  sourceExperimentId: string | null;
@@ -332,13 +352,16 @@ export declare const releaseLineClient: {
332
352
  id: string;
333
353
  projectId: string;
334
354
  releaseLineId: string;
335
- releaseVariantId: string | null;
336
- releaseVariantNumber: number | null;
337
- releaseVariantLabel: string | null;
355
+ releaseVersionId: string | null;
356
+ releaseVersionKind: "production" | "candidate" | null;
357
+ releaseVersionLabel: string | null;
358
+ releaseVersionProductionNumber: number | null;
359
+ releaseVersionTargetProductionNumber: number | null;
360
+ releaseVersionCandidateNumber: number | null;
338
361
  annotationTaskId: string | null;
339
362
  laneType: "production" | "canary";
340
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
341
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
363
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
364
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
342
365
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
343
366
  sourceEventId: string | null;
344
367
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -375,7 +398,8 @@ export declare const releaseLineClient: {
375
398
  variableMapping: unknown;
376
399
  outputMapping: unknown;
377
400
  filterRules: unknown;
378
- recordMode: "all" | "correct_only";
401
+ recordMode: "all" | "selected_categories" | "correct_only";
402
+ recordCategories: string[];
379
403
  externalIdField: string | null;
380
404
  retentionDays: number | null;
381
405
  sourceExperimentId: string | null;
@@ -394,11 +418,15 @@ export declare const releaseLineClient: {
394
418
  createdAt: string;
395
419
  updatedAt: string;
396
420
  } | null;
397
- variants: {
421
+ versions: {
398
422
  id: string;
399
423
  projectId: string;
400
424
  releaseLineId: string;
401
- variantNumber: number;
425
+ kind: "production" | "candidate";
426
+ productionVersionNumber: number | null;
427
+ targetProductionVersionNumber: number;
428
+ candidateNumber: number | null;
429
+ promotedFromReleaseVersionId: string | null;
402
430
  label: string;
403
431
  promptId: string | null;
404
432
  promptName: string;
@@ -424,13 +452,16 @@ export declare const releaseLineClient: {
424
452
  id: string;
425
453
  projectId: string;
426
454
  releaseLineId: string;
427
- releaseVariantId: string | null;
428
- releaseVariantNumber: number | null;
429
- releaseVariantLabel: string | null;
455
+ releaseVersionId: string | null;
456
+ releaseVersionKind: "production" | "candidate" | null;
457
+ releaseVersionLabel: string | null;
458
+ releaseVersionProductionNumber: number | null;
459
+ releaseVersionTargetProductionNumber: number | null;
460
+ releaseVersionCandidateNumber: number | null;
430
461
  annotationTaskId: string | null;
431
462
  laneType: "production" | "canary";
432
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
433
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
463
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
464
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
434
465
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
435
466
  sourceEventId: string | null;
436
467
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -467,7 +498,8 @@ export declare const releaseLineClient: {
467
498
  variableMapping: unknown;
468
499
  outputMapping: unknown;
469
500
  filterRules: unknown;
470
- recordMode: "all" | "correct_only";
501
+ recordMode: "all" | "selected_categories" | "correct_only";
502
+ recordCategories: string[];
471
503
  externalIdField: string | null;
472
504
  retentionDays: number | null;
473
505
  sourceExperimentId: string | null;
@@ -496,13 +528,16 @@ export declare const releaseLineClient: {
496
528
  id: string;
497
529
  projectId: string;
498
530
  releaseLineId: string;
499
- releaseVariantId: string | null;
500
- releaseVariantNumber: number | null;
501
- releaseVariantLabel: string | null;
531
+ releaseVersionId: string | null;
532
+ releaseVersionKind: "production" | "candidate" | null;
533
+ releaseVersionLabel: string | null;
534
+ releaseVersionProductionNumber: number | null;
535
+ releaseVersionTargetProductionNumber: number | null;
536
+ releaseVersionCandidateNumber: number | null;
502
537
  annotationTaskId: string | null;
503
538
  laneType: "production" | "canary";
504
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
505
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
539
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
540
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
506
541
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
507
542
  sourceEventId: string | null;
508
543
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -539,7 +574,8 @@ export declare const releaseLineClient: {
539
574
  variableMapping: unknown;
540
575
  outputMapping: unknown;
541
576
  filterRules: unknown;
542
- recordMode: "all" | "correct_only";
577
+ recordMode: "all" | "selected_categories" | "correct_only";
578
+ recordCategories: string[];
543
579
  externalIdField: string | null;
544
580
  retentionDays: number | null;
545
581
  sourceExperimentId: string | null;
@@ -560,6 +596,36 @@ export declare const releaseLineClient: {
560
596
  }[];
561
597
  total: number;
562
598
  }>;
599
+ getDeleteImpact: (_projectId: string, releaseLineId: string) => Promise<{
600
+ releaseLineId: string;
601
+ lineName: string;
602
+ events: {
603
+ id: string;
604
+ kind: "event" | "version" | "annotation_task";
605
+ name: string | null;
606
+ status: string | null;
607
+ detail: string | null;
608
+ createdAt: string | null;
609
+ }[];
610
+ versions: {
611
+ id: string;
612
+ kind: "event" | "version" | "annotation_task";
613
+ name: string | null;
614
+ status: string | null;
615
+ detail: string | null;
616
+ createdAt: string | null;
617
+ }[];
618
+ annotationTasks: {
619
+ id: string;
620
+ kind: "event" | "version" | "annotation_task";
621
+ name: string | null;
622
+ status: string | null;
623
+ detail: string | null;
624
+ createdAt: string | null;
625
+ }[];
626
+ runResults: number;
627
+ total: number;
628
+ }>;
563
629
  updateTrafficRatio: (_projectId: string, releaseLineId: string, body: UpdateReleaseLineTrafficRatioInputDto) => Promise<{
564
630
  id: string;
565
631
  projectId: string;
@@ -572,20 +638,23 @@ export declare const releaseLineClient: {
572
638
  inputConnectorName: string | null;
573
639
  inputConnectorType: string | null;
574
640
  inputConnectorSnapshot: Record<string, unknown>;
575
- status: "production" | "canary" | "archived" | "stopped" | "production_with_canary";
641
+ status: "archived" | "running" | "stopped";
576
642
  currentProductionEventId: string | null;
577
643
  activeCanaryEventId: string | null;
578
644
  currentProductionEvent: {
579
645
  id: string;
580
646
  projectId: string;
581
647
  releaseLineId: string;
582
- releaseVariantId: string | null;
583
- releaseVariantNumber: number | null;
584
- releaseVariantLabel: string | null;
648
+ releaseVersionId: string | null;
649
+ releaseVersionKind: "production" | "candidate" | null;
650
+ releaseVersionLabel: string | null;
651
+ releaseVersionProductionNumber: number | null;
652
+ releaseVersionTargetProductionNumber: number | null;
653
+ releaseVersionCandidateNumber: number | null;
585
654
  annotationTaskId: string | null;
586
655
  laneType: "production" | "canary";
587
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
588
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
656
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
657
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
589
658
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
590
659
  sourceEventId: string | null;
591
660
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -622,7 +691,8 @@ export declare const releaseLineClient: {
622
691
  variableMapping: unknown;
623
692
  outputMapping: unknown;
624
693
  filterRules: unknown;
625
- recordMode: "all" | "correct_only";
694
+ recordMode: "all" | "selected_categories" | "correct_only";
695
+ recordCategories: string[];
626
696
  externalIdField: string | null;
627
697
  retentionDays: number | null;
628
698
  sourceExperimentId: string | null;
@@ -645,13 +715,16 @@ export declare const releaseLineClient: {
645
715
  id: string;
646
716
  projectId: string;
647
717
  releaseLineId: string;
648
- releaseVariantId: string | null;
649
- releaseVariantNumber: number | null;
650
- releaseVariantLabel: string | null;
718
+ releaseVersionId: string | null;
719
+ releaseVersionKind: "production" | "candidate" | null;
720
+ releaseVersionLabel: string | null;
721
+ releaseVersionProductionNumber: number | null;
722
+ releaseVersionTargetProductionNumber: number | null;
723
+ releaseVersionCandidateNumber: number | null;
651
724
  annotationTaskId: string | null;
652
725
  laneType: "production" | "canary";
653
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
654
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
726
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
727
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
655
728
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
656
729
  sourceEventId: string | null;
657
730
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -688,7 +761,8 @@ export declare const releaseLineClient: {
688
761
  variableMapping: unknown;
689
762
  outputMapping: unknown;
690
763
  filterRules: unknown;
691
- recordMode: "all" | "correct_only";
764
+ recordMode: "all" | "selected_categories" | "correct_only";
765
+ recordCategories: string[];
692
766
  externalIdField: string | null;
693
767
  retentionDays: number | null;
694
768
  sourceExperimentId: string | null;
@@ -707,11 +781,15 @@ export declare const releaseLineClient: {
707
781
  createdAt: string;
708
782
  updatedAt: string;
709
783
  } | null;
710
- variants: {
784
+ versions: {
711
785
  id: string;
712
786
  projectId: string;
713
787
  releaseLineId: string;
714
- variantNumber: number;
788
+ kind: "production" | "candidate";
789
+ productionVersionNumber: number | null;
790
+ targetProductionVersionNumber: number;
791
+ candidateNumber: number | null;
792
+ promotedFromReleaseVersionId: string | null;
715
793
  label: string;
716
794
  promptId: string | null;
717
795
  promptName: string;
@@ -737,13 +815,16 @@ export declare const releaseLineClient: {
737
815
  id: string;
738
816
  projectId: string;
739
817
  releaseLineId: string;
740
- releaseVariantId: string | null;
741
- releaseVariantNumber: number | null;
742
- releaseVariantLabel: string | null;
818
+ releaseVersionId: string | null;
819
+ releaseVersionKind: "production" | "candidate" | null;
820
+ releaseVersionLabel: string | null;
821
+ releaseVersionProductionNumber: number | null;
822
+ releaseVersionTargetProductionNumber: number | null;
823
+ releaseVersionCandidateNumber: number | null;
743
824
  annotationTaskId: string | null;
744
825
  laneType: "production" | "canary";
745
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
746
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
826
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
827
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
747
828
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
748
829
  sourceEventId: string | null;
749
830
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -780,7 +861,8 @@ export declare const releaseLineClient: {
780
861
  variableMapping: unknown;
781
862
  outputMapping: unknown;
782
863
  filterRules: unknown;
783
- recordMode: "all" | "correct_only";
864
+ recordMode: "all" | "selected_categories" | "correct_only";
865
+ recordCategories: string[];
784
866
  externalIdField: string | null;
785
867
  retentionDays: number | null;
786
868
  sourceExperimentId: string | null;
@@ -804,7 +886,2348 @@ export declare const releaseLineClient: {
804
886
  updatedAt: string;
805
887
  archivedAt: string | null;
806
888
  }>;
807
- updateRunConfig: (_projectId: string, releaseLineId: string, body: UpdateReleaseLineRunConfigInputDto) => Promise<{
889
+ promoteCanary: (_projectId: string, releaseLineId: string) => Promise<{
890
+ id: string;
891
+ projectId: string;
892
+ name: string;
893
+ description: string | null;
894
+ promptId: string | null;
895
+ promptName: string;
896
+ promptSnapshot: Record<string, unknown>;
897
+ inputConnectorId: string | null;
898
+ inputConnectorName: string | null;
899
+ inputConnectorType: string | null;
900
+ inputConnectorSnapshot: Record<string, unknown>;
901
+ status: "archived" | "running" | "stopped";
902
+ currentProductionEventId: string | null;
903
+ activeCanaryEventId: string | null;
904
+ currentProductionEvent: {
905
+ id: string;
906
+ projectId: string;
907
+ releaseLineId: string;
908
+ releaseVersionId: string | null;
909
+ releaseVersionKind: "production" | "candidate" | null;
910
+ releaseVersionLabel: string | null;
911
+ releaseVersionProductionNumber: number | null;
912
+ releaseVersionTargetProductionNumber: number | null;
913
+ releaseVersionCandidateNumber: number | null;
914
+ annotationTaskId: string | null;
915
+ laneType: "production" | "canary";
916
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
917
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
918
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
919
+ sourceEventId: string | null;
920
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
921
+ sourceLegacyId: string | null;
922
+ supersedesEventId: string | null;
923
+ rollbackTargetEventId: string | null;
924
+ legacySource: "canary_release" | "production_release_event" | null;
925
+ legacySourceId: string | null;
926
+ promptId: string | null;
927
+ promptName: string;
928
+ promptVersionId: string | null;
929
+ promptVersionNumber: number | null;
930
+ promptVersionLabel: string | null;
931
+ promptSnapshot: Record<string, unknown>;
932
+ promptVersionSnapshot: Record<string, unknown>;
933
+ modelId: string | null;
934
+ modelName: string | null;
935
+ modelProvider: string | null;
936
+ modelSnapshot: Record<string, unknown>;
937
+ inputConnectorId: string | null;
938
+ inputConnectorName: string | null;
939
+ inputConnectorType: string | null;
940
+ inputConnectorSnapshot: Record<string, unknown>;
941
+ outputConnectorIds: string[];
942
+ outputConnectors: {
943
+ id: string;
944
+ name: string;
945
+ type: string;
946
+ }[];
947
+ outputConnectorSnapshots: Record<string, unknown>[];
948
+ trafficMode: "split" | "dual_run" | null;
949
+ trafficRatio: number | null;
950
+ runConfig: Record<string, unknown>;
951
+ variableMapping: unknown;
952
+ outputMapping: unknown;
953
+ filterRules: unknown;
954
+ recordMode: "all" | "selected_categories" | "correct_only";
955
+ recordCategories: string[];
956
+ externalIdField: string | null;
957
+ retentionDays: number | null;
958
+ sourceExperimentId: string | null;
959
+ submitReason: string;
960
+ metrics: Record<string, unknown> | null;
961
+ totalReceived: number;
962
+ totalProcessed: number;
963
+ totalFiltered: number;
964
+ totalCorrect: number;
965
+ totalErrors: number;
966
+ controlState: string | null;
967
+ controlStatePayload: Record<string, unknown> | null;
968
+ startedAt: string | null;
969
+ finishedAt: string | null;
970
+ createdBy: string;
971
+ createdAt: string;
972
+ updatedAt: string;
973
+ } | null;
974
+ activeCanaryEvent: {
975
+ id: string;
976
+ projectId: string;
977
+ releaseLineId: string;
978
+ releaseVersionId: string | null;
979
+ releaseVersionKind: "production" | "candidate" | null;
980
+ releaseVersionLabel: string | null;
981
+ releaseVersionProductionNumber: number | null;
982
+ releaseVersionTargetProductionNumber: number | null;
983
+ releaseVersionCandidateNumber: number | null;
984
+ annotationTaskId: string | null;
985
+ laneType: "production" | "canary";
986
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
987
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
988
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
989
+ sourceEventId: string | null;
990
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
991
+ sourceLegacyId: string | null;
992
+ supersedesEventId: string | null;
993
+ rollbackTargetEventId: string | null;
994
+ legacySource: "canary_release" | "production_release_event" | null;
995
+ legacySourceId: string | null;
996
+ promptId: string | null;
997
+ promptName: string;
998
+ promptVersionId: string | null;
999
+ promptVersionNumber: number | null;
1000
+ promptVersionLabel: string | null;
1001
+ promptSnapshot: Record<string, unknown>;
1002
+ promptVersionSnapshot: Record<string, unknown>;
1003
+ modelId: string | null;
1004
+ modelName: string | null;
1005
+ modelProvider: string | null;
1006
+ modelSnapshot: Record<string, unknown>;
1007
+ inputConnectorId: string | null;
1008
+ inputConnectorName: string | null;
1009
+ inputConnectorType: string | null;
1010
+ inputConnectorSnapshot: Record<string, unknown>;
1011
+ outputConnectorIds: string[];
1012
+ outputConnectors: {
1013
+ id: string;
1014
+ name: string;
1015
+ type: string;
1016
+ }[];
1017
+ outputConnectorSnapshots: Record<string, unknown>[];
1018
+ trafficMode: "split" | "dual_run" | null;
1019
+ trafficRatio: number | null;
1020
+ runConfig: Record<string, unknown>;
1021
+ variableMapping: unknown;
1022
+ outputMapping: unknown;
1023
+ filterRules: unknown;
1024
+ recordMode: "all" | "selected_categories" | "correct_only";
1025
+ recordCategories: string[];
1026
+ externalIdField: string | null;
1027
+ retentionDays: number | null;
1028
+ sourceExperimentId: string | null;
1029
+ submitReason: string;
1030
+ metrics: Record<string, unknown> | null;
1031
+ totalReceived: number;
1032
+ totalProcessed: number;
1033
+ totalFiltered: number;
1034
+ totalCorrect: number;
1035
+ totalErrors: number;
1036
+ controlState: string | null;
1037
+ controlStatePayload: Record<string, unknown> | null;
1038
+ startedAt: string | null;
1039
+ finishedAt: string | null;
1040
+ createdBy: string;
1041
+ createdAt: string;
1042
+ updatedAt: string;
1043
+ } | null;
1044
+ versions: {
1045
+ id: string;
1046
+ projectId: string;
1047
+ releaseLineId: string;
1048
+ kind: "production" | "candidate";
1049
+ productionVersionNumber: number | null;
1050
+ targetProductionVersionNumber: number;
1051
+ candidateNumber: number | null;
1052
+ promotedFromReleaseVersionId: string | null;
1053
+ label: string;
1054
+ promptId: string | null;
1055
+ promptName: string;
1056
+ promptVersionId: string;
1057
+ promptVersionNumber: number | null;
1058
+ promptVersionLabel: string | null;
1059
+ promptSnapshot: Record<string, unknown>;
1060
+ promptVersionSnapshot: Record<string, unknown>;
1061
+ modelId: string;
1062
+ modelName: string | null;
1063
+ modelProvider: string | null;
1064
+ modelSnapshot: Record<string, unknown>;
1065
+ createdBy: string;
1066
+ createdAt: string;
1067
+ updatedAt: string;
1068
+ }[];
1069
+ outputConnectors: {
1070
+ id: string;
1071
+ name: string;
1072
+ type: string;
1073
+ }[];
1074
+ latestEvent: {
1075
+ id: string;
1076
+ projectId: string;
1077
+ releaseLineId: string;
1078
+ releaseVersionId: string | null;
1079
+ releaseVersionKind: "production" | "candidate" | null;
1080
+ releaseVersionLabel: string | null;
1081
+ releaseVersionProductionNumber: number | null;
1082
+ releaseVersionTargetProductionNumber: number | null;
1083
+ releaseVersionCandidateNumber: number | null;
1084
+ annotationTaskId: string | null;
1085
+ laneType: "production" | "canary";
1086
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1087
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1088
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1089
+ sourceEventId: string | null;
1090
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1091
+ sourceLegacyId: string | null;
1092
+ supersedesEventId: string | null;
1093
+ rollbackTargetEventId: string | null;
1094
+ legacySource: "canary_release" | "production_release_event" | null;
1095
+ legacySourceId: string | null;
1096
+ promptId: string | null;
1097
+ promptName: string;
1098
+ promptVersionId: string | null;
1099
+ promptVersionNumber: number | null;
1100
+ promptVersionLabel: string | null;
1101
+ promptSnapshot: Record<string, unknown>;
1102
+ promptVersionSnapshot: Record<string, unknown>;
1103
+ modelId: string | null;
1104
+ modelName: string | null;
1105
+ modelProvider: string | null;
1106
+ modelSnapshot: Record<string, unknown>;
1107
+ inputConnectorId: string | null;
1108
+ inputConnectorName: string | null;
1109
+ inputConnectorType: string | null;
1110
+ inputConnectorSnapshot: Record<string, unknown>;
1111
+ outputConnectorIds: string[];
1112
+ outputConnectors: {
1113
+ id: string;
1114
+ name: string;
1115
+ type: string;
1116
+ }[];
1117
+ outputConnectorSnapshots: Record<string, unknown>[];
1118
+ trafficMode: "split" | "dual_run" | null;
1119
+ trafficRatio: number | null;
1120
+ runConfig: Record<string, unknown>;
1121
+ variableMapping: unknown;
1122
+ outputMapping: unknown;
1123
+ filterRules: unknown;
1124
+ recordMode: "all" | "selected_categories" | "correct_only";
1125
+ recordCategories: string[];
1126
+ externalIdField: string | null;
1127
+ retentionDays: number | null;
1128
+ sourceExperimentId: string | null;
1129
+ submitReason: string;
1130
+ metrics: Record<string, unknown> | null;
1131
+ totalReceived: number;
1132
+ totalProcessed: number;
1133
+ totalFiltered: number;
1134
+ totalCorrect: number;
1135
+ totalErrors: number;
1136
+ controlState: string | null;
1137
+ controlStatePayload: Record<string, unknown> | null;
1138
+ startedAt: string | null;
1139
+ finishedAt: string | null;
1140
+ createdBy: string;
1141
+ createdAt: string;
1142
+ updatedAt: string;
1143
+ } | null;
1144
+ createdBy: string;
1145
+ createdAt: string;
1146
+ updatedAt: string;
1147
+ archivedAt: string | null;
1148
+ }>;
1149
+ stopLine: (_projectId: string, releaseLineId: string, body: StopReleaseLineInputDto) => Promise<{
1150
+ id: string;
1151
+ projectId: string;
1152
+ name: string;
1153
+ description: string | null;
1154
+ promptId: string | null;
1155
+ promptName: string;
1156
+ promptSnapshot: Record<string, unknown>;
1157
+ inputConnectorId: string | null;
1158
+ inputConnectorName: string | null;
1159
+ inputConnectorType: string | null;
1160
+ inputConnectorSnapshot: Record<string, unknown>;
1161
+ status: "archived" | "running" | "stopped";
1162
+ currentProductionEventId: string | null;
1163
+ activeCanaryEventId: string | null;
1164
+ currentProductionEvent: {
1165
+ id: string;
1166
+ projectId: string;
1167
+ releaseLineId: string;
1168
+ releaseVersionId: string | null;
1169
+ releaseVersionKind: "production" | "candidate" | null;
1170
+ releaseVersionLabel: string | null;
1171
+ releaseVersionProductionNumber: number | null;
1172
+ releaseVersionTargetProductionNumber: number | null;
1173
+ releaseVersionCandidateNumber: number | null;
1174
+ annotationTaskId: string | null;
1175
+ laneType: "production" | "canary";
1176
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1177
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1178
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1179
+ sourceEventId: string | null;
1180
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1181
+ sourceLegacyId: string | null;
1182
+ supersedesEventId: string | null;
1183
+ rollbackTargetEventId: string | null;
1184
+ legacySource: "canary_release" | "production_release_event" | null;
1185
+ legacySourceId: string | null;
1186
+ promptId: string | null;
1187
+ promptName: string;
1188
+ promptVersionId: string | null;
1189
+ promptVersionNumber: number | null;
1190
+ promptVersionLabel: string | null;
1191
+ promptSnapshot: Record<string, unknown>;
1192
+ promptVersionSnapshot: Record<string, unknown>;
1193
+ modelId: string | null;
1194
+ modelName: string | null;
1195
+ modelProvider: string | null;
1196
+ modelSnapshot: Record<string, unknown>;
1197
+ inputConnectorId: string | null;
1198
+ inputConnectorName: string | null;
1199
+ inputConnectorType: string | null;
1200
+ inputConnectorSnapshot: Record<string, unknown>;
1201
+ outputConnectorIds: string[];
1202
+ outputConnectors: {
1203
+ id: string;
1204
+ name: string;
1205
+ type: string;
1206
+ }[];
1207
+ outputConnectorSnapshots: Record<string, unknown>[];
1208
+ trafficMode: "split" | "dual_run" | null;
1209
+ trafficRatio: number | null;
1210
+ runConfig: Record<string, unknown>;
1211
+ variableMapping: unknown;
1212
+ outputMapping: unknown;
1213
+ filterRules: unknown;
1214
+ recordMode: "all" | "selected_categories" | "correct_only";
1215
+ recordCategories: string[];
1216
+ externalIdField: string | null;
1217
+ retentionDays: number | null;
1218
+ sourceExperimentId: string | null;
1219
+ submitReason: string;
1220
+ metrics: Record<string, unknown> | null;
1221
+ totalReceived: number;
1222
+ totalProcessed: number;
1223
+ totalFiltered: number;
1224
+ totalCorrect: number;
1225
+ totalErrors: number;
1226
+ controlState: string | null;
1227
+ controlStatePayload: Record<string, unknown> | null;
1228
+ startedAt: string | null;
1229
+ finishedAt: string | null;
1230
+ createdBy: string;
1231
+ createdAt: string;
1232
+ updatedAt: string;
1233
+ } | null;
1234
+ activeCanaryEvent: {
1235
+ id: string;
1236
+ projectId: string;
1237
+ releaseLineId: string;
1238
+ releaseVersionId: string | null;
1239
+ releaseVersionKind: "production" | "candidate" | null;
1240
+ releaseVersionLabel: string | null;
1241
+ releaseVersionProductionNumber: number | null;
1242
+ releaseVersionTargetProductionNumber: number | null;
1243
+ releaseVersionCandidateNumber: number | null;
1244
+ annotationTaskId: string | null;
1245
+ laneType: "production" | "canary";
1246
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1247
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1248
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1249
+ sourceEventId: string | null;
1250
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1251
+ sourceLegacyId: string | null;
1252
+ supersedesEventId: string | null;
1253
+ rollbackTargetEventId: string | null;
1254
+ legacySource: "canary_release" | "production_release_event" | null;
1255
+ legacySourceId: string | null;
1256
+ promptId: string | null;
1257
+ promptName: string;
1258
+ promptVersionId: string | null;
1259
+ promptVersionNumber: number | null;
1260
+ promptVersionLabel: string | null;
1261
+ promptSnapshot: Record<string, unknown>;
1262
+ promptVersionSnapshot: Record<string, unknown>;
1263
+ modelId: string | null;
1264
+ modelName: string | null;
1265
+ modelProvider: string | null;
1266
+ modelSnapshot: Record<string, unknown>;
1267
+ inputConnectorId: string | null;
1268
+ inputConnectorName: string | null;
1269
+ inputConnectorType: string | null;
1270
+ inputConnectorSnapshot: Record<string, unknown>;
1271
+ outputConnectorIds: string[];
1272
+ outputConnectors: {
1273
+ id: string;
1274
+ name: string;
1275
+ type: string;
1276
+ }[];
1277
+ outputConnectorSnapshots: Record<string, unknown>[];
1278
+ trafficMode: "split" | "dual_run" | null;
1279
+ trafficRatio: number | null;
1280
+ runConfig: Record<string, unknown>;
1281
+ variableMapping: unknown;
1282
+ outputMapping: unknown;
1283
+ filterRules: unknown;
1284
+ recordMode: "all" | "selected_categories" | "correct_only";
1285
+ recordCategories: string[];
1286
+ externalIdField: string | null;
1287
+ retentionDays: number | null;
1288
+ sourceExperimentId: string | null;
1289
+ submitReason: string;
1290
+ metrics: Record<string, unknown> | null;
1291
+ totalReceived: number;
1292
+ totalProcessed: number;
1293
+ totalFiltered: number;
1294
+ totalCorrect: number;
1295
+ totalErrors: number;
1296
+ controlState: string | null;
1297
+ controlStatePayload: Record<string, unknown> | null;
1298
+ startedAt: string | null;
1299
+ finishedAt: string | null;
1300
+ createdBy: string;
1301
+ createdAt: string;
1302
+ updatedAt: string;
1303
+ } | null;
1304
+ versions: {
1305
+ id: string;
1306
+ projectId: string;
1307
+ releaseLineId: string;
1308
+ kind: "production" | "candidate";
1309
+ productionVersionNumber: number | null;
1310
+ targetProductionVersionNumber: number;
1311
+ candidateNumber: number | null;
1312
+ promotedFromReleaseVersionId: string | null;
1313
+ label: string;
1314
+ promptId: string | null;
1315
+ promptName: string;
1316
+ promptVersionId: string;
1317
+ promptVersionNumber: number | null;
1318
+ promptVersionLabel: string | null;
1319
+ promptSnapshot: Record<string, unknown>;
1320
+ promptVersionSnapshot: Record<string, unknown>;
1321
+ modelId: string;
1322
+ modelName: string | null;
1323
+ modelProvider: string | null;
1324
+ modelSnapshot: Record<string, unknown>;
1325
+ createdBy: string;
1326
+ createdAt: string;
1327
+ updatedAt: string;
1328
+ }[];
1329
+ outputConnectors: {
1330
+ id: string;
1331
+ name: string;
1332
+ type: string;
1333
+ }[];
1334
+ latestEvent: {
1335
+ id: string;
1336
+ projectId: string;
1337
+ releaseLineId: string;
1338
+ releaseVersionId: string | null;
1339
+ releaseVersionKind: "production" | "candidate" | null;
1340
+ releaseVersionLabel: string | null;
1341
+ releaseVersionProductionNumber: number | null;
1342
+ releaseVersionTargetProductionNumber: number | null;
1343
+ releaseVersionCandidateNumber: number | null;
1344
+ annotationTaskId: string | null;
1345
+ laneType: "production" | "canary";
1346
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1347
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1348
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1349
+ sourceEventId: string | null;
1350
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1351
+ sourceLegacyId: string | null;
1352
+ supersedesEventId: string | null;
1353
+ rollbackTargetEventId: string | null;
1354
+ legacySource: "canary_release" | "production_release_event" | null;
1355
+ legacySourceId: string | null;
1356
+ promptId: string | null;
1357
+ promptName: string;
1358
+ promptVersionId: string | null;
1359
+ promptVersionNumber: number | null;
1360
+ promptVersionLabel: string | null;
1361
+ promptSnapshot: Record<string, unknown>;
1362
+ promptVersionSnapshot: Record<string, unknown>;
1363
+ modelId: string | null;
1364
+ modelName: string | null;
1365
+ modelProvider: string | null;
1366
+ modelSnapshot: Record<string, unknown>;
1367
+ inputConnectorId: string | null;
1368
+ inputConnectorName: string | null;
1369
+ inputConnectorType: string | null;
1370
+ inputConnectorSnapshot: Record<string, unknown>;
1371
+ outputConnectorIds: string[];
1372
+ outputConnectors: {
1373
+ id: string;
1374
+ name: string;
1375
+ type: string;
1376
+ }[];
1377
+ outputConnectorSnapshots: Record<string, unknown>[];
1378
+ trafficMode: "split" | "dual_run" | null;
1379
+ trafficRatio: number | null;
1380
+ runConfig: Record<string, unknown>;
1381
+ variableMapping: unknown;
1382
+ outputMapping: unknown;
1383
+ filterRules: unknown;
1384
+ recordMode: "all" | "selected_categories" | "correct_only";
1385
+ recordCategories: string[];
1386
+ externalIdField: string | null;
1387
+ retentionDays: number | null;
1388
+ sourceExperimentId: string | null;
1389
+ submitReason: string;
1390
+ metrics: Record<string, unknown> | null;
1391
+ totalReceived: number;
1392
+ totalProcessed: number;
1393
+ totalFiltered: number;
1394
+ totalCorrect: number;
1395
+ totalErrors: number;
1396
+ controlState: string | null;
1397
+ controlStatePayload: Record<string, unknown> | null;
1398
+ startedAt: string | null;
1399
+ finishedAt: string | null;
1400
+ createdBy: string;
1401
+ createdAt: string;
1402
+ updatedAt: string;
1403
+ } | null;
1404
+ createdBy: string;
1405
+ createdAt: string;
1406
+ updatedAt: string;
1407
+ archivedAt: string | null;
1408
+ }>;
1409
+ startLine: (_projectId: string, releaseLineId: string, body?: StartReleaseLineInputDto) => Promise<{
1410
+ id: string;
1411
+ projectId: string;
1412
+ name: string;
1413
+ description: string | null;
1414
+ promptId: string | null;
1415
+ promptName: string;
1416
+ promptSnapshot: Record<string, unknown>;
1417
+ inputConnectorId: string | null;
1418
+ inputConnectorName: string | null;
1419
+ inputConnectorType: string | null;
1420
+ inputConnectorSnapshot: Record<string, unknown>;
1421
+ status: "archived" | "running" | "stopped";
1422
+ currentProductionEventId: string | null;
1423
+ activeCanaryEventId: string | null;
1424
+ currentProductionEvent: {
1425
+ id: string;
1426
+ projectId: string;
1427
+ releaseLineId: string;
1428
+ releaseVersionId: string | null;
1429
+ releaseVersionKind: "production" | "candidate" | null;
1430
+ releaseVersionLabel: string | null;
1431
+ releaseVersionProductionNumber: number | null;
1432
+ releaseVersionTargetProductionNumber: number | null;
1433
+ releaseVersionCandidateNumber: number | null;
1434
+ annotationTaskId: string | null;
1435
+ laneType: "production" | "canary";
1436
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1437
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1438
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1439
+ sourceEventId: string | null;
1440
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1441
+ sourceLegacyId: string | null;
1442
+ supersedesEventId: string | null;
1443
+ rollbackTargetEventId: string | null;
1444
+ legacySource: "canary_release" | "production_release_event" | null;
1445
+ legacySourceId: string | null;
1446
+ promptId: string | null;
1447
+ promptName: string;
1448
+ promptVersionId: string | null;
1449
+ promptVersionNumber: number | null;
1450
+ promptVersionLabel: string | null;
1451
+ promptSnapshot: Record<string, unknown>;
1452
+ promptVersionSnapshot: Record<string, unknown>;
1453
+ modelId: string | null;
1454
+ modelName: string | null;
1455
+ modelProvider: string | null;
1456
+ modelSnapshot: Record<string, unknown>;
1457
+ inputConnectorId: string | null;
1458
+ inputConnectorName: string | null;
1459
+ inputConnectorType: string | null;
1460
+ inputConnectorSnapshot: Record<string, unknown>;
1461
+ outputConnectorIds: string[];
1462
+ outputConnectors: {
1463
+ id: string;
1464
+ name: string;
1465
+ type: string;
1466
+ }[];
1467
+ outputConnectorSnapshots: Record<string, unknown>[];
1468
+ trafficMode: "split" | "dual_run" | null;
1469
+ trafficRatio: number | null;
1470
+ runConfig: Record<string, unknown>;
1471
+ variableMapping: unknown;
1472
+ outputMapping: unknown;
1473
+ filterRules: unknown;
1474
+ recordMode: "all" | "selected_categories" | "correct_only";
1475
+ recordCategories: string[];
1476
+ externalIdField: string | null;
1477
+ retentionDays: number | null;
1478
+ sourceExperimentId: string | null;
1479
+ submitReason: string;
1480
+ metrics: Record<string, unknown> | null;
1481
+ totalReceived: number;
1482
+ totalProcessed: number;
1483
+ totalFiltered: number;
1484
+ totalCorrect: number;
1485
+ totalErrors: number;
1486
+ controlState: string | null;
1487
+ controlStatePayload: Record<string, unknown> | null;
1488
+ startedAt: string | null;
1489
+ finishedAt: string | null;
1490
+ createdBy: string;
1491
+ createdAt: string;
1492
+ updatedAt: string;
1493
+ } | null;
1494
+ activeCanaryEvent: {
1495
+ id: string;
1496
+ projectId: string;
1497
+ releaseLineId: string;
1498
+ releaseVersionId: string | null;
1499
+ releaseVersionKind: "production" | "candidate" | null;
1500
+ releaseVersionLabel: string | null;
1501
+ releaseVersionProductionNumber: number | null;
1502
+ releaseVersionTargetProductionNumber: number | null;
1503
+ releaseVersionCandidateNumber: number | null;
1504
+ annotationTaskId: string | null;
1505
+ laneType: "production" | "canary";
1506
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1507
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1508
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1509
+ sourceEventId: string | null;
1510
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1511
+ sourceLegacyId: string | null;
1512
+ supersedesEventId: string | null;
1513
+ rollbackTargetEventId: string | null;
1514
+ legacySource: "canary_release" | "production_release_event" | null;
1515
+ legacySourceId: string | null;
1516
+ promptId: string | null;
1517
+ promptName: string;
1518
+ promptVersionId: string | null;
1519
+ promptVersionNumber: number | null;
1520
+ promptVersionLabel: string | null;
1521
+ promptSnapshot: Record<string, unknown>;
1522
+ promptVersionSnapshot: Record<string, unknown>;
1523
+ modelId: string | null;
1524
+ modelName: string | null;
1525
+ modelProvider: string | null;
1526
+ modelSnapshot: Record<string, unknown>;
1527
+ inputConnectorId: string | null;
1528
+ inputConnectorName: string | null;
1529
+ inputConnectorType: string | null;
1530
+ inputConnectorSnapshot: Record<string, unknown>;
1531
+ outputConnectorIds: string[];
1532
+ outputConnectors: {
1533
+ id: string;
1534
+ name: string;
1535
+ type: string;
1536
+ }[];
1537
+ outputConnectorSnapshots: Record<string, unknown>[];
1538
+ trafficMode: "split" | "dual_run" | null;
1539
+ trafficRatio: number | null;
1540
+ runConfig: Record<string, unknown>;
1541
+ variableMapping: unknown;
1542
+ outputMapping: unknown;
1543
+ filterRules: unknown;
1544
+ recordMode: "all" | "selected_categories" | "correct_only";
1545
+ recordCategories: string[];
1546
+ externalIdField: string | null;
1547
+ retentionDays: number | null;
1548
+ sourceExperimentId: string | null;
1549
+ submitReason: string;
1550
+ metrics: Record<string, unknown> | null;
1551
+ totalReceived: number;
1552
+ totalProcessed: number;
1553
+ totalFiltered: number;
1554
+ totalCorrect: number;
1555
+ totalErrors: number;
1556
+ controlState: string | null;
1557
+ controlStatePayload: Record<string, unknown> | null;
1558
+ startedAt: string | null;
1559
+ finishedAt: string | null;
1560
+ createdBy: string;
1561
+ createdAt: string;
1562
+ updatedAt: string;
1563
+ } | null;
1564
+ versions: {
1565
+ id: string;
1566
+ projectId: string;
1567
+ releaseLineId: string;
1568
+ kind: "production" | "candidate";
1569
+ productionVersionNumber: number | null;
1570
+ targetProductionVersionNumber: number;
1571
+ candidateNumber: number | null;
1572
+ promotedFromReleaseVersionId: string | null;
1573
+ label: string;
1574
+ promptId: string | null;
1575
+ promptName: string;
1576
+ promptVersionId: string;
1577
+ promptVersionNumber: number | null;
1578
+ promptVersionLabel: string | null;
1579
+ promptSnapshot: Record<string, unknown>;
1580
+ promptVersionSnapshot: Record<string, unknown>;
1581
+ modelId: string;
1582
+ modelName: string | null;
1583
+ modelProvider: string | null;
1584
+ modelSnapshot: Record<string, unknown>;
1585
+ createdBy: string;
1586
+ createdAt: string;
1587
+ updatedAt: string;
1588
+ }[];
1589
+ outputConnectors: {
1590
+ id: string;
1591
+ name: string;
1592
+ type: string;
1593
+ }[];
1594
+ latestEvent: {
1595
+ id: string;
1596
+ projectId: string;
1597
+ releaseLineId: string;
1598
+ releaseVersionId: string | null;
1599
+ releaseVersionKind: "production" | "candidate" | null;
1600
+ releaseVersionLabel: string | null;
1601
+ releaseVersionProductionNumber: number | null;
1602
+ releaseVersionTargetProductionNumber: number | null;
1603
+ releaseVersionCandidateNumber: number | null;
1604
+ annotationTaskId: string | null;
1605
+ laneType: "production" | "canary";
1606
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1607
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1608
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1609
+ sourceEventId: string | null;
1610
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1611
+ sourceLegacyId: string | null;
1612
+ supersedesEventId: string | null;
1613
+ rollbackTargetEventId: string | null;
1614
+ legacySource: "canary_release" | "production_release_event" | null;
1615
+ legacySourceId: string | null;
1616
+ promptId: string | null;
1617
+ promptName: string;
1618
+ promptVersionId: string | null;
1619
+ promptVersionNumber: number | null;
1620
+ promptVersionLabel: string | null;
1621
+ promptSnapshot: Record<string, unknown>;
1622
+ promptVersionSnapshot: Record<string, unknown>;
1623
+ modelId: string | null;
1624
+ modelName: string | null;
1625
+ modelProvider: string | null;
1626
+ modelSnapshot: Record<string, unknown>;
1627
+ inputConnectorId: string | null;
1628
+ inputConnectorName: string | null;
1629
+ inputConnectorType: string | null;
1630
+ inputConnectorSnapshot: Record<string, unknown>;
1631
+ outputConnectorIds: string[];
1632
+ outputConnectors: {
1633
+ id: string;
1634
+ name: string;
1635
+ type: string;
1636
+ }[];
1637
+ outputConnectorSnapshots: Record<string, unknown>[];
1638
+ trafficMode: "split" | "dual_run" | null;
1639
+ trafficRatio: number | null;
1640
+ runConfig: Record<string, unknown>;
1641
+ variableMapping: unknown;
1642
+ outputMapping: unknown;
1643
+ filterRules: unknown;
1644
+ recordMode: "all" | "selected_categories" | "correct_only";
1645
+ recordCategories: string[];
1646
+ externalIdField: string | null;
1647
+ retentionDays: number | null;
1648
+ sourceExperimentId: string | null;
1649
+ submitReason: string;
1650
+ metrics: Record<string, unknown> | null;
1651
+ totalReceived: number;
1652
+ totalProcessed: number;
1653
+ totalFiltered: number;
1654
+ totalCorrect: number;
1655
+ totalErrors: number;
1656
+ controlState: string | null;
1657
+ controlStatePayload: Record<string, unknown> | null;
1658
+ startedAt: string | null;
1659
+ finishedAt: string | null;
1660
+ createdBy: string;
1661
+ createdAt: string;
1662
+ updatedAt: string;
1663
+ } | null;
1664
+ createdBy: string;
1665
+ createdAt: string;
1666
+ updatedAt: string;
1667
+ archivedAt: string | null;
1668
+ }>;
1669
+ archiveLine: (_projectId: string, releaseLineId: string, body?: ArchiveReleaseLineInputDto) => Promise<{
1670
+ id: string;
1671
+ projectId: string;
1672
+ name: string;
1673
+ description: string | null;
1674
+ promptId: string | null;
1675
+ promptName: string;
1676
+ promptSnapshot: Record<string, unknown>;
1677
+ inputConnectorId: string | null;
1678
+ inputConnectorName: string | null;
1679
+ inputConnectorType: string | null;
1680
+ inputConnectorSnapshot: Record<string, unknown>;
1681
+ status: "archived" | "running" | "stopped";
1682
+ currentProductionEventId: string | null;
1683
+ activeCanaryEventId: string | null;
1684
+ currentProductionEvent: {
1685
+ id: string;
1686
+ projectId: string;
1687
+ releaseLineId: string;
1688
+ releaseVersionId: string | null;
1689
+ releaseVersionKind: "production" | "candidate" | null;
1690
+ releaseVersionLabel: string | null;
1691
+ releaseVersionProductionNumber: number | null;
1692
+ releaseVersionTargetProductionNumber: number | null;
1693
+ releaseVersionCandidateNumber: number | null;
1694
+ annotationTaskId: string | null;
1695
+ laneType: "production" | "canary";
1696
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1697
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1698
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1699
+ sourceEventId: string | null;
1700
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1701
+ sourceLegacyId: string | null;
1702
+ supersedesEventId: string | null;
1703
+ rollbackTargetEventId: string | null;
1704
+ legacySource: "canary_release" | "production_release_event" | null;
1705
+ legacySourceId: string | null;
1706
+ promptId: string | null;
1707
+ promptName: string;
1708
+ promptVersionId: string | null;
1709
+ promptVersionNumber: number | null;
1710
+ promptVersionLabel: string | null;
1711
+ promptSnapshot: Record<string, unknown>;
1712
+ promptVersionSnapshot: Record<string, unknown>;
1713
+ modelId: string | null;
1714
+ modelName: string | null;
1715
+ modelProvider: string | null;
1716
+ modelSnapshot: Record<string, unknown>;
1717
+ inputConnectorId: string | null;
1718
+ inputConnectorName: string | null;
1719
+ inputConnectorType: string | null;
1720
+ inputConnectorSnapshot: Record<string, unknown>;
1721
+ outputConnectorIds: string[];
1722
+ outputConnectors: {
1723
+ id: string;
1724
+ name: string;
1725
+ type: string;
1726
+ }[];
1727
+ outputConnectorSnapshots: Record<string, unknown>[];
1728
+ trafficMode: "split" | "dual_run" | null;
1729
+ trafficRatio: number | null;
1730
+ runConfig: Record<string, unknown>;
1731
+ variableMapping: unknown;
1732
+ outputMapping: unknown;
1733
+ filterRules: unknown;
1734
+ recordMode: "all" | "selected_categories" | "correct_only";
1735
+ recordCategories: string[];
1736
+ externalIdField: string | null;
1737
+ retentionDays: number | null;
1738
+ sourceExperimentId: string | null;
1739
+ submitReason: string;
1740
+ metrics: Record<string, unknown> | null;
1741
+ totalReceived: number;
1742
+ totalProcessed: number;
1743
+ totalFiltered: number;
1744
+ totalCorrect: number;
1745
+ totalErrors: number;
1746
+ controlState: string | null;
1747
+ controlStatePayload: Record<string, unknown> | null;
1748
+ startedAt: string | null;
1749
+ finishedAt: string | null;
1750
+ createdBy: string;
1751
+ createdAt: string;
1752
+ updatedAt: string;
1753
+ } | null;
1754
+ activeCanaryEvent: {
1755
+ id: string;
1756
+ projectId: string;
1757
+ releaseLineId: string;
1758
+ releaseVersionId: string | null;
1759
+ releaseVersionKind: "production" | "candidate" | null;
1760
+ releaseVersionLabel: string | null;
1761
+ releaseVersionProductionNumber: number | null;
1762
+ releaseVersionTargetProductionNumber: number | null;
1763
+ releaseVersionCandidateNumber: number | null;
1764
+ annotationTaskId: string | null;
1765
+ laneType: "production" | "canary";
1766
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1767
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1768
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1769
+ sourceEventId: string | null;
1770
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1771
+ sourceLegacyId: string | null;
1772
+ supersedesEventId: string | null;
1773
+ rollbackTargetEventId: string | null;
1774
+ legacySource: "canary_release" | "production_release_event" | null;
1775
+ legacySourceId: string | null;
1776
+ promptId: string | null;
1777
+ promptName: string;
1778
+ promptVersionId: string | null;
1779
+ promptVersionNumber: number | null;
1780
+ promptVersionLabel: string | null;
1781
+ promptSnapshot: Record<string, unknown>;
1782
+ promptVersionSnapshot: Record<string, unknown>;
1783
+ modelId: string | null;
1784
+ modelName: string | null;
1785
+ modelProvider: string | null;
1786
+ modelSnapshot: Record<string, unknown>;
1787
+ inputConnectorId: string | null;
1788
+ inputConnectorName: string | null;
1789
+ inputConnectorType: string | null;
1790
+ inputConnectorSnapshot: Record<string, unknown>;
1791
+ outputConnectorIds: string[];
1792
+ outputConnectors: {
1793
+ id: string;
1794
+ name: string;
1795
+ type: string;
1796
+ }[];
1797
+ outputConnectorSnapshots: Record<string, unknown>[];
1798
+ trafficMode: "split" | "dual_run" | null;
1799
+ trafficRatio: number | null;
1800
+ runConfig: Record<string, unknown>;
1801
+ variableMapping: unknown;
1802
+ outputMapping: unknown;
1803
+ filterRules: unknown;
1804
+ recordMode: "all" | "selected_categories" | "correct_only";
1805
+ recordCategories: string[];
1806
+ externalIdField: string | null;
1807
+ retentionDays: number | null;
1808
+ sourceExperimentId: string | null;
1809
+ submitReason: string;
1810
+ metrics: Record<string, unknown> | null;
1811
+ totalReceived: number;
1812
+ totalProcessed: number;
1813
+ totalFiltered: number;
1814
+ totalCorrect: number;
1815
+ totalErrors: number;
1816
+ controlState: string | null;
1817
+ controlStatePayload: Record<string, unknown> | null;
1818
+ startedAt: string | null;
1819
+ finishedAt: string | null;
1820
+ createdBy: string;
1821
+ createdAt: string;
1822
+ updatedAt: string;
1823
+ } | null;
1824
+ versions: {
1825
+ id: string;
1826
+ projectId: string;
1827
+ releaseLineId: string;
1828
+ kind: "production" | "candidate";
1829
+ productionVersionNumber: number | null;
1830
+ targetProductionVersionNumber: number;
1831
+ candidateNumber: number | null;
1832
+ promotedFromReleaseVersionId: string | null;
1833
+ label: string;
1834
+ promptId: string | null;
1835
+ promptName: string;
1836
+ promptVersionId: string;
1837
+ promptVersionNumber: number | null;
1838
+ promptVersionLabel: string | null;
1839
+ promptSnapshot: Record<string, unknown>;
1840
+ promptVersionSnapshot: Record<string, unknown>;
1841
+ modelId: string;
1842
+ modelName: string | null;
1843
+ modelProvider: string | null;
1844
+ modelSnapshot: Record<string, unknown>;
1845
+ createdBy: string;
1846
+ createdAt: string;
1847
+ updatedAt: string;
1848
+ }[];
1849
+ outputConnectors: {
1850
+ id: string;
1851
+ name: string;
1852
+ type: string;
1853
+ }[];
1854
+ latestEvent: {
1855
+ id: string;
1856
+ projectId: string;
1857
+ releaseLineId: string;
1858
+ releaseVersionId: string | null;
1859
+ releaseVersionKind: "production" | "candidate" | null;
1860
+ releaseVersionLabel: string | null;
1861
+ releaseVersionProductionNumber: number | null;
1862
+ releaseVersionTargetProductionNumber: number | null;
1863
+ releaseVersionCandidateNumber: number | null;
1864
+ annotationTaskId: string | null;
1865
+ laneType: "production" | "canary";
1866
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1867
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1868
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1869
+ sourceEventId: string | null;
1870
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1871
+ sourceLegacyId: string | null;
1872
+ supersedesEventId: string | null;
1873
+ rollbackTargetEventId: string | null;
1874
+ legacySource: "canary_release" | "production_release_event" | null;
1875
+ legacySourceId: string | null;
1876
+ promptId: string | null;
1877
+ promptName: string;
1878
+ promptVersionId: string | null;
1879
+ promptVersionNumber: number | null;
1880
+ promptVersionLabel: string | null;
1881
+ promptSnapshot: Record<string, unknown>;
1882
+ promptVersionSnapshot: Record<string, unknown>;
1883
+ modelId: string | null;
1884
+ modelName: string | null;
1885
+ modelProvider: string | null;
1886
+ modelSnapshot: Record<string, unknown>;
1887
+ inputConnectorId: string | null;
1888
+ inputConnectorName: string | null;
1889
+ inputConnectorType: string | null;
1890
+ inputConnectorSnapshot: Record<string, unknown>;
1891
+ outputConnectorIds: string[];
1892
+ outputConnectors: {
1893
+ id: string;
1894
+ name: string;
1895
+ type: string;
1896
+ }[];
1897
+ outputConnectorSnapshots: Record<string, unknown>[];
1898
+ trafficMode: "split" | "dual_run" | null;
1899
+ trafficRatio: number | null;
1900
+ runConfig: Record<string, unknown>;
1901
+ variableMapping: unknown;
1902
+ outputMapping: unknown;
1903
+ filterRules: unknown;
1904
+ recordMode: "all" | "selected_categories" | "correct_only";
1905
+ recordCategories: string[];
1906
+ externalIdField: string | null;
1907
+ retentionDays: number | null;
1908
+ sourceExperimentId: string | null;
1909
+ submitReason: string;
1910
+ metrics: Record<string, unknown> | null;
1911
+ totalReceived: number;
1912
+ totalProcessed: number;
1913
+ totalFiltered: number;
1914
+ totalCorrect: number;
1915
+ totalErrors: number;
1916
+ controlState: string | null;
1917
+ controlStatePayload: Record<string, unknown> | null;
1918
+ startedAt: string | null;
1919
+ finishedAt: string | null;
1920
+ createdBy: string;
1921
+ createdAt: string;
1922
+ updatedAt: string;
1923
+ } | null;
1924
+ createdBy: string;
1925
+ createdAt: string;
1926
+ updatedAt: string;
1927
+ archivedAt: string | null;
1928
+ }>;
1929
+ unarchiveLine: (_projectId: string, releaseLineId: string, body?: UnarchiveReleaseLineInputDto) => Promise<{
1930
+ id: string;
1931
+ projectId: string;
1932
+ name: string;
1933
+ description: string | null;
1934
+ promptId: string | null;
1935
+ promptName: string;
1936
+ promptSnapshot: Record<string, unknown>;
1937
+ inputConnectorId: string | null;
1938
+ inputConnectorName: string | null;
1939
+ inputConnectorType: string | null;
1940
+ inputConnectorSnapshot: Record<string, unknown>;
1941
+ status: "archived" | "running" | "stopped";
1942
+ currentProductionEventId: string | null;
1943
+ activeCanaryEventId: string | null;
1944
+ currentProductionEvent: {
1945
+ id: string;
1946
+ projectId: string;
1947
+ releaseLineId: string;
1948
+ releaseVersionId: string | null;
1949
+ releaseVersionKind: "production" | "candidate" | null;
1950
+ releaseVersionLabel: string | null;
1951
+ releaseVersionProductionNumber: number | null;
1952
+ releaseVersionTargetProductionNumber: number | null;
1953
+ releaseVersionCandidateNumber: number | null;
1954
+ annotationTaskId: string | null;
1955
+ laneType: "production" | "canary";
1956
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1957
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
1958
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
1959
+ sourceEventId: string | null;
1960
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1961
+ sourceLegacyId: string | null;
1962
+ supersedesEventId: string | null;
1963
+ rollbackTargetEventId: string | null;
1964
+ legacySource: "canary_release" | "production_release_event" | null;
1965
+ legacySourceId: string | null;
1966
+ promptId: string | null;
1967
+ promptName: string;
1968
+ promptVersionId: string | null;
1969
+ promptVersionNumber: number | null;
1970
+ promptVersionLabel: string | null;
1971
+ promptSnapshot: Record<string, unknown>;
1972
+ promptVersionSnapshot: Record<string, unknown>;
1973
+ modelId: string | null;
1974
+ modelName: string | null;
1975
+ modelProvider: string | null;
1976
+ modelSnapshot: Record<string, unknown>;
1977
+ inputConnectorId: string | null;
1978
+ inputConnectorName: string | null;
1979
+ inputConnectorType: string | null;
1980
+ inputConnectorSnapshot: Record<string, unknown>;
1981
+ outputConnectorIds: string[];
1982
+ outputConnectors: {
1983
+ id: string;
1984
+ name: string;
1985
+ type: string;
1986
+ }[];
1987
+ outputConnectorSnapshots: Record<string, unknown>[];
1988
+ trafficMode: "split" | "dual_run" | null;
1989
+ trafficRatio: number | null;
1990
+ runConfig: Record<string, unknown>;
1991
+ variableMapping: unknown;
1992
+ outputMapping: unknown;
1993
+ filterRules: unknown;
1994
+ recordMode: "all" | "selected_categories" | "correct_only";
1995
+ recordCategories: string[];
1996
+ externalIdField: string | null;
1997
+ retentionDays: number | null;
1998
+ sourceExperimentId: string | null;
1999
+ submitReason: string;
2000
+ metrics: Record<string, unknown> | null;
2001
+ totalReceived: number;
2002
+ totalProcessed: number;
2003
+ totalFiltered: number;
2004
+ totalCorrect: number;
2005
+ totalErrors: number;
2006
+ controlState: string | null;
2007
+ controlStatePayload: Record<string, unknown> | null;
2008
+ startedAt: string | null;
2009
+ finishedAt: string | null;
2010
+ createdBy: string;
2011
+ createdAt: string;
2012
+ updatedAt: string;
2013
+ } | null;
2014
+ activeCanaryEvent: {
2015
+ id: string;
2016
+ projectId: string;
2017
+ releaseLineId: string;
2018
+ releaseVersionId: string | null;
2019
+ releaseVersionKind: "production" | "candidate" | null;
2020
+ releaseVersionLabel: string | null;
2021
+ releaseVersionProductionNumber: number | null;
2022
+ releaseVersionTargetProductionNumber: number | null;
2023
+ releaseVersionCandidateNumber: number | null;
2024
+ annotationTaskId: string | null;
2025
+ laneType: "production" | "canary";
2026
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2027
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2028
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2029
+ sourceEventId: string | null;
2030
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2031
+ sourceLegacyId: string | null;
2032
+ supersedesEventId: string | null;
2033
+ rollbackTargetEventId: string | null;
2034
+ legacySource: "canary_release" | "production_release_event" | null;
2035
+ legacySourceId: string | null;
2036
+ promptId: string | null;
2037
+ promptName: string;
2038
+ promptVersionId: string | null;
2039
+ promptVersionNumber: number | null;
2040
+ promptVersionLabel: string | null;
2041
+ promptSnapshot: Record<string, unknown>;
2042
+ promptVersionSnapshot: Record<string, unknown>;
2043
+ modelId: string | null;
2044
+ modelName: string | null;
2045
+ modelProvider: string | null;
2046
+ modelSnapshot: Record<string, unknown>;
2047
+ inputConnectorId: string | null;
2048
+ inputConnectorName: string | null;
2049
+ inputConnectorType: string | null;
2050
+ inputConnectorSnapshot: Record<string, unknown>;
2051
+ outputConnectorIds: string[];
2052
+ outputConnectors: {
2053
+ id: string;
2054
+ name: string;
2055
+ type: string;
2056
+ }[];
2057
+ outputConnectorSnapshots: Record<string, unknown>[];
2058
+ trafficMode: "split" | "dual_run" | null;
2059
+ trafficRatio: number | null;
2060
+ runConfig: Record<string, unknown>;
2061
+ variableMapping: unknown;
2062
+ outputMapping: unknown;
2063
+ filterRules: unknown;
2064
+ recordMode: "all" | "selected_categories" | "correct_only";
2065
+ recordCategories: string[];
2066
+ externalIdField: string | null;
2067
+ retentionDays: number | null;
2068
+ sourceExperimentId: string | null;
2069
+ submitReason: string;
2070
+ metrics: Record<string, unknown> | null;
2071
+ totalReceived: number;
2072
+ totalProcessed: number;
2073
+ totalFiltered: number;
2074
+ totalCorrect: number;
2075
+ totalErrors: number;
2076
+ controlState: string | null;
2077
+ controlStatePayload: Record<string, unknown> | null;
2078
+ startedAt: string | null;
2079
+ finishedAt: string | null;
2080
+ createdBy: string;
2081
+ createdAt: string;
2082
+ updatedAt: string;
2083
+ } | null;
2084
+ versions: {
2085
+ id: string;
2086
+ projectId: string;
2087
+ releaseLineId: string;
2088
+ kind: "production" | "candidate";
2089
+ productionVersionNumber: number | null;
2090
+ targetProductionVersionNumber: number;
2091
+ candidateNumber: number | null;
2092
+ promotedFromReleaseVersionId: string | null;
2093
+ label: string;
2094
+ promptId: string | null;
2095
+ promptName: string;
2096
+ promptVersionId: string;
2097
+ promptVersionNumber: number | null;
2098
+ promptVersionLabel: string | null;
2099
+ promptSnapshot: Record<string, unknown>;
2100
+ promptVersionSnapshot: Record<string, unknown>;
2101
+ modelId: string;
2102
+ modelName: string | null;
2103
+ modelProvider: string | null;
2104
+ modelSnapshot: Record<string, unknown>;
2105
+ createdBy: string;
2106
+ createdAt: string;
2107
+ updatedAt: string;
2108
+ }[];
2109
+ outputConnectors: {
2110
+ id: string;
2111
+ name: string;
2112
+ type: string;
2113
+ }[];
2114
+ latestEvent: {
2115
+ id: string;
2116
+ projectId: string;
2117
+ releaseLineId: string;
2118
+ releaseVersionId: string | null;
2119
+ releaseVersionKind: "production" | "candidate" | null;
2120
+ releaseVersionLabel: string | null;
2121
+ releaseVersionProductionNumber: number | null;
2122
+ releaseVersionTargetProductionNumber: number | null;
2123
+ releaseVersionCandidateNumber: number | null;
2124
+ annotationTaskId: string | null;
2125
+ laneType: "production" | "canary";
2126
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2127
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2128
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2129
+ sourceEventId: string | null;
2130
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2131
+ sourceLegacyId: string | null;
2132
+ supersedesEventId: string | null;
2133
+ rollbackTargetEventId: string | null;
2134
+ legacySource: "canary_release" | "production_release_event" | null;
2135
+ legacySourceId: string | null;
2136
+ promptId: string | null;
2137
+ promptName: string;
2138
+ promptVersionId: string | null;
2139
+ promptVersionNumber: number | null;
2140
+ promptVersionLabel: string | null;
2141
+ promptSnapshot: Record<string, unknown>;
2142
+ promptVersionSnapshot: Record<string, unknown>;
2143
+ modelId: string | null;
2144
+ modelName: string | null;
2145
+ modelProvider: string | null;
2146
+ modelSnapshot: Record<string, unknown>;
2147
+ inputConnectorId: string | null;
2148
+ inputConnectorName: string | null;
2149
+ inputConnectorType: string | null;
2150
+ inputConnectorSnapshot: Record<string, unknown>;
2151
+ outputConnectorIds: string[];
2152
+ outputConnectors: {
2153
+ id: string;
2154
+ name: string;
2155
+ type: string;
2156
+ }[];
2157
+ outputConnectorSnapshots: Record<string, unknown>[];
2158
+ trafficMode: "split" | "dual_run" | null;
2159
+ trafficRatio: number | null;
2160
+ runConfig: Record<string, unknown>;
2161
+ variableMapping: unknown;
2162
+ outputMapping: unknown;
2163
+ filterRules: unknown;
2164
+ recordMode: "all" | "selected_categories" | "correct_only";
2165
+ recordCategories: string[];
2166
+ externalIdField: string | null;
2167
+ retentionDays: number | null;
2168
+ sourceExperimentId: string | null;
2169
+ submitReason: string;
2170
+ metrics: Record<string, unknown> | null;
2171
+ totalReceived: number;
2172
+ totalProcessed: number;
2173
+ totalFiltered: number;
2174
+ totalCorrect: number;
2175
+ totalErrors: number;
2176
+ controlState: string | null;
2177
+ controlStatePayload: Record<string, unknown> | null;
2178
+ startedAt: string | null;
2179
+ finishedAt: string | null;
2180
+ createdBy: string;
2181
+ createdAt: string;
2182
+ updatedAt: string;
2183
+ } | null;
2184
+ createdBy: string;
2185
+ createdAt: string;
2186
+ updatedAt: string;
2187
+ archivedAt: string | null;
2188
+ }>;
2189
+ restoreHistoryToProduction: (_projectId: string, releaseLineId: string, body: RestoreReleaseLineHistoryInputDto) => Promise<{
2190
+ id: string;
2191
+ projectId: string;
2192
+ name: string;
2193
+ description: string | null;
2194
+ promptId: string | null;
2195
+ promptName: string;
2196
+ promptSnapshot: Record<string, unknown>;
2197
+ inputConnectorId: string | null;
2198
+ inputConnectorName: string | null;
2199
+ inputConnectorType: string | null;
2200
+ inputConnectorSnapshot: Record<string, unknown>;
2201
+ status: "archived" | "running" | "stopped";
2202
+ currentProductionEventId: string | null;
2203
+ activeCanaryEventId: string | null;
2204
+ currentProductionEvent: {
2205
+ id: string;
2206
+ projectId: string;
2207
+ releaseLineId: string;
2208
+ releaseVersionId: string | null;
2209
+ releaseVersionKind: "production" | "candidate" | null;
2210
+ releaseVersionLabel: string | null;
2211
+ releaseVersionProductionNumber: number | null;
2212
+ releaseVersionTargetProductionNumber: number | null;
2213
+ releaseVersionCandidateNumber: number | null;
2214
+ annotationTaskId: string | null;
2215
+ laneType: "production" | "canary";
2216
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2217
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2218
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2219
+ sourceEventId: string | null;
2220
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2221
+ sourceLegacyId: string | null;
2222
+ supersedesEventId: string | null;
2223
+ rollbackTargetEventId: string | null;
2224
+ legacySource: "canary_release" | "production_release_event" | null;
2225
+ legacySourceId: string | null;
2226
+ promptId: string | null;
2227
+ promptName: string;
2228
+ promptVersionId: string | null;
2229
+ promptVersionNumber: number | null;
2230
+ promptVersionLabel: string | null;
2231
+ promptSnapshot: Record<string, unknown>;
2232
+ promptVersionSnapshot: Record<string, unknown>;
2233
+ modelId: string | null;
2234
+ modelName: string | null;
2235
+ modelProvider: string | null;
2236
+ modelSnapshot: Record<string, unknown>;
2237
+ inputConnectorId: string | null;
2238
+ inputConnectorName: string | null;
2239
+ inputConnectorType: string | null;
2240
+ inputConnectorSnapshot: Record<string, unknown>;
2241
+ outputConnectorIds: string[];
2242
+ outputConnectors: {
2243
+ id: string;
2244
+ name: string;
2245
+ type: string;
2246
+ }[];
2247
+ outputConnectorSnapshots: Record<string, unknown>[];
2248
+ trafficMode: "split" | "dual_run" | null;
2249
+ trafficRatio: number | null;
2250
+ runConfig: Record<string, unknown>;
2251
+ variableMapping: unknown;
2252
+ outputMapping: unknown;
2253
+ filterRules: unknown;
2254
+ recordMode: "all" | "selected_categories" | "correct_only";
2255
+ recordCategories: string[];
2256
+ externalIdField: string | null;
2257
+ retentionDays: number | null;
2258
+ sourceExperimentId: string | null;
2259
+ submitReason: string;
2260
+ metrics: Record<string, unknown> | null;
2261
+ totalReceived: number;
2262
+ totalProcessed: number;
2263
+ totalFiltered: number;
2264
+ totalCorrect: number;
2265
+ totalErrors: number;
2266
+ controlState: string | null;
2267
+ controlStatePayload: Record<string, unknown> | null;
2268
+ startedAt: string | null;
2269
+ finishedAt: string | null;
2270
+ createdBy: string;
2271
+ createdAt: string;
2272
+ updatedAt: string;
2273
+ } | null;
2274
+ activeCanaryEvent: {
2275
+ id: string;
2276
+ projectId: string;
2277
+ releaseLineId: string;
2278
+ releaseVersionId: string | null;
2279
+ releaseVersionKind: "production" | "candidate" | null;
2280
+ releaseVersionLabel: string | null;
2281
+ releaseVersionProductionNumber: number | null;
2282
+ releaseVersionTargetProductionNumber: number | null;
2283
+ releaseVersionCandidateNumber: number | null;
2284
+ annotationTaskId: string | null;
2285
+ laneType: "production" | "canary";
2286
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2287
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2288
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2289
+ sourceEventId: string | null;
2290
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2291
+ sourceLegacyId: string | null;
2292
+ supersedesEventId: string | null;
2293
+ rollbackTargetEventId: string | null;
2294
+ legacySource: "canary_release" | "production_release_event" | null;
2295
+ legacySourceId: string | null;
2296
+ promptId: string | null;
2297
+ promptName: string;
2298
+ promptVersionId: string | null;
2299
+ promptVersionNumber: number | null;
2300
+ promptVersionLabel: string | null;
2301
+ promptSnapshot: Record<string, unknown>;
2302
+ promptVersionSnapshot: Record<string, unknown>;
2303
+ modelId: string | null;
2304
+ modelName: string | null;
2305
+ modelProvider: string | null;
2306
+ modelSnapshot: Record<string, unknown>;
2307
+ inputConnectorId: string | null;
2308
+ inputConnectorName: string | null;
2309
+ inputConnectorType: string | null;
2310
+ inputConnectorSnapshot: Record<string, unknown>;
2311
+ outputConnectorIds: string[];
2312
+ outputConnectors: {
2313
+ id: string;
2314
+ name: string;
2315
+ type: string;
2316
+ }[];
2317
+ outputConnectorSnapshots: Record<string, unknown>[];
2318
+ trafficMode: "split" | "dual_run" | null;
2319
+ trafficRatio: number | null;
2320
+ runConfig: Record<string, unknown>;
2321
+ variableMapping: unknown;
2322
+ outputMapping: unknown;
2323
+ filterRules: unknown;
2324
+ recordMode: "all" | "selected_categories" | "correct_only";
2325
+ recordCategories: string[];
2326
+ externalIdField: string | null;
2327
+ retentionDays: number | null;
2328
+ sourceExperimentId: string | null;
2329
+ submitReason: string;
2330
+ metrics: Record<string, unknown> | null;
2331
+ totalReceived: number;
2332
+ totalProcessed: number;
2333
+ totalFiltered: number;
2334
+ totalCorrect: number;
2335
+ totalErrors: number;
2336
+ controlState: string | null;
2337
+ controlStatePayload: Record<string, unknown> | null;
2338
+ startedAt: string | null;
2339
+ finishedAt: string | null;
2340
+ createdBy: string;
2341
+ createdAt: string;
2342
+ updatedAt: string;
2343
+ } | null;
2344
+ versions: {
2345
+ id: string;
2346
+ projectId: string;
2347
+ releaseLineId: string;
2348
+ kind: "production" | "candidate";
2349
+ productionVersionNumber: number | null;
2350
+ targetProductionVersionNumber: number;
2351
+ candidateNumber: number | null;
2352
+ promotedFromReleaseVersionId: string | null;
2353
+ label: string;
2354
+ promptId: string | null;
2355
+ promptName: string;
2356
+ promptVersionId: string;
2357
+ promptVersionNumber: number | null;
2358
+ promptVersionLabel: string | null;
2359
+ promptSnapshot: Record<string, unknown>;
2360
+ promptVersionSnapshot: Record<string, unknown>;
2361
+ modelId: string;
2362
+ modelName: string | null;
2363
+ modelProvider: string | null;
2364
+ modelSnapshot: Record<string, unknown>;
2365
+ createdBy: string;
2366
+ createdAt: string;
2367
+ updatedAt: string;
2368
+ }[];
2369
+ outputConnectors: {
2370
+ id: string;
2371
+ name: string;
2372
+ type: string;
2373
+ }[];
2374
+ latestEvent: {
2375
+ id: string;
2376
+ projectId: string;
2377
+ releaseLineId: string;
2378
+ releaseVersionId: string | null;
2379
+ releaseVersionKind: "production" | "candidate" | null;
2380
+ releaseVersionLabel: string | null;
2381
+ releaseVersionProductionNumber: number | null;
2382
+ releaseVersionTargetProductionNumber: number | null;
2383
+ releaseVersionCandidateNumber: number | null;
2384
+ annotationTaskId: string | null;
2385
+ laneType: "production" | "canary";
2386
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2387
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2388
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2389
+ sourceEventId: string | null;
2390
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2391
+ sourceLegacyId: string | null;
2392
+ supersedesEventId: string | null;
2393
+ rollbackTargetEventId: string | null;
2394
+ legacySource: "canary_release" | "production_release_event" | null;
2395
+ legacySourceId: string | null;
2396
+ promptId: string | null;
2397
+ promptName: string;
2398
+ promptVersionId: string | null;
2399
+ promptVersionNumber: number | null;
2400
+ promptVersionLabel: string | null;
2401
+ promptSnapshot: Record<string, unknown>;
2402
+ promptVersionSnapshot: Record<string, unknown>;
2403
+ modelId: string | null;
2404
+ modelName: string | null;
2405
+ modelProvider: string | null;
2406
+ modelSnapshot: Record<string, unknown>;
2407
+ inputConnectorId: string | null;
2408
+ inputConnectorName: string | null;
2409
+ inputConnectorType: string | null;
2410
+ inputConnectorSnapshot: Record<string, unknown>;
2411
+ outputConnectorIds: string[];
2412
+ outputConnectors: {
2413
+ id: string;
2414
+ name: string;
2415
+ type: string;
2416
+ }[];
2417
+ outputConnectorSnapshots: Record<string, unknown>[];
2418
+ trafficMode: "split" | "dual_run" | null;
2419
+ trafficRatio: number | null;
2420
+ runConfig: Record<string, unknown>;
2421
+ variableMapping: unknown;
2422
+ outputMapping: unknown;
2423
+ filterRules: unknown;
2424
+ recordMode: "all" | "selected_categories" | "correct_only";
2425
+ recordCategories: string[];
2426
+ externalIdField: string | null;
2427
+ retentionDays: number | null;
2428
+ sourceExperimentId: string | null;
2429
+ submitReason: string;
2430
+ metrics: Record<string, unknown> | null;
2431
+ totalReceived: number;
2432
+ totalProcessed: number;
2433
+ totalFiltered: number;
2434
+ totalCorrect: number;
2435
+ totalErrors: number;
2436
+ controlState: string | null;
2437
+ controlStatePayload: Record<string, unknown> | null;
2438
+ startedAt: string | null;
2439
+ finishedAt: string | null;
2440
+ createdBy: string;
2441
+ createdAt: string;
2442
+ updatedAt: string;
2443
+ } | null;
2444
+ createdBy: string;
2445
+ createdAt: string;
2446
+ updatedAt: string;
2447
+ archivedAt: string | null;
2448
+ }>;
2449
+ restoreHistoryToCanary: (_projectId: string, releaseLineId: string, body: RestoreReleaseLineHistoryInputDto) => Promise<{
2450
+ id: string;
2451
+ projectId: string;
2452
+ name: string;
2453
+ description: string | null;
2454
+ promptId: string | null;
2455
+ promptName: string;
2456
+ promptSnapshot: Record<string, unknown>;
2457
+ inputConnectorId: string | null;
2458
+ inputConnectorName: string | null;
2459
+ inputConnectorType: string | null;
2460
+ inputConnectorSnapshot: Record<string, unknown>;
2461
+ status: "archived" | "running" | "stopped";
2462
+ currentProductionEventId: string | null;
2463
+ activeCanaryEventId: string | null;
2464
+ currentProductionEvent: {
2465
+ id: string;
2466
+ projectId: string;
2467
+ releaseLineId: string;
2468
+ releaseVersionId: string | null;
2469
+ releaseVersionKind: "production" | "candidate" | null;
2470
+ releaseVersionLabel: string | null;
2471
+ releaseVersionProductionNumber: number | null;
2472
+ releaseVersionTargetProductionNumber: number | null;
2473
+ releaseVersionCandidateNumber: number | null;
2474
+ annotationTaskId: string | null;
2475
+ laneType: "production" | "canary";
2476
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2477
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2478
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2479
+ sourceEventId: string | null;
2480
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2481
+ sourceLegacyId: string | null;
2482
+ supersedesEventId: string | null;
2483
+ rollbackTargetEventId: string | null;
2484
+ legacySource: "canary_release" | "production_release_event" | null;
2485
+ legacySourceId: string | null;
2486
+ promptId: string | null;
2487
+ promptName: string;
2488
+ promptVersionId: string | null;
2489
+ promptVersionNumber: number | null;
2490
+ promptVersionLabel: string | null;
2491
+ promptSnapshot: Record<string, unknown>;
2492
+ promptVersionSnapshot: Record<string, unknown>;
2493
+ modelId: string | null;
2494
+ modelName: string | null;
2495
+ modelProvider: string | null;
2496
+ modelSnapshot: Record<string, unknown>;
2497
+ inputConnectorId: string | null;
2498
+ inputConnectorName: string | null;
2499
+ inputConnectorType: string | null;
2500
+ inputConnectorSnapshot: Record<string, unknown>;
2501
+ outputConnectorIds: string[];
2502
+ outputConnectors: {
2503
+ id: string;
2504
+ name: string;
2505
+ type: string;
2506
+ }[];
2507
+ outputConnectorSnapshots: Record<string, unknown>[];
2508
+ trafficMode: "split" | "dual_run" | null;
2509
+ trafficRatio: number | null;
2510
+ runConfig: Record<string, unknown>;
2511
+ variableMapping: unknown;
2512
+ outputMapping: unknown;
2513
+ filterRules: unknown;
2514
+ recordMode: "all" | "selected_categories" | "correct_only";
2515
+ recordCategories: string[];
2516
+ externalIdField: string | null;
2517
+ retentionDays: number | null;
2518
+ sourceExperimentId: string | null;
2519
+ submitReason: string;
2520
+ metrics: Record<string, unknown> | null;
2521
+ totalReceived: number;
2522
+ totalProcessed: number;
2523
+ totalFiltered: number;
2524
+ totalCorrect: number;
2525
+ totalErrors: number;
2526
+ controlState: string | null;
2527
+ controlStatePayload: Record<string, unknown> | null;
2528
+ startedAt: string | null;
2529
+ finishedAt: string | null;
2530
+ createdBy: string;
2531
+ createdAt: string;
2532
+ updatedAt: string;
2533
+ } | null;
2534
+ activeCanaryEvent: {
2535
+ id: string;
2536
+ projectId: string;
2537
+ releaseLineId: string;
2538
+ releaseVersionId: string | null;
2539
+ releaseVersionKind: "production" | "candidate" | null;
2540
+ releaseVersionLabel: string | null;
2541
+ releaseVersionProductionNumber: number | null;
2542
+ releaseVersionTargetProductionNumber: number | null;
2543
+ releaseVersionCandidateNumber: number | null;
2544
+ annotationTaskId: string | null;
2545
+ laneType: "production" | "canary";
2546
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2547
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2548
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2549
+ sourceEventId: string | null;
2550
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2551
+ sourceLegacyId: string | null;
2552
+ supersedesEventId: string | null;
2553
+ rollbackTargetEventId: string | null;
2554
+ legacySource: "canary_release" | "production_release_event" | null;
2555
+ legacySourceId: string | null;
2556
+ promptId: string | null;
2557
+ promptName: string;
2558
+ promptVersionId: string | null;
2559
+ promptVersionNumber: number | null;
2560
+ promptVersionLabel: string | null;
2561
+ promptSnapshot: Record<string, unknown>;
2562
+ promptVersionSnapshot: Record<string, unknown>;
2563
+ modelId: string | null;
2564
+ modelName: string | null;
2565
+ modelProvider: string | null;
2566
+ modelSnapshot: Record<string, unknown>;
2567
+ inputConnectorId: string | null;
2568
+ inputConnectorName: string | null;
2569
+ inputConnectorType: string | null;
2570
+ inputConnectorSnapshot: Record<string, unknown>;
2571
+ outputConnectorIds: string[];
2572
+ outputConnectors: {
2573
+ id: string;
2574
+ name: string;
2575
+ type: string;
2576
+ }[];
2577
+ outputConnectorSnapshots: Record<string, unknown>[];
2578
+ trafficMode: "split" | "dual_run" | null;
2579
+ trafficRatio: number | null;
2580
+ runConfig: Record<string, unknown>;
2581
+ variableMapping: unknown;
2582
+ outputMapping: unknown;
2583
+ filterRules: unknown;
2584
+ recordMode: "all" | "selected_categories" | "correct_only";
2585
+ recordCategories: string[];
2586
+ externalIdField: string | null;
2587
+ retentionDays: number | null;
2588
+ sourceExperimentId: string | null;
2589
+ submitReason: string;
2590
+ metrics: Record<string, unknown> | null;
2591
+ totalReceived: number;
2592
+ totalProcessed: number;
2593
+ totalFiltered: number;
2594
+ totalCorrect: number;
2595
+ totalErrors: number;
2596
+ controlState: string | null;
2597
+ controlStatePayload: Record<string, unknown> | null;
2598
+ startedAt: string | null;
2599
+ finishedAt: string | null;
2600
+ createdBy: string;
2601
+ createdAt: string;
2602
+ updatedAt: string;
2603
+ } | null;
2604
+ versions: {
2605
+ id: string;
2606
+ projectId: string;
2607
+ releaseLineId: string;
2608
+ kind: "production" | "candidate";
2609
+ productionVersionNumber: number | null;
2610
+ targetProductionVersionNumber: number;
2611
+ candidateNumber: number | null;
2612
+ promotedFromReleaseVersionId: string | null;
2613
+ label: string;
2614
+ promptId: string | null;
2615
+ promptName: string;
2616
+ promptVersionId: string;
2617
+ promptVersionNumber: number | null;
2618
+ promptVersionLabel: string | null;
2619
+ promptSnapshot: Record<string, unknown>;
2620
+ promptVersionSnapshot: Record<string, unknown>;
2621
+ modelId: string;
2622
+ modelName: string | null;
2623
+ modelProvider: string | null;
2624
+ modelSnapshot: Record<string, unknown>;
2625
+ createdBy: string;
2626
+ createdAt: string;
2627
+ updatedAt: string;
2628
+ }[];
2629
+ outputConnectors: {
2630
+ id: string;
2631
+ name: string;
2632
+ type: string;
2633
+ }[];
2634
+ latestEvent: {
2635
+ id: string;
2636
+ projectId: string;
2637
+ releaseLineId: string;
2638
+ releaseVersionId: string | null;
2639
+ releaseVersionKind: "production" | "candidate" | null;
2640
+ releaseVersionLabel: string | null;
2641
+ releaseVersionProductionNumber: number | null;
2642
+ releaseVersionTargetProductionNumber: number | null;
2643
+ releaseVersionCandidateNumber: number | null;
2644
+ annotationTaskId: string | null;
2645
+ laneType: "production" | "canary";
2646
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2647
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2648
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2649
+ sourceEventId: string | null;
2650
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2651
+ sourceLegacyId: string | null;
2652
+ supersedesEventId: string | null;
2653
+ rollbackTargetEventId: string | null;
2654
+ legacySource: "canary_release" | "production_release_event" | null;
2655
+ legacySourceId: string | null;
2656
+ promptId: string | null;
2657
+ promptName: string;
2658
+ promptVersionId: string | null;
2659
+ promptVersionNumber: number | null;
2660
+ promptVersionLabel: string | null;
2661
+ promptSnapshot: Record<string, unknown>;
2662
+ promptVersionSnapshot: Record<string, unknown>;
2663
+ modelId: string | null;
2664
+ modelName: string | null;
2665
+ modelProvider: string | null;
2666
+ modelSnapshot: Record<string, unknown>;
2667
+ inputConnectorId: string | null;
2668
+ inputConnectorName: string | null;
2669
+ inputConnectorType: string | null;
2670
+ inputConnectorSnapshot: Record<string, unknown>;
2671
+ outputConnectorIds: string[];
2672
+ outputConnectors: {
2673
+ id: string;
2674
+ name: string;
2675
+ type: string;
2676
+ }[];
2677
+ outputConnectorSnapshots: Record<string, unknown>[];
2678
+ trafficMode: "split" | "dual_run" | null;
2679
+ trafficRatio: number | null;
2680
+ runConfig: Record<string, unknown>;
2681
+ variableMapping: unknown;
2682
+ outputMapping: unknown;
2683
+ filterRules: unknown;
2684
+ recordMode: "all" | "selected_categories" | "correct_only";
2685
+ recordCategories: string[];
2686
+ externalIdField: string | null;
2687
+ retentionDays: number | null;
2688
+ sourceExperimentId: string | null;
2689
+ submitReason: string;
2690
+ metrics: Record<string, unknown> | null;
2691
+ totalReceived: number;
2692
+ totalProcessed: number;
2693
+ totalFiltered: number;
2694
+ totalCorrect: number;
2695
+ totalErrors: number;
2696
+ controlState: string | null;
2697
+ controlStatePayload: Record<string, unknown> | null;
2698
+ startedAt: string | null;
2699
+ finishedAt: string | null;
2700
+ createdBy: string;
2701
+ createdAt: string;
2702
+ updatedAt: string;
2703
+ } | null;
2704
+ createdBy: string;
2705
+ createdAt: string;
2706
+ updatedAt: string;
2707
+ archivedAt: string | null;
2708
+ }>;
2709
+ deleteLine: (_projectId: string, releaseLineId: string, body: DeleteReleaseLineInputDto) => Promise<undefined>;
2710
+ updateRunConfig: (_projectId: string, releaseLineId: string, body: UpdateReleaseLineRunConfigInputDto) => Promise<{
2711
+ id: string;
2712
+ projectId: string;
2713
+ name: string;
2714
+ description: string | null;
2715
+ promptId: string | null;
2716
+ promptName: string;
2717
+ promptSnapshot: Record<string, unknown>;
2718
+ inputConnectorId: string | null;
2719
+ inputConnectorName: string | null;
2720
+ inputConnectorType: string | null;
2721
+ inputConnectorSnapshot: Record<string, unknown>;
2722
+ status: "archived" | "running" | "stopped";
2723
+ currentProductionEventId: string | null;
2724
+ activeCanaryEventId: string | null;
2725
+ currentProductionEvent: {
2726
+ id: string;
2727
+ projectId: string;
2728
+ releaseLineId: string;
2729
+ releaseVersionId: string | null;
2730
+ releaseVersionKind: "production" | "candidate" | null;
2731
+ releaseVersionLabel: string | null;
2732
+ releaseVersionProductionNumber: number | null;
2733
+ releaseVersionTargetProductionNumber: number | null;
2734
+ releaseVersionCandidateNumber: number | null;
2735
+ annotationTaskId: string | null;
2736
+ laneType: "production" | "canary";
2737
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2738
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2739
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2740
+ sourceEventId: string | null;
2741
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2742
+ sourceLegacyId: string | null;
2743
+ supersedesEventId: string | null;
2744
+ rollbackTargetEventId: string | null;
2745
+ legacySource: "canary_release" | "production_release_event" | null;
2746
+ legacySourceId: string | null;
2747
+ promptId: string | null;
2748
+ promptName: string;
2749
+ promptVersionId: string | null;
2750
+ promptVersionNumber: number | null;
2751
+ promptVersionLabel: string | null;
2752
+ promptSnapshot: Record<string, unknown>;
2753
+ promptVersionSnapshot: Record<string, unknown>;
2754
+ modelId: string | null;
2755
+ modelName: string | null;
2756
+ modelProvider: string | null;
2757
+ modelSnapshot: Record<string, unknown>;
2758
+ inputConnectorId: string | null;
2759
+ inputConnectorName: string | null;
2760
+ inputConnectorType: string | null;
2761
+ inputConnectorSnapshot: Record<string, unknown>;
2762
+ outputConnectorIds: string[];
2763
+ outputConnectors: {
2764
+ id: string;
2765
+ name: string;
2766
+ type: string;
2767
+ }[];
2768
+ outputConnectorSnapshots: Record<string, unknown>[];
2769
+ trafficMode: "split" | "dual_run" | null;
2770
+ trafficRatio: number | null;
2771
+ runConfig: Record<string, unknown>;
2772
+ variableMapping: unknown;
2773
+ outputMapping: unknown;
2774
+ filterRules: unknown;
2775
+ recordMode: "all" | "selected_categories" | "correct_only";
2776
+ recordCategories: string[];
2777
+ externalIdField: string | null;
2778
+ retentionDays: number | null;
2779
+ sourceExperimentId: string | null;
2780
+ submitReason: string;
2781
+ metrics: Record<string, unknown> | null;
2782
+ totalReceived: number;
2783
+ totalProcessed: number;
2784
+ totalFiltered: number;
2785
+ totalCorrect: number;
2786
+ totalErrors: number;
2787
+ controlState: string | null;
2788
+ controlStatePayload: Record<string, unknown> | null;
2789
+ startedAt: string | null;
2790
+ finishedAt: string | null;
2791
+ createdBy: string;
2792
+ createdAt: string;
2793
+ updatedAt: string;
2794
+ } | null;
2795
+ activeCanaryEvent: {
2796
+ id: string;
2797
+ projectId: string;
2798
+ releaseLineId: string;
2799
+ releaseVersionId: string | null;
2800
+ releaseVersionKind: "production" | "candidate" | null;
2801
+ releaseVersionLabel: string | null;
2802
+ releaseVersionProductionNumber: number | null;
2803
+ releaseVersionTargetProductionNumber: number | null;
2804
+ releaseVersionCandidateNumber: number | null;
2805
+ annotationTaskId: string | null;
2806
+ laneType: "production" | "canary";
2807
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2808
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2809
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2810
+ sourceEventId: string | null;
2811
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2812
+ sourceLegacyId: string | null;
2813
+ supersedesEventId: string | null;
2814
+ rollbackTargetEventId: string | null;
2815
+ legacySource: "canary_release" | "production_release_event" | null;
2816
+ legacySourceId: string | null;
2817
+ promptId: string | null;
2818
+ promptName: string;
2819
+ promptVersionId: string | null;
2820
+ promptVersionNumber: number | null;
2821
+ promptVersionLabel: string | null;
2822
+ promptSnapshot: Record<string, unknown>;
2823
+ promptVersionSnapshot: Record<string, unknown>;
2824
+ modelId: string | null;
2825
+ modelName: string | null;
2826
+ modelProvider: string | null;
2827
+ modelSnapshot: Record<string, unknown>;
2828
+ inputConnectorId: string | null;
2829
+ inputConnectorName: string | null;
2830
+ inputConnectorType: string | null;
2831
+ inputConnectorSnapshot: Record<string, unknown>;
2832
+ outputConnectorIds: string[];
2833
+ outputConnectors: {
2834
+ id: string;
2835
+ name: string;
2836
+ type: string;
2837
+ }[];
2838
+ outputConnectorSnapshots: Record<string, unknown>[];
2839
+ trafficMode: "split" | "dual_run" | null;
2840
+ trafficRatio: number | null;
2841
+ runConfig: Record<string, unknown>;
2842
+ variableMapping: unknown;
2843
+ outputMapping: unknown;
2844
+ filterRules: unknown;
2845
+ recordMode: "all" | "selected_categories" | "correct_only";
2846
+ recordCategories: string[];
2847
+ externalIdField: string | null;
2848
+ retentionDays: number | null;
2849
+ sourceExperimentId: string | null;
2850
+ submitReason: string;
2851
+ metrics: Record<string, unknown> | null;
2852
+ totalReceived: number;
2853
+ totalProcessed: number;
2854
+ totalFiltered: number;
2855
+ totalCorrect: number;
2856
+ totalErrors: number;
2857
+ controlState: string | null;
2858
+ controlStatePayload: Record<string, unknown> | null;
2859
+ startedAt: string | null;
2860
+ finishedAt: string | null;
2861
+ createdBy: string;
2862
+ createdAt: string;
2863
+ updatedAt: string;
2864
+ } | null;
2865
+ versions: {
2866
+ id: string;
2867
+ projectId: string;
2868
+ releaseLineId: string;
2869
+ kind: "production" | "candidate";
2870
+ productionVersionNumber: number | null;
2871
+ targetProductionVersionNumber: number;
2872
+ candidateNumber: number | null;
2873
+ promotedFromReleaseVersionId: string | null;
2874
+ label: string;
2875
+ promptId: string | null;
2876
+ promptName: string;
2877
+ promptVersionId: string;
2878
+ promptVersionNumber: number | null;
2879
+ promptVersionLabel: string | null;
2880
+ promptSnapshot: Record<string, unknown>;
2881
+ promptVersionSnapshot: Record<string, unknown>;
2882
+ modelId: string;
2883
+ modelName: string | null;
2884
+ modelProvider: string | null;
2885
+ modelSnapshot: Record<string, unknown>;
2886
+ createdBy: string;
2887
+ createdAt: string;
2888
+ updatedAt: string;
2889
+ }[];
2890
+ outputConnectors: {
2891
+ id: string;
2892
+ name: string;
2893
+ type: string;
2894
+ }[];
2895
+ latestEvent: {
2896
+ id: string;
2897
+ projectId: string;
2898
+ releaseLineId: string;
2899
+ releaseVersionId: string | null;
2900
+ releaseVersionKind: "production" | "candidate" | null;
2901
+ releaseVersionLabel: string | null;
2902
+ releaseVersionProductionNumber: number | null;
2903
+ releaseVersionTargetProductionNumber: number | null;
2904
+ releaseVersionCandidateNumber: number | null;
2905
+ annotationTaskId: string | null;
2906
+ laneType: "production" | "canary";
2907
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2908
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2909
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2910
+ sourceEventId: string | null;
2911
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2912
+ sourceLegacyId: string | null;
2913
+ supersedesEventId: string | null;
2914
+ rollbackTargetEventId: string | null;
2915
+ legacySource: "canary_release" | "production_release_event" | null;
2916
+ legacySourceId: string | null;
2917
+ promptId: string | null;
2918
+ promptName: string;
2919
+ promptVersionId: string | null;
2920
+ promptVersionNumber: number | null;
2921
+ promptVersionLabel: string | null;
2922
+ promptSnapshot: Record<string, unknown>;
2923
+ promptVersionSnapshot: Record<string, unknown>;
2924
+ modelId: string | null;
2925
+ modelName: string | null;
2926
+ modelProvider: string | null;
2927
+ modelSnapshot: Record<string, unknown>;
2928
+ inputConnectorId: string | null;
2929
+ inputConnectorName: string | null;
2930
+ inputConnectorType: string | null;
2931
+ inputConnectorSnapshot: Record<string, unknown>;
2932
+ outputConnectorIds: string[];
2933
+ outputConnectors: {
2934
+ id: string;
2935
+ name: string;
2936
+ type: string;
2937
+ }[];
2938
+ outputConnectorSnapshots: Record<string, unknown>[];
2939
+ trafficMode: "split" | "dual_run" | null;
2940
+ trafficRatio: number | null;
2941
+ runConfig: Record<string, unknown>;
2942
+ variableMapping: unknown;
2943
+ outputMapping: unknown;
2944
+ filterRules: unknown;
2945
+ recordMode: "all" | "selected_categories" | "correct_only";
2946
+ recordCategories: string[];
2947
+ externalIdField: string | null;
2948
+ retentionDays: number | null;
2949
+ sourceExperimentId: string | null;
2950
+ submitReason: string;
2951
+ metrics: Record<string, unknown> | null;
2952
+ totalReceived: number;
2953
+ totalProcessed: number;
2954
+ totalFiltered: number;
2955
+ totalCorrect: number;
2956
+ totalErrors: number;
2957
+ controlState: string | null;
2958
+ controlStatePayload: Record<string, unknown> | null;
2959
+ startedAt: string | null;
2960
+ finishedAt: string | null;
2961
+ createdBy: string;
2962
+ createdAt: string;
2963
+ updatedAt: string;
2964
+ } | null;
2965
+ createdBy: string;
2966
+ createdAt: string;
2967
+ updatedAt: string;
2968
+ archivedAt: string | null;
2969
+ }>;
2970
+ updateOutputRoute: (_projectId: string, releaseLineId: string, body: UpdateReleaseLineOutputRouteInputDto) => Promise<{
2971
+ id: string;
2972
+ projectId: string;
2973
+ name: string;
2974
+ description: string | null;
2975
+ promptId: string | null;
2976
+ promptName: string;
2977
+ promptSnapshot: Record<string, unknown>;
2978
+ inputConnectorId: string | null;
2979
+ inputConnectorName: string | null;
2980
+ inputConnectorType: string | null;
2981
+ inputConnectorSnapshot: Record<string, unknown>;
2982
+ status: "archived" | "running" | "stopped";
2983
+ currentProductionEventId: string | null;
2984
+ activeCanaryEventId: string | null;
2985
+ currentProductionEvent: {
2986
+ id: string;
2987
+ projectId: string;
2988
+ releaseLineId: string;
2989
+ releaseVersionId: string | null;
2990
+ releaseVersionKind: "production" | "candidate" | null;
2991
+ releaseVersionLabel: string | null;
2992
+ releaseVersionProductionNumber: number | null;
2993
+ releaseVersionTargetProductionNumber: number | null;
2994
+ releaseVersionCandidateNumber: number | null;
2995
+ annotationTaskId: string | null;
2996
+ laneType: "production" | "canary";
2997
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2998
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
2999
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
3000
+ sourceEventId: string | null;
3001
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
3002
+ sourceLegacyId: string | null;
3003
+ supersedesEventId: string | null;
3004
+ rollbackTargetEventId: string | null;
3005
+ legacySource: "canary_release" | "production_release_event" | null;
3006
+ legacySourceId: string | null;
3007
+ promptId: string | null;
3008
+ promptName: string;
3009
+ promptVersionId: string | null;
3010
+ promptVersionNumber: number | null;
3011
+ promptVersionLabel: string | null;
3012
+ promptSnapshot: Record<string, unknown>;
3013
+ promptVersionSnapshot: Record<string, unknown>;
3014
+ modelId: string | null;
3015
+ modelName: string | null;
3016
+ modelProvider: string | null;
3017
+ modelSnapshot: Record<string, unknown>;
3018
+ inputConnectorId: string | null;
3019
+ inputConnectorName: string | null;
3020
+ inputConnectorType: string | null;
3021
+ inputConnectorSnapshot: Record<string, unknown>;
3022
+ outputConnectorIds: string[];
3023
+ outputConnectors: {
3024
+ id: string;
3025
+ name: string;
3026
+ type: string;
3027
+ }[];
3028
+ outputConnectorSnapshots: Record<string, unknown>[];
3029
+ trafficMode: "split" | "dual_run" | null;
3030
+ trafficRatio: number | null;
3031
+ runConfig: Record<string, unknown>;
3032
+ variableMapping: unknown;
3033
+ outputMapping: unknown;
3034
+ filterRules: unknown;
3035
+ recordMode: "all" | "selected_categories" | "correct_only";
3036
+ recordCategories: string[];
3037
+ externalIdField: string | null;
3038
+ retentionDays: number | null;
3039
+ sourceExperimentId: string | null;
3040
+ submitReason: string;
3041
+ metrics: Record<string, unknown> | null;
3042
+ totalReceived: number;
3043
+ totalProcessed: number;
3044
+ totalFiltered: number;
3045
+ totalCorrect: number;
3046
+ totalErrors: number;
3047
+ controlState: string | null;
3048
+ controlStatePayload: Record<string, unknown> | null;
3049
+ startedAt: string | null;
3050
+ finishedAt: string | null;
3051
+ createdBy: string;
3052
+ createdAt: string;
3053
+ updatedAt: string;
3054
+ } | null;
3055
+ activeCanaryEvent: {
3056
+ id: string;
3057
+ projectId: string;
3058
+ releaseLineId: string;
3059
+ releaseVersionId: string | null;
3060
+ releaseVersionKind: "production" | "candidate" | null;
3061
+ releaseVersionLabel: string | null;
3062
+ releaseVersionProductionNumber: number | null;
3063
+ releaseVersionTargetProductionNumber: number | null;
3064
+ releaseVersionCandidateNumber: number | null;
3065
+ annotationTaskId: string | null;
3066
+ laneType: "production" | "canary";
3067
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
3068
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
3069
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
3070
+ sourceEventId: string | null;
3071
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
3072
+ sourceLegacyId: string | null;
3073
+ supersedesEventId: string | null;
3074
+ rollbackTargetEventId: string | null;
3075
+ legacySource: "canary_release" | "production_release_event" | null;
3076
+ legacySourceId: string | null;
3077
+ promptId: string | null;
3078
+ promptName: string;
3079
+ promptVersionId: string | null;
3080
+ promptVersionNumber: number | null;
3081
+ promptVersionLabel: string | null;
3082
+ promptSnapshot: Record<string, unknown>;
3083
+ promptVersionSnapshot: Record<string, unknown>;
3084
+ modelId: string | null;
3085
+ modelName: string | null;
3086
+ modelProvider: string | null;
3087
+ modelSnapshot: Record<string, unknown>;
3088
+ inputConnectorId: string | null;
3089
+ inputConnectorName: string | null;
3090
+ inputConnectorType: string | null;
3091
+ inputConnectorSnapshot: Record<string, unknown>;
3092
+ outputConnectorIds: string[];
3093
+ outputConnectors: {
3094
+ id: string;
3095
+ name: string;
3096
+ type: string;
3097
+ }[];
3098
+ outputConnectorSnapshots: Record<string, unknown>[];
3099
+ trafficMode: "split" | "dual_run" | null;
3100
+ trafficRatio: number | null;
3101
+ runConfig: Record<string, unknown>;
3102
+ variableMapping: unknown;
3103
+ outputMapping: unknown;
3104
+ filterRules: unknown;
3105
+ recordMode: "all" | "selected_categories" | "correct_only";
3106
+ recordCategories: string[];
3107
+ externalIdField: string | null;
3108
+ retentionDays: number | null;
3109
+ sourceExperimentId: string | null;
3110
+ submitReason: string;
3111
+ metrics: Record<string, unknown> | null;
3112
+ totalReceived: number;
3113
+ totalProcessed: number;
3114
+ totalFiltered: number;
3115
+ totalCorrect: number;
3116
+ totalErrors: number;
3117
+ controlState: string | null;
3118
+ controlStatePayload: Record<string, unknown> | null;
3119
+ startedAt: string | null;
3120
+ finishedAt: string | null;
3121
+ createdBy: string;
3122
+ createdAt: string;
3123
+ updatedAt: string;
3124
+ } | null;
3125
+ versions: {
3126
+ id: string;
3127
+ projectId: string;
3128
+ releaseLineId: string;
3129
+ kind: "production" | "candidate";
3130
+ productionVersionNumber: number | null;
3131
+ targetProductionVersionNumber: number;
3132
+ candidateNumber: number | null;
3133
+ promotedFromReleaseVersionId: string | null;
3134
+ label: string;
3135
+ promptId: string | null;
3136
+ promptName: string;
3137
+ promptVersionId: string;
3138
+ promptVersionNumber: number | null;
3139
+ promptVersionLabel: string | null;
3140
+ promptSnapshot: Record<string, unknown>;
3141
+ promptVersionSnapshot: Record<string, unknown>;
3142
+ modelId: string;
3143
+ modelName: string | null;
3144
+ modelProvider: string | null;
3145
+ modelSnapshot: Record<string, unknown>;
3146
+ createdBy: string;
3147
+ createdAt: string;
3148
+ updatedAt: string;
3149
+ }[];
3150
+ outputConnectors: {
3151
+ id: string;
3152
+ name: string;
3153
+ type: string;
3154
+ }[];
3155
+ latestEvent: {
3156
+ id: string;
3157
+ projectId: string;
3158
+ releaseLineId: string;
3159
+ releaseVersionId: string | null;
3160
+ releaseVersionKind: "production" | "candidate" | null;
3161
+ releaseVersionLabel: string | null;
3162
+ releaseVersionProductionNumber: number | null;
3163
+ releaseVersionTargetProductionNumber: number | null;
3164
+ releaseVersionCandidateNumber: number | null;
3165
+ annotationTaskId: string | null;
3166
+ laneType: "production" | "canary";
3167
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
3168
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
3169
+ terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
3170
+ sourceEventId: string | null;
3171
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
3172
+ sourceLegacyId: string | null;
3173
+ supersedesEventId: string | null;
3174
+ rollbackTargetEventId: string | null;
3175
+ legacySource: "canary_release" | "production_release_event" | null;
3176
+ legacySourceId: string | null;
3177
+ promptId: string | null;
3178
+ promptName: string;
3179
+ promptVersionId: string | null;
3180
+ promptVersionNumber: number | null;
3181
+ promptVersionLabel: string | null;
3182
+ promptSnapshot: Record<string, unknown>;
3183
+ promptVersionSnapshot: Record<string, unknown>;
3184
+ modelId: string | null;
3185
+ modelName: string | null;
3186
+ modelProvider: string | null;
3187
+ modelSnapshot: Record<string, unknown>;
3188
+ inputConnectorId: string | null;
3189
+ inputConnectorName: string | null;
3190
+ inputConnectorType: string | null;
3191
+ inputConnectorSnapshot: Record<string, unknown>;
3192
+ outputConnectorIds: string[];
3193
+ outputConnectors: {
3194
+ id: string;
3195
+ name: string;
3196
+ type: string;
3197
+ }[];
3198
+ outputConnectorSnapshots: Record<string, unknown>[];
3199
+ trafficMode: "split" | "dual_run" | null;
3200
+ trafficRatio: number | null;
3201
+ runConfig: Record<string, unknown>;
3202
+ variableMapping: unknown;
3203
+ outputMapping: unknown;
3204
+ filterRules: unknown;
3205
+ recordMode: "all" | "selected_categories" | "correct_only";
3206
+ recordCategories: string[];
3207
+ externalIdField: string | null;
3208
+ retentionDays: number | null;
3209
+ sourceExperimentId: string | null;
3210
+ submitReason: string;
3211
+ metrics: Record<string, unknown> | null;
3212
+ totalReceived: number;
3213
+ totalProcessed: number;
3214
+ totalFiltered: number;
3215
+ totalCorrect: number;
3216
+ totalErrors: number;
3217
+ controlState: string | null;
3218
+ controlStatePayload: Record<string, unknown> | null;
3219
+ startedAt: string | null;
3220
+ finishedAt: string | null;
3221
+ createdBy: string;
3222
+ createdAt: string;
3223
+ updatedAt: string;
3224
+ } | null;
3225
+ createdBy: string;
3226
+ createdAt: string;
3227
+ updatedAt: string;
3228
+ archivedAt: string | null;
3229
+ }>;
3230
+ updateInputRoute: (_projectId: string, releaseLineId: string, body: UpdateReleaseLineInputRouteInputDto) => Promise<{
808
3231
  id: string;
809
3232
  projectId: string;
810
3233
  name: string;
@@ -816,20 +3239,23 @@ export declare const releaseLineClient: {
816
3239
  inputConnectorName: string | null;
817
3240
  inputConnectorType: string | null;
818
3241
  inputConnectorSnapshot: Record<string, unknown>;
819
- status: "production" | "canary" | "archived" | "stopped" | "production_with_canary";
3242
+ status: "archived" | "running" | "stopped";
820
3243
  currentProductionEventId: string | null;
821
3244
  activeCanaryEventId: string | null;
822
3245
  currentProductionEvent: {
823
3246
  id: string;
824
3247
  projectId: string;
825
3248
  releaseLineId: string;
826
- releaseVariantId: string | null;
827
- releaseVariantNumber: number | null;
828
- releaseVariantLabel: string | null;
3249
+ releaseVersionId: string | null;
3250
+ releaseVersionKind: "production" | "candidate" | null;
3251
+ releaseVersionLabel: string | null;
3252
+ releaseVersionProductionNumber: number | null;
3253
+ releaseVersionTargetProductionNumber: number | null;
3254
+ releaseVersionCandidateNumber: number | null;
829
3255
  annotationTaskId: string | null;
830
3256
  laneType: "production" | "canary";
831
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
832
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
3257
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
3258
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
833
3259
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
834
3260
  sourceEventId: string | null;
835
3261
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -866,7 +3292,8 @@ export declare const releaseLineClient: {
866
3292
  variableMapping: unknown;
867
3293
  outputMapping: unknown;
868
3294
  filterRules: unknown;
869
- recordMode: "all" | "correct_only";
3295
+ recordMode: "all" | "selected_categories" | "correct_only";
3296
+ recordCategories: string[];
870
3297
  externalIdField: string | null;
871
3298
  retentionDays: number | null;
872
3299
  sourceExperimentId: string | null;
@@ -889,13 +3316,16 @@ export declare const releaseLineClient: {
889
3316
  id: string;
890
3317
  projectId: string;
891
3318
  releaseLineId: string;
892
- releaseVariantId: string | null;
893
- releaseVariantNumber: number | null;
894
- releaseVariantLabel: string | null;
3319
+ releaseVersionId: string | null;
3320
+ releaseVersionKind: "production" | "candidate" | null;
3321
+ releaseVersionLabel: string | null;
3322
+ releaseVersionProductionNumber: number | null;
3323
+ releaseVersionTargetProductionNumber: number | null;
3324
+ releaseVersionCandidateNumber: number | null;
895
3325
  annotationTaskId: string | null;
896
3326
  laneType: "production" | "canary";
897
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
898
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
3327
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
3328
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
899
3329
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
900
3330
  sourceEventId: string | null;
901
3331
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -932,7 +3362,8 @@ export declare const releaseLineClient: {
932
3362
  variableMapping: unknown;
933
3363
  outputMapping: unknown;
934
3364
  filterRules: unknown;
935
- recordMode: "all" | "correct_only";
3365
+ recordMode: "all" | "selected_categories" | "correct_only";
3366
+ recordCategories: string[];
936
3367
  externalIdField: string | null;
937
3368
  retentionDays: number | null;
938
3369
  sourceExperimentId: string | null;
@@ -951,11 +3382,15 @@ export declare const releaseLineClient: {
951
3382
  createdAt: string;
952
3383
  updatedAt: string;
953
3384
  } | null;
954
- variants: {
3385
+ versions: {
955
3386
  id: string;
956
3387
  projectId: string;
957
3388
  releaseLineId: string;
958
- variantNumber: number;
3389
+ kind: "production" | "candidate";
3390
+ productionVersionNumber: number | null;
3391
+ targetProductionVersionNumber: number;
3392
+ candidateNumber: number | null;
3393
+ promotedFromReleaseVersionId: string | null;
959
3394
  label: string;
960
3395
  promptId: string | null;
961
3396
  promptName: string;
@@ -981,13 +3416,16 @@ export declare const releaseLineClient: {
981
3416
  id: string;
982
3417
  projectId: string;
983
3418
  releaseLineId: string;
984
- releaseVariantId: string | null;
985
- releaseVariantNumber: number | null;
986
- releaseVariantLabel: string | null;
3419
+ releaseVersionId: string | null;
3420
+ releaseVersionKind: "production" | "candidate" | null;
3421
+ releaseVersionLabel: string | null;
3422
+ releaseVersionProductionNumber: number | null;
3423
+ releaseVersionTargetProductionNumber: number | null;
3424
+ releaseVersionCandidateNumber: number | null;
987
3425
  annotationTaskId: string | null;
988
3426
  laneType: "production" | "canary";
989
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
990
- status: "completed" | "archived" | "failed" | "running" | "stopped" | "cancelled";
3427
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
3428
+ status: "archived" | "completed" | "failed" | "running" | "stopped" | "cancelled";
991
3429
  terminalReason: "archived" | "cancelled" | "error" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
992
3430
  sourceEventId: string | null;
993
3431
  sourceLegacySource: "canary_release" | "production_release_event" | null;
@@ -1024,7 +3462,8 @@ export declare const releaseLineClient: {
1024
3462
  variableMapping: unknown;
1025
3463
  outputMapping: unknown;
1026
3464
  filterRules: unknown;
1027
- recordMode: "all" | "correct_only";
3465
+ recordMode: "all" | "selected_categories" | "correct_only";
3466
+ recordCategories: string[];
1028
3467
  externalIdField: string | null;
1029
3468
  retentionDays: number | null;
1030
3469
  sourceExperimentId: string | null;