@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/api-workflows-dto",
3
3
  "license": "MIT",
4
- "version": "12.6.0",
4
+ "version": "12.7.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -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>;