@epilot/sdk 2.18.21 → 2.18.22
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.
- package/definitions/ai-agents.json +121 -27
- package/definitions/customer-portal-runtime.json +1 -1
- package/definitions/customer-portal.json +207 -17
- package/dist/ai-agents-ME5VRKMY.cjs +7 -0
- package/dist/ai-agents-MY4QE4CP.js +7 -0
- package/dist/{ai-agents.d-BnR7CAeJ.d.cts → ai-agents.d-B3TkP4mo.d.cts} +152 -52
- package/dist/{ai-agents.d-BnR7CAeJ.d.ts → ai-agents.d-B3TkP4mo.d.ts} +152 -52
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.d.cts +2 -2
- package/dist/apis/ai-agents.d.ts +2 -2
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +8 -8
- package/dist/apis/customer-portal.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- package/dist/apis/customer-portal.js +2 -2
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-EPDH37RS.js → chunk-AWKA7GZQ.js} +1 -1
- package/dist/{chunk-ZCEIXRDJ.cjs → chunk-QAEAAKLA.cjs} +3 -3
- package/dist/{chunk-LKV3RKOP.cjs → chunk-QKEPXYEF.cjs} +1 -1
- package/dist/{chunk-C2BFLFHE.js → chunk-S6BWLYUQ.js} +3 -3
- package/dist/customer-portal-JLUT56QQ.js +7 -0
- package/dist/customer-portal-NUYHT3HX.cjs +7 -0
- package/dist/{customer-portal-runtime-FZQLCEJQ.js → customer-portal-runtime-6CECA6UW.js} +1 -1
- package/dist/{customer-portal-runtime-7WW3YRWJ.cjs → customer-portal-runtime-QMONBHLN.cjs} +2 -2
- package/dist/{customer-portal.d-JVkJjm_e.d.cts → customer-portal.d-Ce8-UnSY.d.cts} +794 -42
- package/dist/{customer-portal.d-JVkJjm_e.d.ts → customer-portal.d-Ce8-UnSY.d.ts} +794 -42
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/docs/ai-agents.md +76 -19
- package/docs/customer-portal.md +209 -13
- package/package.json +1 -1
- package/dist/ai-agents-3JK4UU2G.js +0 -7
- package/dist/ai-agents-XST3YUFA.cjs +0 -7
- package/dist/customer-portal-JDIXJD6C.cjs +0 -7
- package/dist/customer-portal-WIRQ7UCN.js +0 -7
package/docs/customer-portal.md
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: ['
|
|
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 = "
|
|
14374
|
+
type SwappableConfig = "email_templates"
|
|
14179
14375
|
```
|
|
14180
14376
|
|
|
14181
14377
|
### `PortalUserRegistrationStatus`
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/ai-agents.json
|
|
4
|
-
var ai_agents_default = '# AI Agents API\n\n- **Base URL:** `https://ai-agents.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/ai-agents](https://docs.epilot.io/api/ai-agents)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.aiAgents.createAgent(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/ai-agents\'\n\nconst aiAgentsClient = getClient()\nauthorize(aiAgentsClient, () => \'<token>\')\nconst { data } = await aiAgentsClient.createAgent(...)\n```\n\n## Operations\n\n**Agents Configuration**\n- [`createAgent`](#createagent)\n- [`listAgents`](#listagents)\n- [`getAgentById`](#getagentbyid)\n- [`updateAgentById`](#updateagentbyid)\n- [`deleteAgentById`](#deleteagentbyid)\n\n**Agent Execution**\n- [`executeAgent`](#executeagent)\n- [`executeAgentStream`](#executeagentstream)\n- [`listExecutions`](#listexecutions)\n- [`getExecution`](#getexecution)\n- [`cancelExecution`](#cancelexecution)\n- [`getExecutionTrace`](#getexecutiontrace)\n- [`getExecutionFeedback`](#getexecutionfeedback)\n- [`putExecutionFeedback`](#putexecutionfeedback)\n- [`approveExecution`](#approveexecution)\n- [`rejectExecution`](#rejectexecution)\n- [`streamExecution`](#streamexecution)\n\n**Chat**\n- [`chat`](#chat)\n\n**Conversations**\n- [`listConversations`](#listconversations)\n- [`getConversation`](#getconversation)\n- [`deleteConversation`](#deleteconversation)\n- [`submitConversationFeedback`](#submitconversationfeedback)\n\n**Schemas**\n- [`AgentId`](#agentid)\n- [`CreateAgentRequest`](#createagentrequest)\n- [`UpdateAgentRequest`](#updateagentrequest)\n- [`AgentDefinition`](#agentdefinition)\n- [`ListAgentsResponse`](#listagentsresponse)\n- [`ListExecutionsResponse`](#listexecutionsresponse)\n- [`ApproveExecutionRequest`](#approveexecutionrequest)\n- [`RejectExecutionRequest`](#rejectexecutionrequest)\n- [`ExecuteAgentRequest`](#executeagentrequest)\n- [`ExecutionResponse`](#executionresponse)\n- [`ExecutionIterationProjection`](#executioniterationprojection)\n- [`ExecutionFeedback`](#executionfeedback)\n- [`ExecutionFeedbackResponse`](#executionfeedbackresponse)\n- [`PutExecutionFeedbackRequest`](#putexecutionfeedbackrequest)\n- [`ExecutionTrace`](#executiontrace)\n- [`ExecutionIteration`](#executioniteration)\n- [`PendingAction`](#pendingaction)\n- [`ExecutionError`](#executionerror)\n- [`ExecutionMetrics`](#executionmetrics)\n- [`ToolPreview`](#toolpreview)\n- [`PreviewActionType`](#previewactiontype)\n- [`PreviewEntity`](#previewentity)\n- [`PreviewChange`](#previewchange)\n- [`PreviewValue`](#previewvalue)\n- [`ToolDefinition`](#tooldefinition)\n- [`SkillCategory`](#skillcategory)\n- [`AgentSource`](#agentsource)\n- [`SkillAvailability`](#skillavailability)\n- [`ExecutionContext`](#executioncontext)\n- [`ExecutionPattern`](#executionpattern)\n- [`ExecutionMode`](#executionmode)\n- [`ExecutionStatus`](#executionstatus)\n- [`ParameterType`](#parametertype)\n- [`InputParameterDefinition`](#inputparameterdefinition)\n- [`InputParametersSchema`](#inputparametersschema)\n- [`ModelConfig`](#modelconfig)\n- [`Error`](#error)\n- [`ChatRequest`](#chatrequest)\n- [`ChatMessage`](#chatmessage)\n- [`StreamingOptions`](#streamingoptions)\n- [`StreamEvent`](#streamevent)\n- [`ExecutionResult`](#executionresult)\n- [`ConversationItem`](#conversationitem)\n- [`MessageItem`](#messageitem)\n- [`MessageFeedback`](#messagefeedback)\n- [`SubmitFeedbackRequest`](#submitfeedbackrequest)\n- [`ListConversationsResponse`](#listconversationsresponse)\n- [`ConversationWithMessages`](#conversationwithmessages)\n\n### `createAgent`\n\nCreate Agent definition\n\n`POST /v1/agents`\n\n```ts\nconst { data } = await client.createAgent(\n null,\n {\n name: \'Email Reply Generator\',\n description: \'string\',\n category: \'message\',\n icon: \'mail-reply\',\n system_prompt: \'string\',\n tools: [\'entity.search\', \'message.draft\'],\n model_config: {\n model_id: \'anthropic.claude-3-5-sonnet-20241022-v2:0\',\n temperature: 0.7,\n max_tokens: 4096,\n thinking: false,\n thinking_budget: 10000\n },\n max_iterations: 10,\n execution_pattern: \'direct\',\n execution_mode: \'automatic\',\n output_schema: {},\n input_parameters_schema: {\n type: \'object\',\n parameters: [\n {\n name: \'target_schema\',\n label: \'Target Schema\',\n type: \'entity-schema\',\n description: \'Entity type to create\'\n },\n {\n name: \'confidence_threshold\',\n label: \'Confidence Threshold\',\n type: \'number\',\n minimum: 0,\n maximum: 1,\n default: 0.8\n },\n /* ... 1 more */\n ],\n required: [\'target_schema\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `listAgents`\n\nList all agent configurations\n\n`GET /v1/agents`\n\n```ts\nconst { data } = await client.listAgents({\n source: \'example\',\n availability: \'example\',\n entity_schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agents": [\n {\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getAgentById`\n\nGet the agent configuration by ID\n\n`GET /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.getAgentById({\n agent_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateAgentById`\n\nUpdate the agent configuration by ID\n\n`PUT /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.updateAgentById(\n {\n agent_id: \'example\',\n },\n {\n name: \'string\',\n description: \'string\',\n category: \'message\',\n icon: \'string\',\n system_prompt: \'string\',\n tools: [\'string\'],\n model_config: {\n model_id: \'anthropic.claude-3-5-sonnet-20241022-v2:0\',\n temperature: 0.7,\n max_tokens: 4096,\n thinking: false,\n thinking_budget: 10000\n },\n max_iterations: 1,\n execution_pattern: \'direct\',\n execution_mode: \'automatic\',\n output_schema: {},\n input_parameters_schema: {\n type: \'object\',\n parameters: [\n {\n name: \'target_schema\',\n label: \'Target Schema\',\n type: \'entity-schema\',\n description: \'Entity type to create\'\n },\n {\n name: \'confidence_threshold\',\n label: \'Confidence Threshold\',\n type: \'number\',\n minimum: 0,\n maximum: 1,\n default: 0.8\n },\n /* ... 1 more */\n ],\n required: [\'target_schema\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteAgentById`\n\nDelete the agent configuration by ID\n\n`DELETE /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.deleteAgentById({\n agent_id: \'example\',\n})\n```\n\n---\n\n### `executeAgent`\n\nExecute an agent\n\n`POST /v1/agents/{agent_id}/execute`\n\n```ts\nconst { data } = await client.executeAgent(\n {\n agent_id: \'example\',\n },\n {\n input: {\n entity_id: \'string\',\n entity_schema: \'string\',\n workflow_id: \'string\',\n workflow_execution_id: \'string\',\n task_id: \'string\',\n custom_data: {},\n flow_context: [\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n }\n ]\n },\n parameters: {},\n execution_mode_override: \'automatic\',\n execution_context: \'flows\',\n callback_url: \'https://example.com/path\',\n timeout_ms: 30000\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `executeAgentStream`\n\nExecute an agent with streaming response\n\n`POST /v1/agents/{agent_id}/execute/stream`\n\n```ts\nconst { data } = await client.executeAgentStream(\n {\n agent_id: \'example\',\n },\n {\n input: {\n entity_id: \'string\',\n entity_schema: \'string\',\n workflow_id: \'string\',\n workflow_execution_id: \'string\',\n task_id: \'string\',\n custom_data: {},\n flow_context: [\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n }\n ]\n },\n parameters: {},\n execution_mode_override: \'automatic\',\n execution_context: \'flows\',\n callback_url: \'https://example.com/path\',\n timeout_ms: 30000\n },\n)\n```\n\n---\n\n### `listExecutions`\n\nList executions\n\n`GET /v1/executions`\n\n```ts\nconst { data } = await client.listExecutions({\n agent_id: \'example\',\n status: \'example\',\n limit: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "executions": [\n {\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getExecution`\n\nGet execution by ID\n\n`GET /v1/executions/{execution_id}`\n\n```ts\nconst { data } = await client.getExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `cancelExecution`\n\nCancel execution\n\n`DELETE /v1/executions/{execution_id}`\n\n```ts\nconst { data } = await client.cancelExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getExecutionTrace`\n\nGet execution trace/iterations\n\n`GET /v1/executions/{execution_id}/trace`\n\n```ts\nconst { data } = await client.getExecutionTrace({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "iterations": [\n {\n "iteration_index": 0,\n "thought": "string",\n "action": {\n "tool": "string",\n "input": {}\n },\n "observation": {},\n "timestamp": "1970-01-01T00:00:00.000Z",\n "tokens_used": 0,\n "latency_ms": 0\n }\n ],\n "total_iterations": 0\n}\n```\n\n</details>\n\n---\n\n### `getExecutionFeedback`\n\nGet execution feedback\n\n`GET /v1/executions/{execution_id}/feedback`\n\n```ts\nconst { data } = await client.getExecutionFeedback({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n### `putExecutionFeedback`\n\nSubmit execution feedback\n\n`PUT /v1/executions/{execution_id}/feedback`\n\n```ts\nconst { data } = await client.putExecutionFeedback(\n {\n execution_id: \'example\',\n },\n {\n rating: \'up\',\n comment: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n### `approveExecution`\n\nApprove pending action\n\n`POST /v1/executions/{execution_id}/approve`\n\n```ts\nconst { data } = await client.approveExecution(\n {\n execution_id: \'example\',\n },\n {\n reason: \'string\',\n approved_action_ids: [\'string\'],\n rejected_action_ids: [\'string\'],\n share_scope: \'primary_only\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `rejectExecution`\n\nReject pending action\n\n`POST /v1/executions/{execution_id}/reject`\n\n```ts\nconst { data } = await client.rejectExecution(\n {\n execution_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `streamExecution`\n\nReconnect to execution stream\n\n`GET /v1/executions/{execution_id}/stream`\n\n```ts\nconst { data } = await client.streamExecution({\n execution_id: \'example\',\n from_sequence: 1,\n})\n```\n\n---\n\n### `chat`\n\nStreaming chat with AI agent\n\n`POST /v1/chat`\n\n```ts\nconst { data } = await client.chat(\n null,\n {\n agentId: \'string\',\n message: \'string\',\n conversationId: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n clientHistory: [\n {\n role: \'user\',\n content: \'string\',\n tool_calls: [\n {\n id: \'string\',\n name: \'string\',\n input: {},\n output: \'string\'\n }\n ]\n }\n ],\n context: {\n entityId: \'string\',\n customData: {}\n },\n streaming: {\n mode: \'updates\',\n streamTokens: false,\n includeMetadata: false\n }\n },\n)\n```\n\n---\n\n### `listConversations`\n\nList conversations\n\n`GET /v1/conversations`\n\n```ts\nconst { data } = await client.listConversations({\n agent_id: \'example\',\n limit: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversations": [\n {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "user_id": "string",\n "agent_id": "string",\n "title": "string",\n "message_count": 0,\n "last_message": "string",\n "last_message_at": "1970-01-01T00:00:00.000Z",\n "context": {\n "entityId": "string",\n "customData": {}\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getConversation`\n\nGet conversation with messages\n\n`GET /v1/conversations/{conversation_id}`\n\n```ts\nconst { data } = await client.getConversation({\n conversation_id: \'example\',\n message_limit: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation": {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "user_id": "string",\n "agent_id": "string",\n "title": "string",\n "message_count": 0,\n "last_message": "string",\n "last_message_at": "1970-01-01T00:00:00.000Z",\n "context": {\n "entityId": "string",\n "customData": {}\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n },\n "messages": [\n {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "role": "user",\n "content": "string",\n "timestamp": "1970-01-01T00:00:00.000Z",\n "tool_calls": [\n {\n "id": "string",\n "name": "string",\n "input": {},\n "output": "string"\n }\n ],\n "token_count": 0,\n "trace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `deleteConversation`\n\nDelete conversation\n\n`DELETE /v1/conversations/{conversation_id}`\n\n```ts\nconst { data } = await client.deleteConversation({\n conversation_id: \'example\',\n})\n```\n\n---\n\n### `submitConversationFeedback`\n\nSubmit feedback for an assistant turn\n\n`POST /v1/conversations/{conversation_id}/feedback`\n\n```ts\nconst { data } = await client.submitConversationFeedback(\n {\n conversation_id: \'example\',\n },\n {\n trace_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n rating: \'up\',\n comment: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `AgentId`\n\nAgent identifier. Can be either:\n- System skill ID (prefixed): "skill:email-categorizer", "skill:email-labeler"\n- Custom agent UUID: "0336a235-9417-4dd8-894c-fe81285bba75"\n\n\n```ts\ntype AgentId = string\n```\n\n### `CreateAgentRequest`\n\n```ts\ntype CreateAgentRequest = {\n name: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n system_prompt: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n}\n```\n\n### `UpdateAgentRequest`\n\n```ts\ntype UpdateAgentRequest = {\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n}\n```\n\n### `AgentDefinition`\n\n```ts\ntype AgentDefinition = {\n agent_id?: string\n org_id?: string\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n source?: "system" | "custom"\n availability?: "flows" | "copilot" | "portals" | "all"[]\n allowed_entity_schemas?: string[]\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n version?: number\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n}\n```\n\n### `ListAgentsResponse`\n\n```ts\ntype ListAgentsResponse = {\n agents?: Array<{\n agent_id?: string\n org_id?: string\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n source?: "system" | "custom"\n availability?: "flows" | "copilot" | "portals" | "all"[]\n allowed_entity_schemas?: string[]\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: { ... }\n temperature?: { ... }\n max_tokens?: { ... }\n thinking?: { ... }\n thinking_budget?: { ... }\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: { ... }\n parameters: { ... }\n required?: { ... }\n }\n version?: number\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n }>\n next_cursor?: string\n}\n```\n\n### `ListExecutionsResponse`\n\n```ts\ntype ListExecutionsResponse = {\n executions?: Array<{\n execution_id?: string // uuid\n agent_id?: string\n agent_source?: "system" | "custom"\n agent_name?: string\n execution_context?: "flows" | "copilot" | "api"\n org_id?: string\n status?: "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n input?: object\n parameters?: object\n result?: {\n response?: { ... }\n structured_output?: { ... }\n }\n error?: {\n code?: { ... }\n message?: { ... }\n details?: { ... }\n }\n pending_action?: {\n tool?: { ... }\n input?: { ... }\n description?: { ... }\n preview?: { ... }\n }\n metrics?: {\n total_tokens?: { ... }\n input_tokens?: { ... }\n output_tokens?: { ... }\n total_cost_usd?: { ... }\n duration_ms?: { ... }\n iteration_count?: { ... }\n }\n started_at?: string // date-time\n completed_at?: string // date-time\n iterations?: Array<{\n index?: { ... }\n tool?: { ... }\n status?: { ... }\n timestamp?: { ... }\n }>\n }>\n next_cursor?: string\n}\n```\n\n### `ApproveExecutionRequest`\n\n```ts\ntype ApproveExecutionRequest = {\n reason?: string\n approved_action_ids?: string[]\n rejected_action_ids?: string[]\n share_scope?: "primary_only" | "primary_and_relations"\n}\n```\n\n### `RejectExecutionRequest`\n\n```ts\ntype RejectExecutionRequest = {\n reason: string\n}\n```\n\n### `ExecuteAgentRequest`\n\n```ts\ntype ExecuteAgentRequest = {\n input?: {\n entity_id?: string\n entity_schema?: string\n workflow_id?: string\n workflow_execution_id?: string\n task_id?: string\n custom_data?: Record<string, unknown>\n flow_context?: Array<{\n entity_id: { ... }\n entity_schema: { ... }\n }>\n }\n parameters?: Record<string, unknown>\n execution_mode_override?: "automatic" | "approval" | "draft"\n execution_context?: "flows" | "copilot" | "api"\n callback_url?: string // uri\n timeout_ms?: number\n}\n```\n\n### `ExecutionResponse`\n\n```ts\ntype ExecutionResponse = {\n execution_id?: string // uuid\n agent_id?: string\n agent_source?: "system" | "custom"\n agent_name?: string\n execution_context?: "flows" | "copilot" | "api"\n org_id?: string\n status?: "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n input?: object\n parameters?: object\n result?: {\n response?: string\n structured_output?: object\n }\n error?: {\n code?: "TIMEOUT" | "MAX_ITERATIONS_EXCEEDED" | "TOOL_EXECUTION_FAILED" | "LLM_ERROR" | "INVALID_OUTPUT" | "REJECTED" | "INTERNAL_ERROR"\n message?: string\n details?: object\n }\n pending_action?: {\n tool?: string\n input?: object\n description?: string\n preview?: {\n action?: { ... }\n source?: { ... }\n target?: { ... }\n changes?: { ... }\n metadata?: { ... }\n summary?: { ... }\n }\n }\n metrics?: {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n }\n started_at?: string // date-time\n completed_at?: string // date-time\n iterations?: Array<{\n index?: number\n tool?: string\n status?: "running" | "completed"\n timestamp?: string // date-time\n }>\n}\n```\n\n### `ExecutionIterationProjection`\n\n```ts\ntype ExecutionIterationProjection = {\n index?: number\n tool?: string\n status?: "running" | "completed"\n timestamp?: string // date-time\n}\n```\n\n### `ExecutionFeedback`\n\n```ts\ntype ExecutionFeedback = {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n}\n```\n\n### `ExecutionFeedbackResponse`\n\n```ts\ntype ExecutionFeedbackResponse = {\n feedback: {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n }\n}\n```\n\n### `PutExecutionFeedbackRequest`\n\n```ts\ntype PutExecutionFeedbackRequest = {\n rating: "up" | "down"\n comment?: string\n}\n```\n\n### `ExecutionTrace`\n\n```ts\ntype ExecutionTrace = {\n execution_id?: string // uuid\n iterations?: Array<{\n iteration_index?: number\n thought?: string\n action?: {\n tool?: { ... }\n input?: { ... }\n }\n observation?: object\n timestamp?: string // date-time\n tokens_used?: number\n latency_ms?: number\n }>\n total_iterations?: number\n}\n```\n\n### `ExecutionIteration`\n\n```ts\ntype ExecutionIteration = {\n iteration_index?: number\n thought?: string\n action?: {\n tool?: string\n input?: object\n }\n observation?: object\n timestamp?: string // date-time\n tokens_used?: number\n latency_ms?: number\n}\n```\n\n### `PendingAction`\n\nAction waiting for approval (when status=waiting_approval)\n\n```ts\ntype PendingAction = {\n tool?: string\n input?: object\n description?: string\n preview?: {\n action?: {\n type: { ... }\n verb: { ... }\n }\n source?: {\n type?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n icon?: { ... }\n url?: { ... }\n }\n target?: {\n type?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n icon?: { ... }\n url?: { ... }\n }\n changes?: Array<{\n field?: { ... }\n label?: { ... }\n from?: { ... }\n to?: { ... }\n }>\n metadata?: Record<string, {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }>\n summary?: string\n }\n}\n```\n\n### `ExecutionError`\n\n```ts\ntype ExecutionError = {\n code?: "TIMEOUT" | "MAX_ITERATIONS_EXCEEDED" | "TOOL_EXECUTION_FAILED" | "LLM_ERROR" | "INVALID_OUTPUT" | "REJECTED" | "INTERNAL_ERROR"\n message?: string\n details?: object\n}\n```\n\n### `ExecutionMetrics`\n\n```ts\ntype ExecutionMetrics = {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n}\n```\n\n### `ToolPreview`\n\nStructured preview data for approval UI. Provides a generic format that any tool can populate.\n\n```ts\ntype ToolPreview = {\n action?: {\n type: "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"\n verb: string\n }\n source?: {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n }\n target?: {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n }\n changes?: Array<{\n field?: string\n label?: string\n from?: {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }\n to?: {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }\n }>\n metadata?: Record<string, {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }>\n summary?: string\n}\n```\n\n### `PreviewActionType`\n\nType of action being previewed\n\n```ts\ntype PreviewActionType = "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"\n```\n\n### `PreviewEntity`\n\nEntity reference for preview display\n\n```ts\ntype PreviewEntity = {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n}\n```\n\n### `PreviewChange`\n\nA single field change in the preview\n\n```ts\ntype PreviewChange = {\n field?: string\n label?: string\n from?: {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }\n to?: {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }\n}\n```\n\n### `PreviewValue`\n\nTyped value for preview display\n\n```ts\ntype PreviewValue = {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n}\n```\n\n### `ToolDefinition`\n\n```ts\ntype ToolDefinition = {\n tool_id?: string\n name?: string\n description?: string\n category?: "entity" | "message" | "taxonomy" | "rag" | "workflow"\n parameters?: object\n returns?: object\n requires_approval?: boolean\n enabled?: boolean\n}\n```\n\n### `SkillCategory`\n\n```ts\ntype SkillCategory = "message" | "entity" | "document" | "classification" | "custom"\n```\n\n### `AgentSource`\n\n- system: Pre-built by epilot (system skills)\n- custom: Created by organization\n\n\n```ts\ntype AgentSource = "system" | "custom"\n```\n\n### `SkillAvailability`\n\nWhere the skill/agent is available:\n- flows: Available in workflow automations\n- copilot: Available as a sub-agent in copilot\n- portals: Available in end-user self-service portals\n- all: Available everywhere\n\n\n```ts\ntype SkillAvailability = "flows" | "copilot" | "portals" | "all"\n```\n\n### `ExecutionContext`\n\nWhere the execution was triggered from:\n- flows: Triggered from workflow automation\n- copilot: Triggered from copilot assistant\n- api: Direct API call\n\n\n```ts\ntype ExecutionContext = "flows" | "copilot" | "api"\n```\n\n### `ExecutionPattern`\n\n- direct: Single LLM call, no tools\n- react: Multi-step reasoning with tool use\n\n\n```ts\ntype ExecutionPattern = "direct" | "react"\n```\n\n### `ExecutionMode`\n\n- automatic: Execute without human intervention\n- approval: Pause for human approval before tool execution\n- draft: Execute but mark output as draft for review\n\n\n```ts\ntype ExecutionMode = "automatic" | "approval" | "draft"\n```\n\n### `ExecutionStatus`\n\n```ts\ntype ExecutionStatus = "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n```\n\n### `ParameterType`\n\nBase types:\n- text: Text input field\n- textarea: Multi-line text input field\n- number: Numeric input field\n- boolean: Toggle switch\n- select: Dropdown selection (requires enum array)\n\nCustom types (domain-specific):\n- entity-schema: Entity schema selector (fetches from Entity API)\n- entity-attribute\n\n```ts\ntype ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n```\n\n### `InputParameterDefinition`\n\n```ts\ntype InputParameterDefinition = {\n name: string\n label: string\n type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n description?: string\n default?: unknown\n multi?: boolean\n dependsOn?: string\n visibleWhen?: Record<string, unknown[]>\n enum?: string[]\n minimum?: number\n maximum?: number\n step?: number\n minLength?: number\n maxLength?: number\n schemaFilter?: string[]\n attributeTypeFilter?: string[]\n hidden?: boolean\n}\n```\n\n### `InputParametersSchema`\n\n```ts\ntype InputParametersSchema = {\n type: "object"\n parameters: Array<{\n name: string\n label: string\n type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n description?: string\n default?: unknown\n multi?: boolean\n dependsOn?: string\n visibleWhen?: Record<string, unknown[]>\n enum?: string[]\n minimum?: number\n maximum?: number\n step?: number\n minLength?: number\n maxLength?: number\n schemaFilter?: string[]\n attributeTypeFilter?: string[]\n hidden?: boolean\n }>\n required?: string[]\n}\n```\n\n### `ModelConfig`\n\n```ts\ntype ModelConfig = {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n}\n```\n\n### `Error`\n\n```ts\ntype Error = {\n error?: string\n message?: string\n details?: object\n}\n```\n\n### `ChatRequest`\n\n```ts\ntype ChatRequest = {\n agentId: string\n message: string\n conversationId?: string // uuid\n clientHistory?: Array<{\n role: "user" | "assistant" | "tool" | "system"\n content: string\n tool_calls?: Array<{\n id?: { ... }\n name?: { ... }\n input?: { ... }\n output?: { ... }\n }>\n }>\n context?: {\n entityId?: string\n customData?: Record<string, unknown>\n }\n streaming?: {\n mode?: "updates" | "messages"\n streamTokens?: boolean\n includeMetadata?: boolean\n }\n}\n```\n\n### `ChatMessage`\n\n```ts\ntype ChatMessage = {\n role: "user" | "assistant" | "tool" | "system"\n content: string\n tool_calls?: Array<{\n id?: string\n name?: string\n input?: object\n output?: string\n }>\n}\n```\n\n### `StreamingOptions`\n\n```ts\ntype StreamingOptions = {\n mode?: "updates" | "messages"\n streamTokens?: boolean\n includeMetadata?: boolean\n}\n```\n\n### `StreamEvent`\n\nServer-Sent Event for streaming responses\n\n```ts\ntype StreamEvent = {\n type?: "token" | "agent_step" | "tool_call" | "tool_result" | "complete" | "error" | "metadata" | "needs_approval"\n content?: string\n index?: number\n tool?: string\n input?: object\n output?: string\n callId?: string\n result?: {\n response?: string\n structured_output?: object\n status?: "completed" | "failed" | "max_iterations" | "rejected"\n metrics?: {\n total_tokens?: { ... }\n input_tokens?: { ... }\n output_tokens?: { ... }\n total_cost_usd?: { ... }\n duration_ms?: { ... }\n iteration_count?: { ... }\n }\n }\n error?: {\n code?: string\n message?: string\n }\n conversationId?: string // uuid\n}\n```\n\n### `ExecutionResult`\n\n```ts\ntype ExecutionResult = {\n response?: string\n structured_output?: object\n status?: "completed" | "failed" | "max_iterations" | "rejected"\n metrics?: {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n }\n}\n```\n\n### `ConversationItem`\n\n```ts\ntype ConversationItem = {\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: string\n customData?: object\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `MessageItem`\n\n```ts\ntype MessageItem = {\n conversation_id?: string // uuid\n role?: "user" | "assistant" | "tool" | "system"\n content?: string\n timestamp?: string // date-time\n tool_calls?: Array<{\n id?: string\n name?: string\n input?: object\n output?: string\n }>\n token_count?: number\n trace_id?: string // uuid\n feedback?: {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n }\n}\n```\n\n### `MessageFeedback`\n\n```ts\ntype MessageFeedback = {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n}\n```\n\n### `SubmitFeedbackRequest`\n\n```ts\ntype SubmitFeedbackRequest = {\n trace_id: string // uuid\n rating: "up" | "down"\n comment?: string\n}\n```\n\n### `ListConversationsResponse`\n\n```ts\ntype ListConversationsResponse = {\n conversations?: Array<{\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: { ... }\n customData?: { ... }\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n }>\n next_cursor?: string\n}\n```\n\n### `ConversationWithMessages`\n\n```ts\ntype ConversationWithMessages = {\n conversation?: {\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: { ... }\n customData?: { ... }\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n }\n messages?: Array<{\n conversation_id?: string // uuid\n role?: "user" | "assistant" | "tool" | "system"\n content?: string\n timestamp?: string // date-time\n tool_calls?: Array<{\n id?: { ... }\n name?: { ... }\n input?: { ... }\n output?: { ... }\n }>\n token_count?: number\n trace_id?: string // uuid\n feedback?: {\n rating: { ... }\n comment?: { ... }\n user_id: { ... }\n submitted_at: { ... }\n }\n }>\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
ai_agents_default as default
|
|
7
|
-
};
|