@epilot/cli 0.1.68 → 0.1.70

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.
@@ -3,13 +3,27 @@
3
3
  "info": {
4
4
  "title": "Workflows Definitions",
5
5
  "version": "1.1.0",
6
- "description": "Service for Workflow Definitions for different processes inside of an Organization\n"
6
+ "description": "The Workflows Definitions API enables you to create, manage, and configure reusable workflow templates\nwithin your organization. Workflow definitions serve as blueprints that define the structure and behavior\nof business processes, which can then be instantiated as workflow executions.\n\n## Core Concepts\n\n### Workflow Definition (V1)\nA workflow definition is a template that describes a business process. It consists of:\n- **Sections**: Logical groupings (phases) that organize related steps together\n- **Steps**: Individual tasks or actions that need to be completed within a section\n- **Closing Reasons**: Predefined reasons that can be selected when closing/completing a workflow\n\n### Flow Template (V2)\nThe modern workflow model that provides advanced capabilities:\n- **Phases**: Named stages that group related tasks and track progress through the workflow\n- **Tasks**: Individual units of work that can be manual, automated, AI-powered, or decision points\n- **Edges**: Connections between tasks that define the flow sequence and support conditional branching\n- **Triggers**: Define how a workflow is started (manual, automation, journey submission)\n\n### Task Types (V2)\n- **MANUAL**: Tasks assigned to users that require human action to complete\n- **AUTOMATION**: Tasks that execute automated actions when reached\n- **DECISION**: Conditional branching points that evaluate conditions to determine the next path\n- **AI_AGENT**: Tasks that invoke AI agents to perform intelligent actions\n\n## API Versions\n- **V1 endpoints** (`/v1/workflows/...`): Legacy linear workflow model with sections and steps\n- **V2 endpoints** (`/v2/flows/...`): Modern graph-based flow model with phases, tasks, and edges\n"
7
7
  },
8
8
  "servers": [
9
9
  {
10
10
  "url": "https://workflows-definition.sls.epilot.io"
11
11
  }
12
12
  ],
13
+ "tags": [
14
+ {
15
+ "name": "Workflows",
16
+ "description": "Manage V1 workflow definitions with sections and steps. These endpoints support the legacy\nlinear workflow model where definitions contain a sequential flow of sections and steps.\n"
17
+ },
18
+ {
19
+ "name": "Flows V2",
20
+ "description": "Manage V2 flow templates with phases, tasks, and edges. The modern workflow model supports\nadvanced features including conditional branching, multiple trigger types, automation tasks,\nAI agent tasks, and flexible task dependencies.\n"
21
+ },
22
+ {
23
+ "name": "Closing Reason",
24
+ "description": "Manage closing reasons that can be associated with workflows. Closing reasons provide\npredefined options for users to select when closing or completing a workflow execution,\nenabling better tracking and reporting of workflow outcomes.\n"
25
+ }
26
+ ],
13
27
  "security": [
14
28
  {
15
29
  "BearerAuth": []
@@ -40,7 +54,7 @@
40
54
  }
41
55
  },
42
56
  "500": {
43
- "description": "Other errors",
57
+ "description": "Internal server error",
44
58
  "content": {
45
59
  "application/json": {
46
60
  "schema": {
@@ -56,7 +70,7 @@
56
70
  "get": {
57
71
  "operationId": "getDefinitions",
58
72
  "summary": "getDefinitions",
59
- "description": "Retrieve all Workflow Definitions from an Organization",
73
+ "description": "Retrieve all V1 workflow definitions belonging to the authenticated organization.",
60
74
  "tags": [
61
75
  "Workflows"
62
76
  ],
@@ -135,7 +149,7 @@
135
149
  }
136
150
  },
137
151
  "500": {
138
- "description": "Other errors",
152
+ "description": "Internal server error",
139
153
  "content": {
140
154
  "application/json": {
141
155
  "schema": {
@@ -149,7 +163,7 @@
149
163
  "post": {
150
164
  "operationId": "createDefinition",
151
165
  "summary": "createDefinition",
152
- "description": "Create a Workflow Definition.",
166
+ "description": "Create a new V1 workflow definition. The definition consists of sections and steps\nthat define the structure of the workflow. Once created, the definition can be used\nto start workflow executions.\n",
153
167
  "tags": [
154
168
  "Workflows"
155
169
  ],
@@ -387,17 +401,89 @@
387
401
  "post": {
388
402
  "operationId": "createFlowTemplate",
389
403
  "summary": "createFlowTemplate",
390
- "description": "Create a new Flow Template.",
404
+ "description": "Create a new Flow Template (V2 workflow definition).\n\nA flow template defines the structure of a workflow including its phases, tasks,\nedges (connections between tasks), and trigger configuration. Once created, the\ntemplate can be used to start workflow executions.\n",
391
405
  "tags": [
392
406
  "Flows V2"
393
407
  ],
408
+ "parameters": [
409
+ {
410
+ "$ref": "#/components/parameters/EnforceLimitsParam"
411
+ }
412
+ ],
394
413
  "requestBody": {
395
- "description": "Flow Template payload",
414
+ "description": "Flow Template payload containing the workflow structure.\n\nRequired fields:\n- `name`: Display name for the workflow\n- `tasks`: Array of task definitions (manual, automation, decision, or AI agent tasks)\n- `edges`: Array of connections defining the flow between tasks\n",
396
415
  "required": true,
397
416
  "content": {
398
417
  "application/json": {
399
418
  "schema": {
400
419
  "$ref": "#/components/schemas/CreateFlowTemplate"
420
+ },
421
+ "example": {
422
+ "name": "Customer Onboarding",
423
+ "description": "Standard customer onboarding workflow with verification steps",
424
+ "version": "v3",
425
+ "enabled": true,
426
+ "trigger": {
427
+ "type": "manual",
428
+ "entity_schema": "contact"
429
+ },
430
+ "phases": [
431
+ {
432
+ "id": "phase_1",
433
+ "name": "Verification"
434
+ },
435
+ {
436
+ "id": "phase_2",
437
+ "name": "Setup"
438
+ }
439
+ ],
440
+ "tasks": [
441
+ {
442
+ "id": "task_1",
443
+ "name": "Verify customer identity",
444
+ "task_type": "MANUAL",
445
+ "phase_id": "phase_1",
446
+ "assigned_to": [
447
+ "user_123"
448
+ ]
449
+ },
450
+ {
451
+ "id": "task_2",
452
+ "name": "Send welcome email",
453
+ "task_type": "AUTOMATION",
454
+ "phase_id": "phase_2",
455
+ "automation_config": {
456
+ "flow_id": "automation_456"
457
+ },
458
+ "trigger_mode": "automatic"
459
+ },
460
+ {
461
+ "id": "task_3",
462
+ "name": "Schedule follow-up",
463
+ "task_type": "MANUAL",
464
+ "phase_id": "phase_2"
465
+ }
466
+ ],
467
+ "edges": [
468
+ {
469
+ "id": "edge_1",
470
+ "from_id": "task_1",
471
+ "to_id": "task_2"
472
+ },
473
+ {
474
+ "id": "edge_2",
475
+ "from_id": "task_2",
476
+ "to_id": "task_3"
477
+ }
478
+ ],
479
+ "closing_reasons": [
480
+ {
481
+ "id": "reason_completed"
482
+ },
483
+ {
484
+ "id": "reason_cancelled"
485
+ }
486
+ ]
401
487
  }
402
488
  }
403
489
  }
@@ -512,7 +598,7 @@
512
598
  "get": {
513
599
  "operationId": "getFlowTemplate",
514
600
  "summary": "getFlowTemplate",
515
- "description": "Get specific FLow template for a customer",
601
+ "description": "Retrieve a specific flow template by its unique identifier.",
516
602
  "tags": [
517
603
  "Flows V2"
518
604
  ],
@@ -523,7 +609,8 @@
523
609
  "schema": {
524
610
  "$ref": "#/components/schemas/FlowTemplateId"
525
611
  },
526
- "required": true
612
+ "required": true,
613
+ "description": "Unique identifier of the flow template to retrieve."
527
614
  }
528
615
  ],
529
616
  "responses": {
@@ -593,11 +680,15 @@
593
680
  "schema": {
594
681
  "$ref": "#/components/schemas/FlowTemplateId"
595
682
  },
596
- "required": true
683
+ "required": true,
684
+ "description": "Unique identifier of the flow template to update."
685
+ },
686
+ {
687
+ "$ref": "#/components/parameters/EnforceLimitsParam"
597
688
  }
598
689
  ],
599
690
  "requestBody": {
600
- "description": "Flow Template payload",
691
+ "description": "Updated flow template payload containing the full workflow definition.",
601
692
  "required": true,
602
693
  "content": {
603
694
  "application/json": {
@@ -619,7 +710,7 @@
619
710
  }
620
711
  },
621
712
  "400": {
622
- "description": "Validation Errors",
713
+ "description": "Validation errors - request body contains invalid data",
623
714
  "content": {
624
715
  "application/json": {
625
716
  "schema": {
@@ -629,7 +720,7 @@
629
720
  }
630
721
  },
631
722
  "401": {
632
- "description": "Authentication Errors",
723
+ "description": "Authentication failed - invalid or missing Bearer token",
633
724
  "content": {
634
725
  "application/json": {
635
726
  "schema": {
@@ -638,6 +729,16 @@
638
729
  }
639
730
  }
640
731
  },
732
+ "404": {
733
+ "description": "Flow template not found",
734
+ "content": {
735
+ "application/json": {
736
+ "schema": {
737
+ "$ref": "#/components/schemas/DefinitionNotFoundResp"
738
+ }
739
+ }
740
+ }
741
+ },
641
742
  "409": {
642
743
  "description": "Conflict - the workflow was modified by another user since it was last loaded",
643
744
  "content": {
@@ -649,7 +750,7 @@
649
750
  }
650
751
  },
651
752
  "500": {
652
- "description": "Other errors",
753
+ "description": "Internal server error",
653
754
  "content": {
654
755
  "application/json": {
655
756
  "schema": {
@@ -675,7 +776,7 @@
675
776
  "$ref": "#/components/schemas/FlowTemplateId"
676
777
  },
677
778
  "required": true,
678
- "description": "Id of the flow template to de deleted."
779
+ "description": "Unique identifier of the flow template to be deleted."
679
780
  }
680
781
  ],
681
782
  "responses": {
@@ -693,7 +794,24 @@
693
794
  }
694
795
  },
695
796
  "404": {
696
- "description": "No definition found"
797
+ "description": "Flow template not found",
798
+ "content": {
799
+ "application/json": {
800
+ "schema": {
801
+ "$ref": "#/components/schemas/DefinitionNotFoundResp"
802
+ }
803
+ }
804
+ }
805
+ },
806
+ "500": {
807
+ "description": "Internal server error",
808
+ "content": {
809
+ "application/json": {
810
+ "schema": {
811
+ "$ref": "#/components/schemas/ErrorResp"
812
+ }
813
+ }
814
+ }
697
815
  }
698
816
  }
699
817
  }
@@ -702,7 +820,7 @@
702
820
  "post": {
703
821
  "operationId": "duplicateFlowTemplate",
704
822
  "summary": "duplicateFlowTemplate",
705
- "description": "Duplicate a Flow Template from an existing workflow.",
823
+ "description": "Create a copy of an existing flow template. The duplicated template will have a new\nunique identifier and can be modified independently of the original. This is useful\nfor creating variations of existing workflows without starting from scratch.\n",
706
824
  "tags": [
707
825
  "Flows V2"
708
826
  ],
@@ -713,7 +831,8 @@
713
831
  "schema": {
714
832
  "$ref": "#/components/schemas/FlowTemplateId"
715
833
  },
716
- "required": true
834
+ "required": true,
835
+ "description": "Unique identifier of the flow template to duplicate."
717
836
  }
718
837
  ],
719
838
  "responses": {
@@ -728,7 +847,7 @@
728
847
  }
729
848
  },
730
849
  "400": {
731
- "description": "Validation Errors",
850
+ "description": "Validation errors - source template contains invalid data",
732
851
  "content": {
733
852
  "application/json": {
734
853
  "schema": {
@@ -738,7 +857,7 @@
738
857
  }
739
858
  },
740
859
  "401": {
741
- "description": "Authentication Errors",
860
+ "description": "Authentication failed - invalid or missing Bearer token",
742
861
  "content": {
743
862
  "application/json": {
744
863
  "schema": {
@@ -747,8 +866,18 @@
747
866
  }
748
867
  }
749
868
  },
869
+ "404": {
870
+ "description": "Source flow template not found",
871
+ "content": {
872
+ "application/json": {
873
+ "schema": {
874
+ "$ref": "#/components/schemas/DefinitionNotFoundResp"
875
+ }
876
+ }
877
+ }
878
+ },
750
879
  "500": {
751
- "description": "Other errors",
880
+ "description": "Internal server error",
752
881
  "content": {
753
882
  "application/json": {
754
883
  "schema": {
@@ -1106,7 +1235,7 @@
1106
1235
  "type": "string"
1107
1236
  },
1108
1237
  "required": true,
1109
- "description": "Id of the definition to de deleted.",
1238
+ "description": "Unique identifier of the workflow definition to be deleted.",
1110
1239
  "example": "CustomerRequest"
1111
1240
  }
1112
1241
  ],
@@ -1143,7 +1272,7 @@
1143
1272
  "type": "boolean"
1144
1273
  },
1145
1274
  "required": false,
1146
- "description": "Filter Closing Reasons by status like active inactiv",
1275
+ "description": "When set to true, includes inactive closing reasons in the response. By default, only active closing reasons are returned.",
1147
1276
  "example": true
1148
1277
  }
1149
1278
  ],
@@ -1588,6 +1717,18 @@
1588
1717
  }
1589
1718
  },
1590
1719
  "components": {
1720
+ "parameters": {
1721
+ "EnforceLimitsParam": {
1722
+ "in": "query",
1723
+ "name": "enforce_limits",
1724
+ "required": false,
1725
+ "schema": {
1726
+ "type": "boolean",
1727
+ "default": false
1728
+ },
1729
+ "description": "When true, size/count limit violations (max incoming edges per task, max branches, max entity-sync rules, ...) are enforced as 400 errors. Used by the flow-builder UI for interactive authoring. On update, pre-existing violations are tolerated as long as the request does not worsen them. When false or absent (default for API/system callers such as blueprints, configuration hub and snapshots), limit violations are accepted and returned as `limit_warnings`. Structural errors are always enforced regardless of this flag."
1730
+ }
1731
+ },
1591
1732
  "securitySchemes": {
1592
1733
  "BearerAuth": {
1593
1734
  "type": "http",
@@ -1598,6 +1739,7 @@
1598
1739
  "schemas": {
1599
1740
  "FlowTemplateBase": {
1600
1741
  "type": "object",
1742
+ "description": "Base schema for V2 flow templates. A flow template defines the structure of a workflow\nincluding phases, tasks, edges, triggers, and other configuration. Flow templates serve\nas blueprints that can be instantiated as flow executions.\n",
1601
1743
  "required": [
1602
1744
  "name",
1603
1745
  "tasks",
@@ -1605,16 +1747,22 @@
1605
1747
  ],
1606
1748
  "properties": {
1607
1749
  "id": {
1608
- "type": "string"
1750
+ "type": "string",
1751
+ "description": "Unique identifier for the flow template, generated by the system."
1609
1752
  },
1610
1753
  "org_id": {
1611
- "type": "string"
1754
+ "type": "string",
1755
+ "description": "Organization identifier that owns this flow template."
1612
1756
  },
1613
1757
  "name": {
1614
- "type": "string"
1758
+ "type": "string",
1759
+ "description": "Display name for the workflow, shown to users in the UI.",
1760
+ "minLength": 3
1615
1761
  },
1616
1762
  "description": {
1617
- "type": "string"
1763
+ "type": "string",
1764
+ "description": "Optional detailed description of the workflow's purpose and behavior.",
1765
+ "maxLength": 5000
1618
1766
  },
1619
1767
  "trigger": {
1620
1768
  "$ref": "#/components/schemas/Trigger"
@@ -1715,6 +1863,64 @@
1715
1863
  "items": {
1716
1864
  "type": "string"
1717
1865
  }
1866
+ },
1867
+ "linear": {
1868
+ "type": "boolean",
1869
+ "description": "When true, this is a linear flow: task enablement is computed at runtime from the graph — a task is enabled only when all of its direct predecessor tasks in its branch are done. This fully overrides any explicit per-task requirements."
1870
+ },
1871
+ "limit_warnings": {
1872
+ "type": "array",
1873
+ "description": "Non-blocking warnings for configuration limits the flow exceeds. Returned on read (get-flow) and on create/update responses. Size/count limits are soft: a flow exceeding them is still accepted and stored, and the violations are reported here so the UI can surface an informational banner. The flow is still fully editable and usable.",
1874
+ "items": {
1875
+ "$ref": "#/components/schemas/FlowLimitWarning"
1876
+ }
1877
+ }
1878
+ }
1879
+ },
1880
+ "FlowLimitWarning": {
1881
+ "type": "object",
1882
+ "description": "A configuration limit that the flow currently exceeds. Returned by the get-flow endpoint and by create/update responses so the UI can show a non-blocking banner. Size/count limit violations never cause a 400 — only structural errors do. The flow remains fully usable; users are encouraged to bring values within the limits.",
1883
+ "required": [
1884
+ "i18nKey",
1885
+ "message",
1886
+ "max",
1887
+ "path"
1888
+ ],
1889
+ "properties": {
1890
+ "i18nKey": {
1891
+ "type": "string",
1892
+ "description": "i18n key identifying the exceeded limit (e.g. errors.task_max_incoming_edges)."
1893
+ },
1894
+ "message": {
1895
+ "type": "string",
1896
+ "description": "Human-readable description of the exceeded limit."
1897
+ },
1898
+ "max": {
1899
+ "type": "number",
1900
+ "description": "The configured maximum for this limit."
1901
+ },
1902
+ "current": {
1903
+ "type": "number",
1904
+ "description": "The actual value the flow currently has for this limit (e.g. the actual number of incoming connections)."
1905
+ },
1906
+ "node_id": {
1907
+ "type": "string",
1908
+ "description": "ID of the task/node the limit applies to, when applicable."
1909
+ },
1910
+ "task_name": {
1911
+ "type": "string"
1912
+ },
1913
+ "branch_name": {
1914
+ "type": "string"
1915
+ },
1916
+ "param_name": {
1917
+ "type": "string",
1918
+ "description": "Name of the AI-agent parameter the limit applies to, when applicable."
1919
+ },
1920
+ "path": {
1921
+ "type": "array",
1922
+ "items": {},
1923
+ "description": "JSON path within the flow to the offending value."
1718
1924
  }
1719
1925
  }
1720
1926
  },
@@ -2159,7 +2365,8 @@
2159
2365
  ]
2160
2366
  },
2161
2367
  "duration": {
2162
- "type": "number"
2368
+ "type": "number",
2369
+ "minimum": 1
2163
2370
  },
2164
2371
  "unit": {
2165
2372
  "$ref": "#/components/schemas/TimeUnit"
@@ -2182,7 +2389,8 @@
2182
2389
  ]
2183
2390
  },
2184
2391
  "duration": {
2185
- "type": "number"
2392
+ "type": "number",
2393
+ "minimum": 1
2186
2394
  },
2187
2395
  "unit": {
2188
2396
  "$ref": "#/components/schemas/TimeUnit"
@@ -2273,8 +2481,7 @@
2273
2481
  "type": "integer",
2274
2482
  "description": "Maximum number of iterations for the loop branch",
2275
2483
  "default": 3,
2276
- "minimum": 1,
2277
- "maximum": 100
2484
+ "minimum": 1
2278
2485
  }
2279
2486
  },
2280
2487
  "required": [
@@ -2473,7 +2680,6 @@
2473
2680
  "branch_name": {
2474
2681
  "type": "string",
2475
2682
  "description": "The name of the branch",
2476
- "maxLength": 255,
2477
2683
  "example": "Branch 1"
2478
2684
  },
2479
2685
  "logical_operator": {
@@ -2597,6 +2803,22 @@
2597
2803
  "deleted"
2598
2804
  ]
2599
2805
  },
2806
+ "attributes": {
2807
+ "type": "array",
2808
+ "maxItems": 10,
2809
+ "items": {
2810
+ "type": "string"
2811
+ },
2812
+ "description": "Multi-attribute mode. When present and length > 1, the statement is\nevaluated against every listed attribute and combined via\n`attributes_match`. All listed attributes must share the same\n`attribute_type`. Mutually exclusive with `attribute_sub_field`,\n`date_offset`, and `attribute_operation`. When absent or length === 1,\nthe legacy `attribute` field is used.\n"
2813
+ },
2814
+ "attributes_match": {
2815
+ "type": "string",
2816
+ "enum": [
2817
+ "any",
2818
+ "all"
2819
+ ],
2820
+ "description": "Inner connector across `attributes`. `any` (default) means at least\none attribute must satisfy the operator; `all` means every attribute\nmust satisfy it. Ignored when `attributes` is absent or has length < 2.\n"
2821
+ },
2600
2822
  "attribute_sub_field": {
2601
2823
  "type": "string",
2602
2824
  "description": "For complex attribute types, specifies which sub-field to extract (e.g., \"address\", \"name\", \"email_type\")"
@@ -2681,7 +2903,8 @@
2681
2903
  "hours",
2682
2904
  "days",
2683
2905
  "weeks",
2684
- "months"
2906
+ "months",
2907
+ "years"
2685
2908
  ]
2686
2909
  },
2687
2910
  "EnableRequirement": {
@@ -2710,15 +2933,19 @@
2710
2933
  },
2711
2934
  "WorkflowDefinition": {
2712
2935
  "type": "object",
2936
+ "description": "V1 workflow definition schema. Defines a linear workflow structure with sections\nand steps. Sections group related steps together, and steps represent individual\ntasks that need to be completed. This is the legacy workflow model; for new\nimplementations, consider using V2 flow templates instead.\n",
2713
2937
  "properties": {
2714
2938
  "id": {
2715
- "type": "string"
2939
+ "type": "string",
2940
+ "description": "Unique identifier for the workflow definition, generated by the system."
2716
2941
  },
2717
2942
  "name": {
2718
- "type": "string"
2943
+ "type": "string",
2944
+ "description": "Display name for the workflow, shown to users in the UI."
2719
2945
  },
2720
2946
  "description": {
2721
- "type": "string"
2947
+ "type": "string",
2948
+ "description": "Optional detailed description of the workflow's purpose and behavior."
2722
2949
  },
2723
2950
  "creationTime": {
2724
2951
  "type": "string",
@@ -3029,7 +3256,8 @@
3029
3256
  "type": "boolean"
3030
3257
  },
3031
3258
  "value": {
3032
- "type": "string"
3259
+ "type": "string",
3260
+ "maxLength": 10000
3033
3261
  }
3034
3262
  }
3035
3263
  },
@@ -3045,18 +3273,24 @@
3045
3273
  }
3046
3274
  },
3047
3275
  "DefinitionNotFoundResp": {
3048
- "description": "Definition could be not found",
3276
+ "type": "object",
3277
+ "description": "Error response returned when a workflow definition or flow template is not found.",
3049
3278
  "properties": {
3050
3279
  "message": {
3051
- "type": "string"
3280
+ "type": "string",
3281
+ "description": "Human-readable message indicating the resource was not found.",
3282
+ "example": "Definition with id 'abc123' not found"
3052
3283
  }
3053
3284
  }
3054
3285
  },
3055
3286
  "ClosingReasonNotFoundResp": {
3056
- "description": "Closing reason could be not found",
3287
+ "type": "object",
3288
+ "description": "Error response returned when a closing reason is not found.",
3057
3289
  "properties": {
3058
3290
  "message": {
3059
- "type": "string"
3291
+ "type": "string",
3292
+ "description": "Human-readable message indicating the closing reason was not found.",
3293
+ "example": "Closing reason with id 'xyz789' not found"
3060
3294
  }
3061
3295
  }
3062
3296
  },
@@ -3143,9 +3377,12 @@
3143
3377
  },
3144
3378
  "ErrorResp": {
3145
3379
  "type": "object",
3380
+ "description": "Standard error response returned when an API request fails.",
3146
3381
  "properties": {
3147
3382
  "message": {
3148
- "type": "string"
3383
+ "type": "string",
3384
+ "description": "Human-readable error message describing what went wrong.",
3385
+ "example": "Invalid request body: name is required"
3149
3386
  }
3150
3387
  }
3151
3388
  },
@@ -3296,11 +3533,12 @@
3296
3533
  ]
3297
3534
  },
3298
3535
  "DynamicDueDate": {
3299
- "description": "set a Duedate for a step then a specific",
3536
+ "description": "Configuration for calculating a due date dynamically based on workflow events.\nThe due date is computed by adding a duration (numberOfUnits + timePeriod) to\na reference point defined by actionTypeCondition (e.g., when workflow started,\nwhen a step closed, or when a phase finished).\n",
3300
3537
  "type": "object",
3301
3538
  "properties": {
3302
3539
  "numberOfUnits": {
3303
- "type": "number"
3540
+ "type": "number",
3541
+ "description": "Number of time units to add to the reference point."
3304
3542
  },
3305
3543
  "timePeriod": {
3306
3544
  "$ref": "#/components/schemas/TimeUnit"
@@ -3507,6 +3507,10 @@
3507
3507
  "singleClosingReasonSelection": {
3508
3508
  "type": "boolean",
3509
3509
  "description": "Indicates whether only a single closing reason can be selected when closing the flow execution"
3510
+ },
3511
+ "linear": {
3512
+ "type": "boolean",
3513
+ "description": "Copied from the flow template at start. When true, task enablement is computed at runtime from the graph (a task is enabled only when all of its direct predecessor tasks in its branch are done) instead of from each task's explicit requirements."
3510
3514
  }
3511
3515
  }
3512
3516
  },
@@ -3751,6 +3755,10 @@
3751
3755
  "scheduled_at": {
3752
3756
  "type": "string",
3753
3757
  "description": "The resolved absolute timestamp (ISO 8601, UTC) at which the task is\narmed to run. Set by the backend when the schedule is armed and the\ntask transitions to SCHEDULED. Absent while the task is still\npending/unscheduled.\n\nNote: intentionally typed as plain `string` (not\n`format: date-time`). `schedule` is embedded in the AutomationTask /\nDecisionTask schemas; if a future request body ever accepts a task\n(or schedule) and `safeParse`s it, `format: date-time` would make\nopenapi-zod-client emit `z.string().datetime({ offset: true })` and\nreject any round-tripped value that is empty or tz-less — the exact\nmechanism behind the May 2026 due_date incident (513ed597 added the\nformat, ee574b43 activated it via an unrelated regen; see commit\n2c91ff35). This field is server-written via `toISOString()` so it is\nalways a valid UTC instant; the datetime validator adds no\nprotection, only latent risk.\n"
3758
+ },
3759
+ "error_reason": {
3760
+ "type": "string",
3761
+ "description": "Set by the backend when scheduling this task FAILED (e.g. the\nreferenced date attribute is empty/unreadable, or the resolved fire\ntime is already in the past). A JSON string\n({ error_code, error_reason, error_info }) describing why, so the UI\ncan show a specific warning and ask the user to fix the date\nattribute and re-schedule. Cleared when the task is successfully\n(re-)armed. This is the decision-task counterpart of\nAutomationInfo.error_reason (decision tasks have no automation_config).\n"
3754
3762
  }
3755
3763
  }
3756
3764
  },
@@ -3812,6 +3820,10 @@
3812
3820
  "scheduled_at": {
3813
3821
  "type": "string",
3814
3822
  "description": "The resolved absolute timestamp (ISO 8601, UTC) at which the task is\narmed to run. Set by the backend when the schedule is armed and the\ntask transitions to SCHEDULED. Absent while the task is still\npending/unscheduled.\n\nNote: intentionally typed as plain `string` (not\n`format: date-time`). `schedule` is embedded in the AutomationTask /\nDecisionTask schemas; if a future request body ever accepts a task\n(or schedule) and `safeParse`s it, `format: date-time` would make\nopenapi-zod-client emit `z.string().datetime({ offset: true })` and\nreject any round-tripped value that is empty or tz-less — the exact\nmechanism behind the May 2026 due_date incident (513ed597 added the\nformat, ee574b43 activated it via an unrelated regen; see commit\n2c91ff35). This field is server-written via `toISOString()` so it is\nalways a valid UTC instant; the datetime validator adds no\nprotection, only latent risk.\n"
3823
+ },
3824
+ "error_reason": {
3825
+ "type": "string",
3826
+ "description": "Set by the backend when scheduling this task FAILED (e.g. the\nreferenced date attribute is empty/unreadable, or the resolved fire\ntime is already in the past). A JSON string\n({ error_code, error_reason, error_info }) describing why, so the UI\ncan show a specific warning and ask the user to fix the date\nattribute and re-schedule. Cleared when the task is successfully\n(re-)armed. This is the decision-task counterpart of\nAutomationInfo.error_reason (decision tasks have no automation_config).\n"
3815
3827
  }
3816
3828
  },
3817
3829
  "required": [