@shipfox/api-workflows-dto 13.1.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +12 -0
- package/dist/events.d.ts +8 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/job-listening.d.ts +3 -3
- package/dist/schemas/job-listening.js +1 -1
- package/dist/schemas/job-listening.js.map +1 -1
- package/dist/schemas/job.d.ts +2 -2
- package/dist/schemas/workflow-run-detail.d.ts +15 -4
- package/dist/schemas/workflow-run-detail.d.ts.map +1 -1
- package/dist/schemas/workflow-run-detail.js +10 -9
- package/dist/schemas/workflow-run-detail.js.map +1 -1
- package/dist/schemas/workflow-run.d.ts +126 -2
- package/dist/schemas/workflow-run.d.ts.map +1 -1
- package/dist/schemas/workflow-run.js +52 -13
- package/dist/schemas/workflow-run.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/index.ts +4 -0
- package/src/schemas/index.ts +4 -0
- package/src/schemas/job-listening.test.ts +21 -0
- package/src/schemas/job-listening.ts +1 -1
- package/src/schemas/workflow-run-detail.ts +17 -13
- package/src/schemas/workflow-run.test.ts +151 -0
- package/src/schemas/workflow-run.ts +80 -24
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -19,6 +19,19 @@ export declare const workflowRunRerunModeSchema: z.ZodEnum<{
|
|
|
19
19
|
failed: "failed";
|
|
20
20
|
}>;
|
|
21
21
|
export type WorkflowRunRerunModeDto = z.infer<typeof workflowRunRerunModeSchema>;
|
|
22
|
+
export declare const workflowRunOriginSchema: z.ZodEnum<{
|
|
23
|
+
dev: "dev";
|
|
24
|
+
synced: "synced";
|
|
25
|
+
}>;
|
|
26
|
+
export type WorkflowRunOriginDto = z.infer<typeof workflowRunOriginSchema>;
|
|
27
|
+
export declare const workflowRunDevSourceSchema: z.ZodObject<{
|
|
28
|
+
ref: z.ZodString;
|
|
29
|
+
commit: z.ZodString;
|
|
30
|
+
config_path: z.ZodString;
|
|
31
|
+
initiated_by_user_id: z.ZodString;
|
|
32
|
+
replay_of_event_id: z.ZodNullable<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type WorkflowRunDevSourceDto = z.infer<typeof workflowRunDevSourceSchema>;
|
|
22
35
|
export declare const rerunWorkflowRunBodySchema: z.ZodObject<{
|
|
23
36
|
mode: z.ZodEnum<{
|
|
24
37
|
all: "all";
|
|
@@ -39,6 +52,10 @@ export declare const workflowRunListQuerySchema: z.ZodObject<{
|
|
|
39
52
|
}>>;
|
|
40
53
|
definition_id: z.ZodOptional<z.ZodString>;
|
|
41
54
|
trigger_source: z.ZodOptional<z.ZodString>;
|
|
55
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
dev: "dev";
|
|
57
|
+
synced: "synced";
|
|
58
|
+
}>>;
|
|
42
59
|
created_from: z.ZodOptional<z.ZodString>;
|
|
43
60
|
created_to: z.ZodOptional<z.ZodString>;
|
|
44
61
|
}, z.core.$strip>;
|
|
@@ -54,6 +71,10 @@ export declare const workflowRunAggregatesQuerySchema: z.ZodObject<{
|
|
|
54
71
|
}>>;
|
|
55
72
|
definition_id: z.ZodOptional<z.ZodString>;
|
|
56
73
|
trigger_source: z.ZodOptional<z.ZodString>;
|
|
74
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
dev: "dev";
|
|
76
|
+
synced: "synced";
|
|
77
|
+
}>>;
|
|
57
78
|
created_from: z.ZodOptional<z.ZodString>;
|
|
58
79
|
created_to: z.ZodOptional<z.ZodString>;
|
|
59
80
|
}, z.core.$strip>;
|
|
@@ -70,6 +91,57 @@ export declare const workflowRunTriggerReferenceSchema: z.ZodObject<{
|
|
|
70
91
|
actor: z.ZodNullable<z.ZodString>;
|
|
71
92
|
}, z.core.$strip>;
|
|
72
93
|
export type WorkflowRunTriggerReferenceDto = z.infer<typeof workflowRunTriggerReferenceSchema>;
|
|
94
|
+
export declare const workflowRunDtoFields: {
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
project_id: z.ZodString;
|
|
97
|
+
definition_id: z.ZodString;
|
|
98
|
+
number: z.ZodNumber;
|
|
99
|
+
name: z.ZodString;
|
|
100
|
+
workflow_name: z.ZodString;
|
|
101
|
+
status: z.ZodEnum<{
|
|
102
|
+
cancelled: "cancelled";
|
|
103
|
+
failed: "failed";
|
|
104
|
+
pending: "pending";
|
|
105
|
+
running: "running";
|
|
106
|
+
succeeded: "succeeded";
|
|
107
|
+
}>;
|
|
108
|
+
origin: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
dev: "dev";
|
|
110
|
+
synced: "synced";
|
|
111
|
+
}>>>;
|
|
112
|
+
dev_source: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
113
|
+
ref: z.ZodString;
|
|
114
|
+
commit: z.ZodString;
|
|
115
|
+
config_path: z.ZodString;
|
|
116
|
+
initiated_by_user_id: z.ZodString;
|
|
117
|
+
replay_of_event_id: z.ZodNullable<z.ZodString>;
|
|
118
|
+
}, z.core.$strip>>>>;
|
|
119
|
+
current_attempt: z.ZodNumber;
|
|
120
|
+
latest_attempt: z.ZodNumber;
|
|
121
|
+
trigger_provider: z.ZodNullable<z.ZodString>;
|
|
122
|
+
trigger_source: z.ZodString;
|
|
123
|
+
trigger_event: z.ZodString;
|
|
124
|
+
trigger_payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
125
|
+
trigger_reference: z.ZodNullable<z.ZodObject<{
|
|
126
|
+
repository: z.ZodNullable<z.ZodString>;
|
|
127
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
128
|
+
commit: z.ZodNullable<z.ZodString>;
|
|
129
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
inputs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
132
|
+
source_snapshot: z.ZodNullable<z.ZodObject<{
|
|
133
|
+
content: z.ZodString;
|
|
134
|
+
format: z.ZodLiteral<"yaml">;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
created_at: z.ZodString;
|
|
137
|
+
updated_at: z.ZodString;
|
|
138
|
+
started_at: z.ZodNullable<z.ZodString>;
|
|
139
|
+
finished_at: z.ZodNullable<z.ZodString>;
|
|
140
|
+
};
|
|
141
|
+
export declare function validateWorkflowRunOrigin(value: {
|
|
142
|
+
origin: WorkflowRunOriginDto;
|
|
143
|
+
dev_source: WorkflowRunDevSourceDto | null;
|
|
144
|
+
}, ctx: z.RefinementCtx): void;
|
|
73
145
|
export declare const workflowRunDtoSchema: z.ZodObject<{
|
|
74
146
|
id: z.ZodString;
|
|
75
147
|
project_id: z.ZodString;
|
|
@@ -84,6 +156,17 @@ export declare const workflowRunDtoSchema: z.ZodObject<{
|
|
|
84
156
|
running: "running";
|
|
85
157
|
succeeded: "succeeded";
|
|
86
158
|
}>;
|
|
159
|
+
origin: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
dev: "dev";
|
|
161
|
+
synced: "synced";
|
|
162
|
+
}>>>;
|
|
163
|
+
dev_source: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
164
|
+
ref: z.ZodString;
|
|
165
|
+
commit: z.ZodString;
|
|
166
|
+
config_path: z.ZodString;
|
|
167
|
+
initiated_by_user_id: z.ZodString;
|
|
168
|
+
replay_of_event_id: z.ZodNullable<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>>>>;
|
|
87
170
|
current_attempt: z.ZodNumber;
|
|
88
171
|
latest_attempt: z.ZodNumber;
|
|
89
172
|
trigger_provider: z.ZodNullable<z.ZodString>;
|
|
@@ -141,6 +224,17 @@ export declare const workflowRunResponseSchema: z.ZodObject<{
|
|
|
141
224
|
running: "running";
|
|
142
225
|
succeeded: "succeeded";
|
|
143
226
|
}>;
|
|
227
|
+
origin: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
228
|
+
dev: "dev";
|
|
229
|
+
synced: "synced";
|
|
230
|
+
}>>>;
|
|
231
|
+
dev_source: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
232
|
+
ref: z.ZodString;
|
|
233
|
+
commit: z.ZodString;
|
|
234
|
+
config_path: z.ZodString;
|
|
235
|
+
initiated_by_user_id: z.ZodString;
|
|
236
|
+
replay_of_event_id: z.ZodNullable<z.ZodString>;
|
|
237
|
+
}, z.core.$strip>>>>;
|
|
144
238
|
current_attempt: z.ZodNumber;
|
|
145
239
|
latest_attempt: z.ZodNumber;
|
|
146
240
|
trigger_provider: z.ZodNullable<z.ZodString>;
|
|
@@ -266,6 +360,17 @@ export declare const workflowRunListItemSchema: z.ZodObject<{
|
|
|
266
360
|
running: "running";
|
|
267
361
|
succeeded: "succeeded";
|
|
268
362
|
}>;
|
|
363
|
+
origin: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
dev: "dev";
|
|
365
|
+
synced: "synced";
|
|
366
|
+
}>>>;
|
|
367
|
+
dev_source: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
368
|
+
ref: z.ZodString;
|
|
369
|
+
commit: z.ZodString;
|
|
370
|
+
config_path: z.ZodString;
|
|
371
|
+
initiated_by_user_id: z.ZodString;
|
|
372
|
+
replay_of_event_id: z.ZodNullable<z.ZodString>;
|
|
373
|
+
}, z.core.$strip>>>>;
|
|
269
374
|
current_attempt: z.ZodNumber;
|
|
270
375
|
latest_attempt: z.ZodNumber;
|
|
271
376
|
trigger_provider: z.ZodNullable<z.ZodString>;
|
|
@@ -341,7 +446,11 @@ export declare const workflowRunListItemSchema: z.ZodObject<{
|
|
|
341
446
|
}, z.core.$strip>>>;
|
|
342
447
|
has_started_job_execution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
343
448
|
}, z.core.$strip>;
|
|
344
|
-
|
|
449
|
+
type WorkflowRunListItemInput = z.input<typeof workflowRunListItemSchema>;
|
|
450
|
+
export type WorkflowRunListItemDto = Omit<WorkflowRunListItemInput, 'origin' | 'dev_source'> & {
|
|
451
|
+
origin: WorkflowRunOriginDto;
|
|
452
|
+
dev_source: WorkflowRunDevSourceDto | null;
|
|
453
|
+
};
|
|
345
454
|
export declare const workflowRunListResponseSchema: z.ZodObject<{
|
|
346
455
|
runs: z.ZodArray<z.ZodObject<{
|
|
347
456
|
id: z.ZodString;
|
|
@@ -357,6 +466,17 @@ export declare const workflowRunListResponseSchema: z.ZodObject<{
|
|
|
357
466
|
running: "running";
|
|
358
467
|
succeeded: "succeeded";
|
|
359
468
|
}>;
|
|
469
|
+
origin: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
470
|
+
dev: "dev";
|
|
471
|
+
synced: "synced";
|
|
472
|
+
}>>>;
|
|
473
|
+
dev_source: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
474
|
+
ref: z.ZodString;
|
|
475
|
+
commit: z.ZodString;
|
|
476
|
+
config_path: z.ZodString;
|
|
477
|
+
initiated_by_user_id: z.ZodString;
|
|
478
|
+
replay_of_event_id: z.ZodNullable<z.ZodString>;
|
|
479
|
+
}, z.core.$strip>>>>;
|
|
360
480
|
current_attempt: z.ZodNumber;
|
|
361
481
|
latest_attempt: z.ZodNumber;
|
|
362
482
|
trigger_provider: z.ZodNullable<z.ZodString>;
|
|
@@ -435,7 +555,10 @@ export declare const workflowRunListResponseSchema: z.ZodObject<{
|
|
|
435
555
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
436
556
|
filtered_total_count: z.ZodNullable<z.ZodNumber>;
|
|
437
557
|
}, z.core.$strip>;
|
|
438
|
-
|
|
558
|
+
type WorkflowRunListResponseInput = z.input<typeof workflowRunListResponseSchema>;
|
|
559
|
+
export type WorkflowRunListResponseDto = Omit<WorkflowRunListResponseInput, 'runs'> & {
|
|
560
|
+
runs: WorkflowRunListItemDto[];
|
|
561
|
+
};
|
|
439
562
|
export declare const workflowRunAggregatesResponseSchema: z.ZodObject<{
|
|
440
563
|
status: z.ZodArray<z.ZodObject<{
|
|
441
564
|
value: z.ZodEnum<{
|
|
@@ -457,4 +580,5 @@ export declare const workflowRunAggregatesResponseSchema: z.ZodObject<{
|
|
|
457
580
|
}, z.core.$strip>>;
|
|
458
581
|
}, z.core.$strip>;
|
|
459
582
|
export type WorkflowRunAggregatesResponseDto = z.infer<typeof workflowRunAggregatesResponseSchema>;
|
|
583
|
+
export {};
|
|
460
584
|
//# sourceMappingURL=workflow-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../src/schemas/workflow-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,eAAO,MAAM,uBAAuB;;;;;;EAMlC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,eAAO,MAAM,wBAAwB;;;;;;EAMnC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;EAA4B,CAAC;AAEpE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,0BAA0B;;;;;iBAErC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../src/schemas/workflow-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC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AC;CAChC,CAAC;AAOF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;iBAM9C,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
|
|
@@ -19,6 +19,19 @@ export const workflowRunRerunModeSchema = z.enum([
|
|
|
19
19
|
'all',
|
|
20
20
|
'failed'
|
|
21
21
|
]);
|
|
22
|
+
export const workflowRunOriginSchema = z.enum([
|
|
23
|
+
'synced',
|
|
24
|
+
'dev'
|
|
25
|
+
]);
|
|
26
|
+
// Dev-run provenance: the ref and pinned commit the definition came from, the file that
|
|
27
|
+
// ran, the user who started the run, and the journaled event it replays when any.
|
|
28
|
+
export const workflowRunDevSourceSchema = z.object({
|
|
29
|
+
ref: z.string(),
|
|
30
|
+
commit: z.string(),
|
|
31
|
+
config_path: z.string(),
|
|
32
|
+
initiated_by_user_id: z.string().uuid(),
|
|
33
|
+
replay_of_event_id: z.string().uuid().nullable()
|
|
34
|
+
});
|
|
22
35
|
export const rerunWorkflowRunBodySchema = z.object({
|
|
23
36
|
mode: workflowRunRerunModeSchema
|
|
24
37
|
});
|
|
@@ -30,6 +43,7 @@ const runListQueryBaseSchema = z.object({
|
|
|
30
43
|
status: workflowRunStatusSchema.optional(),
|
|
31
44
|
definition_id: z.string().uuid().optional(),
|
|
32
45
|
trigger_source: z.string().optional(),
|
|
46
|
+
origin: workflowRunOriginSchema.optional(),
|
|
33
47
|
created_from: isoDateTimeSchema.optional(),
|
|
34
48
|
created_to: isoDateTimeSchema.optional()
|
|
35
49
|
});
|
|
@@ -76,7 +90,7 @@ export const workflowRunTriggerReferenceSchema = z.object({
|
|
|
76
90
|
commit: z.string().nullable(),
|
|
77
91
|
actor: z.string().nullable()
|
|
78
92
|
});
|
|
79
|
-
export const
|
|
93
|
+
export const workflowRunDtoFields = {
|
|
80
94
|
id: z.string().uuid(),
|
|
81
95
|
project_id: z.string().uuid(),
|
|
82
96
|
definition_id: z.string().uuid(),
|
|
@@ -84,6 +98,9 @@ export const workflowRunDtoSchema = z.object({
|
|
|
84
98
|
name: z.string(),
|
|
85
99
|
workflow_name: z.string(),
|
|
86
100
|
status: workflowRunStatusSchema,
|
|
101
|
+
// These defaults keep the response contract compatible while API and web deploys overlap.
|
|
102
|
+
origin: workflowRunOriginSchema.optional().default('synced'),
|
|
103
|
+
dev_source: workflowRunDevSourceSchema.nullable().optional().default(null),
|
|
87
104
|
current_attempt: z.number().int().positive(),
|
|
88
105
|
latest_attempt: z.number().int().positive(),
|
|
89
106
|
trigger_provider: z.string().nullable(),
|
|
@@ -97,7 +114,28 @@ export const workflowRunDtoSchema = z.object({
|
|
|
97
114
|
updated_at: z.string(),
|
|
98
115
|
started_at: z.string().nullable(),
|
|
99
116
|
finished_at: z.string().nullable()
|
|
100
|
-
}
|
|
117
|
+
};
|
|
118
|
+
export function validateWorkflowRunOrigin(value, ctx) {
|
|
119
|
+
if (value.origin === 'synced' && value.dev_source !== null) {
|
|
120
|
+
ctx.addIssue({
|
|
121
|
+
code: z.ZodIssueCode.custom,
|
|
122
|
+
message: 'Synced runs cannot include dev_source',
|
|
123
|
+
path: [
|
|
124
|
+
'dev_source'
|
|
125
|
+
]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
if (value.origin === 'dev' && value.dev_source === null) {
|
|
129
|
+
ctx.addIssue({
|
|
130
|
+
code: z.ZodIssueCode.custom,
|
|
131
|
+
message: 'Dev runs require dev_source',
|
|
132
|
+
path: [
|
|
133
|
+
'dev_source'
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
export const workflowRunDtoSchema = z.object(workflowRunDtoFields).superRefine(validateWorkflowRunOrigin);
|
|
101
139
|
export const workflowRunAttemptDtoSchema = z.object({
|
|
102
140
|
id: z.string().uuid(),
|
|
103
141
|
workflow_run_id: z.string().uuid(),
|
|
@@ -143,21 +181,22 @@ export const workflowRunJobSummaryDtoSchema = z.object({
|
|
|
143
181
|
status: jobStatusSchema.or(z.literal('listening')),
|
|
144
182
|
count: z.number().int().positive()
|
|
145
183
|
});
|
|
146
|
-
export const workflowRunListItemSchema =
|
|
184
|
+
export const workflowRunListItemSchema = z.object({
|
|
185
|
+
...workflowRunDtoFields,
|
|
147
186
|
/** Up to `WORKFLOW_RUN_JOB_PREVIEW_LIMIT` jobs in graph order, not the whole set. */ jobs: z.array(workflowRunJobSummaryDtoSchema).max(WORKFLOW_RUN_JOB_PREVIEW_LIMIT),
|
|
148
187
|
/** Persisted verdict counts, kept stable so older web clients can consume new responses. */ job_status_counts: z.array(workflowRunJobStatusCountDtoSchema),
|
|
149
188
|
/**
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
189
|
+
* Display-state counts over every job of the attempt, including those past the preview.
|
|
190
|
+
* Optional so a new web client can consume an older API response during rollout.
|
|
191
|
+
*/ job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional(),
|
|
153
192
|
/**
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
193
|
+
* Whether any job execution in the attempt reached its runner. A `cancelled` job does not say
|
|
194
|
+
* this on its own, so the counts above cannot answer it.
|
|
195
|
+
*
|
|
196
|
+
* Defaults to started, so an older API response during a rollout keeps the reading a run had
|
|
197
|
+
* before this field existed rather than claiming work that ran never began.
|
|
198
|
+
*/ has_started_job_execution: z.boolean().optional().default(true)
|
|
199
|
+
}).superRefine(validateWorkflowRunOrigin);
|
|
161
200
|
export const workflowRunListResponseSchema = z.object({
|
|
162
201
|
runs: z.array(workflowRunListItemSchema),
|
|
163
202
|
next_cursor: z.string().nullable(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schemas/workflow-run.ts"],"sourcesContent":["import {z} from 'zod';\nimport {jobStatusSchema} from './job.js';\nimport {jobModeSchema, listenerStatusSchema} from './job-listening.js';\n\nexport const workflowRunStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport type WorkflowRunStatusDto = z.infer<typeof workflowRunStatusSchema>;\n\nexport const jobExecutionStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport const workflowRunRerunModeSchema = z.enum(['all', 'failed']);\n\nexport type WorkflowRunRerunModeDto = z.infer<typeof workflowRunRerunModeSchema>;\n\nexport const rerunWorkflowRunBodySchema = z.object({\n mode: workflowRunRerunModeSchema,\n});\n\nexport type RerunWorkflowRunBodyDto = z.infer<typeof rerunWorkflowRunBodySchema>;\n\nconst isoDateTimeSchema = z.string().datetime();\nconst runListQueryBaseSchema = z.object({\n project_id: z.string().uuid(),\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n status: workflowRunStatusSchema.optional(),\n definition_id: z.string().uuid().optional(),\n trigger_source: z.string().optional(),\n created_from: isoDateTimeSchema.optional(),\n created_to: isoDateTimeSchema.optional(),\n});\n\nfunction validateDateWindow(\n value: {created_from?: string | undefined; created_to?: string | undefined},\n ctx: z.RefinementCtx,\n) {\n if (!value.created_from || !value.created_to) return;\n const from = new Date(value.created_from);\n const to = new Date(value.created_to);\n if (from > to) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'created_from must be before or equal to created_to',\n path: ['created_from'],\n });\n return;\n }\n\n const maxWindowMs = 365 * 24 * 60 * 60 * 1000;\n if (to.getTime() - from.getTime() > maxWindowMs) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'created date window must be 365 days or less',\n path: ['created_to'],\n });\n }\n}\n\nexport const workflowRunListQuerySchema = runListQueryBaseSchema.superRefine(validateDateWindow);\n\nexport type WorkflowRunListQueryDto = z.infer<typeof workflowRunListQuerySchema>;\n\nexport const workflowRunAggregatesQuerySchema = runListQueryBaseSchema\n .omit({limit: true, cursor: true})\n .superRefine(validateDateWindow);\n\nexport type WorkflowRunAggregatesQueryDto = z.infer<typeof workflowRunAggregatesQuerySchema>;\n\nexport const workflowSourceSnapshotSchema = z.object({\n content: z.string(),\n format: z.literal('yaml'),\n});\n\nexport type WorkflowSourceSnapshotDto = z.infer<typeof workflowSourceSnapshotSchema>;\n\n// Provider-neutral trigger facts captured at run creation. Every field is nullable because\n// only source-control triggers resolve one at all, and a given payload may name a ref\n// without naming an actor.\nexport const workflowRunTriggerReferenceSchema = z.object({\n repository: z.string().nullable(),\n ref: z.string().nullable(),\n commit: z.string().nullable(),\n actor: z.string().nullable(),\n});\n\nexport type WorkflowRunTriggerReferenceDto = z.infer<typeof workflowRunTriggerReferenceSchema>;\n\nexport const workflowRunDtoSchema = z.object({\n id: z.string().uuid(),\n project_id: z.string().uuid(),\n definition_id: z.string().uuid(),\n number: z.number().int().positive(),\n name: z.string(),\n workflow_name: z.string(),\n status: workflowRunStatusSchema,\n current_attempt: z.number().int().positive(),\n latest_attempt: z.number().int().positive(),\n trigger_provider: z.string().nullable(),\n trigger_source: z.string(),\n trigger_event: z.string(),\n trigger_payload: z.record(z.string(), z.unknown()),\n trigger_reference: workflowRunTriggerReferenceSchema.nullable(),\n inputs: z.record(z.string(), z.unknown()).nullable(),\n source_snapshot: workflowSourceSnapshotSchema.nullable(),\n created_at: z.string(),\n updated_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n});\n\nexport type WorkflowRunDto = z.infer<typeof workflowRunDtoSchema>;\n\nexport const workflowRunAttemptDtoSchema = z.object({\n id: z.string().uuid(),\n workflow_run_id: z.string().uuid(),\n attempt: z.number().int().positive(),\n status: workflowRunStatusSchema,\n created_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n rerun_mode: workflowRunRerunModeSchema.nullable(),\n});\n\nexport type WorkflowRunAttemptDto = z.infer<typeof workflowRunAttemptDtoSchema>;\n\nexport const workflowRunResponseSchema = workflowRunDtoSchema;\n\nexport type WorkflowRunResponseDto = z.infer<typeof workflowRunResponseSchema>;\n\nexport const workflowRunAttemptsResponseSchema = z.object({\n attempts: z.array(workflowRunAttemptDtoSchema),\n});\n\nexport type WorkflowRunAttemptsResponseDto = z.infer<typeof workflowRunAttemptsResponseSchema>;\n\n// The run list renders a status glyph per job so a failing run can be read without being\n// opened. Runtime state comes from the selected execution rather than the job verdict, while\n// mode and listener status let the client apply the same display rule as run detail. These\n// fields default to the pre-display-state contract so a web client can roll out before or\n// alongside an API deployment without rejecting an older response.\nexport const workflowRunJobSummaryDtoSchema = z.object({\n id: z.string().uuid(),\n key: z.string(),\n name: z.string().nullable(),\n status: jobStatusSchema,\n mode: jobModeSchema.optional().default('one_shot'),\n listener_status: listenerStatusSchema.optional().default('inactive'),\n execution_status: jobExecutionStatusSchema.nullable().optional().default(null),\n position: z.number().int().nonnegative(),\n});\n\nexport type WorkflowRunJobSummaryDto = z.input<typeof workflowRunJobSummaryDtoSchema>;\n\n/**\n * How many jobs a run list row carries in graph order.\n *\n * A workflow has no job limit, and the list is polled while runs are active, so the row\n * cannot carry every job of every run on the page. This bound is the API's, deliberately set\n * above what any current surface draws: a client is free to show fewer without a server\n * change, and `job_status_counts` still describes the jobs beyond it.\n */\nexport const WORKFLOW_RUN_JOB_PREVIEW_LIMIT = 16;\n\n/** The persisted job verdict and how many of the run's jobs carry it, counted over all of them. */\nexport const workflowRunJobStatusCountDtoSchema = z.object({\n status: jobStatusSchema,\n count: z.number().int().positive(),\n});\n\nexport type WorkflowRunJobStatusCountDto = z.infer<typeof workflowRunJobStatusCountDtoSchema>;\n\n/** One display status and how many of the run's jobs render it, counted over all of them. */\nexport const workflowRunJobDisplayStatusCountDtoSchema = z.object({\n status: jobStatusSchema.or(z.literal('listening')),\n count: z.number().int().positive(),\n});\n\nexport type WorkflowRunJobDisplayStatusCountDto = z.infer<\n typeof workflowRunJobDisplayStatusCountDtoSchema\n>;\n\nexport const workflowRunListItemSchema = workflowRunResponseSchema.extend({\n /** Up to `WORKFLOW_RUN_JOB_PREVIEW_LIMIT` jobs in graph order, not the whole set. */\n jobs: z.array(workflowRunJobSummaryDtoSchema).max(WORKFLOW_RUN_JOB_PREVIEW_LIMIT),\n /** Persisted verdict counts, kept stable so older web clients can consume new responses. */\n job_status_counts: z.array(workflowRunJobStatusCountDtoSchema),\n /**\n * Display-state counts over every job of the attempt, including those past the preview.\n * Optional so a new web client can consume an older API response during rollout.\n */\n job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional(),\n /**\n * Whether any job execution in the attempt reached its runner. A `cancelled` job does not say\n * this on its own, so the counts above cannot answer it.\n *\n * Defaults to started, so an older API response during a rollout keeps the reading a run had\n * before this field existed rather than claiming work that ran never began.\n */\n has_started_job_execution: z.boolean().optional().default(true),\n});\n\nexport type WorkflowRunListItemDto = z.input<typeof workflowRunListItemSchema>;\n\nexport const workflowRunListResponseSchema = z.object({\n runs: z.array(workflowRunListItemSchema),\n next_cursor: z.string().nullable(),\n filtered_total_count: z.number().int().nonnegative().nullable(),\n});\n\nexport type WorkflowRunListResponseDto = z.input<typeof workflowRunListResponseSchema>;\n\nconst aggregateBucketSchema = z.object({\n value: z.string(),\n count: z.number().int().nonnegative(),\n});\n\nexport const workflowRunAggregatesResponseSchema = z.object({\n status: z.array(\n z.object({value: workflowRunStatusSchema, count: z.number().int().nonnegative()}),\n ),\n trigger_source: z.array(aggregateBucketSchema),\n workflow: z.array(aggregateBucketSchema),\n});\n\nexport type WorkflowRunAggregatesResponseDto = z.infer<typeof workflowRunAggregatesResponseSchema>;\n"],"names":["z","jobStatusSchema","jobModeSchema","listenerStatusSchema","workflowRunStatusSchema","enum","jobExecutionStatusSchema","workflowRunRerunModeSchema","rerunWorkflowRunBodySchema","object","mode","isoDateTimeSchema","string","datetime","runListQueryBaseSchema","project_id","uuid","limit","coerce","number","int","min","max","default","cursor","optional","status","definition_id","trigger_source","created_from","created_to","validateDateWindow","value","ctx","from","Date","to","addIssue","code","ZodIssueCode","custom","message","path","maxWindowMs","getTime","workflowRunListQuerySchema","superRefine","workflowRunAggregatesQuerySchema","omit","workflowSourceSnapshotSchema","content","format","literal","workflowRunTriggerReferenceSchema","repository","nullable","ref","commit","actor","workflowRunDtoSchema","id","positive","name","workflow_name","current_attempt","latest_attempt","trigger_provider","trigger_event","trigger_payload","record","unknown","trigger_reference","inputs","source_snapshot","created_at","updated_at","started_at","finished_at","workflowRunAttemptDtoSchema","workflow_run_id","attempt","rerun_mode","workflowRunResponseSchema","workflowRunAttemptsResponseSchema","attempts","array","workflowRunJobSummaryDtoSchema","key","listener_status","execution_status","position","nonnegative","WORKFLOW_RUN_JOB_PREVIEW_LIMIT","workflowRunJobStatusCountDtoSchema","count","workflowRunJobDisplayStatusCountDtoSchema","or","workflowRunListItemSchema","extend","jobs","job_status_counts","job_display_status_counts","has_started_job_execution","boolean","workflowRunListResponseSchema","runs","next_cursor","filtered_total_count","aggregateBucketSchema","workflowRunAggregatesResponseSchema","workflow"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,eAAe,QAAO,WAAW;AACzC,SAAQC,aAAa,EAAEC,oBAAoB,QAAO,qBAAqB;AAEvE,OAAO,MAAMC,0BAA0BJ,EAAEK,IAAI,CAAC;IAC5C;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,OAAO,MAAMC,2BAA2BN,EAAEK,IAAI,CAAC;IAC7C;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH,OAAO,MAAME,6BAA6BP,EAAEK,IAAI,CAAC;IAAC;IAAO;CAAS,EAAE;AAIpE,OAAO,MAAMG,6BAA6BR,EAAES,MAAM,CAAC;IACjDC,MAAMH;AACR,GAAG;AAIH,MAAMI,oBAAoBX,EAAEY,MAAM,GAAGC,QAAQ;AAC7C,MAAMC,yBAAyBd,EAAES,MAAM,CAAC;IACtCM,YAAYf,EAAEY,MAAM,GAAGI,IAAI;IAC3BC,OAAOjB,EAAEkB,MAAM,CAACC,MAAM,GAAGC,GAAG,GAAGC,GAAG,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} from './job.js';\nimport {jobModeSchema, listenerStatusSchema} from './job-listening.js';\n\nexport const workflowRunStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport type WorkflowRunStatusDto = z.infer<typeof workflowRunStatusSchema>;\n\nexport const jobExecutionStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport const workflowRunRerunModeSchema = z.enum(['all', 'failed']);\n\nexport type WorkflowRunRerunModeDto = z.infer<typeof workflowRunRerunModeSchema>;\n\nexport const workflowRunOriginSchema = z.enum(['synced', 'dev']);\n\nexport type WorkflowRunOriginDto = z.infer<typeof workflowRunOriginSchema>;\n\n// Dev-run provenance: the ref and pinned commit the definition came from, the file that\n// ran, the user who started the run, and the journaled event it replays when any.\nexport const workflowRunDevSourceSchema = z.object({\n ref: z.string(),\n commit: z.string(),\n config_path: z.string(),\n initiated_by_user_id: z.string().uuid(),\n replay_of_event_id: z.string().uuid().nullable(),\n});\n\nexport type WorkflowRunDevSourceDto = z.infer<typeof workflowRunDevSourceSchema>;\n\nexport const rerunWorkflowRunBodySchema = z.object({\n mode: workflowRunRerunModeSchema,\n});\n\nexport type RerunWorkflowRunBodyDto = z.infer<typeof rerunWorkflowRunBodySchema>;\n\nconst isoDateTimeSchema = z.string().datetime();\nconst runListQueryBaseSchema = z.object({\n project_id: z.string().uuid(),\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n status: workflowRunStatusSchema.optional(),\n definition_id: z.string().uuid().optional(),\n trigger_source: z.string().optional(),\n origin: workflowRunOriginSchema.optional(),\n created_from: isoDateTimeSchema.optional(),\n created_to: isoDateTimeSchema.optional(),\n});\n\nfunction validateDateWindow(\n value: {created_from?: string | undefined; created_to?: string | undefined},\n ctx: z.RefinementCtx,\n) {\n if (!value.created_from || !value.created_to) return;\n const from = new Date(value.created_from);\n const to = new Date(value.created_to);\n if (from > to) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'created_from must be before or equal to created_to',\n path: ['created_from'],\n });\n return;\n }\n\n const maxWindowMs = 365 * 24 * 60 * 60 * 1000;\n if (to.getTime() - from.getTime() > maxWindowMs) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'created date window must be 365 days or less',\n path: ['created_to'],\n });\n }\n}\n\nexport const workflowRunListQuerySchema = runListQueryBaseSchema.superRefine(validateDateWindow);\n\nexport type WorkflowRunListQueryDto = z.infer<typeof workflowRunListQuerySchema>;\n\nexport const workflowRunAggregatesQuerySchema = runListQueryBaseSchema\n .omit({limit: true, cursor: true})\n .superRefine(validateDateWindow);\n\nexport type WorkflowRunAggregatesQueryDto = z.infer<typeof workflowRunAggregatesQuerySchema>;\n\nexport const workflowSourceSnapshotSchema = z.object({\n content: z.string(),\n format: z.literal('yaml'),\n});\n\nexport type WorkflowSourceSnapshotDto = z.infer<typeof workflowSourceSnapshotSchema>;\n\n// Provider-neutral trigger facts captured at run creation. Every field is nullable because\n// only source-control triggers resolve one at all, and a given payload may name a ref\n// without naming an actor.\nexport const workflowRunTriggerReferenceSchema = z.object({\n repository: z.string().nullable(),\n ref: z.string().nullable(),\n commit: z.string().nullable(),\n actor: z.string().nullable(),\n});\n\nexport type WorkflowRunTriggerReferenceDto = z.infer<typeof workflowRunTriggerReferenceSchema>;\n\nexport const workflowRunDtoFields = {\n id: z.string().uuid(),\n project_id: z.string().uuid(),\n definition_id: z.string().uuid(),\n number: z.number().int().positive(),\n name: z.string(),\n workflow_name: z.string(),\n status: workflowRunStatusSchema,\n // These defaults keep the response contract compatible while API and web deploys overlap.\n origin: workflowRunOriginSchema.optional().default('synced'),\n dev_source: workflowRunDevSourceSchema.nullable().optional().default(null),\n current_attempt: z.number().int().positive(),\n latest_attempt: z.number().int().positive(),\n trigger_provider: z.string().nullable(),\n trigger_source: z.string(),\n trigger_event: z.string(),\n trigger_payload: z.record(z.string(), z.unknown()),\n trigger_reference: workflowRunTriggerReferenceSchema.nullable(),\n inputs: z.record(z.string(), z.unknown()).nullable(),\n source_snapshot: workflowSourceSnapshotSchema.nullable(),\n created_at: z.string(),\n updated_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n};\n\nexport function validateWorkflowRunOrigin(\n value: {origin: WorkflowRunOriginDto; dev_source: WorkflowRunDevSourceDto | null},\n ctx: z.RefinementCtx,\n) {\n if (value.origin === 'synced' && value.dev_source !== null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Synced runs cannot include dev_source',\n path: ['dev_source'],\n });\n }\n if (value.origin === 'dev' && value.dev_source === null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Dev runs require dev_source',\n path: ['dev_source'],\n });\n }\n}\n\nexport const workflowRunDtoSchema = z\n .object(workflowRunDtoFields)\n .superRefine(validateWorkflowRunOrigin);\n\nexport type WorkflowRunDto = z.infer<typeof workflowRunDtoSchema>;\n\nexport const workflowRunAttemptDtoSchema = z.object({\n id: z.string().uuid(),\n workflow_run_id: z.string().uuid(),\n attempt: z.number().int().positive(),\n status: workflowRunStatusSchema,\n created_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n rerun_mode: workflowRunRerunModeSchema.nullable(),\n});\n\nexport type WorkflowRunAttemptDto = z.infer<typeof workflowRunAttemptDtoSchema>;\n\nexport const workflowRunResponseSchema = workflowRunDtoSchema;\n\nexport type WorkflowRunResponseDto = z.infer<typeof workflowRunResponseSchema>;\n\nexport const workflowRunAttemptsResponseSchema = z.object({\n attempts: z.array(workflowRunAttemptDtoSchema),\n});\n\nexport type WorkflowRunAttemptsResponseDto = z.infer<typeof workflowRunAttemptsResponseSchema>;\n\n// The run list renders a status glyph per job so a failing run can be read without being\n// opened. Runtime state comes from the selected execution rather than the job verdict, while\n// mode and listener status let the client apply the same display rule as run detail. These\n// fields default to the pre-display-state contract so a web client can roll out before or\n// alongside an API deployment without rejecting an older response.\nexport const workflowRunJobSummaryDtoSchema = z.object({\n id: z.string().uuid(),\n key: z.string(),\n name: z.string().nullable(),\n status: jobStatusSchema,\n mode: jobModeSchema.optional().default('one_shot'),\n listener_status: listenerStatusSchema.optional().default('inactive'),\n execution_status: jobExecutionStatusSchema.nullable().optional().default(null),\n position: z.number().int().nonnegative(),\n});\n\nexport type WorkflowRunJobSummaryDto = z.input<typeof workflowRunJobSummaryDtoSchema>;\n\n/**\n * How many jobs a run list row carries in graph order.\n *\n * A workflow has no job limit, and the list is polled while runs are active, so the row\n * cannot carry every job of every run on the page. This bound is the API's, deliberately set\n * above what any current surface draws: a client is free to show fewer without a server\n * change, and `job_status_counts` still describes the jobs beyond it.\n */\nexport const WORKFLOW_RUN_JOB_PREVIEW_LIMIT = 16;\n\n/** The persisted job verdict and how many of the run's jobs carry it, counted over all of them. */\nexport const workflowRunJobStatusCountDtoSchema = z.object({\n status: jobStatusSchema,\n count: z.number().int().positive(),\n});\n\nexport type WorkflowRunJobStatusCountDto = z.infer<typeof workflowRunJobStatusCountDtoSchema>;\n\n/** One display status and how many of the run's jobs render it, counted over all of them. */\nexport const workflowRunJobDisplayStatusCountDtoSchema = z.object({\n status: jobStatusSchema.or(z.literal('listening')),\n count: z.number().int().positive(),\n});\n\nexport type WorkflowRunJobDisplayStatusCountDto = z.infer<\n typeof workflowRunJobDisplayStatusCountDtoSchema\n>;\n\nexport const workflowRunListItemSchema = z\n .object({\n ...workflowRunDtoFields,\n /** Up to `WORKFLOW_RUN_JOB_PREVIEW_LIMIT` jobs in graph order, not the whole set. */\n jobs: z.array(workflowRunJobSummaryDtoSchema).max(WORKFLOW_RUN_JOB_PREVIEW_LIMIT),\n /** Persisted verdict counts, kept stable so older web clients can consume new responses. */\n job_status_counts: z.array(workflowRunJobStatusCountDtoSchema),\n /**\n * Display-state counts over every job of the attempt, including those past the preview.\n * Optional so a new web client can consume an older API response during rollout.\n */\n job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional(),\n /**\n * Whether any job execution in the attempt reached its runner. A `cancelled` job does not say\n * this on its own, so the counts above cannot answer it.\n *\n * Defaults to started, so an older API response during a rollout keeps the reading a run had\n * before this field existed rather than claiming work that ran never began.\n */\n has_started_job_execution: z.boolean().optional().default(true),\n })\n .superRefine(validateWorkflowRunOrigin);\n\ntype WorkflowRunListItemInput = z.input<typeof workflowRunListItemSchema>;\n\nexport type WorkflowRunListItemDto = Omit<WorkflowRunListItemInput, 'origin' | 'dev_source'> & {\n origin: WorkflowRunOriginDto;\n dev_source: WorkflowRunDevSourceDto | null;\n};\n\nexport const workflowRunListResponseSchema = z.object({\n runs: z.array(workflowRunListItemSchema),\n next_cursor: z.string().nullable(),\n filtered_total_count: z.number().int().nonnegative().nullable(),\n});\n\ntype WorkflowRunListResponseInput = z.input<typeof workflowRunListResponseSchema>;\n\nexport type WorkflowRunListResponseDto = Omit<WorkflowRunListResponseInput, 'runs'> & {\n runs: WorkflowRunListItemDto[];\n};\n\nconst aggregateBucketSchema = z.object({\n value: z.string(),\n count: z.number().int().nonnegative(),\n});\n\nexport const workflowRunAggregatesResponseSchema = z.object({\n status: z.array(\n z.object({value: workflowRunStatusSchema, count: z.number().int().nonnegative()}),\n ),\n trigger_source: z.array(aggregateBucketSchema),\n workflow: z.array(aggregateBucketSchema),\n});\n\nexport type WorkflowRunAggregatesResponseDto = z.infer<typeof workflowRunAggregatesResponseSchema>;\n"],"names":["z","jobStatusSchema","jobModeSchema","listenerStatusSchema","workflowRunStatusSchema","enum","jobExecutionStatusSchema","workflowRunRerunModeSchema","workflowRunOriginSchema","workflowRunDevSourceSchema","object","ref","string","commit","config_path","initiated_by_user_id","uuid","replay_of_event_id","nullable","rerunWorkflowRunBodySchema","mode","isoDateTimeSchema","datetime","runListQueryBaseSchema","project_id","limit","coerce","number","int","min","max","default","cursor","optional","status","definition_id","trigger_source","origin","created_from","created_to","validateDateWindow","value","ctx","from","Date","to","addIssue","code","ZodIssueCode","custom","message","path","maxWindowMs","getTime","workflowRunListQuerySchema","superRefine","workflowRunAggregatesQuerySchema","omit","workflowSourceSnapshotSchema","content","format","literal","workflowRunTriggerReferenceSchema","repository","actor","workflowRunDtoFields","id","positive","name","workflow_name","dev_source","current_attempt","latest_attempt","trigger_provider","trigger_event","trigger_payload","record","unknown","trigger_reference","inputs","source_snapshot","created_at","updated_at","started_at","finished_at","validateWorkflowRunOrigin","workflowRunDtoSchema","workflowRunAttemptDtoSchema","workflow_run_id","attempt","rerun_mode","workflowRunResponseSchema","workflowRunAttemptsResponseSchema","attempts","array","workflowRunJobSummaryDtoSchema","key","listener_status","execution_status","position","nonnegative","WORKFLOW_RUN_JOB_PREVIEW_LIMIT","workflowRunJobStatusCountDtoSchema","count","workflowRunJobDisplayStatusCountDtoSchema","or","workflowRunListItemSchema","jobs","job_status_counts","job_display_status_counts","has_started_job_execution","boolean","workflowRunListResponseSchema","runs","next_cursor","filtered_total_count","aggregateBucketSchema","workflowRunAggregatesResponseSchema","workflow"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,eAAe,QAAO,WAAW;AACzC,SAAQC,aAAa,EAAEC,oBAAoB,QAAO,qBAAqB;AAEvE,OAAO,MAAMC,0BAA0BJ,EAAEK,IAAI,CAAC;IAC5C;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,OAAO,MAAMC,2BAA2BN,EAAEK,IAAI,CAAC;IAC7C;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH,OAAO,MAAME,6BAA6BP,EAAEK,IAAI,CAAC;IAAC;IAAO;CAAS,EAAE;AAIpE,OAAO,MAAMG,0BAA0BR,EAAEK,IAAI,CAAC;IAAC;IAAU;CAAM,EAAE;AAIjE,wFAAwF;AACxF,kFAAkF;AAClF,OAAO,MAAMI,6BAA6BT,EAAEU,MAAM,CAAC;IACjDC,KAAKX,EAAEY,MAAM;IACbC,QAAQb,EAAEY,MAAM;IAChBE,aAAad,EAAEY,MAAM;IACrBG,sBAAsBf,EAAEY,MAAM,GAAGI,IAAI;IACrCC,o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