@epilot/sdk 2.3.8 → 2.3.10

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 (146) hide show
  1. package/definitions/configuration-hub-runtime.json +1 -1
  2. package/definitions/configuration-hub.json +220 -8
  3. package/definitions/workflow-definition.json +52 -0
  4. package/definitions/workflow.json +24 -0
  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 +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +6 -6
  20. package/dist/apis/billing.js +1 -1
  21. package/dist/apis/blueprint-manifest.cjs +6 -6
  22. package/dist/apis/blueprint-manifest.js +1 -1
  23. package/dist/apis/configuration-hub.cjs +8 -8
  24. package/dist/apis/configuration-hub.d.cts +2 -2
  25. package/dist/apis/configuration-hub.d.ts +2 -2
  26. package/dist/apis/configuration-hub.js +2 -2
  27. package/dist/apis/consent.cjs +6 -6
  28. package/dist/apis/consent.js +1 -1
  29. package/dist/apis/customer-portal.cjs +6 -6
  30. package/dist/apis/customer-portal.js +1 -1
  31. package/dist/apis/dashboard.cjs +6 -6
  32. package/dist/apis/dashboard.js +1 -1
  33. package/dist/apis/data-governance.cjs +6 -6
  34. package/dist/apis/data-governance.js +1 -1
  35. package/dist/apis/deduplication.cjs +6 -6
  36. package/dist/apis/deduplication.js +1 -1
  37. package/dist/apis/design.cjs +6 -6
  38. package/dist/apis/design.js +1 -1
  39. package/dist/apis/document.cjs +6 -6
  40. package/dist/apis/document.js +1 -1
  41. package/dist/apis/email-settings.cjs +6 -6
  42. package/dist/apis/email-settings.js +1 -1
  43. package/dist/apis/email-template.cjs +6 -6
  44. package/dist/apis/email-template.js +1 -1
  45. package/dist/apis/entity-mapping.cjs +6 -6
  46. package/dist/apis/entity-mapping.js +1 -1
  47. package/dist/apis/entity.cjs +6 -6
  48. package/dist/apis/entity.js +1 -1
  49. package/dist/apis/environments.cjs +6 -6
  50. package/dist/apis/environments.js +1 -1
  51. package/dist/apis/event-catalog.cjs +6 -6
  52. package/dist/apis/event-catalog.js +1 -1
  53. package/dist/apis/file.cjs +6 -6
  54. package/dist/apis/file.js +1 -1
  55. package/dist/apis/iban.cjs +6 -6
  56. package/dist/apis/iban.js +1 -1
  57. package/dist/apis/integration-toolkit.cjs +6 -6
  58. package/dist/apis/integration-toolkit.js +1 -1
  59. package/dist/apis/journey.cjs +6 -6
  60. package/dist/apis/journey.js +1 -1
  61. package/dist/apis/kanban.cjs +6 -6
  62. package/dist/apis/kanban.js +1 -1
  63. package/dist/apis/message.cjs +6 -6
  64. package/dist/apis/message.js +1 -1
  65. package/dist/apis/metering.cjs +6 -6
  66. package/dist/apis/metering.js +1 -1
  67. package/dist/apis/notes.cjs +6 -6
  68. package/dist/apis/notes.js +1 -1
  69. package/dist/apis/notification.cjs +6 -6
  70. package/dist/apis/notification.js +1 -1
  71. package/dist/apis/organization.cjs +6 -6
  72. package/dist/apis/organization.js +1 -1
  73. package/dist/apis/partner-directory.cjs +6 -6
  74. package/dist/apis/partner-directory.js +1 -1
  75. package/dist/apis/permissions.cjs +6 -6
  76. package/dist/apis/permissions.js +1 -1
  77. package/dist/apis/pricing-tier.cjs +6 -6
  78. package/dist/apis/pricing-tier.js +1 -1
  79. package/dist/apis/pricing.cjs +6 -6
  80. package/dist/apis/pricing.js +1 -1
  81. package/dist/apis/purpose.cjs +6 -6
  82. package/dist/apis/purpose.js +1 -1
  83. package/dist/apis/query.cjs +6 -6
  84. package/dist/apis/query.js +1 -1
  85. package/dist/apis/sandbox.cjs +6 -6
  86. package/dist/apis/sandbox.js +1 -1
  87. package/dist/apis/sharing.cjs +6 -6
  88. package/dist/apis/sharing.js +1 -1
  89. package/dist/apis/submission.cjs +6 -6
  90. package/dist/apis/submission.js +1 -1
  91. package/dist/apis/target.cjs +6 -6
  92. package/dist/apis/target.js +1 -1
  93. package/dist/apis/targeting.cjs +6 -6
  94. package/dist/apis/targeting.js +1 -1
  95. package/dist/apis/template-variables.cjs +6 -6
  96. package/dist/apis/template-variables.js +1 -1
  97. package/dist/apis/user.cjs +6 -6
  98. package/dist/apis/user.js +1 -1
  99. package/dist/apis/validation-rules.cjs +6 -6
  100. package/dist/apis/validation-rules.js +1 -1
  101. package/dist/apis/webhooks.cjs +6 -6
  102. package/dist/apis/webhooks.js +1 -1
  103. package/dist/apis/workflow-definition.cjs +6 -6
  104. package/dist/apis/workflow-definition.d.cts +2 -2
  105. package/dist/apis/workflow-definition.d.ts +2 -2
  106. package/dist/apis/workflow-definition.js +1 -1
  107. package/dist/apis/workflow.cjs +6 -6
  108. package/dist/apis/workflow.d.cts +2 -2
  109. package/dist/apis/workflow.d.ts +2 -2
  110. package/dist/apis/workflow.js +1 -1
  111. package/dist/{chunk-6DZXWV2A.cjs → chunk-MDLNRFJV.cjs} +4 -4
  112. package/dist/chunk-ONOGGR6Q.js +14 -0
  113. package/dist/{chunk-7TFVO6SP.js → chunk-W7YCS4FU.js} +4 -4
  114. package/dist/chunk-ZSONBZIF.cjs +14 -0
  115. package/dist/configuration-hub-A3S6ND6R.cjs +7 -0
  116. package/dist/configuration-hub-PMAW44U5.js +7 -0
  117. package/dist/{configuration-hub-runtime-B7KKIHHY.cjs → configuration-hub-runtime-I5Y67CXD.cjs} +2 -2
  118. package/dist/{configuration-hub-runtime-TEDEKI7E.js → configuration-hub-runtime-L6IOERSP.js} +1 -1
  119. package/dist/configuration-hub.d-Cqaq2F-W.d.cts +478 -0
  120. package/dist/configuration-hub.d-Cqaq2F-W.d.ts +478 -0
  121. package/dist/index.cjs +10 -10
  122. package/dist/index.d.cts +3 -3
  123. package/dist/index.d.ts +3 -3
  124. package/dist/index.js +2 -2
  125. package/dist/workflow-3WBD74WR.js +7 -0
  126. package/dist/workflow-WIUZ5TOX.cjs +7 -0
  127. package/dist/workflow-definition-2VF7S23G.js +7 -0
  128. package/dist/workflow-definition-U6YXD42W.cjs +7 -0
  129. package/dist/{workflow-definition.d-ByCJK9_x.d.ts → workflow-definition.d-DOeb0KVV.d.cts} +37 -1
  130. package/dist/{workflow-definition.d-ByCJK9_x.d.cts → workflow-definition.d-DOeb0KVV.d.ts} +37 -1
  131. package/dist/{workflow.d-pD8ISOg-.d.ts → workflow.d-CMSKt8oN.d.cts} +22 -1
  132. package/dist/{workflow.d-pD8ISOg-.d.cts → workflow.d-CMSKt8oN.d.ts} +22 -1
  133. package/docs/configuration-hub.md +159 -11
  134. package/docs/workflow-definition.md +40 -8
  135. package/docs/workflow.md +57 -11
  136. package/package.json +1 -1
  137. package/dist/chunk-4JAOFRYX.js +0 -14
  138. package/dist/chunk-Q7OKRNUG.cjs +0 -14
  139. package/dist/configuration-hub-LKSRCGYT.cjs +0 -7
  140. package/dist/configuration-hub-TZ2ULWV4.js +0 -7
  141. package/dist/configuration-hub.d-CqvhcMOn.d.cts +0 -166
  142. package/dist/configuration-hub.d-CqvhcMOn.d.ts +0 -166
  143. package/dist/workflow-CQOBZ25C.cjs +0 -7
  144. package/dist/workflow-G7VFCXY7.js +0 -7
  145. package/dist/workflow-definition-CVBYKAUY.cjs +0 -7
  146. package/dist/workflow-definition-GNAKDNG7.js +0 -7
@@ -1,6 +1,6 @@
1
1
  # Configuration Hub API
2
2
 
3
- - **Base URL:** `https://configuration-hub.dev.sls.epilot.io`
3
+ - **Base URL:** `https://configuration-hub.sls.epilot.io`
4
4
  - **Full API Docs:** [https://docs.epilot.io/api/configuration-hub](https://docs.epilot.io/api/configuration-hub)
5
5
 
6
6
  ## Usage
@@ -28,6 +28,9 @@ const { data } = await configurationHubClient.listConfigTypes(...)
28
28
  - [`listConfigTypes`](#listconfigtypes)
29
29
  - [`listConfigs`](#listconfigs)
30
30
  - [`getConfigDependencies`](#getconfigdependencies)
31
+ - [`getConfigUsedBy`](#getconfigusedby)
32
+ - [`getIndex`](#getindex)
33
+ - [`rebuildIndex`](#rebuildindex)
31
34
 
32
35
  **Schemas**
33
36
  - [`ResourceType`](#resourcetype)
@@ -35,6 +38,8 @@ const { data } = await configurationHubClient.listConfigTypes(...)
35
38
  - [`ConfigNode`](#confignode)
36
39
  - [`ConfigListResponse`](#configlistresponse)
37
40
  - [`ConfigDependenciesResponse`](#configdependenciesresponse)
41
+ - [`IndexRebuildResponse`](#indexrebuildresponse)
42
+ - [`IndexStatusResponse`](#indexstatusresponse)
38
43
  - [`ErrorResponse`](#errorresponse)
39
44
 
40
45
  ### `listConfigTypes`
@@ -82,6 +87,13 @@ const { data } = await client.listConfigs({
82
87
  type: 'example',
83
88
  cursor: 'example',
84
89
  size: 1,
90
+ q: 'example',
91
+ updated_after: 'example',
92
+ updated_before: 'example',
93
+ purposes: 'example',
94
+ blueprint_ids: 'example',
95
+ sort: 'example',
96
+ active_only: true,
85
97
  })
86
98
  ```
87
99
 
@@ -95,7 +107,7 @@ const { data } = await client.listConfigs({
95
107
  "icon": "string",
96
108
  "total": 0,
97
109
  "next_cursor": "string",
98
- "items": [
110
+ "results": [
99
111
  {
100
112
  "type": "journey",
101
113
  "id": "string",
@@ -103,8 +115,10 @@ const { data } = await client.listConfigs({
103
115
  "updated_at": "1970-01-01T00:00:00.000Z",
104
116
  "updated_by": "string",
105
117
  "tags": ["string"],
118
+ "aliases": ["string"],
106
119
  "purposes": ["string"],
107
- "link": "https://example.com/path"
120
+ "link": "https://example.com/path",
121
+ "metadata": {}
108
122
  }
109
123
  ]
110
124
  }
@@ -145,8 +159,52 @@ const { data } = await client.getConfigDependencies({
145
159
  "updated_at": "1970-01-01T00:00:00.000Z",
146
160
  "updated_by": "string",
147
161
  "tags": ["string"],
162
+ "aliases": ["string"],
163
+ "purposes": ["string"],
164
+ "link": "https://example.com/path",
165
+ "metadata": {}
166
+ }
167
+ ]
168
+ }
169
+ ```
170
+
171
+ </details>
172
+
173
+ ---
174
+
175
+ ### `getConfigUsedBy`
176
+
177
+ Get configs that reference the given config (reverse dependencies).
178
+ Scans the indexed config items for references to this config's ID or aliases.
179
+
180
+ `GET /v1/configs/{type}/{id}/used_by`
181
+
182
+ ```ts
183
+ const { data } = await client.getConfigUsedBy({
184
+ type: 'example',
185
+ id: '123e4567-e89b-12d3-a456-426614174000',
186
+ })
187
+ ```
188
+
189
+ <details>
190
+ <summary>Response</summary>
191
+
192
+ ```json
193
+ {
194
+ "total": 0,
195
+ "next_cursor": "string",
196
+ "results": [
197
+ {
198
+ "type": "journey",
199
+ "id": "string",
200
+ "title": "string",
201
+ "updated_at": "1970-01-01T00:00:00.000Z",
202
+ "updated_by": "string",
203
+ "tags": ["string"],
204
+ "aliases": ["string"],
148
205
  "purposes": ["string"],
149
- "link": "https://example.com/path"
206
+ "link": "https://example.com/path",
207
+ "metadata": {}
150
208
  }
151
209
  ]
152
210
  }
@@ -156,6 +214,63 @@ const { data } = await client.getConfigDependencies({
156
214
 
157
215
  ---
158
216
 
217
+ ### `getIndex`
218
+
219
+ Return the current index build state for the caller's organization.
220
+ Clients poll this to decide whether to show a "building" indicator
221
+ and when to refetch data.
222
+
223
+ `GET /v1/configs/index`
224
+
225
+ ```ts
226
+ const { data } = await client.getIndex()
227
+ ```
228
+
229
+ <details>
230
+ <summary>Response</summary>
231
+
232
+ ```json
233
+ {
234
+ "status": "missing",
235
+ "last_built_at": "1970-01-01T00:00:00.000Z",
236
+ "total_items": 0,
237
+ "build_duration_ms": 0
238
+ }
239
+ ```
240
+
241
+ </details>
242
+
243
+ ---
244
+
245
+ ### `rebuildIndex`
246
+
247
+ Rebuild the configuration index for the caller's organization.
248
+ Fire-and-forget: invokes the async worker and returns immediately.
249
+ A new rebuild will cancel any in-flight build (see `build_token`).
250
+
251
+ `POST /v1/configs/index:rebuild`
252
+
253
+ ```ts
254
+ const { data } = await client.rebuildIndex()
255
+ ```
256
+
257
+ <details>
258
+ <summary>Response</summary>
259
+
260
+ ```json
261
+ {
262
+ "status": "ready",
263
+ "last_built_at": "1970-01-01T00:00:00.000Z",
264
+ "total_items": 0,
265
+ "build_duration_ms": 0,
266
+ "failed_types": ["string"]
267
+ }
268
+ ```
269
+
270
+ </details>
271
+
272
+ ---
273
+
159
274
  ## Schemas
160
275
 
161
276
  ### `ResourceType`
@@ -165,7 +280,7 @@ Matches blueprint-manifest-api V3 naming conventions.
165
280
 
166
281
 
167
282
  ```ts
168
- type ResourceType = "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation"
283
+ type ResourceType = "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "document_template" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation" | "access_token"
169
284
  ```
170
285
 
171
286
  ### `ConfigTypeInfo`
@@ -176,7 +291,7 @@ No downstream API calls — just type + label + icon + source API info.
176
291
 
177
292
  ```ts
178
293
  type ConfigTypeInfo = {
179
- type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation"
294
+ type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "document_template" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation" | "access_token"
180
295
  label: string
181
296
  icon: string
182
297
  source_api: string
@@ -190,14 +305,16 @@ Summary metadata for a single configuration item in the tree
190
305
 
191
306
  ```ts
192
307
  type ConfigNode = {
193
- type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation"
308
+ type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "document_template" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation" | "access_token"
194
309
  id: string
195
310
  title: string
196
311
  updated_at?: string // date-time
197
312
  updated_by?: string
198
313
  tags?: string[]
314
+ aliases?: string[]
199
315
  purposes?: string[]
200
316
  link?: string // uri
317
+ metadata?: Record<string, unknown>
201
318
  }
202
319
  ```
203
320
 
@@ -207,20 +324,22 @@ Cursor-paginated list of configs for a specific type
207
324
 
208
325
  ```ts
209
326
  type ConfigListResponse = {
210
- type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation"
327
+ type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "document_template" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation" | "access_token"
211
328
  label: string
212
329
  icon: string
213
330
  total?: number
214
331
  next_cursor?: string
215
- items: Array<{
216
- type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation"
332
+ results: Array<{
333
+ type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "document_template" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation" | "access_token"
217
334
  id: string
218
335
  title: string
219
336
  updated_at?: string // date-time
220
337
  updated_by?: string
221
338
  tags?: string[]
339
+ aliases?: string[]
222
340
  purposes?: string[]
223
341
  link?: string // uri
342
+ metadata?: Record<string, unknown>
224
343
  }>
225
344
  }
226
345
  ```
@@ -234,18 +353,47 @@ type ConfigDependenciesResponse = {
234
353
  total?: number
235
354
  next_cursor?: string
236
355
  results: Array<{
237
- type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation"
356
+ type: "journey" | "automation_flow" | "workflow_definition" | "closing_reason" | "flow_template" | "schema" | "emailtemplate" | "product" | "price" | "tax" | "coupon" | "file" | "document_template" | "webhook" | "saved_view" | "dashboard" | "kanban" | "role" | "usergroup" | "validation_rule" | "integration" | "app" | "designbuilder" | "notification_template" | "custom_variable" | "environment_variable" | "taxonomy" | "taxonomy_classification" | "entity_mapping" | "portal_config" | "target" | "product_recommendation" | "access_token"
238
357
  id: string
239
358
  title: string
240
359
  updated_at?: string // date-time
241
360
  updated_by?: string
242
361
  tags?: string[]
362
+ aliases?: string[]
243
363
  purposes?: string[]
244
364
  link?: string // uri
365
+ metadata?: Record<string, unknown>
245
366
  }>
246
367
  }
247
368
  ```
248
369
 
370
+ ### `IndexRebuildResponse`
371
+
372
+ Result of an index rebuild operation
373
+
374
+ ```ts
375
+ type IndexRebuildResponse = {
376
+ status: "ready" | "building" | "failed" | "already_building"
377
+ last_built_at?: string // date-time
378
+ total_items?: number
379
+ build_duration_ms?: number
380
+ failed_types?: string[]
381
+ }
382
+ ```
383
+
384
+ ### `IndexStatusResponse`
385
+
386
+ Current index build state
387
+
388
+ ```ts
389
+ type IndexStatusResponse = {
390
+ status: "missing" | "building" | "ready" | "failed"
391
+ last_built_at?: string // date-time
392
+ total_items?: number
393
+ build_duration_ms?: number
394
+ }
395
+ ```
396
+
249
397
  ### `ErrorResponse`
250
398
 
251
399
  ```ts
@@ -68,6 +68,7 @@ const { data } = await workflowDefinitionClient.getMaxAllowedLimit(...)
68
68
  - [`ManualTask`](#manualtask)
69
69
  - [`AutomationTask`](#automationtask)
70
70
  - [`AutomationConfig`](#automationconfig)
71
+ - [`AutomationInputContext`](#automationinputcontext)
71
72
  - [`AiAgentTask`](#aiagenttask)
72
73
  - [`AgentConfig`](#agentconfig)
73
74
  - [`TriggerMode`](#triggermode)
@@ -437,6 +438,7 @@ const { data } = await client.createFlowTemplate(
437
438
  id: 'string',
438
439
  type: 'automation',
439
440
  automation_id: 'string',
441
+ input_entity: 'thread',
440
442
  trigger_config: [ /* ... */ ]
441
443
  },
442
444
  /* ... 2 more */
@@ -559,6 +561,7 @@ const { data } = await client.createFlowTemplate(
559
561
  "id": "string",
560
562
  "type": "automation",
561
563
  "automation_id": "string",
564
+ "input_entity": "thread",
562
565
  "trigger_config": []
563
566
  }
564
567
  ],
@@ -755,6 +758,7 @@ const { data } = await client.getFlowTemplate({
755
758
  "id": "string",
756
759
  "type": "automation",
757
760
  "automation_id": "string",
761
+ "input_entity": "thread",
758
762
  "trigger_config": []
759
763
  }
760
764
  ],
@@ -885,6 +889,7 @@ const { data } = await client.updateFlowTemplate(
885
889
  id: 'string',
886
890
  type: 'automation',
887
891
  automation_id: 'string',
892
+ input_entity: 'thread',
888
893
  trigger_config: [ /* ... */ ]
889
894
  },
890
895
  /* ... 2 more */
@@ -1007,6 +1012,7 @@ const { data } = await client.updateFlowTemplate(
1007
1012
  "id": "string",
1008
1013
  "type": "automation",
1009
1014
  "automation_id": "string",
1015
+ "input_entity": "thread",
1010
1016
  "trigger_config": []
1011
1017
  }
1012
1018
  ],
@@ -1156,6 +1162,7 @@ const { data } = await client.duplicateFlowTemplate({
1156
1162
  "id": "string",
1157
1163
  "type": "automation",
1158
1164
  "automation_id": "string",
1165
+ "input_entity": "thread",
1159
1166
  "trigger_config": []
1160
1167
  }
1161
1168
  ],
@@ -1736,6 +1743,7 @@ type FlowTemplateBase = {
1736
1743
  id?: string
1737
1744
  type: "automation"
1738
1745
  automation_id?: string
1746
+ input_entity?: "thread" | "first_email" | "last_email"
1739
1747
  trigger_config?: Array<{
1740
1748
  type: { ... }
1741
1749
  configuration?: { ... }
@@ -1776,6 +1784,7 @@ type FlowTemplateBase = {
1776
1784
  id?: string
1777
1785
  type: "automation"
1778
1786
  automation_id?: string
1787
+ input_entity?: "thread" | "first_email" | "last_email"
1779
1788
  trigger_config?: Array<{
1780
1789
  type: { ... }
1781
1790
  configuration?: { ... }
@@ -1821,8 +1830,6 @@ type FlowTemplateBase = {
1821
1830
  name?: { ... }
1822
1831
  complete_task_automatically?: { ... }
1823
1832
  }
1824
- due_date?: string
1825
- due_date_config?: {
1826
1833
  // ...
1827
1834
  }
1828
1835
  ```
@@ -1843,6 +1850,7 @@ type FlowTemplate = {
1843
1850
  id?: string
1844
1851
  type: "automation"
1845
1852
  automation_id?: string
1853
+ input_entity?: "thread" | "first_email" | "last_email"
1846
1854
  trigger_config?: Array<{
1847
1855
  type: { ... }
1848
1856
  configuration?: { ... }
@@ -1883,6 +1891,7 @@ type FlowTemplate = {
1883
1891
  id?: string
1884
1892
  type: "automation"
1885
1893
  automation_id?: string
1894
+ input_entity?: "thread" | "first_email" | "last_email"
1886
1895
  trigger_config?: Array<{
1887
1896
  type: { ... }
1888
1897
  configuration?: { ... }
@@ -1928,8 +1937,6 @@ type FlowTemplate = {
1928
1937
  name?: { ... }
1929
1938
  complete_task_automatically?: { ... }
1930
1939
  }
1931
- due_date?: string
1932
- due_date_config?: {
1933
1940
  // ...
1934
1941
  }
1935
1942
  ```
@@ -1957,6 +1964,7 @@ type Trigger = {
1957
1964
  id?: string
1958
1965
  type: "automation"
1959
1966
  automation_id?: string
1967
+ input_entity?: "thread" | "first_email" | "last_email"
1960
1968
  trigger_config?: Array<{
1961
1969
  type: string
1962
1970
  configuration?: Record<string, unknown>
@@ -1991,6 +1999,7 @@ type AutomationTrigger = {
1991
1999
  id?: string
1992
2000
  type: "automation"
1993
2001
  automation_id?: string
2002
+ input_entity?: "thread" | "first_email" | "last_email"
1994
2003
  trigger_config?: Array<{
1995
2004
  type: string
1996
2005
  configuration?: Record<string, unknown>
@@ -2036,6 +2045,7 @@ type CreateFlowTemplate = {
2036
2045
  id?: string
2037
2046
  type: "automation"
2038
2047
  automation_id?: string
2048
+ input_entity?: "thread" | "first_email" | "last_email"
2039
2049
  trigger_config?: Array<{
2040
2050
  type: { ... }
2041
2051
  configuration?: { ... }
@@ -2076,6 +2086,7 @@ type CreateFlowTemplate = {
2076
2086
  id?: string
2077
2087
  type: "automation"
2078
2088
  automation_id?: string
2089
+ input_entity?: "thread" | "first_email" | "last_email"
2079
2090
  trigger_config?: Array<{
2080
2091
  type: { ... }
2081
2092
  configuration?: { ... }
@@ -2121,8 +2132,6 @@ type CreateFlowTemplate = {
2121
2132
  name?: { ... }
2122
2133
  complete_task_automatically?: { ... }
2123
2134
  }
2124
- due_date?: string
2125
- due_date_config?: {
2126
2135
  // ...
2127
2136
  }
2128
2137
  ```
@@ -2159,6 +2168,7 @@ type FlowTemplatesList = {
2159
2168
  id?: { ... }
2160
2169
  type: { ... }
2161
2170
  automation_id?: { ... }
2171
+ input_entity?: { ... }
2162
2172
  trigger_config?: { ... }
2163
2173
  } | {
2164
2174
  id?: { ... }
@@ -2196,6 +2206,7 @@ type FlowTemplatesList = {
2196
2206
  id?: { ... }
2197
2207
  type: { ... }
2198
2208
  automation_id?: { ... }
2209
+ input_entity?: { ... }
2199
2210
  trigger_config?: { ... }
2200
2211
  } | {
2201
2212
  id?: { ... }
@@ -2243,8 +2254,6 @@ type FlowTemplatesList = {
2243
2254
  ecp?: { ... }
2244
2255
  installer?: { ... }
2245
2256
  partner?: { ... }
2246
- taxonomies?: { ... }
2247
- phase_id?: { ... }
2248
2257
  // ...
2249
2258
  }
2250
2259
  ```
@@ -2499,6 +2508,11 @@ type AutomationTask = {
2499
2508
  type: { ... }
2500
2509
  config?: { ... }
2501
2510
  }
2511
+ duplicated_flow_id?: string
2512
+ input_context?: {
2513
+ source: { ... }
2514
+ task_id?: { ... }
2515
+ }
2502
2516
  }
2503
2517
  trigger_mode?: "manual" | "automatic"
2504
2518
  schedule?: {
@@ -2534,6 +2548,23 @@ type AutomationConfig = {
2534
2548
  type: string
2535
2549
  config?: Record<string, unknown>
2536
2550
  }
2551
+ duplicated_flow_id?: string
2552
+ input_context?: {
2553
+ source: "trigger" | "task"
2554
+ task_id?: string
2555
+ }
2556
+ }
2557
+ ```
2558
+
2559
+ ### `AutomationInputContext`
2560
+
2561
+ Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
2562
+
2563
+
2564
+ ```ts
2565
+ type AutomationInputContext = {
2566
+ source: "trigger" | "task"
2567
+ task_id?: string
2537
2568
  }
2538
2569
  ```
2539
2570
 
@@ -2756,6 +2787,7 @@ type DecisionTask = {
2756
2787
  value_type?: { ... }
2757
2788
  }>
2758
2789
  }>
2790
+ allow_parallel_execution?: boolean
2759
2791
  schedule?: {
2760
2792
  mode: "delayed"
2761
2793
  duration: number
package/docs/workflow.md CHANGED
@@ -129,6 +129,7 @@ const { data } = await workflowClient.getExecutions(...)
129
129
  - [`Phase`](#phase)
130
130
  - [`Edge`](#edge)
131
131
  - [`AutomationInfo`](#automationinfo)
132
+ - [`AutomationInputContext`](#automationinputcontext)
132
133
  - [`AnalyticsInfo`](#analyticsinfo)
133
134
  - [`ConditionId`](#conditionid)
134
135
  - [`Condition`](#condition)
@@ -721,7 +722,11 @@ const { data } = await client.startFlowExecution(
721
722
  flow_id: 'string',
722
723
  execution_id: 'string',
723
724
  execution_status: 'string',
724
- error_reason: 'string'
725
+ error_reason: 'string',
726
+ input_context: {
727
+ source: 'trigger',
728
+ task_id: 'string'
729
+ }
725
730
  }
726
731
  },
727
732
  contexts: [
@@ -855,7 +860,8 @@ const { data } = await client.startFlowExecution(
855
860
  "flow_id": "string",
856
861
  "execution_id": "string",
857
862
  "execution_status": "string",
858
- "error_reason": "string"
863
+ "error_reason": "string",
864
+ "input_context": {}
859
865
  }
860
866
  },
861
867
  "singleClosingReasonSelection": true
@@ -997,7 +1003,8 @@ const { data } = await client.getFlowExecution({
997
1003
  "flow_id": "string",
998
1004
  "execution_id": "string",
999
1005
  "execution_status": "string",
1000
- "error_reason": "string"
1006
+ "error_reason": "string",
1007
+ "input_context": {}
1001
1008
  }
1002
1009
  },
1003
1010
  "singleClosingReasonSelection": true
@@ -1175,7 +1182,8 @@ const { data } = await client.patchFlowExecution(
1175
1182
  "flow_id": "string",
1176
1183
  "execution_id": "string",
1177
1184
  "execution_status": "string",
1178
- "error_reason": "string"
1185
+ "error_reason": "string",
1186
+ "input_context": {}
1179
1187
  }
1180
1188
  },
1181
1189
  "singleClosingReasonSelection": true
@@ -1285,7 +1293,11 @@ const { data } = await client.patchTask(
1285
1293
  flow_id: 'string',
1286
1294
  execution_id: 'string',
1287
1295
  execution_status: 'string',
1288
- error_reason: 'string'
1296
+ error_reason: 'string',
1297
+ input_context: {
1298
+ source: 'trigger',
1299
+ task_id: 'string'
1300
+ }
1289
1301
  },
1290
1302
  description: {
1291
1303
  enabled: true,
@@ -1510,7 +1522,11 @@ const { data } = await client.runTaskAutomation({
1510
1522
  "flow_id": "string",
1511
1523
  "execution_id": "string",
1512
1524
  "execution_status": "string",
1513
- "error_reason": "string"
1525
+ "error_reason": "string",
1526
+ "input_context": {
1527
+ "source": "trigger",
1528
+ "task_id": "string"
1529
+ }
1514
1530
  },
1515
1531
  "automation_execution_id": "string",
1516
1532
  "trigger_mode": "manual",
@@ -1731,7 +1747,11 @@ const { data } = await client.addTask(
1731
1747
  flow_id: 'string',
1732
1748
  execution_id: 'string',
1733
1749
  execution_status: 'string',
1734
- error_reason: 'string'
1750
+ error_reason: 'string',
1751
+ input_context: {
1752
+ source: 'trigger',
1753
+ task_id: 'string'
1754
+ }
1735
1755
  },
1736
1756
  phase_id: 'string',
1737
1757
  task_type: 'MANUAL'
@@ -3381,6 +3401,7 @@ type StartFlowReq = {
3381
3401
  execution_id?: { ... }
3382
3402
  execution_status?: { ... }
3383
3403
  error_reason?: { ... }
3404
+ input_context?: { ... }
3384
3405
  }
3385
3406
  }
3386
3407
  contexts: Array<{
@@ -3570,6 +3591,10 @@ type FlowTrigger = {
3570
3591
  execution_id?: string
3571
3592
  execution_status?: string
3572
3593
  error_reason?: string
3594
+ input_context?: {
3595
+ source: { ... }
3596
+ task_id?: { ... }
3597
+ }
3573
3598
  }
3574
3599
  }
3575
3600
  ```
@@ -3889,6 +3914,10 @@ type AutomationTask = {
3889
3914
  execution_id?: string
3890
3915
  execution_status?: string
3891
3916
  error_reason?: string
3917
+ input_context?: {
3918
+ source: { ... }
3919
+ task_id?: { ... }
3920
+ }
3892
3921
  }
3893
3922
  automation_execution_id?: string
3894
3923
  trigger_mode?: "manual" | "automatic"
@@ -3904,10 +3933,6 @@ type AutomationTask = {
3904
3933
  direction: "before" | "after"
3905
3934
  duration: number
3906
3935
  unit: "minutes" | "hours" | "days" | "weeks" | "months"
3907
- reference: {
3908
- id: { ... }
3909
- origin: { ... }
3910
- schema?: { ... }
3911
3936
  // ...
3912
3937
  }
3913
3938
  ```
@@ -4367,6 +4392,22 @@ type AutomationInfo = {
4367
4392
  execution_id?: string
4368
4393
  execution_status?: string
4369
4394
  error_reason?: string
4395
+ input_context?: {
4396
+ source: "trigger" | "task"
4397
+ task_id?: string
4398
+ }
4399
+ }
4400
+ ```
4401
+
4402
+ ### `AutomationInputContext`
4403
+
4404
+ Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
4405
+
4406
+
4407
+ ```ts
4408
+ type AutomationInputContext = {
4409
+ source: "trigger" | "task"
4410
+ task_id?: string
4370
4411
  }
4371
4412
  ```
4372
4413
 
@@ -4573,6 +4614,10 @@ type PatchTaskReq = {
4573
4614
  execution_id?: string
4574
4615
  execution_status?: string
4575
4616
  error_reason?: string
4617
+ input_context?: {
4618
+ source: { ... }
4619
+ task_id?: { ... }
4620
+ }
4576
4621
  }
4577
4622
  description?: {
4578
4623
  enabled?: boolean
@@ -4658,6 +4703,7 @@ type AddTaskReq = {
4658
4703
  execution_id?: { ... }
4659
4704
  execution_status?: { ... }
4660
4705
  error_reason?: { ... }
4706
+ input_context?: { ... }
4661
4707
  }
4662
4708
  phase_id?: string
4663
4709
  task_type?: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.3.8",
3
+ "version": "2.3.10",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,14 +0,0 @@
1
- import {
2
- __commonJS
3
- } from "./chunk-YPSWSI3M.js";
4
-
5
- // src/definitions/configuration-hub-runtime.json
6
- var require_configuration_hub_runtime = __commonJS({
7
- "src/definitions/configuration-hub-runtime.json"(exports, module) {
8
- module.exports = { s: "https://configuration-hub.dev.sls.epilot.io", o: [["listConfigTypes", "get", "/v1/configs/types"], ["listConfigs", "get", "/v1/configs/{type}", [["ConfigType"], ["CursorParam"], ["SizeParam"]]], ["getConfigDependencies", "get", "/v1/configs/{type}/{id}/dependencies", [["ConfigType"], ["ConfigId"], ["CursorParam"], ["SizeParam"]]]], v: "3.0.3", cp: { ConfigType: ["type", "p", true], ConfigId: ["id", "p", true], CursorParam: ["cursor", "q"], SizeParam: ["size", "q"] } };
9
- }
10
- });
11
-
12
- export {
13
- require_configuration_hub_runtime
14
- };