@epilot/sdk 2.20.84 → 2.20.86

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 (161) hide show
  1. package/definitions/automation-runtime.json +1 -1
  2. package/definitions/automation.json +294 -17
  3. package/definitions/integration-toolkit.json +69 -2
  4. package/definitions/workflow-definition.json +686 -12
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +8 -8
  18. package/dist/apis/automation.d.cts +2 -2
  19. package/dist/apis/automation.d.ts +2 -2
  20. package/dist/apis/automation.js +2 -2
  21. package/dist/apis/billing.cjs +6 -6
  22. package/dist/apis/billing.js +1 -1
  23. package/dist/apis/blueprint-manifest.cjs +6 -6
  24. package/dist/apis/blueprint-manifest.js +1 -1
  25. package/dist/apis/calendar.cjs +6 -6
  26. package/dist/apis/calendar.js +1 -1
  27. package/dist/apis/chat.cjs +6 -6
  28. package/dist/apis/chat.js +1 -1
  29. package/dist/apis/configuration-hub.cjs +6 -6
  30. package/dist/apis/configuration-hub.js +1 -1
  31. package/dist/apis/consent.cjs +6 -6
  32. package/dist/apis/consent.js +1 -1
  33. package/dist/apis/customer-portal.cjs +6 -6
  34. package/dist/apis/customer-portal.js +1 -1
  35. package/dist/apis/dashboard.cjs +6 -6
  36. package/dist/apis/dashboard.js +1 -1
  37. package/dist/apis/data-governance.cjs +6 -6
  38. package/dist/apis/data-governance.js +1 -1
  39. package/dist/apis/deduplication.cjs +6 -6
  40. package/dist/apis/deduplication.js +1 -1
  41. package/dist/apis/design.cjs +6 -6
  42. package/dist/apis/design.js +1 -1
  43. package/dist/apis/document.cjs +6 -6
  44. package/dist/apis/document.js +1 -1
  45. package/dist/apis/email-settings.cjs +6 -6
  46. package/dist/apis/email-settings.js +1 -1
  47. package/dist/apis/email-template.cjs +6 -6
  48. package/dist/apis/email-template.js +1 -1
  49. package/dist/apis/entity-mapping.cjs +6 -6
  50. package/dist/apis/entity-mapping.js +1 -1
  51. package/dist/apis/entity.cjs +6 -6
  52. package/dist/apis/entity.js +1 -1
  53. package/dist/apis/environments.cjs +6 -6
  54. package/dist/apis/environments.js +1 -1
  55. package/dist/apis/event-catalog.cjs +6 -6
  56. package/dist/apis/event-catalog.js +1 -1
  57. package/dist/apis/external-values.cjs +6 -6
  58. package/dist/apis/external-values.js +1 -1
  59. package/dist/apis/file.cjs +6 -6
  60. package/dist/apis/file.js +1 -1
  61. package/dist/apis/iban.cjs +6 -6
  62. package/dist/apis/iban.js +1 -1
  63. package/dist/apis/identity.cjs +6 -6
  64. package/dist/apis/identity.js +1 -1
  65. package/dist/apis/integration-toolkit.cjs +76 -7
  66. package/dist/apis/integration-toolkit.d.cts +2 -2
  67. package/dist/apis/integration-toolkit.d.ts +2 -2
  68. package/dist/apis/integration-toolkit.js +71 -2
  69. package/dist/apis/journey.cjs +6 -6
  70. package/dist/apis/journey.js +1 -1
  71. package/dist/apis/kanban.cjs +6 -6
  72. package/dist/apis/kanban.js +1 -1
  73. package/dist/apis/message.cjs +6 -6
  74. package/dist/apis/message.js +1 -1
  75. package/dist/apis/metering.cjs +6 -6
  76. package/dist/apis/metering.js +1 -1
  77. package/dist/apis/notes.cjs +6 -6
  78. package/dist/apis/notes.js +1 -1
  79. package/dist/apis/notification.cjs +6 -6
  80. package/dist/apis/notification.js +1 -1
  81. package/dist/apis/organization.cjs +6 -6
  82. package/dist/apis/organization.js +1 -1
  83. package/dist/apis/partner-directory.cjs +6 -6
  84. package/dist/apis/partner-directory.js +1 -1
  85. package/dist/apis/permissions.cjs +6 -6
  86. package/dist/apis/permissions.js +1 -1
  87. package/dist/apis/phone-integration.cjs +6 -6
  88. package/dist/apis/phone-integration.js +1 -1
  89. package/dist/apis/pricing-tier.cjs +6 -6
  90. package/dist/apis/pricing-tier.js +1 -1
  91. package/dist/apis/pricing.cjs +6 -6
  92. package/dist/apis/pricing.js +1 -1
  93. package/dist/apis/purpose.cjs +6 -6
  94. package/dist/apis/purpose.js +1 -1
  95. package/dist/apis/query.cjs +6 -6
  96. package/dist/apis/query.js +1 -1
  97. package/dist/apis/sandbox.cjs +6 -6
  98. package/dist/apis/sandbox.js +1 -1
  99. package/dist/apis/sharing.cjs +6 -6
  100. package/dist/apis/sharing.js +1 -1
  101. package/dist/apis/snapshot.cjs +6 -6
  102. package/dist/apis/snapshot.js +1 -1
  103. package/dist/apis/submission.cjs +6 -6
  104. package/dist/apis/submission.js +1 -1
  105. package/dist/apis/target.cjs +6 -6
  106. package/dist/apis/target.js +1 -1
  107. package/dist/apis/targeting.cjs +6 -6
  108. package/dist/apis/targeting.js +1 -1
  109. package/dist/apis/template-variables.cjs +6 -6
  110. package/dist/apis/template-variables.js +1 -1
  111. package/dist/apis/user.cjs +6 -6
  112. package/dist/apis/user.js +1 -1
  113. package/dist/apis/validation-rules.cjs +6 -6
  114. package/dist/apis/validation-rules.js +1 -1
  115. package/dist/apis/webhooks.cjs +6 -6
  116. package/dist/apis/webhooks.js +1 -1
  117. package/dist/apis/workflow-definition.cjs +6 -6
  118. package/dist/apis/workflow-definition.d.cts +2 -2
  119. package/dist/apis/workflow-definition.d.ts +2 -2
  120. package/dist/apis/workflow-definition.js +1 -1
  121. package/dist/apis/workflow.cjs +6 -6
  122. package/dist/apis/workflow.js +1 -1
  123. package/dist/automation-KNJZDJD7.cjs +7 -0
  124. package/dist/automation-RKVFGJTO.js +7 -0
  125. package/dist/{automation-runtime-KLCXZKEC.cjs → automation-runtime-7LXZ343U.cjs} +2 -2
  126. package/dist/{automation-runtime-Y52HM57N.js → automation-runtime-JZKABTGP.js} +1 -1
  127. package/dist/{automation.d-B8g3nYp-.d.cts → automation.d-cTvIBxDI.d.cts} +514 -26
  128. package/dist/{automation.d-B8g3nYp-.d.ts → automation.d-cTvIBxDI.d.ts} +514 -26
  129. package/dist/{chunk-ZPG2RR4J.js → chunk-2AWPRVIH.js} +4 -7
  130. package/dist/{chunk-WOUASZJW.cjs → chunk-EIT2JFPB.cjs} +1 -1
  131. package/dist/{chunk-QW3ROE6H.js → chunk-JKCBMHOZ.js} +1 -1
  132. package/dist/{chunk-T4WYY7OU.cjs → chunk-NMY7ACYO.cjs} +4 -7
  133. package/dist/index.cjs +10 -10
  134. package/dist/index.d.cts +3 -3
  135. package/dist/index.d.ts +3 -3
  136. package/dist/index.js +2 -2
  137. package/dist/integration-toolkit-DER5W7ID.cjs +7 -0
  138. package/dist/integration-toolkit-EMCDJARR.js +7 -0
  139. package/dist/{integration-toolkit.d-BGF0LVB7.d.cts → integration-toolkit.d-BJgyGgcU.d.cts} +45 -2
  140. package/dist/{integration-toolkit.d-BGF0LVB7.d.ts → integration-toolkit.d-BJgyGgcU.d.ts} +45 -2
  141. package/dist/workflow-definition-46NTR2N5.cjs +7 -0
  142. package/dist/workflow-definition-BSY2BNM2.js +7 -0
  143. package/dist/{workflow-definition.d-CweGhhBU.d.cts → workflow-definition.d-Be0CM3Py.d.cts} +574 -10
  144. package/dist/{workflow-definition.d-CweGhhBU.d.ts → workflow-definition.d-Be0CM3Py.d.ts} +574 -10
  145. package/docs/automation.md +267 -26
  146. package/docs/integration-toolkit.md +54 -8
  147. package/docs/workflow-definition.md +840 -138
  148. package/package.json +1 -1
  149. package/dist/automation-G2CKAQNB.cjs +0 -7
  150. package/dist/automation-UPTNUOYO.js +0 -7
  151. package/dist/erp-integration-735KQ73W.js +0 -5295
  152. package/dist/erp-integration-PAVHSUDM.cjs +0 -7
  153. package/dist/erp-integration-SBQJ6HEG.js +0 -7
  154. package/dist/erp-integration-W7FZDJOB.cjs +0 -5295
  155. package/dist/erp-integration-runtime-JGVGQ22V.js +0 -13
  156. package/dist/erp-integration-runtime-OZ4YSTQX.cjs +0 -13
  157. package/dist/integration-toolkit-3XNG4PL5.cjs +0 -7
  158. package/dist/integration-toolkit-VLTS5HKV.js +0 -7
  159. package/dist/workflow-definition-MSO4JDA3.js +0 -7
  160. package/dist/workflow-definition-XTWO4RMY.cjs +0 -7
  161. package/docs/erp-integration.md +0 -6011
@@ -93,9 +93,12 @@ const { data } = await automationClient.searchFlows(...)
93
93
  - [`AppendValueMapper`](#appendvaluemapper)
94
94
  - [`MoveThreadAction`](#movethreadaction)
95
95
  - [`AssignThreadAction`](#assignthreadaction)
96
+ - [`LabelEmailAction`](#labelemailaction)
96
97
  - [`MoveThreadConfig`](#movethreadconfig)
98
+ - [`LabelEmailConfig`](#labelemailconfig)
97
99
  - [`AssignThreadConfig`](#assignthreadconfig)
98
100
  - [`EntityAssignee`](#entityassignee)
101
+ - [`EntityAssigneeVariable`](#entityassigneevariable)
99
102
  - [`AssignEntityConfig`](#assignentityconfig)
100
103
  - [`AssignEntityActionConfig`](#assignentityactionconfig)
101
104
  - [`AssignEntityAction`](#assignentityaction)
@@ -164,6 +167,7 @@ const { data } = await automationClient.searchFlows(...)
164
167
  - [`BulkTriggerRequest`](#bulktriggerrequest)
165
168
  - [`EntityRef`](#entityref)
166
169
  - [`BulkTriggerJob`](#bulktriggerjob)
170
+ - [`ExecutionStats`](#executionstats)
167
171
  - [`ExecItem`](#execitem)
168
172
  - [`JobId`](#jobid)
169
173
  - [`EntityId`](#entityid)
@@ -177,6 +181,7 @@ const { data } = await automationClient.searchFlows(...)
177
181
  - [`ApiSubmissionTrigger`](#apisubmissiontrigger)
178
182
  - [`NewEmailThreadTrigger`](#newemailthreadtrigger)
179
183
  - [`ReceivedEmailTrigger`](#receivedemailtrigger)
184
+ - [`SentEmailTrigger`](#sentemailtrigger)
180
185
  - [`EntityOperationTrigger`](#entityoperationtrigger)
181
186
  - [`ActivityTrigger`](#activitytrigger)
182
187
  - [`EntityOperation`](#entityoperation)
@@ -382,7 +387,20 @@ const { data } = await client.startExecution(
382
387
  is_primary: true
383
388
  }
384
389
  ],
385
- trigger_user_id: '10006129'
390
+ resolved_input: {
391
+ with_relations: true,
392
+ also_pass: [
393
+ {
394
+ entity_id: 'string',
395
+ entity_schema: 'string'
396
+ }
397
+ ]
398
+ },
399
+ trigger_user_id: '10006129',
400
+ run_by: {
401
+ user_id: '10006129',
402
+ org_id: '739224'
403
+ }
386
404
  },
387
405
  flow_execution_id: 'string',
388
406
  flow_automation_task_id: 'string',
@@ -532,7 +550,15 @@ const { data } = await client.startExecution(
532
550
  "entity_contexts": [
533
551
  {}
534
552
  ],
535
- "trigger_user_id": "10006129"
553
+ "resolved_input": {
554
+ "with_relations": true,
555
+ "also_pass": []
556
+ },
557
+ "trigger_user_id": "10006129",
558
+ "run_by": {
559
+ "user_id": "10006129",
560
+ "org_id": "739224"
561
+ }
536
562
  },
537
563
  "workflow_wait_context": {
538
564
  "workflow_execution_id": "string",
@@ -648,13 +674,14 @@ const { data } = await client.bulkTriggerExecutions(
648
674
 
649
675
  ### `getBulkJob`
650
676
 
651
- Get the status of a bulk job that triggers multiple automation executions
677
+ Get the status of a bulk job that triggers multiple automation executions.
652
678
 
653
679
  `GET /v1/automation/executions/bulk-jobs/{job_id}`
654
680
 
655
681
  ```ts
656
682
  const { data } = await client.getBulkJob({
657
683
  job_id: 'example',
684
+ include_execution_summary: true,
658
685
  })
659
686
  ```
660
687
 
@@ -676,6 +703,9 @@ const { data } = await client.getBulkJob({
676
703
  },
677
704
  "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
678
705
  "report_file_entity_id": "string",
706
+ "last_error": "ThrottlingException: Throughput exceeds the current capacity of your table or index.",
707
+ "restart_count": 1,
708
+ "restarted_at": "1970-01-01T00:00:00.000Z",
679
709
  "entity_query": {
680
710
  "type": "refs",
681
711
  "data": [
@@ -702,7 +732,21 @@ const { data } = await client.getBulkJob({
702
732
  "timestamp": "2025-10-30T15:56:47.842Z",
703
733
  "error": "string"
704
734
  }
705
- ]
735
+ ],
736
+ "execution_stats": {
737
+ "total": 60582,
738
+ "pending": 0,
739
+ "starting": 0,
740
+ "in_progress": 0,
741
+ "success": 0,
742
+ "failed": 0,
743
+ "cancelled": 0,
744
+ "skipped": 0,
745
+ "paused": 0,
746
+ "scheduled": 0,
747
+ "hot": 0
748
+ },
749
+ "execution_summary_truncated": true
706
750
  }
707
751
  ```
708
752
 
@@ -712,7 +756,7 @@ const { data } = await client.getBulkJob({
712
756
 
713
757
  ### `patchBulkJob`
714
758
 
715
- Approve / Cancel bulk job that triggers multiple automation executions
759
+ Approve / Cancel / Restart a bulk job that triggers multiple automation executions.
716
760
 
717
761
  `PATCH /v1/automation/executions/bulk-jobs/{job_id}`
718
762
 
@@ -746,6 +790,9 @@ const { data } = await client.patchBulkJob(
746
790
  },
747
791
  "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
748
792
  "report_file_entity_id": "string",
793
+ "last_error": "ThrottlingException: Throughput exceeds the current capacity of your table or index.",
794
+ "restart_count": 1,
795
+ "restarted_at": "1970-01-01T00:00:00.000Z",
749
796
  "entity_query": {
750
797
  "type": "refs",
751
798
  "data": [
@@ -772,7 +819,21 @@ const { data } = await client.patchBulkJob(
772
819
  "timestamp": "2025-10-30T15:56:47.842Z",
773
820
  "error": "string"
774
821
  }
775
- ]
822
+ ],
823
+ "execution_stats": {
824
+ "total": 60582,
825
+ "pending": 0,
826
+ "starting": 0,
827
+ "in_progress": 0,
828
+ "success": 0,
829
+ "failed": 0,
830
+ "cancelled": 0,
831
+ "skipped": 0,
832
+ "paused": 0,
833
+ "scheduled": 0,
834
+ "hot": 0
835
+ },
836
+ "execution_summary_truncated": true
776
837
  }
777
838
  ```
778
839
 
@@ -918,7 +979,15 @@ const { data } = await client.getExecution({
918
979
  "entity_contexts": [
919
980
  {}
920
981
  ],
921
- "trigger_user_id": "10006129"
982
+ "resolved_input": {
983
+ "with_relations": true,
984
+ "also_pass": []
985
+ },
986
+ "trigger_user_id": "10006129",
987
+ "run_by": {
988
+ "user_id": "10006129",
989
+ "org_id": "739224"
990
+ }
922
991
  },
923
992
  "workflow_wait_context": {
924
993
  "workflow_execution_id": "string",
@@ -1081,7 +1150,15 @@ const { data } = await client.cancelExecution({
1081
1150
  "entity_contexts": [
1082
1151
  {}
1083
1152
  ],
1084
- "trigger_user_id": "10006129"
1153
+ "resolved_input": {
1154
+ "with_relations": true,
1155
+ "also_pass": []
1156
+ },
1157
+ "trigger_user_id": "10006129",
1158
+ "run_by": {
1159
+ "user_id": "10006129",
1160
+ "org_id": "739224"
1161
+ }
1085
1162
  },
1086
1163
  "workflow_wait_context": {
1087
1164
  "workflow_execution_id": "string",
@@ -1199,7 +1276,9 @@ const { data } = await client.resumeExecutionWithToken(
1199
1276
  "_execution_chain": {},
1200
1277
  "_automation_chain": ["string"],
1201
1278
  "entity_contexts": [],
1202
- "trigger_user_id": "10006129"
1279
+ "resolved_input": {},
1280
+ "trigger_user_id": "10006129",
1281
+ "run_by": {}
1203
1282
  },
1204
1283
  "workflow_wait_context": {
1205
1284
  "workflow_execution_id": "string",
@@ -1371,6 +1450,10 @@ type AutomationFlow = {
1371
1450
  configuration: {
1372
1451
  message_type?: { ... }
1373
1452
  }
1453
+ } | {
1454
+ id?: string // uuid
1455
+ type: "sent_email"
1456
+ configuration: object
1374
1457
  } | {
1375
1458
  id?: string // uuid
1376
1459
  type: "new_email_thread"
@@ -1410,10 +1493,6 @@ type AutomationFlow = {
1410
1493
  error_code: { ... }
1411
1494
  error_reason: { ... }
1412
1495
  error_info?: { ... }
1413
- }
1414
- allow_failure?: boolean
1415
- statements?: Array<{
1416
- id?: { ... }
1417
1496
  // ...
1418
1497
  }
1419
1498
  ```
@@ -1472,6 +1551,10 @@ type SearchAutomationsResp = {
1472
1551
  id?: { ... }
1473
1552
  type: { ... }
1474
1553
  configuration: { ... }
1554
+ } | {
1555
+ id?: { ... }
1556
+ type: { ... }
1557
+ configuration: { ... }
1475
1558
  } | {
1476
1559
  id?: { ... }
1477
1560
  type: { ... }
@@ -1525,10 +1608,6 @@ type SearchAutomationsResp = {
1525
1608
  config?: { ... }
1526
1609
  } | {
1527
1610
  type?: { ... }
1528
- config?: { ... }
1529
- } | {
1530
- type?: { ... }
1531
- config?: { ... }
1532
1611
  // ...
1533
1612
  }
1534
1613
  ```
@@ -1657,6 +1736,10 @@ type AnyTrigger = {
1657
1736
  configuration: {
1658
1737
  message_type?: "RECEIVED"
1659
1738
  }
1739
+ } | {
1740
+ id?: string // uuid
1741
+ type: "sent_email"
1742
+ configuration: object
1660
1743
  } | {
1661
1744
  id?: string // uuid
1662
1745
  type: "new_email_thread"
@@ -1751,6 +1834,8 @@ type AnyAction = {
1751
1834
  } | {
1752
1835
  type?: "trigger-share-entity"
1753
1836
  config?: {
1837
+ operation?: "share" | "unshare"
1838
+ unshare_all_partners?: boolean
1754
1839
  partner_org_ids?: string[]
1755
1840
  }
1756
1841
  } | {
@@ -1784,8 +1869,6 @@ type AnyAction = {
1784
1869
  type?: "send-email"
1785
1870
  config?: {
1786
1871
  email_template_id?: string
1787
- language_code?: string
1788
- notify_portal_user_only?: boolean
1789
1872
  // ...
1790
1873
  }
1791
1874
  ```
@@ -1887,12 +1970,12 @@ type AnyActionConfig = {
1887
1970
  name?: string
1888
1971
  type?: "trigger-workflow"
1889
1972
  config?: {
1973
+ operation?: "share" | "unshare"
1974
+ unshare_all_partners?: boolean
1890
1975
  partner_org_ids?: string[]
1891
1976
  }
1892
1977
  allow_failure?: boolean
1893
1978
  created_automatically?: boolean
1894
- is_bulk_action?: boolean
1895
- reason?: {
1896
1979
  // ...
1897
1980
  }
1898
1981
  ```
@@ -2664,6 +2747,18 @@ type AssignThreadAction = {
2664
2747
  skill_match_mode?: "require_all" | "prefer"
2665
2748
  fallback?: "leave_unassigned" | "assign_to_fallback"
2666
2749
  fallback_assignees?: string[]
2750
+ write_mode?: "append" | "replace"
2751
+ }
2752
+ }
2753
+ ```
2754
+
2755
+ ### `LabelEmailAction`
2756
+
2757
+ ```ts
2758
+ type LabelEmailAction = {
2759
+ type?: "label-email"
2760
+ config?: {
2761
+ add: string[]
2667
2762
  }
2668
2763
  }
2669
2764
  ```
@@ -2676,6 +2771,14 @@ type MoveThreadConfig = {
2676
2771
  }
2677
2772
  ```
2678
2773
 
2774
+ ### `LabelEmailConfig`
2775
+
2776
+ ```ts
2777
+ type LabelEmailConfig = {
2778
+ add: string[]
2779
+ }
2780
+ ```
2781
+
2679
2782
  ### `AssignThreadConfig`
2680
2783
 
2681
2784
  ```ts
@@ -2690,6 +2793,7 @@ type AssignThreadConfig = {
2690
2793
  skill_match_mode?: "require_all" | "prefer"
2691
2794
  fallback?: "leave_unassigned" | "assign_to_fallback"
2692
2795
  fallback_assignees?: string[]
2796
+ write_mode?: "append" | "replace"
2693
2797
  }
2694
2798
  ```
2695
2799
 
@@ -2713,6 +2817,19 @@ type EntityAssignee = {
2713
2817
  }
2714
2818
  ```
2715
2819
 
2820
+ ### `EntityAssigneeVariable`
2821
+
2822
+ An assignee resolved at execution time from a user-relation attribute of an
2823
+ entity in the automation context, e.g. `{{submission._owners}}`. Resolves
2824
+ against the entity being assigned or the triggering entity, whichever has
2825
+ the given schema slug. The attribute may hold user ids, `{ org_id, user_id }
2826
+
2827
+ ```ts
2828
+ type EntityAssigneeVariable = {
2829
+ variable: string
2830
+ }
2831
+ ```
2832
+
2716
2833
  ### `AssignEntityConfig`
2717
2834
 
2718
2835
  ```ts
@@ -2726,9 +2843,20 @@ type AssignEntityConfig = {
2726
2843
  partner_id?: string
2727
2844
  display_name?: string
2728
2845
  email?: string
2846
+ } | {
2847
+ variable: string
2729
2848
  }>
2730
2849
  write_mode?: "replace" | "append"
2731
2850
  assignment_type?: "direct" | "sequential" | "even_distribution"
2851
+ candidate_pool?: Array<{
2852
+ type: "user" | "partner_user" | "partner_organization" | "group"
2853
+ user_id?: string
2854
+ group_id?: string
2855
+ org_id?: string
2856
+ partner_id?: string
2857
+ display_name?: string
2858
+ email?: string
2859
+ }>
2732
2860
  candidate_group?: {
2733
2861
  type: "user" | "partner_user" | "partner_organization" | "group"
2734
2862
  user_id?: string
@@ -2745,6 +2873,8 @@ type AssignEntityConfig = {
2745
2873
  }
2746
2874
  match_user_skills?: boolean
2747
2875
  required_skill_categories?: string[]
2876
+ required_skills?: string[]
2877
+ required_skills_match_mode?: "require_all" | "prefer"
2748
2878
  skill_match_mode?: "require_all" | "prefer"
2749
2879
  fallback?: "leave_unassigned" | "assign_to_fallback"
2750
2880
  fallback_assignees?: Array<{
@@ -2782,9 +2912,20 @@ type AssignEntityActionConfig = {
2782
2912
  partner_id?: { ... }
2783
2913
  display_name?: { ... }
2784
2914
  email?: { ... }
2915
+ } | {
2916
+ variable: { ... }
2785
2917
  }>
2786
2918
  write_mode?: "replace" | "append"
2787
2919
  assignment_type?: "direct" | "sequential" | "even_distribution"
2920
+ candidate_pool?: Array<{
2921
+ type: { ... }
2922
+ user_id?: { ... }
2923
+ group_id?: { ... }
2924
+ org_id?: { ... }
2925
+ partner_id?: { ... }
2926
+ display_name?: { ... }
2927
+ email?: { ... }
2928
+ }>
2788
2929
  candidate_group?: {
2789
2930
  type: { ... }
2790
2931
  user_id?: { ... }
@@ -2801,6 +2942,8 @@ type AssignEntityActionConfig = {
2801
2942
  }
2802
2943
  match_user_skills?: boolean
2803
2944
  required_skill_categories?: string[]
2945
+ required_skills?: string[]
2946
+ required_skills_match_mode?: "require_all" | "prefer"
2804
2947
  skill_match_mode?: "require_all" | "prefer"
2805
2948
  fallback?: "leave_unassigned" | "assign_to_fallback"
2806
2949
  fallback_assignees?: Array<{
@@ -2846,9 +2989,20 @@ type AssignEntityAction = {
2846
2989
  partner_id?: { ... }
2847
2990
  display_name?: { ... }
2848
2991
  email?: { ... }
2992
+ } | {
2993
+ variable: { ... }
2849
2994
  }>
2850
2995
  write_mode?: "replace" | "append"
2851
2996
  assignment_type?: "direct" | "sequential" | "even_distribution"
2997
+ candidate_pool?: Array<{
2998
+ type: { ... }
2999
+ user_id?: { ... }
3000
+ group_id?: { ... }
3001
+ org_id?: { ... }
3002
+ partner_id?: { ... }
3003
+ display_name?: { ... }
3004
+ email?: { ... }
3005
+ }>
2852
3006
  candidate_group?: {
2853
3007
  type: { ... }
2854
3008
  user_id?: { ... }
@@ -2865,6 +3019,8 @@ type AssignEntityAction = {
2865
3019
  }
2866
3020
  match_user_skills?: boolean
2867
3021
  required_skill_categories?: string[]
3022
+ required_skills?: string[]
3023
+ required_skills_match_mode?: "require_all" | "prefer"
2868
3024
  skill_match_mode?: "require_all" | "prefer"
2869
3025
  fallback?: "leave_unassigned" | "assign_to_fallback"
2870
3026
  fallback_assignees?: Array<{
@@ -3270,6 +3426,8 @@ type TriggerShareEntityActionConfig = {
3270
3426
  name?: string
3271
3427
  type?: "trigger-workflow"
3272
3428
  config?: {
3429
+ operation?: "share" | "unshare"
3430
+ unshare_all_partners?: boolean
3273
3431
  partner_org_ids?: string[]
3274
3432
  }
3275
3433
  allow_failure?: boolean
@@ -3291,6 +3449,8 @@ type TriggerShareEntityActionConfig = {
3291
3449
  type TriggerShareEntityAction = {
3292
3450
  type?: "trigger-share-entity"
3293
3451
  config?: {
3452
+ operation?: "share" | "unshare"
3453
+ unshare_all_partners?: boolean
3294
3454
  partner_org_ids?: string[]
3295
3455
  }
3296
3456
  }
@@ -3300,6 +3460,8 @@ type TriggerShareEntityAction = {
3300
3460
 
3301
3461
  ```ts
3302
3462
  type TriggerShareEntityConfig = {
3463
+ operation?: "share" | "unshare"
3464
+ unshare_all_partners?: boolean
3303
3465
  partner_org_ids?: string[]
3304
3466
  }
3305
3467
  ```
@@ -3718,6 +3880,8 @@ type AutomationExecution = {
3718
3880
  } | {
3719
3881
  type?: "trigger-share-entity"
3720
3882
  config?: {
3883
+ operation?: { ... }
3884
+ unshare_all_partners?: { ... }
3721
3885
  partner_org_ids?: { ... }
3722
3886
  }
3723
3887
  } | {
@@ -3740,8 +3904,6 @@ type AutomationExecution = {
3740
3904
  config?: {
3741
3905
  event_name: { ... }
3742
3906
  event_inputs?: { ... }
3743
- }
3744
- } | {
3745
3907
  // ...
3746
3908
  }
3747
3909
  ```
@@ -3773,7 +3935,18 @@ type WorkflowExecutionContext = {
3773
3935
  entity_schema?: string
3774
3936
  is_primary?: boolean
3775
3937
  }>
3938
+ resolved_input?: {
3939
+ with_relations: boolean
3940
+ also_pass: Array<{
3941
+ entity_id: { ... }
3942
+ entity_schema?: { ... }
3943
+ }>
3944
+ }
3776
3945
  trigger_user_id?: string
3946
+ run_by?: {
3947
+ user_id: string
3948
+ org_id?: string
3949
+ }
3777
3950
  }
3778
3951
  ```
3779
3952
 
@@ -3856,7 +4029,7 @@ type TriggerEventEntityActivity = {
3856
4029
 
3857
4030
  ```ts
3858
4031
  type TriggerEventMessaging = {
3859
- type?: "new_email_thread"
4032
+ type?: "new_email_thread" | "sent_email"
3860
4033
  org_id: string
3861
4034
  thread_id: string
3862
4035
  message_id: string
@@ -4183,7 +4356,15 @@ type StartExecutionRequest = {
4183
4356
  entity_schema?: { ... }
4184
4357
  is_primary?: { ... }
4185
4358
  }>
4359
+ resolved_input?: {
4360
+ with_relations: { ... }
4361
+ also_pass: { ... }
4362
+ }
4186
4363
  trigger_user_id?: string
4364
+ run_by?: {
4365
+ user_id: { ... }
4366
+ org_id?: { ... }
4367
+ }
4187
4368
  }
4188
4369
  flow_execution_id?: string
4189
4370
  flow_automation_task_id?: string
@@ -4259,8 +4440,8 @@ type FlowExecutionCancelInputs = {
4259
4440
 
4260
4441
  ```ts
4261
4442
  type PatchBulkJobRequest = {
4262
- action: "APPROVE" | "CANCEL"
4263
- task_token: string
4443
+ action: "APPROVE" | "CANCEL" | "RESTART"
4444
+ task_token?: string
4264
4445
  }
4265
4446
  ```
4266
4447
 
@@ -4357,6 +4538,9 @@ type BulkTriggerJob = {
4357
4538
  trigger_context?: Record<string, string>
4358
4539
  task_token?: string
4359
4540
  report_file_entity_id?: string
4541
+ last_error?: string
4542
+ restart_count?: number
4543
+ restarted_at?: string // date-time
4360
4544
  entity_query?: {
4361
4545
  type: "refs" | "query" | "filter"
4362
4546
  data: Array<{
@@ -4389,6 +4573,40 @@ type BulkTriggerJob = {
4389
4573
  timestamp?: string // date-time
4390
4574
  error?: string
4391
4575
  }>
4576
+ execution_stats?: {
4577
+ total: number
4578
+ pending?: number
4579
+ starting?: number
4580
+ in_progress?: number
4581
+ success?: number
4582
+ failed?: number
4583
+ cancelled?: number
4584
+ skipped?: number
4585
+ paused?: number
4586
+ scheduled?: number
4587
+ hot?: number
4588
+ }
4589
+ execution_summary_truncated?: boolean
4590
+ }
4591
+ ```
4592
+
4593
+ ### `ExecutionStats`
4594
+
4595
+ Number of execution items of a bulk trigger job per execution status. Always complete.
4596
+
4597
+ ```ts
4598
+ type ExecutionStats = {
4599
+ total: number
4600
+ pending?: number
4601
+ starting?: number
4602
+ in_progress?: number
4603
+ success?: number
4604
+ failed?: number
4605
+ cancelled?: number
4606
+ skipped?: number
4607
+ paused?: number
4608
+ scheduled?: number
4609
+ hot?: number
4392
4610
  }
4393
4611
  ```
4394
4612
 
@@ -4499,6 +4717,12 @@ type ApiSubmissionTrigger = {
4499
4717
 
4500
4718
  ### `NewEmailThreadTrigger`
4501
4719
 
4720
+ Starts the flow when an email starts a new thread. The thread is the execution's entity.
4721
+
4722
+ For outbound threads, an email that failed to send or a bulk email does not start the flow,
4723
+ and neither does an email whose automation chain already contains the flow. A flow that
4724
+ sends emails itself (a send-em
4725
+
4502
4726
  ```ts
4503
4727
  type NewEmailThreadTrigger = {
4504
4728
  id?: string // uuid
@@ -4522,6 +4746,23 @@ type ReceivedEmailTrigger = {
4522
4746
  }
4523
4747
  ```
4524
4748
 
4749
+ ### `SentEmailTrigger`
4750
+
4751
+ Starts the flow for every email sent from epilot: emails and replies sent from the inbox,
4752
+ including replies sent from a draft, and emails sent by automations or Flows, except sends
4753
+ that skip creating entities. The sent email is the execution's entity. The outgoing
4754
+ counterpart of `received_email`.
4755
+
4756
+ O
4757
+
4758
+ ```ts
4759
+ type SentEmailTrigger = {
4760
+ id?: string // uuid
4761
+ type: "sent_email"
4762
+ configuration: object
4763
+ }
4764
+ ```
4765
+
4525
4766
  ### `EntityOperationTrigger`
4526
4767
 
4527
4768
  - If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.