@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.
@@ -1,2 +1,2 @@
1
1
  $ shipfox-swc
2
- Successfully compiled: 16 files with swc (287.48ms)
2
+ Successfully compiled: 16 files with swc (305.62ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @shipfox/api-workflows-dto
2
2
 
3
+ ## 12.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4df5e37: Workflow run list items and run detail now carry `has_started_job_execution`, reporting whether any
8
+ job execution of the attempt reached a runner. Run surfaces no longer show a client-derived `Queued`
9
+ state: the run list and run detail present the API attempt status and duration, and read the new
10
+ field to label a finished run's duration as run or elapsed time.
11
+
3
12
  ## 12.6.0
4
13
 
5
14
  ### Minor Changes
@@ -1058,6 +1058,7 @@ export declare const workflowRunDetailResponseSchema: z.ZodObject<{
1058
1058
  }, z.core.$strip>>;
1059
1059
  }, z.core.$strip>>;
1060
1060
  }, z.core.$strip>>;
1061
+ has_started_job_execution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1061
1062
  }, z.core.$strip>;
1062
1063
  export type WorkflowRunDetailResponseDto = z.infer<typeof workflowRunDetailResponseSchema>;
1063
1064
  //# sourceMappingURL=workflow-run-detail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run-detail.d.ts","sourceRoot":"","sources":["../../src/schemas/workflow-run-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAWtB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW1C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
@@ -49,7 +49,14 @@ export const workflowRunJobDetailDtoSchema = jobDtoSchema.extend({
49
49
  // jobs, each job's steps, and each step's attempt history.
50
50
  export const workflowRunDetailResponseSchema = workflowRunResponseSchema.extend({
51
51
  run_attempt: workflowRunAttemptDtoSchema,
52
- jobs: z.array(workflowRunJobDetailDtoSchema)
52
+ jobs: z.array(workflowRunJobDetailDtoSchema),
53
+ /**
54
+ * Whether any job execution of this attempt reached its runner. Redundant with the executions
55
+ * below, and deliberately so: the server decides it once for both this response and the run
56
+ * list, which is what keeps the two surfaces from reaching different answers.
57
+ *
58
+ * Defaults to started for the same rollout reason as the list item's copy.
59
+ */ has_started_job_execution: z.boolean().optional().default(true)
53
60
  });
54
61
 
55
62
  //# sourceMappingURL=workflow-run-detail.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/workflow-run-detail.ts"],"sourcesContent":["import {z} from 'zod';\nimport {evaluationTraceSchema} from './evaluation-trace.js';\nimport {jobDtoSchema} from './job.js';\nimport {workflowExecutionEventSchema} from './job-listening.js';\nimport {stepAttemptDetailDtoSchema, stepAttemptDtoSchema, stepDtoSchema} from './step.js';\nimport {\n jobExecutionStatusSchema,\n workflowRunAttemptDtoSchema,\n workflowRunResponseSchema,\n} from './workflow-run.js';\n\nexport const jobExecutionDtoSchema = z.object({\n id: z.string().uuid(),\n job_id: z.string().uuid(),\n sequence: z.number().int().positive(),\n name: z.string(),\n status: jobExecutionStatusSchema,\n status_reason: z.string().nullable(),\n status_reason_message: z.string().nullable().optional(),\n runner: z.array(z.string()).nullable(),\n trigger_events: z.array(workflowExecutionEventSchema).default([]),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n evaluation_trace: evaluationTraceSchema.nullable(),\n queued_at: z.string().nullable(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n timed_out_at: z.string().nullable(),\n created_at: z.string(),\n updated_at: z.string(),\n});\n\nexport type JobExecutionDto = z.infer<typeof jobExecutionDtoSchema>;\n\n// A step with its attempt history: one entry per dispatched attempt (a restarted\n// step has more than one). `current_attempt` on the step points at the latest.\nexport const workflowRunStepDetailDtoSchema = stepDtoSchema.extend({\n exit_code: z.number().int().nullable(),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n response: z.string().nullable(),\n gate_result: stepAttemptDtoSchema.shape.gate_result,\n attempts: z.array(stepAttemptDtoSchema),\n});\n\nexport type WorkflowRunStepDetailDto = z.infer<typeof workflowRunStepDetailDtoSchema>;\n\nexport const stepAttemptDetailResponseSchema = z.object({\n step_id: z.string().uuid(),\n attempt: stepAttemptDetailDtoSchema.shape.attempt,\n authored_config: z.record(z.string(), z.unknown()).nullable(),\n config: stepAttemptDetailDtoSchema.shape.config,\n evaluation_trace: stepAttemptDetailDtoSchema.shape.evaluation_trace,\n});\n\nexport type StepAttemptDetailResponseDto = z.infer<typeof stepAttemptDetailResponseSchema>;\n\nexport const workflowRunJobExecutionDetailDtoSchema = jobExecutionDtoSchema.extend({\n steps: z.array(workflowRunStepDetailDtoSchema),\n});\n\nexport type WorkflowRunJobExecutionDetailDto = z.infer<\n typeof workflowRunJobExecutionDetailDtoSchema\n>;\n\nexport const workflowRunJobDetailDtoSchema = jobDtoSchema.extend({\n job_executions: z.array(workflowRunJobExecutionDetailDtoSchema),\n});\n\nexport type WorkflowRunJobDetailDto = z.infer<typeof workflowRunJobDetailDtoSchema>;\n\n// The run detail read model returned by `GET /workflows/runs/:id`: a run plus its\n// jobs, each job's steps, and each step's attempt history.\nexport const workflowRunDetailResponseSchema = workflowRunResponseSchema.extend({\n run_attempt: workflowRunAttemptDtoSchema,\n jobs: z.array(workflowRunJobDetailDtoSchema),\n});\n\nexport type WorkflowRunDetailResponseDto = z.infer<typeof workflowRunDetailResponseSchema>;\n"],"names":["z","evaluationTraceSchema","jobDtoSchema","workflowExecutionEventSchema","stepAttemptDetailDtoSchema","stepAttemptDtoSchema","stepDtoSchema","jobExecutionStatusSchema","workflowRunAttemptDtoSchema","workflowRunResponseSchema","jobExecutionDtoSchema","object","id","string","uuid","job_id","sequence","number","int","positive","name","status","status_reason","nullable","status_reason_message","optional","runner","array","trigger_events","default","outputs","record","unknown","evaluation_trace","queued_at","started_at","finished_at","timed_out_at","created_at","updated_at","workflowRunStepDetailDtoSchema","extend","exit_code","response","gate_result","shape","attempts","stepAttemptDetailResponseSchema","step_id","attempt","authored_config","config","workflowRunJobExecutionDetailDtoSchema","steps","workflowRunJobDetailDtoSchema","job_executions","workflowRunDetailResponseSchema","run_attempt","jobs"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,qBAAqB,QAAO,wBAAwB;AAC5D,SAAQC,YAAY,QAAO,WAAW;AACtC,SAAQC,4BAA4B,QAAO,qBAAqB;AAChE,SAAQC,0BAA0B,EAAEC,oBAAoB,EAAEC,aAAa,QAAO,YAAY;AAC1F,SACEC,wBAAwB,EACxBC,2BAA2B,EAC3BC,yBAAyB,QACpB,oBAAoB;AAE3B,OAAO,MAAMC,wBAAwBV,EAAEW,MAAM,CAAC;IAC5CC,IAAIZ,EAAEa,MAAM,GAAGC,IAAI;IACnBC,QAAQf,EAAEa,MAAM,GAAGC,IAAI;IACvBE,UAAUhB,EAAEiB,MAAM,GAAGC,GAAG,GAAGC,QAAQ;IACnCC,MAAMpB,EAAEa,MAAM;IACdQ,QAAQd;IACRe,eAAetB,EAAEa,MAAM,GAAGU,QAAQ;IAClCC,uBAAuBxB,EAAEa,MAAM,GAAGU,QAAQ,GAAGE,QAAQ;IACrDC,QAAQ1B,EAAE2B,KAAK,CAAC3B,EAAEa,MAAM,IAAIU,QAAQ;IACpCK,gBAAgB5B,EAAE2B,K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,MAAMc,gCAAgCpD,aAAauC,MAAM,CAAC;IAC/Dc,gBAAgBvD,EAAE2B,KAAK,CAACyB;AAC1B,GAAG;AAIH,kFAAkF;AAClF,2DAA2D;AAC3D,OAAO,MAAMI,kCAAkC/C,0BAA0BgC,MAAM,CAAC;IAC9EgB,aAAajD;IACbkD,MAAM1D,EAAE2B,KAAK,CAAC2B;AAChB,GAAG"}
1
+ {"version":3,"sources":["../../src/schemas/workflow-run-detail.ts"],"sourcesContent":["import {z} from 'zod';\nimport {evaluationTraceSchema} from './evaluation-trace.js';\nimport {jobDtoSchema} from './job.js';\nimport {workflowExecutionEventSchema} from './job-listening.js';\nimport {stepAttemptDetailDtoSchema, stepAttemptDtoSchema, stepDtoSchema} from './step.js';\nimport {\n jobExecutionStatusSchema,\n workflowRunAttemptDtoSchema,\n workflowRunResponseSchema,\n} from './workflow-run.js';\n\nexport const jobExecutionDtoSchema = z.object({\n id: z.string().uuid(),\n job_id: z.string().uuid(),\n sequence: z.number().int().positive(),\n name: z.string(),\n status: jobExecutionStatusSchema,\n status_reason: z.string().nullable(),\n status_reason_message: z.string().nullable().optional(),\n runner: z.array(z.string()).nullable(),\n trigger_events: z.array(workflowExecutionEventSchema).default([]),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n evaluation_trace: evaluationTraceSchema.nullable(),\n queued_at: z.string().nullable(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n timed_out_at: z.string().nullable(),\n created_at: z.string(),\n updated_at: z.string(),\n});\n\nexport type JobExecutionDto = z.infer<typeof jobExecutionDtoSchema>;\n\n// A step with its attempt history: one entry per dispatched attempt (a restarted\n// step has more than one). `current_attempt` on the step points at the latest.\nexport const workflowRunStepDetailDtoSchema = stepDtoSchema.extend({\n exit_code: z.number().int().nullable(),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n response: z.string().nullable(),\n gate_result: stepAttemptDtoSchema.shape.gate_result,\n attempts: z.array(stepAttemptDtoSchema),\n});\n\nexport type WorkflowRunStepDetailDto = z.infer<typeof workflowRunStepDetailDtoSchema>;\n\nexport const stepAttemptDetailResponseSchema = z.object({\n step_id: z.string().uuid(),\n attempt: stepAttemptDetailDtoSchema.shape.attempt,\n authored_config: z.record(z.string(), z.unknown()).nullable(),\n config: stepAttemptDetailDtoSchema.shape.config,\n evaluation_trace: stepAttemptDetailDtoSchema.shape.evaluation_trace,\n});\n\nexport type StepAttemptDetailResponseDto = z.infer<typeof stepAttemptDetailResponseSchema>;\n\nexport const workflowRunJobExecutionDetailDtoSchema = jobExecutionDtoSchema.extend({\n steps: z.array(workflowRunStepDetailDtoSchema),\n});\n\nexport type WorkflowRunJobExecutionDetailDto = z.infer<\n typeof workflowRunJobExecutionDetailDtoSchema\n>;\n\nexport const workflowRunJobDetailDtoSchema = jobDtoSchema.extend({\n job_executions: z.array(workflowRunJobExecutionDetailDtoSchema),\n});\n\nexport type WorkflowRunJobDetailDto = z.infer<typeof workflowRunJobDetailDtoSchema>;\n\n// The run detail read model returned by `GET /workflows/runs/:id`: a run plus its\n// jobs, each job's steps, and each step's attempt history.\nexport const workflowRunDetailResponseSchema = workflowRunResponseSchema.extend({\n run_attempt: workflowRunAttemptDtoSchema,\n jobs: z.array(workflowRunJobDetailDtoSchema),\n /**\n * Whether any job execution of this attempt reached its runner. Redundant with the executions\n * below, and deliberately so: the server decides it once for both this response and the run\n * list, which is what keeps the two surfaces from reaching different answers.\n *\n * Defaults to started for the same rollout reason as the list item's copy.\n */\n has_started_job_execution: z.boolean().optional().default(true),\n});\n\nexport type WorkflowRunDetailResponseDto = z.infer<typeof workflowRunDetailResponseSchema>;\n"],"names":["z","evaluationTraceSchema","jobDtoSchema","workflowExecutionEventSchema","stepAttemptDetailDtoSchema","stepAttemptDtoSchema","stepDtoSchema","jobExecutionStatusSchema","workflowRunAttemptDtoSchema","workflowRunResponseSchema","jobExecutionDtoSchema","object","id","string","uuid","job_id","sequence","number","int","positive","name","status","status_reason","nullable","status_reason_message","optional","runner","array","trigger_events","default","outputs","record","unknown","evaluation_trace","queued_at","started_at","finished_at","timed_out_at","created_at","updated_at","workflowRunStepDetailDtoSchema","extend","exit_code","response","gate_result","shape","attempts","stepAttemptDetailResponseSchema","step_id","attempt","authored_config","config","workflowRunJobExecutionDetailDtoSchema","steps","workflowRunJobDetailDtoSchema","job_executions","workflowRunDetailResponseSchema","run_attempt","jobs","has_started_job_execution","boolean"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,qBAAqB,QAAO,wBAAwB;AAC5D,SAAQC,YAAY,QAAO,WAAW;AACtC,SAAQC,4BAA4B,QAAO,qBAAqB;AAChE,SAAQC,0BAA0B,EAAEC,oBAAoB,EAAEC,aAAa,QAAO,YAAY;AAC1F,SACEC,wBAAwB,EACxBC,2BAA2B,EAC3BC,yBAAyB,QACpB,oBAAoB;AAE3B,OAAO,MAAMC,wBAAwBV,EAAEW,MAAM,CAAC;IAC5CC,IAAIZ,EAAEa,MAAM,GAAGC,IAAI;IACnBC,QAAQf,EAAEa,MAAM,GAAGC,IAAI;IACvBE,UAAUhB,EAAEiB,MAAM,GAAGC,GAAG,GAAGC,QAAQ;IACnCC,MAAMpB,EAAEa,MAAM;IACdQ,QAAQd;IACRe,eAAetB,EAAEa,MAAM,GAAGU,QAAQ;IAClCC,uBAAuBxB,EAAEa,MAAM,GAAGU,QAAQ,GAAGE,QAAQ;IACrDC,QAAQ1B,EAAE2B,KAAK,CAAC3B,EAAEa,MAAM,IAAIU,QAAQ;IACpCK,gBAAgB5B,EAAE2B,KAAK,CAACxB,8BAA8B0B,OAAO,CAAC,EAAE;IAChEC,SAAS9B,EAAE+B,MAAM,CAAC/B,EAAEa,MAAM,IAAIb,EAAEgC,OAAO,IAAIT,QAAQ;IACnDU,kBAAkBhC,sBAAsBsB,QAAQ;IAChDW,WAAWlC,EAAEa,MAAM,GAAGU,QAAQ;IAC9BY,YAAYnC,EAAEa,MAAM,GAAGU,QAAQ;IAC/Ba,aAAapC,EAAEa,MAAM,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AGnC,QAAQ,GAAGI,OAAO,CAAC;AAC5D,GAAG"}
@@ -339,6 +339,7 @@ export declare const workflowRunListItemSchema: z.ZodObject<{
339
339
  }>, z.ZodLiteral<"listening">]>;
340
340
  count: z.ZodNumber;
341
341
  }, z.core.$strip>>>;
342
+ has_started_job_execution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
342
343
  }, z.core.$strip>;
343
344
  export type WorkflowRunListItemDto = z.input<typeof workflowRunListItemSchema>;
344
345
  export declare const workflowRunListResponseSchema: z.ZodObject<{
@@ -429,6 +430,7 @@ export declare const workflowRunListResponseSchema: z.ZodObject<{
429
430
  }>, z.ZodLiteral<"listening">]>;
430
431
  count: z.ZodNumber;
431
432
  }, z.core.$strip>>>;
433
+ has_started_job_execution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
432
434
  }, z.core.$strip>>;
433
435
  next_cursor: z.ZodNullable<z.ZodString>;
434
436
  filtered_total_count: z.ZodNullable<z.ZodNumber>;
@@ -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;AAwCjF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;iBA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6BAA6B,CAAC,CAAC;AAOvF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;iBAM9C,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
@@ -149,7 +149,14 @@ export const workflowRunListItemSchema = workflowRunResponseSchema.extend({
149
149
  /**
150
150
  * Display-state counts over every job of the attempt, including those past the preview.
151
151
  * Optional so a new web client can consume an older API response during rollout.
152
- */ job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional()
152
+ */ job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional(),
153
+ /**
154
+ * Whether any job execution in the attempt reached its runner. A `cancelled` job does not say
155
+ * this on its own, so the counts above cannot answer it.
156
+ *
157
+ * Defaults to started, so an older API response during a rollout keeps the reading a run had
158
+ * before this field existed rather than claiming work that ran never began.
159
+ */ has_started_job_execution: z.boolean().optional().default(true)
153
160
  });
154
161
  export const workflowRunListResponseSchema = z.object({
155
162
  runs: z.array(workflowRunListItemSchema),
@@ -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\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","workflowRunListResponseSchema","runs","next_cursor","filtered_total_count","aggregateBucketSchema","workflowRunAggregatesResponseSchema","workflow"],"mappings":"AAAA,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AAW,GAAGpC,QAAQ;AAC/D,GAAG;AAIH,MAAMmD,wBAAwB1G,EAAES,MAAM,CAAC;IACrCuB,OAAOhC,EAAEY,MAAM;IACfkF,OAAO9F,EAAEmB,MAAM,GAAGC,GAAG,GAAGuE,WAAW;AACrC;AAEA,OAAO,MAAMgB,sCAAsC3G,EAAES,MAAM,CAAC;IAC1DiB,QAAQ1B,EAAEqF,KAAK,CACbrF,EAAES,MAAM,CAAC;QAACuB,OAAO5B;QAAyB0F,OAAO9F,EAAEmB,MAAM,GAAGC,GAAG,GAAGuE,WAAW;IAAE;IAEjF/D,gBAAgB5B,EAAEqF,KAAK,CAACqB;IACxBE,UAAU5G,EAAEqF,KAAK,CAACqB;AACpB,GAAG"}
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,QAA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