@shipfox/api-workflows-dto 12.6.0 → 12.7.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 +9 -0
- package/dist/schemas/workflow-run-detail.d.ts +1 -0
- package/dist/schemas/workflow-run-detail.d.ts.map +1 -1
- package/dist/schemas/workflow-run-detail.js +8 -1
- package/dist/schemas/workflow-run-detail.js.map +1 -1
- package/dist/schemas/workflow-run.d.ts +2 -0
- package/dist/schemas/workflow-run.d.ts.map +1 -1
- package/dist/schemas/workflow-run.js +8 -1
- package/dist/schemas/workflow-run.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/schemas/workflow-run-detail.ts +8 -0
- package/src/schemas/workflow-run.test.ts +3 -0
- package/src/schemas/workflow-run.ts +8 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -72,6 +72,14 @@ export type WorkflowRunJobDetailDto = z.infer<typeof workflowRunJobDetailDtoSche
|
|
|
72
72
|
export const workflowRunDetailResponseSchema = workflowRunResponseSchema.extend({
|
|
73
73
|
run_attempt: workflowRunAttemptDtoSchema,
|
|
74
74
|
jobs: z.array(workflowRunJobDetailDtoSchema),
|
|
75
|
+
/**
|
|
76
|
+
* Whether any job execution of this attempt reached its runner. Redundant with the executions
|
|
77
|
+
* below, and deliberately so: the server decides it once for both this response and the run
|
|
78
|
+
* list, which is what keeps the two surfaces from reaching different answers.
|
|
79
|
+
*
|
|
80
|
+
* Defaults to started for the same rollout reason as the list item's copy.
|
|
81
|
+
*/
|
|
82
|
+
has_started_job_execution: z.boolean().optional().default(true),
|
|
75
83
|
});
|
|
76
84
|
|
|
77
85
|
export type WorkflowRunDetailResponseDto = z.infer<typeof workflowRunDetailResponseSchema>;
|
|
@@ -120,6 +120,7 @@ describe('workflow run list item schema', () => {
|
|
|
120
120
|
source_snapshot: null,
|
|
121
121
|
jobs: [jobDto(0)],
|
|
122
122
|
job_status_counts: [{status: 'succeeded', count: 1}],
|
|
123
|
+
has_started_job_execution: true,
|
|
123
124
|
});
|
|
124
125
|
|
|
125
126
|
expect(result.jobs).toHaveLength(1);
|
|
@@ -185,6 +186,7 @@ describe('workflow run list item schema', () => {
|
|
|
185
186
|
{status: 'succeeded', count: 40},
|
|
186
187
|
{status: 'failed', count: 2},
|
|
187
188
|
],
|
|
189
|
+
has_started_job_execution: true,
|
|
188
190
|
});
|
|
189
191
|
|
|
190
192
|
expect(result.job_status_counts).toHaveLength(2);
|
|
@@ -196,6 +198,7 @@ describe('workflow run list item schema', () => {
|
|
|
196
198
|
source_snapshot: null,
|
|
197
199
|
jobs: Array.from({length: WORKFLOW_RUN_JOB_PREVIEW_LIMIT + 1}, (_, index) => jobDto(index)),
|
|
198
200
|
job_status_counts: [],
|
|
201
|
+
has_started_job_execution: false,
|
|
199
202
|
});
|
|
200
203
|
|
|
201
204
|
expect(result.success).toBe(false);
|
|
@@ -201,6 +201,14 @@ export const workflowRunListItemSchema = workflowRunResponseSchema.extend({
|
|
|
201
201
|
* Optional so a new web client can consume an older API response during rollout.
|
|
202
202
|
*/
|
|
203
203
|
job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional(),
|
|
204
|
+
/**
|
|
205
|
+
* Whether any job execution in the attempt reached its runner. A `cancelled` job does not say
|
|
206
|
+
* this on its own, so the counts above cannot answer it.
|
|
207
|
+
*
|
|
208
|
+
* Defaults to started, so an older API response during a rollout keeps the reading a run had
|
|
209
|
+
* before this field existed rather than claiming work that ran never began.
|
|
210
|
+
*/
|
|
211
|
+
has_started_job_execution: z.boolean().optional().default(true),
|
|
204
212
|
});
|
|
205
213
|
|
|
206
214
|
export type WorkflowRunListItemDto = z.input<typeof workflowRunListItemSchema>;
|