@epilot/sdk 2.18.21 → 2.18.23

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/ai-agents.json +121 -27
  2. package/definitions/customer-portal-runtime.json +1 -1
  3. package/definitions/customer-portal.json +207 -17
  4. package/definitions/message.json +164 -14
  5. package/dist/ai-agents-ME5VRKMY.cjs +7 -0
  6. package/dist/ai-agents-MY4QE4CP.js +7 -0
  7. package/dist/{ai-agents.d-BnR7CAeJ.d.cts → ai-agents.d-B3TkP4mo.d.cts} +152 -52
  8. package/dist/{ai-agents.d-BnR7CAeJ.d.ts → ai-agents.d-B3TkP4mo.d.ts} +152 -52
  9. package/dist/apis/access-token.cjs +6 -6
  10. package/dist/apis/access-token.js +1 -1
  11. package/dist/apis/address-suggestions.cjs +6 -6
  12. package/dist/apis/address-suggestions.js +1 -1
  13. package/dist/apis/address.cjs +6 -6
  14. package/dist/apis/address.js +1 -1
  15. package/dist/apis/ai-agents.cjs +6 -6
  16. package/dist/apis/ai-agents.d.cts +2 -2
  17. package/dist/apis/ai-agents.d.ts +2 -2
  18. package/dist/apis/ai-agents.js +1 -1
  19. package/dist/apis/app.cjs +6 -6
  20. package/dist/apis/app.js +1 -1
  21. package/dist/apis/audit-logs.cjs +6 -6
  22. package/dist/apis/audit-logs.js +1 -1
  23. package/dist/apis/automation.cjs +6 -6
  24. package/dist/apis/automation.js +1 -1
  25. package/dist/apis/billing.cjs +6 -6
  26. package/dist/apis/billing.js +1 -1
  27. package/dist/apis/blueprint-manifest.cjs +6 -6
  28. package/dist/apis/blueprint-manifest.js +1 -1
  29. package/dist/apis/calendar.cjs +6 -6
  30. package/dist/apis/calendar.js +1 -1
  31. package/dist/apis/configuration-hub.cjs +6 -6
  32. package/dist/apis/configuration-hub.js +1 -1
  33. package/dist/apis/consent.cjs +6 -6
  34. package/dist/apis/consent.js +1 -1
  35. package/dist/apis/customer-portal.cjs +8 -8
  36. package/dist/apis/customer-portal.d.cts +2 -2
  37. package/dist/apis/customer-portal.d.ts +2 -2
  38. package/dist/apis/customer-portal.js +2 -2
  39. package/dist/apis/dashboard.cjs +6 -6
  40. package/dist/apis/dashboard.js +1 -1
  41. package/dist/apis/data-governance.cjs +6 -6
  42. package/dist/apis/data-governance.js +1 -1
  43. package/dist/apis/deduplication.cjs +6 -6
  44. package/dist/apis/deduplication.js +1 -1
  45. package/dist/apis/design.cjs +6 -6
  46. package/dist/apis/design.js +1 -1
  47. package/dist/apis/document.cjs +6 -6
  48. package/dist/apis/document.js +1 -1
  49. package/dist/apis/email-settings.cjs +6 -6
  50. package/dist/apis/email-settings.js +1 -1
  51. package/dist/apis/email-template.cjs +6 -6
  52. package/dist/apis/email-template.js +1 -1
  53. package/dist/apis/entity-mapping.cjs +6 -6
  54. package/dist/apis/entity-mapping.js +1 -1
  55. package/dist/apis/entity.cjs +6 -6
  56. package/dist/apis/entity.js +1 -1
  57. package/dist/apis/environments.cjs +6 -6
  58. package/dist/apis/environments.js +1 -1
  59. package/dist/apis/event-catalog.cjs +6 -6
  60. package/dist/apis/event-catalog.js +1 -1
  61. package/dist/apis/file.cjs +6 -6
  62. package/dist/apis/file.js +1 -1
  63. package/dist/apis/iban.cjs +6 -6
  64. package/dist/apis/iban.js +1 -1
  65. package/dist/apis/integration-toolkit.cjs +6 -6
  66. package/dist/apis/integration-toolkit.js +1 -1
  67. package/dist/apis/journey.cjs +6 -6
  68. package/dist/apis/journey.js +1 -1
  69. package/dist/apis/kanban.cjs +6 -6
  70. package/dist/apis/kanban.js +1 -1
  71. package/dist/apis/message.cjs +6 -6
  72. package/dist/apis/message.d.cts +2 -2
  73. package/dist/apis/message.d.ts +2 -2
  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/pricing-tier.cjs +6 -6
  88. package/dist/apis/pricing-tier.js +1 -1
  89. package/dist/apis/pricing.cjs +6 -6
  90. package/dist/apis/pricing.js +1 -1
  91. package/dist/apis/purpose.cjs +6 -6
  92. package/dist/apis/purpose.js +1 -1
  93. package/dist/apis/query.cjs +6 -6
  94. package/dist/apis/query.js +1 -1
  95. package/dist/apis/sandbox.cjs +6 -6
  96. package/dist/apis/sandbox.js +1 -1
  97. package/dist/apis/sharing.cjs +6 -6
  98. package/dist/apis/sharing.js +1 -1
  99. package/dist/apis/snapshot.cjs +6 -6
  100. package/dist/apis/snapshot.js +1 -1
  101. package/dist/apis/submission.cjs +6 -6
  102. package/dist/apis/submission.js +1 -1
  103. package/dist/apis/target.cjs +6 -6
  104. package/dist/apis/target.js +1 -1
  105. package/dist/apis/targeting.cjs +6 -6
  106. package/dist/apis/targeting.js +1 -1
  107. package/dist/apis/template-variables.cjs +6 -6
  108. package/dist/apis/template-variables.js +1 -1
  109. package/dist/apis/user.cjs +6 -6
  110. package/dist/apis/user.js +1 -1
  111. package/dist/apis/validation-rules.cjs +6 -6
  112. package/dist/apis/validation-rules.js +1 -1
  113. package/dist/apis/webhooks.cjs +6 -6
  114. package/dist/apis/webhooks.js +1 -1
  115. package/dist/apis/workflow-definition.cjs +6 -6
  116. package/dist/apis/workflow-definition.js +1 -1
  117. package/dist/apis/workflow.cjs +6 -6
  118. package/dist/apis/workflow.js +1 -1
  119. package/dist/{chunk-EPDH37RS.js → chunk-AWKA7GZQ.js} +1 -1
  120. package/dist/{chunk-ZCEIXRDJ.cjs → chunk-J57SWYWL.cjs} +4 -4
  121. package/dist/{chunk-LKV3RKOP.cjs → chunk-QKEPXYEF.cjs} +1 -1
  122. package/dist/{chunk-C2BFLFHE.js → chunk-SCBBLLBK.js} +4 -4
  123. package/dist/customer-portal-JLUT56QQ.js +7 -0
  124. package/dist/customer-portal-NUYHT3HX.cjs +7 -0
  125. package/dist/{customer-portal-runtime-FZQLCEJQ.js → customer-portal-runtime-6CECA6UW.js} +1 -1
  126. package/dist/{customer-portal-runtime-7WW3YRWJ.cjs → customer-portal-runtime-QMONBHLN.cjs} +2 -2
  127. package/dist/{customer-portal.d-JVkJjm_e.d.cts → customer-portal.d-Ce8-UnSY.d.cts} +794 -42
  128. package/dist/{customer-portal.d-JVkJjm_e.d.ts → customer-portal.d-Ce8-UnSY.d.ts} +794 -42
  129. package/dist/index.cjs +10 -10
  130. package/dist/index.d.cts +3 -3
  131. package/dist/index.d.ts +3 -3
  132. package/dist/index.js +2 -2
  133. package/dist/message-LJ32JH6Z.cjs +7 -0
  134. package/dist/message-SSTVRGEF.js +7 -0
  135. package/dist/{message.d-BHWCGH3q.d.cts → message.d-DwnqO-Us.d.cts} +366 -25
  136. package/dist/{message.d-BHWCGH3q.d.ts → message.d-DwnqO-Us.d.ts} +366 -25
  137. package/docs/ai-agents.md +76 -19
  138. package/docs/customer-portal.md +209 -13
  139. package/docs/message.md +126 -2
  140. package/package.json +1 -1
  141. package/dist/ai-agents-3JK4UU2G.js +0 -7
  142. package/dist/ai-agents-XST3YUFA.cjs +0 -7
  143. package/dist/customer-portal-JDIXJD6C.cjs +0 -7
  144. package/dist/customer-portal-WIRQ7UCN.js +0 -7
  145. package/dist/message-BZN67NTB.js +0 -7
  146. package/dist/message-DBHA4PHI.cjs +0 -7
package/docs/ai-agents.md CHANGED
@@ -73,6 +73,8 @@ const { data } = await aiAgentsClient.createAgent(...)
73
73
  - [`PendingAction`](#pendingaction)
74
74
  - [`ExecutionError`](#executionerror)
75
75
  - [`ExecutionMetrics`](#executionmetrics)
76
+ - [`AgentExecutionEventStatus`](#agentexecutioneventstatus)
77
+ - [`AgentExecutionEvent`](#agentexecutionevent)
76
78
  - [`ToolPreview`](#toolpreview)
77
79
  - [`PreviewActionType`](#previewactiontype)
78
80
  - [`PreviewEntity`](#previewentity)
@@ -105,7 +107,7 @@ const { data } = await aiAgentsClient.createAgent(...)
105
107
 
106
108
  ### `createAgent`
107
109
 
108
- Create Agent definition
110
+ Creates a new custom agent. System skills cannot be created via this endpoint.
109
111
 
110
112
  `POST /v1/agents`
111
113
 
@@ -215,7 +217,8 @@ const { data } = await client.createAgent(
215
217
 
216
218
  ### `listAgents`
217
219
 
218
- List all agent configurations
220
+ Lists agents from both system skills and custom agents.
221
+ Use query parameters to filter by source, availability, or entity schema.
219
222
 
220
223
  `GET /v1/agents`
221
224
 
@@ -292,7 +295,9 @@ const { data } = await client.listAgents({
292
295
 
293
296
  ### `getAgentById`
294
297
 
295
- Get the agent configuration by ID
298
+ Retrieves an agent by ID. Supports both:
299
+ - System skill IDs (prefixed): "skill:email-categorizer"
300
+ - Custom agent IDs (UUID): "0336a235-9417-4dd8-894c-fe81285bba75"
296
301
 
297
302
  `GET /v1/agents/{agent_id}`
298
303
 
@@ -362,7 +367,7 @@ const { data } = await client.getAgentById({
362
367
 
363
368
  ### `updateAgentById`
364
369
 
365
- Update the agent configuration by ID
370
+ Updates a custom agent. System skills cannot be updated via this endpoint.
366
371
 
367
372
  `PUT /v1/agents/{agent_id}`
368
373
 
@@ -474,7 +479,7 @@ const { data } = await client.updateAgentById(
474
479
 
475
480
  ### `deleteAgentById`
476
481
 
477
- Delete the agent configuration by ID
482
+ Deletes a custom agent. System skills cannot be deleted via this endpoint.
478
483
 
479
484
  `DELETE /v1/agents/{agent_id}`
480
485
 
@@ -488,7 +493,10 @@ const { data } = await client.deleteAgentById({
488
493
 
489
494
  ### `executeAgent`
490
495
 
491
- Execute an agent
496
+ Executes an agent (system skill or custom agent).
497
+ Supports both:
498
+ - System skill IDs (prefixed): "skill:email-categorizer"
499
+ - Custom agent IDs (UUID): "0336a235-9417-4dd8-894c-fe81285bba75"
492
500
 
493
501
  `POST /v1/agents/{agent_id}/execute`
494
502
 
@@ -624,7 +632,9 @@ const { data } = await client.executeAgent(
624
632
 
625
633
  ### `executeAgentStream`
626
634
 
627
- Execute an agent with streaming response
635
+ Executes an agent with real-time streaming of tokens and tool events.
636
+ Returns Server-Sent Events (SSE) stream with token-by-token output,
637
+ tool call progress, and completion status.
628
638
 
629
639
  `POST /v1/agents/{agent_id}/execute/stream`
630
640
 
@@ -1007,7 +1017,7 @@ const { data } = await client.cancelExecution({
1007
1017
 
1008
1018
  ### `getExecutionTrace`
1009
1019
 
1010
- Get execution trace/iterations
1020
+ Returns the step-by-step reasoning and tool calls for ReAct mode executions. Returns empty iterations array for direct mode executions.
1011
1021
 
1012
1022
  `GET /v1/executions/{execution_id}/trace`
1013
1023
 
@@ -1113,7 +1123,7 @@ const { data } = await client.putExecutionFeedback(
1113
1123
 
1114
1124
  ### `approveExecution`
1115
1125
 
1116
- Approve pending action
1126
+ Approves a pending tool action when execution is in waiting_approval status
1117
1127
 
1118
1128
  `POST /v1/executions/{execution_id}/approve`
1119
1129
 
@@ -1125,8 +1135,7 @@ const { data } = await client.approveExecution(
1125
1135
  {
1126
1136
  reason: 'string',
1127
1137
  approved_action_ids: ['string'],
1128
- rejected_action_ids: ['string'],
1129
- share_scope: 'primary_only'
1138
+ rejected_action_ids: ['string']
1130
1139
  },
1131
1140
  )
1132
1141
  ```
@@ -1234,7 +1243,7 @@ const { data } = await client.approveExecution(
1234
1243
 
1235
1244
  ### `rejectExecution`
1236
1245
 
1237
- Reject pending action
1246
+ Rejects a pending tool action when execution is in waiting_approval status
1238
1247
 
1239
1248
  `POST /v1/executions/{execution_id}/reject`
1240
1249
 
@@ -1352,7 +1361,7 @@ const { data } = await client.rejectExecution(
1352
1361
 
1353
1362
  ### `streamExecution`
1354
1363
 
1355
- Reconnect to execution stream
1364
+ Reconnects to an execution's event stream after approval. Replays missed events from event log and continues streaming if execution is still running.
1356
1365
 
1357
1366
  `GET /v1/executions/{execution_id}/stream`
1358
1367
 
@@ -1367,7 +1376,7 @@ const { data } = await client.streamExecution({
1367
1376
 
1368
1377
  ### `chat`
1369
1378
 
1370
- Streaming chat with AI agent
1379
+ Initiates a streaming chat session with an AI agent. Supports server-side conversation memory via conversationId or client-provided history via clientHistory.
1371
1380
 
1372
1381
  `POST /v1/chat`
1373
1382
 
@@ -1409,7 +1418,7 @@ const { data } = await client.chat(
1409
1418
 
1410
1419
  ### `listConversations`
1411
1420
 
1412
- List conversations
1421
+ Lists conversations for the authenticated user, sorted by most recent.
1413
1422
 
1414
1423
  `GET /v1/conversations`
1415
1424
 
@@ -1453,7 +1462,7 @@ const { data } = await client.listConversations({
1453
1462
 
1454
1463
  ### `getConversation`
1455
1464
 
1456
- Get conversation with messages
1465
+ Retrieves a conversation and its message history.
1457
1466
 
1458
1467
  `GET /v1/conversations/{conversation_id}`
1459
1468
 
@@ -1517,7 +1526,7 @@ const { data } = await client.getConversation({
1517
1526
 
1518
1527
  ### `deleteConversation`
1519
1528
 
1520
- Delete conversation
1529
+ Deletes a conversation and all its messages.
1521
1530
 
1522
1531
  `DELETE /v1/conversations/{conversation_id}`
1523
1532
 
@@ -1531,7 +1540,7 @@ const { data } = await client.deleteConversation({
1531
1540
 
1532
1541
  ### `submitConversationFeedback`
1533
1542
 
1534
- Submit feedback for an assistant turn
1543
+ Records a thumbs up/down (with optional comment) for the assistant turn identified by its Langfuse trace id. The rating is persisted on the message and mirrored to Langfuse as a trace score.
1535
1544
 
1536
1545
  `POST /v1/conversations/{conversation_id}/feedback`
1537
1546
 
@@ -1827,7 +1836,6 @@ type ApproveExecutionRequest = {
1827
1836
  reason?: string
1828
1837
  approved_action_ids?: string[]
1829
1838
  rejected_action_ids?: string[]
1830
- share_scope?: "primary_only" | "primary_and_relations"
1831
1839
  }
1832
1840
  ```
1833
1841
 
@@ -2072,6 +2080,55 @@ type ExecutionMetrics = {
2072
2080
  }
2073
2081
  ```
2074
2082
 
2083
+ ### `AgentExecutionEventStatus`
2084
+
2085
+ Lifecycle status carried on an agent execution event.
2086
+
2087
+ Deliberately narrower than `ExecutionStatus`, which is the stored status of
2088
+ the execution row: `pending` and `running` both surface as `started`, and
2089
+ `cancelled` surfaces as `failed`. Consumers must not assume the two
2090
+ vocabularies are interchang
2091
+
2092
+ ```ts
2093
+ type AgentExecutionEventStatus = "started" | "completed" | "failed" | "approval_required"
2094
+ ```
2095
+
2096
+ ### `AgentExecutionEvent`
2097
+
2098
+ Detail payload of the `agent-execution-status-update` event, published on
2099
+ the AI Agents event bus with source `ai-agents`.
2100
+
2101
+ `execution_context` and `input` are present on every status, so a consumer
2102
+ can tell whether an execution is theirs, and what it belonged to, from the
2103
+ terminal event alone — wit
2104
+
2105
+ ```ts
2106
+ type AgentExecutionEvent = {
2107
+ executionId: string
2108
+ agentId: string
2109
+ orgId: string
2110
+ userId?: string
2111
+ execution_status: "started" | "completed" | "failed" | "approval_required"
2112
+ execution_context?: "flows" | "copilot" | "api"
2113
+ input?: Record<string, unknown>
2114
+ output?: Record<string, unknown>
2115
+ error?: {
2116
+ message?: string
2117
+ code?: string
2118
+ stack?: string
2119
+ }
2120
+ duration?: number
2121
+ iterations?: number
2122
+ iteration?: number
2123
+ message?: string
2124
+ toolCalls?: Array<{
2125
+ name?: string
2126
+ args?: Record<string, unknown>
2127
+ }>
2128
+ timestamp?: string // date-time
2129
+ }
2130
+ ```
2131
+
2075
2132
  ### `ToolPreview`
2076
2133
 
2077
2134
  Structured preview data for approval UI. Provides a generic format that any tool can populate.
@@ -131,6 +131,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
131
131
  - [`createCustomEntityActivity`](#createcustomentityactivity)
132
132
  - [`saveEntityFile`](#saveentityfile)
133
133
  - [`deleteEntityFile`](#deleteentityfile)
134
+ - [`getFilePreview`](#getfilepreview)
134
135
  - [`trackFileDownloaded`](#trackfiledownloaded)
135
136
  - [`getBillingEvents`](#getbillingevents)
136
137
  - [`triggerEntityAccessEvent`](#triggerentityaccessevent)
@@ -141,6 +142,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
141
142
  - [`updateWorkflowStepAsDone`](#updateworkflowstepasdone)
142
143
  - [`getEntityWorkflows`](#getentityworkflows)
143
144
  - [`getEntityPortalWorkflows`](#getentityportalworkflows)
145
+ - [`getEntityPortalWorkflowsBatch`](#getentityportalworkflowsbatch)
144
146
  - [`uploadMeterReadingPhoto`](#uploadmeterreadingphoto)
145
147
  - [`createMeterReading`](#createmeterreading)
146
148
  - [`getAllowedMeterReadingRange`](#getallowedmeterreadingrange)
@@ -245,6 +247,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
245
247
  - [`EntityEditRule`](#entityeditrule)
246
248
  - [`ActivityItem`](#activityitem)
247
249
  - [`FileItem`](#fileitem)
250
+ - [`FilePreviewResult`](#filepreviewresult)
248
251
  - [`EntityFileCount`](#entityfilecount)
249
252
  - [`AdminUser`](#adminuser)
250
253
  - [`Grant`](#grant)
@@ -256,6 +259,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
256
259
  - [`WorkflowStep`](#workflowstep)
257
260
  - [`PortalWorkflow`](#portalworkflow)
258
261
  - [`PortalWorkflowTask`](#portalworkflowtask)
262
+ - [`EntityPortalWorkflows`](#entityportalworkflows)
259
263
  - [`PortalTaskConfig`](#portaltaskconfig)
260
264
  - [`BaseBillingEvent`](#basebillingevent)
261
265
  - [`InstallmentEvent`](#installmentevent)
@@ -2056,7 +2060,7 @@ const { data } = await client.getPublicPortalExtensionDetailsV3({
2056
2060
 
2057
2061
  ### `getConsumption`
2058
2062
 
2059
- Get Consumption
2063
+ Get energy consumption data between a given time period.
2060
2064
 
2061
2065
  `GET /v2/portal/consumption`
2062
2066
 
@@ -2095,7 +2099,7 @@ const { data } = await client.getConsumption({
2095
2099
 
2096
2100
  ### `prepareVisualizationExport`
2097
2101
 
2098
- Prepare Visualization Export
2102
+ Asks an installed App to prepare a downloadable export of a visualization (consumption chart, dynamic tariff chart, etc.). The export is produced by the third-party App via a configured portal extensi
2099
2103
 
2100
2104
  `POST /v2/portal/visualization:export`
2101
2105
 
@@ -2136,7 +2140,7 @@ const { data } = await client.prepareVisualizationExport(
2136
2140
 
2137
2141
  ### `getVisualizationMetadata`
2138
2142
 
2139
- Get Visualization Metadata
2143
+ Returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). Resolves the extension's `visualization
2140
2144
 
2141
2145
  `GET /v2/portal/visualization/metadata`
2142
2146
 
@@ -2178,7 +2182,7 @@ const { data } = await client.getVisualizationMetadata({
2178
2182
 
2179
2183
  ### `getCosts`
2180
2184
 
2181
- Get Costs
2185
+ Get energy cost data between a given time period.
2182
2186
 
2183
2187
  `GET /v2/portal/costs`
2184
2188
 
@@ -2219,7 +2223,7 @@ const { data } = await client.getCosts({
2219
2223
 
2220
2224
  ### `getPrices`
2221
2225
 
2222
- Get Prices
2226
+ Get energy prices data between a given time period.
2223
2227
 
2224
2228
  `GET /v2/portal/prices`
2225
2229
 
@@ -5767,6 +5771,33 @@ const { data } = await client.getRegistrationIdentifiers()
5767
5771
 
5768
5772
  ---
5769
5773
 
5774
+ ### `getFilePreview`
5775
+
5776
+ resolves an in-portal preview for a file. Returns a Content-Disposition: inline URL for directly-previewable files (PDF, common image formats), or a document-api PDF conversion result for the Office f
5777
+
5778
+ `GET /v2/portal/user/file/{id}/preview`
5779
+
5780
+ ```ts
5781
+ const { data } = await client.getFilePreview({
5782
+ id: '123e4567-e89b-12d3-a456-426614174000',
5783
+ })
5784
+ ```
5785
+
5786
+ <details>
5787
+ <summary>Response</summary>
5788
+
5789
+ ```json
5790
+ {
5791
+ "kind": "pdf",
5792
+ "url": "https://example.com/path",
5793
+ "download_url": "https://example.com/path"
5794
+ }
5795
+ ```
5796
+
5797
+ </details>
5798
+
5799
+ ---
5800
+
5770
5801
  ### `trackFileDownloaded`
5771
5802
 
5772
5803
  Track that user has downloaded a file
@@ -6386,7 +6417,7 @@ const { data } = await client.updateWorkflowStepAsDone({
6386
6417
 
6387
6418
  ### `getEntityWorkflows`
6388
6419
 
6389
- Get workflows for an entity
6420
+ Get all workflows associated with an entity (requires access to the entity)
6390
6421
 
6391
6422
  `GET /v2/portal/entity/{slug}/{id}/workflows`
6392
6423
 
@@ -6448,7 +6479,8 @@ const { data } = await client.getEntityWorkflows({
6448
6479
 
6449
6480
  ### `getEntityPortalWorkflows`
6450
6481
 
6451
- Get linearized workflows for an entity
6482
+ Get all portal-relevant workflows associated with an entity (requires access to the entity),
6483
+ linearized by the Workflows API into a flat, ordered list of portal-visible tasks.
6452
6484
 
6453
6485
  `GET /v2/portal/entity/{slug}/{id}/workflows/linearized`
6454
6486
 
@@ -6535,9 +6567,112 @@ const { data } = await client.getEntityPortalWorkflows({
6535
6567
 
6536
6568
  ---
6537
6569
 
6570
+ ### `getEntityPortalWorkflowsBatch`
6571
+
6572
+ Batch variant of `getEntityPortalWorkflows`: returns portal-relevant workflows for
6573
+ up to 50 entities — schemas may differ — in a single call, each already linearized
6574
+ by the Workflows API into a flat,
6575
+
6576
+ `POST /v2/portal/entities/workflows/linearized/batch`
6577
+
6578
+ ```ts
6579
+ const { data } = await client.getEntityPortalWorkflowsBatch(
6580
+ null,
6581
+ {
6582
+ entities: [
6583
+ {
6584
+ id: 'string',
6585
+ slug: 'order'
6586
+ }
6587
+ ]
6588
+ },
6589
+ )
6590
+ ```
6591
+
6592
+ <details>
6593
+ <summary>Response</summary>
6594
+
6595
+ ```json
6596
+ {
6597
+ "results": [
6598
+ {
6599
+ "entity_id": "string",
6600
+ "portal_workflows": [
6601
+ {
6602
+ "id": "string",
6603
+ "definition_id": "string",
6604
+ "name": "string",
6605
+ "status": "STARTED",
6606
+ "version": 2,
6607
+ "created_at": "string",
6608
+ "updated_at": "string",
6609
+ "completed_at": "string",
6610
+ "due_date": "string",
6611
+ "assigned_to": ["string"],
6612
+ "contexts": [
6613
+ {
6614
+ "entity_id": "string",
6615
+ "entity_schema": "string",
6616
+ "is_primary": true
6617
+ }
6618
+ ],
6619
+ "is_path_complete": true,
6620
+ "tasks": [
6621
+ {
6622
+ "id": "string",
6623
+ "name": "string",
6624
+ "order": 0,
6625
+ "status": "COMPLETED",
6626
+ "is_active": true,
6627
+ "ecp": {
6628
+ "enabled": true,
6629
+ "label": "string",
6630
+ "description": "string",
6631
+ "journey": {
6632
+ "id": "string",
6633
+ "journeyId": "string",
6634
+ "name": "string",
6635
+ "complete_task_automatically": true
6636
+ }
6637
+ },
6638
+ "installer": {
6639
+ "enabled": true,
6640
+ "label": "string",
6641
+ "description": "string",
6642
+ "journey": {
6643
+ "id": "string",
6644
+ "journeyId": "string",
6645
+ "name": "string",
6646
+ "complete_task_automatically": true
6647
+ }
6648
+ },
6649
+ "journey": {
6650
+ "id": "string",
6651
+ "journeyId": "string",
6652
+ "name": "string",
6653
+ "complete_task_automatically": true
6654
+ },
6655
+ "assigned_to": ["string"],
6656
+ "phase_id": "string",
6657
+ "phase_name": "string",
6658
+ "completed_at": "string",
6659
+ "updated_at": "string"
6660
+ }
6661
+ ]
6662
+ }
6663
+ ]
6664
+ }
6665
+ ]
6666
+ }
6667
+ ```
6668
+
6669
+ </details>
6670
+
6671
+ ---
6672
+
6538
6673
  ### `uploadMeterReadingPhoto`
6539
6674
 
6540
- Upload Meter Reading Photo
6675
+ Uploads a Meter Reading photo and - if enabled - gives back data extracted from the photo.
6541
6676
 
6542
6677
  `POST /v2/portal/metering/reading/photo`
6543
6678
 
@@ -6578,7 +6713,7 @@ const { data } = await client.uploadMeterReadingPhoto(
6578
6713
 
6579
6714
  ### `createMeterReading`
6580
6715
 
6581
- Create Meter Reading
6716
+ Inserts a new meter reading.
6582
6717
 
6583
6718
  `POST /v2/portal/metering/reading`
6584
6719
 
@@ -6638,6 +6773,10 @@ const { data } = await client.createMeterReading(
6638
6773
 
6639
6774
  ### `getAllowedMeterReadingRange`
6640
6775
 
6776
+ Get allowed reading range for all counters of a meter from the configured
6777
+ third-party plausibility check hook using 'range' mode. This endpoint requires
6778
+ a plausibility check hook to be configured for
6779
+
6641
6780
  `GET /v2/portal/metering/reading/allowed-range/{meter_id}`
6642
6781
 
6643
6782
  ```ts
@@ -6670,7 +6809,8 @@ const { data } = await client.getAllowedMeterReadingRange({
6670
6809
 
6671
6810
  ### `getMeterReadings`
6672
6811
 
6673
- Get meter readings with optional template resolution
6812
+ Fetches meter readings for a counter and optionally resolves Handlebars
6813
+ template strings against each reading object using @epilot/variables.
6674
6814
 
6675
6815
  `POST /v2/portal/metering/readings`
6676
6816
 
@@ -7694,7 +7834,7 @@ const { data } = await client.getUserEntryPoint({
7694
7834
 
7695
7835
  ### `updateCampaignPortalBlockStatus`
7696
7836
 
7697
- Update Campaign Portal Block Status
7837
+ Updates the status of a campaign portal block for multiple recipients.
7698
7838
 
7699
7839
  `PUT /v2/portal/campaign/{campaign_id}/entity:status`
7700
7840
 
@@ -9422,7 +9562,7 @@ const { data } = await client.swapPortalConfig(
9422
9562
  {
9423
9563
  source_portal_id: '453ad7bf-86d5-46c8-8252-bcc868df5e3c',
9424
9564
  target_portal_id: '453ad7bf-86d5-46c8-8252-bcc868df5e3c',
9425
- items_to_swap: ['all']
9565
+ items_to_swap: ['email_templates']
9426
9566
  },
9427
9567
  )
9428
9568
  ```
@@ -10338,6 +10478,7 @@ type ContextEntities = Array<{
10338
10478
  ```ts
10339
10479
  type ErrorResp = {
10340
10480
  message?: string
10481
+ reason?: string
10341
10482
  }
10342
10483
  ```
10343
10484
 
@@ -11923,6 +12064,16 @@ type FileItem = {
11923
12064
  }
11924
12065
  ```
11925
12066
 
12067
+ ### `FilePreviewResult`
12068
+
12069
+ ```ts
12070
+ type FilePreviewResult = {
12071
+ kind: "pdf" | "image" | "unsupported"
12072
+ url?: string // uri
12073
+ download_url?: string // uri
12074
+ }
12075
+ ```
12076
+
11926
12077
  ### `EntityFileCount`
11927
12078
 
11928
12079
  ```ts
@@ -12138,6 +12289,49 @@ type PortalWorkflowTask = {
12138
12289
  }
12139
12290
  ```
12140
12291
 
12292
+ ### `EntityPortalWorkflows`
12293
+
12294
+ Linearized portal workflows of a single entity
12295
+
12296
+ ```ts
12297
+ type EntityPortalWorkflows = {
12298
+ entity_id: string
12299
+ portal_workflows: Array<{
12300
+ id: string
12301
+ definition_id?: string
12302
+ name: string
12303
+ status: "STARTED" | "DONE" | "CLOSED"
12304
+ version: 2 | 3
12305
+ created_at?: string
12306
+ updated_at?: string
12307
+ completed_at?: string
12308
+ due_date?: string
12309
+ assigned_to?: string[]
12310
+ contexts?: Array<{
12311
+ entity_id?: { ... }
12312
+ entity_schema?: { ... }
12313
+ is_primary?: { ... }
12314
+ }>
12315
+ is_path_complete: boolean
12316
+ tasks: Array<{
12317
+ id: { ... }
12318
+ name: { ... }
12319
+ order: { ... }
12320
+ status: { ... }
12321
+ is_active: { ... }
12322
+ ecp?: { ... }
12323
+ installer?: { ... }
12324
+ journey?: { ... }
12325
+ assigned_to?: { ... }
12326
+ phase_id?: { ... }
12327
+ phase_name?: { ... }
12328
+ completed_at?: { ... }
12329
+ updated_at?: { ... }
12330
+ }>
12331
+ }>
12332
+ }
12333
+ ```
12334
+
12141
12335
  ### `PortalTaskConfig`
12142
12336
 
12143
12337
  Portal-specific (ECP / installer) display config of a workflow task
@@ -14174,8 +14368,10 @@ type JuiceSettings = {
14174
14368
 
14175
14369
  ### `SwappableConfig`
14176
14370
 
14371
+ Optional configuration item that a portal swap can additionally include. The swap always transfers the pages and the functional experience config that keep the portal working. These items are opt-in on top of that and are OFF by default. Domain and access/security settings (domain, cognito_details,
14372
+
14177
14373
  ```ts
14178
- type SwappableConfig = "all" | "domain" | "users" | "email_templates"
14374
+ type SwappableConfig = "email_templates"
14179
14375
  ```
14180
14376
 
14181
14377
  ### `PortalUserRegistrationStatus`