@epilot/cli 0.1.225 → 0.1.227

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.
Files changed (79) hide show
  1. package/README.md +1 -1
  2. package/definitions/automation.json +294 -17
  3. package/definitions/workflow-definition.json +686 -12
  4. package/definitions/workflow.json +4072 -1386
  5. package/dist/{access-token-EGGQKOTG.js → access-token-SS3WPAZ5.js} +2 -2
  6. package/dist/{add-component-DE5C5HP6.js → add-component-PYNASDUG.js} +2 -2
  7. package/dist/{add-function-KZNQBM2N.js → add-function-NLT3RIMJ.js} +2 -2
  8. package/dist/{address-6V3M2FT6.js → address-5R3FQ6PP.js} +2 -2
  9. package/dist/{address-suggestions-WT66C5MV.js → address-suggestions-QRMH4NZX.js} +2 -2
  10. package/dist/{ai-agents-E5TVWHO3.js → ai-agents-MF2REJ5T.js} +2 -2
  11. package/dist/{api-3SSFBNXN.js → api-RF4PGU4P.js} +2 -2
  12. package/dist/app-REANZB24.js +26 -0
  13. package/dist/{audit-logs-YU5HJET7.js → audit-logs-RQPVSMUT.js} +2 -2
  14. package/dist/{automation-7CVHYCQL.js → automation-VZ52QFRU.js} +2 -2
  15. package/dist/{billing-TC72LEEP.js → billing-RC5JQ4JP.js} +2 -2
  16. package/dist/bin/epilot.js +61 -61
  17. package/dist/{blueprint-manifest-B3KBMHMJ.js → blueprint-manifest-G2E5E54S.js} +2 -2
  18. package/dist/{calendar-O4LL3PEQ.js → calendar-DXEZ4WA4.js} +2 -2
  19. package/dist/{chat-GBUTYEGT.js → chat-ZGZCCJ7Q.js} +2 -2
  20. package/dist/{chunk-TZ7FZ6QN.js → chunk-5Z4VSOXF.js} +10 -1
  21. package/dist/{chunk-FY2K462D.js → chunk-KBOM2C2N.js} +1 -1
  22. package/dist/{chunk-YL3LWVAP.js → chunk-LLRRUUM3.js} +1 -1
  23. package/dist/{chunk-N4VZYUPA.js → chunk-OV6COART.js} +1 -1
  24. package/dist/{completion-JEV2CM5B.js → completion-ESOBED6Z.js} +1 -1
  25. package/dist/{configuration-hub-JPFOAGVC.js → configuration-hub-BDGPSNUH.js} +2 -2
  26. package/dist/{consent-IWFZ62OQ.js → consent-XTNOSERD.js} +2 -2
  27. package/dist/{customer-portal-WE2BPJGR.js → customer-portal-C3LCYKZD.js} +2 -2
  28. package/dist/{dashboard-XNZFLZKW.js → dashboard-63WXGHZJ.js} +2 -2
  29. package/dist/{data-governance-U6RYWHBH.js → data-governance-COTDAWI6.js} +2 -2
  30. package/dist/{deduplication-U5FX7ZEE.js → deduplication-IVU7DSZZ.js} +2 -2
  31. package/dist/{deploy-VK2YLEPG.js → deploy-MPXHM63D.js} +2 -2
  32. package/dist/{design-HVFXGGTL.js → design-D2EEQJZX.js} +2 -2
  33. package/dist/{dev-54LKYWCY.js → dev-SJFKUWOH.js} +2 -2
  34. package/dist/{document-2KG3GOZE.js → document-4WNVGETG.js} +2 -2
  35. package/dist/{email-settings-NWJFP5OH.js → email-settings-X4GACOAX.js} +2 -2
  36. package/dist/{email-template-XJ7HSEG2.js → email-template-7VSEGU4P.js} +2 -2
  37. package/dist/{entity-CCKBATR3.js → entity-P66ACAWO.js} +2 -2
  38. package/dist/{entity-mapping-PPHMB5A5.js → entity-mapping-BZKXX2ME.js} +2 -2
  39. package/dist/{environments-SXSDTNXE.js → environments-S6SD7IK3.js} +2 -2
  40. package/dist/{event-catalog-LQ7VAFFC.js → event-catalog-N6CEHH6J.js} +2 -2
  41. package/dist/{export-OMJ7DPBL.js → export-V3XJIRFH.js} +2 -2
  42. package/dist/{external-values-SZVZQT4G.js → external-values-GRO2RE5A.js} +2 -2
  43. package/dist/{file-LAVUPKWL.js → file-YMPEQBN6.js} +2 -2
  44. package/dist/{iban-GKWHXXZF.js → iban-4O3DR337.js} +2 -2
  45. package/dist/{identity-XNCEJNPY.js → identity-Q2GD4MMA.js} +2 -2
  46. package/dist/{init-FZZIHN43.js → init-JCZXCOMB.js} +2 -2
  47. package/dist/{integration-toolkit-QHACL7C6.js → integration-toolkit-CLJD5G45.js} +2 -2
  48. package/dist/{journey-5BGAQLPS.js → journey-YFVYLVHY.js} +2 -2
  49. package/dist/{kanban-CSFG3EH4.js → kanban-OAATTS42.js} +2 -2
  50. package/dist/{message-NVPTDZJU.js → message-5ZDKQJJY.js} +2 -2
  51. package/dist/{metering-NGHTNG2I.js → metering-IKDZODBR.js} +2 -2
  52. package/dist/{notes-WG4PIMJD.js → notes-H3NU7WTD.js} +2 -2
  53. package/dist/{notification-3ESG7PUF.js → notification-XTXQCR23.js} +2 -2
  54. package/dist/{organization-3NF7KIBD.js → organization-ML2YXZRQ.js} +2 -2
  55. package/dist/{partner-directory-USGXNAMU.js → partner-directory-MMWDBSAA.js} +2 -2
  56. package/dist/{permissions-REXSZYVQ.js → permissions-7OTJMGXG.js} +2 -2
  57. package/dist/{phone-integration-DVIGW3FC.js → phone-integration-37A6KEY2.js} +2 -2
  58. package/dist/{pricing-YNLHQLPW.js → pricing-JTLURJLZ.js} +2 -2
  59. package/dist/{pricing-tier-AQTPWT6A.js → pricing-tier-IPZWUWDR.js} +2 -2
  60. package/dist/{purpose-ASWITR4N.js → purpose-K5SDMPL4.js} +2 -2
  61. package/dist/{query-PWNIBQYC.js → query-FV2WYICW.js} +2 -2
  62. package/dist/{remove-component-5NMUQW32.js → remove-component-VWHUDNXR.js} +2 -2
  63. package/dist/{review-CKENQSJ4.js → review-XKFIVRGT.js} +2 -2
  64. package/dist/{sandbox-F3U4HZYW.js → sandbox-ZCHKGXGM.js} +2 -2
  65. package/dist/{sharing-D65YTWAD.js → sharing-POIRHU27.js} +2 -2
  66. package/dist/{snapshot-ZJXWZQ73.js → snapshot-PSW5NMXT.js} +2 -2
  67. package/dist/{submission-HDMIWIX6.js → submission-MUJUQO47.js} +2 -2
  68. package/dist/{targeting-RU6IZP53.js → targeting-GBTFFKLI.js} +2 -2
  69. package/dist/{template-variables-QE4FQT7Z.js → template-variables-OSSB7I6T.js} +2 -2
  70. package/dist/{upgrade-ROY3C4ZU.js → upgrade-4Y5HQOGB.js} +1 -1
  71. package/dist/{user-ALTWMPIT.js → user-O3EWNWRP.js} +2 -2
  72. package/dist/{validate-DUFVFZXO.js → validate-KAZGQ7IO.js} +2 -2
  73. package/dist/{validation-rules-EBMKMB7R.js → validation-rules-SHS47LNY.js} +2 -2
  74. package/dist/{versions-JPMDD5W3.js → versions-JZ3UIVFE.js} +2 -2
  75. package/dist/{webhooks-SF7B4CKN.js → webhooks-WSNR2AYE.js} +2 -2
  76. package/dist/{workflow-OXZOCOVF.js → workflow-G5QO3A2L.js} +2 -2
  77. package/dist/{workflow-definition-A4RLIUYY.js → workflow-definition-QUKYUO6R.js} +2 -2
  78. package/package.json +1 -1
  79. package/dist/app-OGKT2I7U.js +0 -26
package/README.md CHANGED
@@ -29,7 +29,7 @@ npm install -g @epilot/cli
29
29
 
30
30
  <!-- usage-help -->
31
31
  ```
32
- epilot v0.1.225 — CLI for epilot APIs
32
+ epilot v0.1.227 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -721,7 +721,7 @@
721
721
  "get": {
722
722
  "operationId": "getBulkJob",
723
723
  "summary": "getBulkJob",
724
- "description": "Get the status of a bulk job that triggers multiple automation executions",
724
+ "description": "Get the status of a bulk job that triggers multiple automation executions.\n\n`execution_stats` always holds the complete counts per execution status. `execution_summary` is bounded\nto a few MB for very large jobs (`execution_summary_truncated: true`) and can be left out entirely with\n`include_execution_summary=false`.\n",
725
725
  "parameters": [
726
726
  {
727
727
  "name": "job_id",
@@ -730,6 +730,15 @@
730
730
  "$ref": "#/components/schemas/JobId"
731
731
  },
732
732
  "required": true
733
+ },
734
+ {
735
+ "name": "include_execution_summary",
736
+ "in": "query",
737
+ "description": "Set to `false` to only get the job with its `execution_stats`, without the execution items",
738
+ "schema": {
739
+ "type": "boolean",
740
+ "default": true
741
+ }
733
742
  }
734
743
  ],
735
744
  "tags": [
@@ -757,7 +766,7 @@
757
766
  "patch": {
758
767
  "operationId": "patchBulkJob",
759
768
  "summary": "patchBulkJob",
760
- "description": "Approve / Cancel bulk job that triggers multiple automation executions",
769
+ "description": "Approve / Cancel / Restart a bulk job that triggers multiple automation executions.\n\nA `failed` or `cancelled` job can be restarted with the `RESTART` action: it continues where it left off,\nonly triggering the entities whose executions were not started yet.\n",
761
770
  "parameters": [
762
771
  {
763
772
  "name": "job_id",
@@ -933,6 +942,9 @@
933
942
  "/v1/automation/public/executions:resume": {
934
943
  "post": {
935
944
  "operationId": "resumeExecutionWithToken",
945
+ "x-epilot-agent": {
946
+ "expose": false
947
+ },
936
948
  "summary": "resumeExecutionWithToken",
937
949
  "description": "Resume a paused automation execution using a unique resume token.\n\nThis public API is normally called when a user lands on a confirmation page via email link.\n\nExample link: https://automation.epilot.io/confirm-email?token=eyJraWQiOiJrZXkifQ...\n",
938
950
  "tags": [
@@ -1400,6 +1412,9 @@
1400
1412
  {
1401
1413
  "$ref": "#/components/schemas/ReceivedEmailTrigger"
1402
1414
  },
1415
+ {
1416
+ "$ref": "#/components/schemas/SentEmailTrigger"
1417
+ },
1403
1418
  {
1404
1419
  "$ref": "#/components/schemas/NewEmailThreadTrigger"
1405
1420
  },
@@ -2542,6 +2557,26 @@
2542
2557
  }
2543
2558
  ]
2544
2559
  },
2560
+ "LabelEmailAction": {
2561
+ "allOf": [
2562
+ {
2563
+ "$ref": "#/components/schemas/AutomationAction"
2564
+ },
2565
+ {
2566
+ "type": "object",
2567
+ "properties": {
2568
+ "type": {
2569
+ "enum": [
2570
+ "label-email"
2571
+ ]
2572
+ },
2573
+ "config": {
2574
+ "$ref": "#/components/schemas/LabelEmailConfig"
2575
+ }
2576
+ }
2577
+ }
2578
+ ]
2579
+ },
2545
2580
  "MoveThreadConfig": {
2546
2581
  "type": "object",
2547
2582
  "properties": {
@@ -2551,6 +2586,22 @@
2551
2586
  }
2552
2587
  }
2553
2588
  },
2589
+ "LabelEmailConfig": {
2590
+ "type": "object",
2591
+ "required": [
2592
+ "add"
2593
+ ],
2594
+ "properties": {
2595
+ "add": {
2596
+ "type": "array",
2597
+ "description": "Message label slugs to add, exactly as stored in the message entity's `_tags`. Labels already on the message are kept.\n",
2598
+ "minItems": 1,
2599
+ "items": {
2600
+ "type": "string"
2601
+ }
2602
+ }
2603
+ }
2604
+ },
2554
2605
  "AssignThreadConfig": {
2555
2606
  "type": "object",
2556
2607
  "properties": {
@@ -2624,6 +2675,15 @@
2624
2675
  "items": {
2625
2676
  "type": "string"
2626
2677
  }
2678
+ },
2679
+ "write_mode": {
2680
+ "type": "string",
2681
+ "description": "How the resolved assignees combine with the thread's current assignees.\nApplies in every `assignment_type`, after routing and fallback have\npicked the user(s).\n- append: add the resolved assignees and remove those in `remove`,\n keeping everyone else (default).\n- replace: the thread ends up assigned to exactly the resolved\n assignees (`add` minus `remove` for direct; the picked user or the\n fallback assignees otherwise). Existing user and group assignees\n not in that list are removed.\nIgnored when nothing is written (e.g. `leave_unassigned` fallback).\n",
2682
+ "enum": [
2683
+ "append",
2684
+ "replace"
2685
+ ],
2686
+ "default": "append"
2627
2687
  }
2628
2688
  }
2629
2689
  },
@@ -2669,6 +2729,20 @@
2669
2729
  "type"
2670
2730
  ]
2671
2731
  },
2732
+ "EntityAssigneeVariable": {
2733
+ "type": "object",
2734
+ "description": "An assignee resolved at execution time from a user-relation attribute of an\nentity in the automation context, e.g. `{{submission._owners}}`. Resolves\nagainst the entity being assigned or the triggering entity, whichever has\nthe given schema slug. The attribute may hold user ids, `{ org_id, user_id }`\nowners, groups or partner organizations. Direct assignment only.\n",
2735
+ "properties": {
2736
+ "variable": {
2737
+ "type": "string",
2738
+ "description": "Expression of the form `{{schema.attribute}}`.",
2739
+ "example": "{{submission._owners}}"
2740
+ }
2741
+ },
2742
+ "required": [
2743
+ "variable"
2744
+ ]
2745
+ },
2672
2746
  "AssignEntityConfig": {
2673
2747
  "type": "object",
2674
2748
  "properties": {
@@ -2678,14 +2752,21 @@
2678
2752
  },
2679
2753
  "assignees": {
2680
2754
  "type": "array",
2681
- "description": "Assignees to write into `attribute`, in the order given.",
2755
+ "description": "Assignees to write into `attribute`, in the order given. Variable\nentries are resolved at execution time and expand to zero or more\nassignees.\n",
2682
2756
  "items": {
2683
- "$ref": "#/components/schemas/EntityAssignee"
2757
+ "oneOf": [
2758
+ {
2759
+ "$ref": "#/components/schemas/EntityAssignee"
2760
+ },
2761
+ {
2762
+ "$ref": "#/components/schemas/EntityAssigneeVariable"
2763
+ }
2764
+ ]
2684
2765
  }
2685
2766
  },
2686
2767
  "write_mode": {
2687
2768
  "type": "string",
2688
- "description": "How `assignees` combine with the attribute's current value.\n- replace: overwrite the attribute with `assignees` (default).\n- append: union with the existing assignees, de-duplicated, existing\n entries first. Two assignees are duplicates when their `type` and\n `org_id` both match and the identifier for that type matches:\n `user_id` for user and partner_user, `group_id` for group,\n `partner_id` for partner_organization. Scoping by `org_id` keeps\n assignees from different organizations distinct even when their\n identifiers coincide.\nHonoured in `direct` only; `sequential` always forces `replace`.\n",
2769
+ "description": "How `assignees` combine with the attribute's current value.\n- replace: overwrite the attribute with `assignees` (default).\n- append: union with the existing assignees, de-duplicated, existing\n entries first. Two assignees are duplicates when their `type` and\n `org_id` both match and the identifier for that type matches:\n `user_id` for user and partner_user, `group_id` for group,\n `partner_id` for partner_organization. Scoping by `org_id` keeps\n assignees from different organizations distinct even when their\n identifiers coincide.\nHonoured in every `assignment_type`; in `sequential` and\n`even_distribution` the selected user (or the fallback assignees)\ntake the place of `assignees`.\n",
2689
2770
  "enum": [
2690
2771
  "replace",
2691
2772
  "append"
@@ -2694,7 +2775,7 @@
2694
2775
  },
2695
2776
  "assignment_type": {
2696
2777
  "type": "string",
2697
- "description": "How assignees are resolved. Omitted means `direct`.\n- direct: assign exactly the assignees listed in `assignees`.\n- sequential: round-robin over the members of `candidate_group`,\n selecting one user per execution. `assignees` is ignored and\n `write_mode` is forced to `replace`.\n- even_distribution: like sequential, but the member with the fewest\n matching entities wins; ties are resolved by the rotation.\n `workload_filter` narrows what counts as load.\n",
2778
+ "description": "How assignees are resolved. Omitted means `direct`.\n- direct: assign exactly the assignees listed in `assignees`.\n- sequential: round-robin over the users in `candidate_pool`,\n selecting one user per execution. `assignees` is ignored.\n- even_distribution: the user in `candidate_pool` with the fewest\n matching entities wins; ties are broken at random.\n `workload_filter` narrows what counts as load.\n",
2698
2779
  "enum": [
2699
2780
  "direct",
2700
2781
  "sequential",
@@ -2702,13 +2783,22 @@
2702
2783
  ],
2703
2784
  "default": "direct"
2704
2785
  },
2786
+ "candidate_pool": {
2787
+ "type": "array",
2788
+ "nullable": true,
2789
+ "description": "Users and groups whose members form the candidate set for\n`sequential` and `even_distribution`; ignored in `direct`. Groups\nexpand to their members and a user reached through several entries\nis a candidate once. Partner entries are ignored.\n`even_distribution` supports at most 200 distinct users once groups\nare expanded; beyond that the run fails.\nWhen absent or empty, `candidate_group` is used instead.\n",
2790
+ "items": {
2791
+ "$ref": "#/components/schemas/EntityAssignee"
2792
+ }
2793
+ },
2705
2794
  "candidate_group": {
2706
2795
  "allOf": [
2707
2796
  {
2708
2797
  "$ref": "#/components/schemas/EntityAssignee"
2709
2798
  }
2710
2799
  ],
2711
- "description": "The group whose members form the rotation. Must be `type: group`;\nignored in `direct`.\n"
2800
+ "deprecated": true,
2801
+ "description": "Deprecated: use `candidate_pool`. The group whose members form the\ncandidates, read only when `candidate_pool` is absent or empty. Must\nbe `type: group`; ignored in `direct`.\n"
2712
2802
  },
2713
2803
  "reset_interval": {
2714
2804
  "type": "string",
@@ -2740,7 +2830,7 @@
2740
2830
  },
2741
2831
  "match_user_skills": {
2742
2832
  "type": "boolean",
2743
- "description": "Candidate condition for `sequential` and `even_distribution`: when true,\nonly assign to users whose skills (tags) match a label on the entity\nbeing assigned. Opt-in; defaults to false. An entity carrying no\nnamespaced label matches nobody, so the fallback applies.\n",
2833
+ "description": "Candidate condition for `sequential` and `even_distribution`: when true,\nonly assign to users whose skills (tags) match a label on the entity\nbeing assigned. Opt-in; defaults to false. An entity carrying no\nnamespaced label matches nobody, so the fallback applies.\nWhen `required_skills` is non-empty, that filter runs first and this\nmatching narrows its result.\n",
2744
2834
  "default": false
2745
2835
  },
2746
2836
  "required_skill_categories": {
@@ -2750,6 +2840,27 @@
2750
2840
  "type": "string"
2751
2841
  }
2752
2842
  },
2843
+ "required_skills": {
2844
+ "type": "array",
2845
+ "description": "Candidate condition for `sequential` and `even_distribution`: skills a\nuser must have, as classification ids (`family:label`, e.g.\n`role:project-manager`), checked against the user's skills (tags) only,\ncase-insensitively; the entity's labels play no part, so an unlabelled\nentity can still be assigned. Applied whenever non-empty; independent of\n`match_user_skills`.\n",
2846
+ "maxItems": 100,
2847
+ "items": {
2848
+ "type": "string",
2849
+ "pattern": "^[^:]+:.+$"
2850
+ },
2851
+ "example": [
2852
+ "role:project-manager"
2853
+ ]
2854
+ },
2855
+ "required_skills_match_mode": {
2856
+ "type": "string",
2857
+ "description": "How strictly `required_skills` is matched. Independent of\n`skill_match_mode`.\n- require_all: a user must have every required skill (default).\n- prefer: users with the most required skills are eligible; a user\n with none of them is never eligible (the fallback then applies).\n",
2858
+ "enum": [
2859
+ "require_all",
2860
+ "prefer"
2861
+ ],
2862
+ "default": "require_all"
2863
+ },
2753
2864
  "skill_match_mode": {
2754
2865
  "type": "string",
2755
2866
  "description": "How strictly required skill categories are matched (applies with\nmatch_user_skills and required skill categories set).\n- require_all: hard match (default) — a user must match every required\n category the entity has a label in.\n- prefer: soft match — prefer the best-matching users, relaxing to\n fewer categories only when no better match exists; a user matching\n no category is never eligible (the fallback then applies).\n",
@@ -2761,7 +2872,7 @@
2761
2872
  },
2762
2873
  "fallback": {
2763
2874
  "type": "string",
2764
- "description": "What to do when no assignable principal resolves, e.g. an empty or\nfully ineligible `candidate_group`.\n- leave_unassigned: write nothing at all, leaving the attribute as it\n was. Not the same as writing an empty array, which would clear an\n existing assignment.\n- assign_to_fallback: write `fallback_assignees` instead.\n",
2875
+ "description": "What to do when no assignable principal resolves, e.g. an empty or\nfully ineligible `candidate_pool`.\n- leave_unassigned: write nothing at all, leaving the attribute as it\n was. Not the same as writing an empty array, which would clear an\n existing assignment.\n- assign_to_fallback: write `fallback_assignees` instead.\n",
2765
2876
  "enum": [
2766
2877
  "leave_unassigned",
2767
2878
  "assign_to_fallback"
@@ -3493,8 +3604,23 @@
3493
3604
  "TriggerShareEntityConfig": {
3494
3605
  "type": "object",
3495
3606
  "properties": {
3607
+ "operation": {
3608
+ "type": "string",
3609
+ "enum": [
3610
+ "share",
3611
+ "unshare"
3612
+ ],
3613
+ "default": "share",
3614
+ "description": "Whether the action shares the entity with partners or unshares it from them.\nUnsharing removes the entity together with all of its related resources from the partners.\n"
3615
+ },
3616
+ "unshare_all_partners": {
3617
+ "type": "boolean",
3618
+ "default": false,
3619
+ "description": "Only used when `operation` is `unshare`. When true, the entity is unshared from every partner\nit is currently shared with and `partner_org_ids` is ignored.\n"
3620
+ },
3496
3621
  "partner_org_ids": {
3497
3622
  "type": "array",
3623
+ "description": "Partner organizations to share the entity with, or to unshare it from",
3498
3624
  "items": {
3499
3625
  "type": "string"
3500
3626
  }
@@ -4304,7 +4430,7 @@
4304
4430
  },
4305
4431
  "entity_contexts": {
4306
4432
  "type": "array",
4307
- "description": "Additional entity contexts from the parent flow execution. Used when an automation is triggered from a workflow task to carry all flow contexts into the automation, not just the primary entity.\n",
4433
+ "description": "The contexts of the workflow execution whose task started this automation, as they were when the task ran: every entity that run works on, the one flagged is_primary being its main context. Any action of the automation may read them, e.g. assign-entity to find an entity of a given schema. Sent only for automations started by a workflow task.\n",
4308
4434
  "items": {
4309
4435
  "type": "object",
4310
4436
  "properties": {
@@ -4320,10 +4446,59 @@
4320
4446
  }
4321
4447
  }
4322
4448
  },
4449
+ "resolved_input": {
4450
+ "type": "object",
4451
+ "description": "The task's input settings, as the flow author configured them on the workflow task (input_context.with_relations and input_context.also_pass in the workflow definition), resolved to entities for this run. The automation's own entity is the task's main input and is not repeated here. Present only when the task configures these settings; when absent, every action keeps the legacy behaviour: the automation's entity comes with all of its direct relations, and a started workflow also receives every entity in entity_contexts.\n",
4452
+ "required": [
4453
+ "with_relations",
4454
+ "also_pass"
4455
+ ],
4456
+ "properties": {
4457
+ "with_relations": {
4458
+ "type": "boolean",
4459
+ "description": "Whether the automation's entity brings its direct relations along. Every action honours it: when false, the relations are not loaded, and a started workflow does not receive them as contexts.\n"
4460
+ },
4461
+ "also_pass": {
4462
+ "type": "array",
4463
+ "description": "Entities a start-workflow (trigger-workflow) action passes to the workflow it starts, on top of the automation's entity and, when with_relations is true, its relations. With resolved_input present, the started workflow receives exactly these: the entities in entity_contexts are not passed on.\n",
4464
+ "items": {
4465
+ "type": "object",
4466
+ "required": [
4467
+ "entity_id"
4468
+ ],
4469
+ "properties": {
4470
+ "entity_id": {
4471
+ "type": "string"
4472
+ },
4473
+ "entity_schema": {
4474
+ "type": "string"
4475
+ }
4476
+ }
4477
+ }
4478
+ }
4479
+ }
4480
+ },
4323
4481
  "trigger_user_id": {
4324
4482
  "type": "string",
4325
4483
  "description": "Id of the user on whose behalf the workflow task triggered this automation — the caller of a user-initiated run, or the user whose task completion advanced the flow to the automation task. Action workers resolve it as the acting user for template variable resolution (user.*) and email thread assignment, matching the attribution of manually triggered executions. Absent when no human action led to the trigger (scheduler fires, journey-triggered flows).\n",
4326
4484
  "example": "10006129"
4485
+ },
4486
+ "run_by": {
4487
+ "type": "object",
4488
+ "description": "[Internal] The person who ran the workflow task's automation, set by the workflows service only when a user (not the engine) runs it. org_id is that user's own organization, which differs from the flow's for partner users. Used to attribute what the automation does, e.g. who closed the flow. Not for external consumers: a start request carrying it under any token other than a platform service's is refused with 403 and nothing is stored.\n",
4489
+ "required": [
4490
+ "user_id"
4491
+ ],
4492
+ "properties": {
4493
+ "user_id": {
4494
+ "type": "string",
4495
+ "example": "10006129"
4496
+ },
4497
+ "org_id": {
4498
+ "type": "string",
4499
+ "example": "739224"
4500
+ }
4501
+ }
4327
4502
  }
4328
4503
  }
4329
4504
  },
@@ -4460,8 +4635,10 @@
4460
4635
  "properties": {
4461
4636
  "type": {
4462
4637
  "type": "string",
4638
+ "description": "The trigger that started the execution:\n- new_email_thread: the execution entity is the thread.\n- sent_email: the execution entity is the sent email (`message_id`).\n",
4463
4639
  "enum": [
4464
- "new_email_thread"
4640
+ "new_email_thread",
4641
+ "sent_email"
4465
4642
  ]
4466
4643
  },
4467
4644
  "org_id": {
@@ -4834,18 +5011,20 @@
4834
5011
  "properties": {
4835
5012
  "action": {
4836
5013
  "type": "string",
5014
+ "description": "* APPROVE: Start the approved bulk job. Requires the `task_token` of the job.\n* CANCEL: Cancel the bulk job. Executions that already started keep running.\n* RESTART: Restart a `failed` or `cancelled` bulk job and continue where it left off.\n Entities whose executions were not started yet are triggered, executions that already\n started or finished are left untouched. If the entities were not fully loaded yet, they are\n loaded again from scratch. A job that was never approved goes back to `approval`.\n",
4837
5015
  "enum": [
4838
5016
  "APPROVE",
4839
- "CANCEL"
5017
+ "CANCEL",
5018
+ "RESTART"
4840
5019
  ]
4841
5020
  },
4842
5021
  "task_token": {
4843
- "type": "string"
5022
+ "type": "string",
5023
+ "description": "Task token of the job. Required for the APPROVE action."
4844
5024
  }
4845
5025
  },
4846
5026
  "required": [
4847
- "action",
4848
- "task_token"
5027
+ "action"
4849
5028
  ]
4850
5029
  },
4851
5030
  "BulkTriggerRequest": {
@@ -4990,6 +5169,21 @@
4990
5169
  "type": "string",
4991
5170
  "description": "Entity ID of the report file entity"
4992
5171
  },
5172
+ "last_error": {
5173
+ "type": "string",
5174
+ "description": "Error that moved the job into the `failed` status. Cleared when the job is restarted.",
5175
+ "example": "ThrottlingException: Throughput exceeds the current capacity of your table or index."
5176
+ },
5177
+ "restart_count": {
5178
+ "type": "integer",
5179
+ "description": "How many times the job was restarted after failing or being cancelled",
5180
+ "example": 1
5181
+ },
5182
+ "restarted_at": {
5183
+ "type": "string",
5184
+ "description": "Time of the last restart of the job",
5185
+ "format": "date-time"
5186
+ },
4993
5187
  "entity_query": {
4994
5188
  "type": "object",
4995
5189
  "description": "Query configuration for loading entities",
@@ -5066,10 +5260,60 @@
5066
5260
  },
5067
5261
  "execution_summary": {
5068
5262
  "type": "array",
5069
- "description": "List of entities & their automation execution id & status",
5263
+ "description": "List of entities & their automation execution id & status.\n\nIn API responses the list is bounded to a few MB (see `execution_summary_truncated`); use\n`execution_stats` for complete counts.\n",
5070
5264
  "items": {
5071
5265
  "$ref": "#/components/schemas/ExecItem"
5072
5266
  }
5267
+ },
5268
+ "execution_stats": {
5269
+ "$ref": "#/components/schemas/ExecutionStats"
5270
+ },
5271
+ "execution_summary_truncated": {
5272
+ "type": "boolean",
5273
+ "description": "True when `execution_summary` does not contain all execution items of the job (the response was bounded,\nor the summary was not requested).\n"
5274
+ }
5275
+ }
5276
+ },
5277
+ "ExecutionStats": {
5278
+ "type": "object",
5279
+ "description": "Number of execution items of a bulk trigger job per execution status. Always complete.",
5280
+ "required": [
5281
+ "total"
5282
+ ],
5283
+ "properties": {
5284
+ "total": {
5285
+ "type": "integer",
5286
+ "example": 60582
5287
+ },
5288
+ "pending": {
5289
+ "type": "integer"
5290
+ },
5291
+ "starting": {
5292
+ "type": "integer"
5293
+ },
5294
+ "in_progress": {
5295
+ "type": "integer"
5296
+ },
5297
+ "success": {
5298
+ "type": "integer"
5299
+ },
5300
+ "failed": {
5301
+ "type": "integer"
5302
+ },
5303
+ "cancelled": {
5304
+ "type": "integer"
5305
+ },
5306
+ "skipped": {
5307
+ "type": "integer"
5308
+ },
5309
+ "paused": {
5310
+ "type": "integer"
5311
+ },
5312
+ "scheduled": {
5313
+ "type": "integer"
5314
+ },
5315
+ "hot": {
5316
+ "type": "integer"
5073
5317
  }
5074
5318
  }
5075
5319
  },
@@ -5269,6 +5513,7 @@
5269
5513
  ]
5270
5514
  },
5271
5515
  "NewEmailThreadTrigger": {
5516
+ "description": "Starts the flow when an email starts a new thread. The thread is the execution's entity.\n\nFor outbound threads, an email that failed to send or a bulk email does not start the flow,\nand neither does an email whose automation chain already contains the flow. A flow that\nsends emails itself (a send-email, reply-email or forward-email action) is not started for\noutbound threads at all, because its own emails could start it again.\n",
5272
5517
  "allOf": [
5273
5518
  {
5274
5519
  "$ref": "#/components/schemas/AutomationTrigger"
@@ -5347,6 +5592,38 @@
5347
5592
  }
5348
5593
  ]
5349
5594
  },
5595
+ "SentEmailTrigger": {
5596
+ "description": "Starts the flow for every email sent from epilot: emails and replies sent from the inbox,\nincluding replies sent from a draft, and emails sent by automations or Flows, except sends\nthat skip creating entities. The sent email is the execution's entity. The outgoing\ncounterpart of `received_email`.\n\nOnly a Flow's trigger can use it: the flow must have exactly one action, of type\n`trigger-workflow`. Any other flow with this trigger is rejected.\n\nAn email that failed to send, or a bulk email, does not start the flow. Neither does an email\nwhose automation chain already contains the flow, so a Flow isn't started again by emails its\nown run sends, also not through other Flows.\n\nEvery other sent email starts the flow, so a busy mailbox can reach the hot-flow limit; raise\nthe flow's `max_executions` if needed.\n",
5597
+ "allOf": [
5598
+ {
5599
+ "$ref": "#/components/schemas/AutomationTrigger"
5600
+ },
5601
+ {
5602
+ "type": "object",
5603
+ "properties": {
5604
+ "type": {
5605
+ "type": "string",
5606
+ "enum": [
5607
+ "sent_email"
5608
+ ]
5609
+ },
5610
+ "configuration": {
5611
+ "type": "object",
5612
+ "description": "The trigger has no options yet."
5613
+ }
5614
+ },
5615
+ "required": [
5616
+ "type",
5617
+ "configuration"
5618
+ ]
5619
+ }
5620
+ ],
5621
+ "example": {
5622
+ "id": "12d4f45a-1883-4841-a94c-5928cb338a94",
5623
+ "type": "sent_email",
5624
+ "configuration": {}
5625
+ }
5626
+ },
5350
5627
  "EntityOperationTrigger": {
5351
5628
  "description": "- If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.\n- The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`\n | Comparison | Example | Rule syntax |\n |------------------------|-----------------------------------------------------|----------------------------------------------------------|\n | Null | first_name is null | `\"first_name\": [ null ]` |\n | Empty | last_name is empty | `\"last_name\": [\"\"]` |\n | Equals | email is \"j.doe@email.com\" | `\"email\": [ \"j.doe@email.com\" ]` |\n | Equals (ignore case) | first_name is \"John\" | `\"first_name\": [ { \"equals-ignore-case\": \"john\" } ]` |\n | And | fist_name is \"John\" and last_name is \"Doe\" | `\"first_name\": [ \"John\" ], \"last_name\": [\"Doe\"]` |\n | Or | PaymentType is \"Invoice\" or \"SEPA\" | `\"PaymentType\": [ \"invoice\", \"sepa\"]` |\n | Or (multiple fields) | first_name is \"John\", or last_name is \"Doe\". | `\"$or\": [ { \"first_name\": [ \"John\" ] }, { \"last_name\": [ \"Doe\" ] } ]` |\n | Not | status is anything but \"cancelled\" | `\"status\": [ { \"anything-but\": [ \"cancelled\" ] } ]` |\n | Numeric (equals) | Price is 100 | `\"Price\": [ { \"numeric\": [ \"=\", 100 ] } ]` |\n | Numeric (range) | Price is more than 10, and less than or equal to 20 | `\"Price\": [ { \"numeric\": [ \">\", 10, \"<=\", 20 ] } ]` |\n | Exists | ProductName exists | `\"ProductName\": [ { \"exists\": true } ]` |\n | Does not exist | ProductName does not exist | `\"ProductName\": [ { \"exists\": false } ]` |\n | Begins with | OpportunityNumber starts with OPP- | `\"opportunity_number\": [ { \"prefix\": \"OPP-\" } ]` |\n | Ends with | FileName ends with a .png extension | `\"filename\": [ { \"suffix\": \".png\" } ]` |\n | Wildcard | search a string using a wildcard | `\"email\": [ { \"wildcard\": \"*@doe.com\" } ]` |\n - To run the execution on all update events\n ```\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"]\n }\n }\n }\n ```\n - To run the execution only when the updates are from a portal user\n ```\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"]\n },\n \"activity\": {\n \"type\": \"EntityUpdatedFromPortal\"\n }\n }\n }\n ```\n - To run the execution only when there is an update on a specific attribute\n ```\n Only starts the automation when the email on a contact is changed\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"],\n \"payload\": {\n \"_schema\": [\"contact\"]\n },\n \"diff\": {\n \"updated\": {\n \"email\": [{ \"exists\": true }]\n }\n }\n }\n }\n }\n ```\n - To run the execution only when a specific attribute is altered(created/updated/deleted)\n ```\n Only starts the automation when a price is altered on a contract\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"payload\": {\n \"_schema\": [\"contract\"]\n },\n \"diff\": {\n // Whether he first_name has been added, updated, or removed\n $or: [\n {\n 'added.first_name': [{ exists: true }]\n },\n {\n 'updated.first_name': [{ exists: true }]\n },\n {\n 'deleted.first_name': [{ exists: true }]\n }\n ]\n }\n }\n }\n }\n ```\n - To run the execution if an attribute is changed from one state to another\n ```\n Only starts the automation when the order status changes from `open_for_acceptance` to `placed`\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"],\n \"payload\": {\n \"_schema\": [\"order\"],\n \"status\": [\"placed\"]\n },\n \"diff\": {\n \"updated\": {\n \"status\": [\"open_for_acceptance\"]\n }\n }\n }\n }\n }\n ```\n",
5352
5629
  "allOf": [
@@ -5808,7 +6085,7 @@
5808
6085
  },
5809
6086
  "entity_node_id": {
5810
6087
  "type": "string",
5811
- "description": "Id of the cardinality-one node in the event's entity graph whose entity becomes the execution's main entity (the entity actions operate on).\n",
6088
+ "description": "Id of the node in the event's entity graph whose entity becomes the execution's main entity (the entity actions operate on). A repeatable (cardinality many) node may be chosen too: the first entity in the list becomes the main entity, and an event with an empty list does not start the flow.\n",
5812
6089
  "example": "ticket"
5813
6090
  },
5814
6091
  "entity_schema": {