@epilot/sdk 2.20.66 → 2.20.68

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/chat.json +257 -193
  2. package/definitions/message-runtime.json +1 -1
  3. package/definitions/message.json +1312 -14
  4. package/dist/apis/access-token.cjs +6 -6
  5. package/dist/apis/access-token.js +1 -1
  6. package/dist/apis/address-suggestions.cjs +6 -6
  7. package/dist/apis/address-suggestions.js +1 -1
  8. package/dist/apis/address.cjs +6 -6
  9. package/dist/apis/address.js +1 -1
  10. package/dist/apis/ai-agents.cjs +6 -6
  11. package/dist/apis/ai-agents.js +1 -1
  12. package/dist/apis/app.cjs +6 -6
  13. package/dist/apis/app.js +1 -1
  14. package/dist/apis/audit-logs.cjs +6 -6
  15. package/dist/apis/audit-logs.js +1 -1
  16. package/dist/apis/automation.cjs +6 -6
  17. package/dist/apis/automation.js +1 -1
  18. package/dist/apis/billing.cjs +6 -6
  19. package/dist/apis/billing.js +1 -1
  20. package/dist/apis/blueprint-manifest.cjs +6 -6
  21. package/dist/apis/blueprint-manifest.js +1 -1
  22. package/dist/apis/calendar.cjs +6 -6
  23. package/dist/apis/calendar.js +1 -1
  24. package/dist/apis/chat.cjs +6 -6
  25. package/dist/apis/chat.d.cts +2 -2
  26. package/dist/apis/chat.d.ts +2 -2
  27. package/dist/apis/chat.js +1 -1
  28. package/dist/apis/configuration-hub.cjs +6 -6
  29. package/dist/apis/configuration-hub.js +1 -1
  30. package/dist/apis/consent.cjs +6 -6
  31. package/dist/apis/consent.js +1 -1
  32. package/dist/apis/customer-portal.cjs +6 -6
  33. package/dist/apis/customer-portal.js +1 -1
  34. package/dist/apis/dashboard.cjs +6 -6
  35. package/dist/apis/dashboard.js +1 -1
  36. package/dist/apis/data-governance.cjs +6 -6
  37. package/dist/apis/data-governance.js +1 -1
  38. package/dist/apis/deduplication.cjs +6 -6
  39. package/dist/apis/deduplication.js +1 -1
  40. package/dist/apis/design.cjs +6 -6
  41. package/dist/apis/design.js +1 -1
  42. package/dist/apis/document.cjs +6 -6
  43. package/dist/apis/document.js +1 -1
  44. package/dist/apis/email-settings.cjs +6 -6
  45. package/dist/apis/email-settings.js +1 -1
  46. package/dist/apis/email-template.cjs +6 -6
  47. package/dist/apis/email-template.js +1 -1
  48. package/dist/apis/entity-mapping.cjs +6 -6
  49. package/dist/apis/entity-mapping.js +1 -1
  50. package/dist/apis/entity.cjs +6 -6
  51. package/dist/apis/entity.js +1 -1
  52. package/dist/apis/environments.cjs +6 -6
  53. package/dist/apis/environments.js +1 -1
  54. package/dist/apis/event-catalog.cjs +6 -6
  55. package/dist/apis/event-catalog.js +1 -1
  56. package/dist/apis/external-values.cjs +6 -6
  57. package/dist/apis/external-values.js +1 -1
  58. package/dist/apis/file.cjs +6 -6
  59. package/dist/apis/file.js +1 -1
  60. package/dist/apis/iban.cjs +6 -6
  61. package/dist/apis/iban.js +1 -1
  62. package/dist/apis/identity.cjs +6 -6
  63. package/dist/apis/identity.js +1 -1
  64. package/dist/apis/integration-toolkit.cjs +6 -6
  65. package/dist/apis/integration-toolkit.js +1 -1
  66. package/dist/apis/journey.cjs +6 -6
  67. package/dist/apis/journey.js +1 -1
  68. package/dist/apis/kanban.cjs +6 -6
  69. package/dist/apis/kanban.js +1 -1
  70. package/dist/apis/message.cjs +8 -8
  71. package/dist/apis/message.d.cts +2 -2
  72. package/dist/apis/message.d.ts +2 -2
  73. package/dist/apis/message.js +2 -2
  74. package/dist/apis/metering.cjs +6 -6
  75. package/dist/apis/metering.js +1 -1
  76. package/dist/apis/notes.cjs +6 -6
  77. package/dist/apis/notes.js +1 -1
  78. package/dist/apis/notification.cjs +6 -6
  79. package/dist/apis/notification.js +1 -1
  80. package/dist/apis/organization.cjs +6 -6
  81. package/dist/apis/organization.js +1 -1
  82. package/dist/apis/partner-directory.cjs +6 -6
  83. package/dist/apis/partner-directory.js +1 -1
  84. package/dist/apis/permissions.cjs +6 -6
  85. package/dist/apis/permissions.js +1 -1
  86. package/dist/apis/phone-integration.cjs +6 -6
  87. package/dist/apis/phone-integration.js +1 -1
  88. package/dist/apis/pricing-tier.cjs +6 -6
  89. package/dist/apis/pricing-tier.js +1 -1
  90. package/dist/apis/pricing.cjs +6 -6
  91. package/dist/apis/pricing.js +1 -1
  92. package/dist/apis/purpose.cjs +6 -6
  93. package/dist/apis/purpose.js +1 -1
  94. package/dist/apis/query.cjs +6 -6
  95. package/dist/apis/query.js +1 -1
  96. package/dist/apis/sandbox.cjs +6 -6
  97. package/dist/apis/sandbox.js +1 -1
  98. package/dist/apis/sharing.cjs +6 -6
  99. package/dist/apis/sharing.js +1 -1
  100. package/dist/apis/snapshot.cjs +6 -6
  101. package/dist/apis/snapshot.js +1 -1
  102. package/dist/apis/submission.cjs +6 -6
  103. package/dist/apis/submission.js +1 -1
  104. package/dist/apis/target.cjs +6 -6
  105. package/dist/apis/target.js +1 -1
  106. package/dist/apis/targeting.cjs +6 -6
  107. package/dist/apis/targeting.js +1 -1
  108. package/dist/apis/template-variables.cjs +6 -6
  109. package/dist/apis/template-variables.js +1 -1
  110. package/dist/apis/user.cjs +6 -6
  111. package/dist/apis/user.js +1 -1
  112. package/dist/apis/validation-rules.cjs +6 -6
  113. package/dist/apis/validation-rules.js +1 -1
  114. package/dist/apis/webhooks.cjs +6 -6
  115. package/dist/apis/webhooks.js +1 -1
  116. package/dist/apis/workflow-definition.cjs +6 -6
  117. package/dist/apis/workflow-definition.js +1 -1
  118. package/dist/apis/workflow.cjs +6 -6
  119. package/dist/apis/workflow.js +1 -1
  120. package/dist/chat-QZJ5P6HQ.cjs +7 -0
  121. package/dist/chat-T6GUSV2K.js +7 -0
  122. package/dist/{chat.d-BUkItuYX.d.cts → chat.d-B6dICX6Y.d.cts} +177 -71
  123. package/dist/{chat.d-BUkItuYX.d.ts → chat.d-B6dICX6Y.d.ts} +177 -71
  124. package/dist/{chunk-SGTQJYAX.js → chunk-6WXFXQKB.js} +3 -3
  125. package/dist/chunk-AWYQVLER.cjs +14 -0
  126. package/dist/chunk-HQ3YHL5H.js +14 -0
  127. package/dist/{chunk-3UL4JWCK.cjs → chunk-LGNMQHO5.cjs} +3 -3
  128. package/dist/index.cjs +10 -10
  129. package/dist/index.d.cts +2 -2
  130. package/dist/index.d.ts +2 -2
  131. package/dist/index.js +2 -2
  132. package/dist/message-AJJJK44K.js +7 -0
  133. package/dist/message-XIJPEF22.cjs +7 -0
  134. package/dist/{message-runtime-4JSNBEVL.cjs → message-runtime-ERSSQCHN.cjs} +2 -2
  135. package/dist/{message-runtime-7UM7U4VL.js → message-runtime-I7WFL4J3.js} +1 -1
  136. package/dist/{message.d-DwnqO-Us.d.cts → message.d-CRg7bM_m.d.cts} +384 -11
  137. package/dist/{message.d-DwnqO-Us.d.ts → message.d-CRg7bM_m.d.ts} +384 -11
  138. package/docs/chat.md +64 -37
  139. package/docs/message.md +403 -12
  140. package/package.json +1 -1
  141. package/dist/chat-UYCCJWAM.js +0 -7
  142. package/dist/chat-YYRMNUXU.cjs +0 -7
  143. package/dist/chunk-EHLNSFCU.cjs +0 -14
  144. package/dist/chunk-OT6AETWN.js +0 -14
  145. package/dist/message-LJ32JH6Z.cjs +0 -7
  146. package/dist/message-SSTVRGEF.js +0 -7
package/docs/message.md CHANGED
@@ -54,6 +54,7 @@ const { data } = await messageClient.sendMessage(...)
54
54
  - [`markThreadAsDone`](#markthreadasdone)
55
55
  - [`markThreadAsOpen`](#markthreadasopen)
56
56
  - [`getThreadTimeline`](#getthreadtimeline)
57
+ - [`getThreadSummary`](#getthreadsummary)
57
58
  - [`trashThread`](#trashthread)
58
59
  - [`untrashThread`](#untrashthread)
59
60
  - [`spamThread`](#spamthread)
@@ -74,6 +75,7 @@ const { data } = await messageClient.sendMessage(...)
74
75
  - [`markUnreadThread`](#markunreadthread)
75
76
  - [`markUnreadThreadV2`](#markunreadthreadv2)
76
77
  - [`assignThread`](#assignthread)
78
+ - [`dismissThreadLinkSuggestions`](#dismissthreadlinksuggestions)
77
79
  - [`unassignThread`](#unassignthread)
78
80
  - [`assignUsers`](#assignusers)
79
81
  - [`assignUsersV2`](#assignusersv2)
@@ -108,6 +110,16 @@ const { data } = await messageClient.sendMessage(...)
108
110
  - [`AssigneeWorkloadResults`](#assigneeworkloadresults)
109
111
  - [`ReadMessagePayload`](#readmessagepayload)
110
112
  - [`ReadingScope`](#readingscope)
113
+ - [`ThreadReplyContext`](#threadreplycontext)
114
+ - [`ReplyContextMessage`](#replycontextmessage)
115
+ - [`ReplyContextEntityRef`](#replycontextentityref)
116
+ - [`ThreadSummary`](#threadsummary)
117
+ - [`ThreadSummaryPayload`](#threadsummarypayload)
118
+ - [`ThreadSummaryEntityRef`](#threadsummaryentityref)
119
+ - [`ThreadSummaryContext`](#threadsummarycontext)
120
+ - [`SimilarSentMessagesRequest`](#similarsentmessagesrequest)
121
+ - [`SimilarSentMessagesResponse`](#similarsentmessagesresponse)
122
+ - [`SimilarSentMessage`](#similarsentmessage)
111
123
  - [`ThreadTimeline`](#threadtimeline)
112
124
  - [`ThreadDoneEvent`](#threaddoneevent)
113
125
  - [`ThreadOpenEvent`](#threadopenevent)
@@ -121,6 +133,11 @@ const { data } = await messageClient.sendMessage(...)
121
133
  - [`ThreadMovedToInboxEvent`](#threadmovedtoinboxevent)
122
134
  - [`ThreadTrashedEvent`](#threadtrashedevent)
123
135
  - [`ThreadRestoredEvent`](#threadrestoredevent)
136
+ - [`LinkSuggestionCandidate`](#linksuggestioncandidate)
137
+ - [`LinkSuggestion`](#linksuggestion)
138
+ - [`TimelineLinkSuggestion`](#timelinelinksuggestion)
139
+ - [`MessageEntityLinkSuggestedEvent`](#messageentitylinksuggestedevent)
140
+ - [`MessageEntityLinkSuggestionDismissedEvent`](#messageentitylinksuggestiondismissedevent)
124
141
  - [`TimelineLinkedEntity`](#timelinelinkedentity)
125
142
  - [`TimelineActor`](#timelineactor)
126
143
  - [`TimelineEventData`](#timelineeventdata)
@@ -1082,7 +1099,7 @@ const { data } = await client.getThreadTimeline({
1082
1099
  "user_id": "123",
1083
1100
  "organization_id": "456"
1084
1101
  },
1085
- "timestamp": "2024-01-01T00:00:00.000Z",
1102
+ "timestamp": "2024-01-01T00:00:00Z",
1086
1103
  "message_id": "string",
1087
1104
  "source": "user",
1088
1105
  "automated": true,
@@ -1103,6 +1120,52 @@ const { data } = await client.getThreadTimeline({
1103
1120
 
1104
1121
  ---
1105
1122
 
1123
+ ### `getThreadSummary`
1124
+
1125
+ AI summary of a thread. Returns `202` while it is generated; poll until `jobStatus.status` is `COMPLETED` or `FAILED`.
1126
+
1127
+ `GET /v1/message/threads/{id}/summary`
1128
+
1129
+ ```ts
1130
+ const { data } = await client.getThreadSummary({
1131
+ id: '123e4567-e89b-12d3-a456-426614174000',
1132
+ message_id: 'example',
1133
+ })
1134
+ ```
1135
+
1136
+ <details>
1137
+ <summary>Response</summary>
1138
+
1139
+ ```json
1140
+ {
1141
+ "orgId": "string",
1142
+ "jobId": "string",
1143
+ "executionId": "string",
1144
+ "jobStatus": {
1145
+ "status": "INITIATED",
1146
+ "error": "string"
1147
+ },
1148
+ "payload": {
1149
+ "summary": ["string"],
1150
+ "topics": ["string"],
1151
+ "next_steps": ["string"],
1152
+ "refs": [
1153
+ {
1154
+ "id": "string",
1155
+ "displayText": "Raven GmbH",
1156
+ "schema": "contact"
1157
+ }
1158
+ ]
1159
+ },
1160
+ "createdAt": "1970-01-01T00:00:00.000Z",
1161
+ "updatedAt": "1970-01-01T00:00:00.000Z"
1162
+ }
1163
+ ```
1164
+
1165
+ </details>
1166
+
1167
+ ---
1168
+
1106
1169
  ### `trashThread`
1107
1170
 
1108
1171
  Move a thread to trash
@@ -1476,6 +1539,37 @@ const { data } = await client.assignThread(
1476
1539
 
1477
1540
  ---
1478
1541
 
1542
+ ### `dismissThreadLinkSuggestions`
1543
+
1544
+ Dismiss pending candidates of entity-link suggestions on a thread. A suggestion is recorded on a message when an identifier in it matched entities of different customers, so nothing was linked automat
1545
+
1546
+ `POST /v1/message/threads/{id}/link-suggestions/dismiss`
1547
+
1548
+ ```ts
1549
+ const { data } = await client.dismissThreadLinkSuggestions(
1550
+ {
1551
+ id: '123e4567-e89b-12d3-a456-426614174000',
1552
+ },
1553
+ {
1554
+ suggestion_ids: ['string'],
1555
+ entity_ids: ['string']
1556
+ },
1557
+ )
1558
+ ```
1559
+
1560
+ <details>
1561
+ <summary>Response</summary>
1562
+
1563
+ ```json
1564
+ {
1565
+ "dismissed": ["string"]
1566
+ }
1567
+ ```
1568
+
1569
+ </details>
1570
+
1571
+ ---
1572
+
1479
1573
  ### `unassignThread`
1480
1574
 
1481
1575
  Unassign thread from entities
@@ -1669,7 +1763,7 @@ const { data } = await client.createDraft(
1669
1763
 
1670
1764
  ### `sendDraft`
1671
1765
 
1672
- Send the existing draft to the recipients
1766
+ Send the existing draft to the recipients.
1673
1767
 
1674
1768
  `POST /v1/message/drafts:send`
1675
1769
 
@@ -1786,6 +1880,19 @@ const { data } = await client.getMessageV2({
1786
1880
 
1787
1881
  ```json
1788
1882
  {
1883
+ "link_suggestions": [
1884
+ {
1885
+ "id": "string",
1886
+ "identifier": "string",
1887
+ "found_in": "string",
1888
+ "status": "pending",
1889
+ "candidates": [],
1890
+ "accepted_entity_ids": ["string"],
1891
+ "resolved_by": {},
1892
+ "resolved_at": "1970-01-01T00:00:00.000Z",
1893
+ "created_at": "1970-01-01T00:00:00.000Z"
1894
+ }
1895
+ ],
1789
1896
  "html_omitted": false,
1790
1897
  "html_download_url": "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html",
1791
1898
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
@@ -1844,16 +1951,7 @@ const { data } = await client.getMessageV2({
1844
1951
  ],
1845
1952
  "file": {
1846
1953
  "$relation": [
1847
- {
1848
- "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
1849
- "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
1850
- "is_message_attachment": true,
1851
- "may_be_signature_attachment": true,
1852
- "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
1853
- "inline": false,
1854
- "send_as_link": false,
1855
- "save_to_entity": true
1856
- }
1954
+ {}
1857
1955
  ]
1858
1956
  },
1859
1957
  "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
@@ -2463,6 +2561,161 @@ Who is marking an item as read or unread.
2463
2561
  type ReadingScope = "organization" | "user"
2464
2562
  ```
2465
2563
 
2564
+ ### `ThreadReplyContext`
2565
+
2566
+ ```ts
2567
+ type ThreadReplyContext = {
2568
+ thread_id: string
2569
+ topic?: string
2570
+ reply_to_message_id?: string
2571
+ messages: Array<{
2572
+ id: string
2573
+ created_at?: string // date-time
2574
+ type: "RECEIVED" | "SENT"
2575
+ role: "customer" | "agent" | "partner"
2576
+ subject?: string
2577
+ from?: {
2578
+ address?: { ... }
2579
+ name?: { ... }
2580
+ }
2581
+ text: string
2582
+ }>
2583
+ related_entities: Array<{
2584
+ _id: string
2585
+ _schema: string
2586
+ }>
2587
+ }
2588
+ ```
2589
+
2590
+ ### `ReplyContextMessage`
2591
+
2592
+ ```ts
2593
+ type ReplyContextMessage = {
2594
+ id: string
2595
+ created_at?: string // date-time
2596
+ type: "RECEIVED" | "SENT"
2597
+ role: "customer" | "agent" | "partner"
2598
+ subject?: string
2599
+ from?: {
2600
+ address?: string
2601
+ name?: string
2602
+ }
2603
+ text: string
2604
+ }
2605
+ ```
2606
+
2607
+ ### `ReplyContextEntityRef`
2608
+
2609
+ ```ts
2610
+ type ReplyContextEntityRef = {
2611
+ _id: string
2612
+ _schema: string
2613
+ }
2614
+ ```
2615
+
2616
+ ### `ThreadSummary`
2617
+
2618
+ ```ts
2619
+ type ThreadSummary = {
2620
+ orgId: string
2621
+ jobId: string
2622
+ executionId?: string
2623
+ jobStatus: {
2624
+ status: "INITIATED" | "IN_PROGRESS" | "COMPLETED" | "FAILED"
2625
+ error?: string
2626
+ }
2627
+ payload?: {
2628
+ summary?: string[]
2629
+ topics?: string[]
2630
+ next_steps?: string[]
2631
+ refs?: Array<{
2632
+ id: { ... }
2633
+ displayText: { ... }
2634
+ schema: { ... }
2635
+ }>
2636
+ }
2637
+ createdAt: string // date-time
2638
+ updatedAt: string // date-time
2639
+ }
2640
+ ```
2641
+
2642
+ ### `ThreadSummaryPayload`
2643
+
2644
+ Present once the summary is generated
2645
+
2646
+ ```ts
2647
+ type ThreadSummaryPayload = {
2648
+ summary?: string[]
2649
+ topics?: string[]
2650
+ next_steps?: string[]
2651
+ refs?: Array<{
2652
+ id: string
2653
+ displayText: string
2654
+ schema: string
2655
+ }>
2656
+ }
2657
+ ```
2658
+
2659
+ ### `ThreadSummaryEntityRef`
2660
+
2661
+ ```ts
2662
+ type ThreadSummaryEntityRef = {
2663
+ id: string
2664
+ displayText: string
2665
+ schema: string
2666
+ }
2667
+ ```
2668
+
2669
+ ### `ThreadSummaryContext`
2670
+
2671
+ ```ts
2672
+ type ThreadSummaryContext = {
2673
+ thread_id: string
2674
+ message_id: string
2675
+ subject: string
2676
+ conversation: string
2677
+ entity_context: string
2678
+ }
2679
+ ```
2680
+
2681
+ ### `SimilarSentMessagesRequest`
2682
+
2683
+ ```ts
2684
+ type SimilarSentMessagesRequest = {
2685
+ queries: string[]
2686
+ limit?: number
2687
+ min_score?: number
2688
+ }
2689
+ ```
2690
+
2691
+ ### `SimilarSentMessagesResponse`
2692
+
2693
+ ```ts
2694
+ type SimilarSentMessagesResponse = {
2695
+ results: Array<{
2696
+ message_id: string
2697
+ thread_id?: string
2698
+ subject?: string
2699
+ text: string
2700
+ created_at?: string
2701
+ score: number
2702
+ }>
2703
+ }
2704
+ ```
2705
+
2706
+ ### `SimilarSentMessage`
2707
+
2708
+ ```ts
2709
+ type SimilarSentMessage = {
2710
+ message_id: string
2711
+ thread_id?: string
2712
+ subject?: string
2713
+ text: string
2714
+ created_at?: string
2715
+ score: number
2716
+ }
2717
+ ```
2718
+
2466
2719
  ### `ThreadTimeline`
2467
2720
 
2468
2721
  ```ts
@@ -2497,10 +2750,17 @@ type ThreadTimeline = {
2497
2750
  type: { ... }
2498
2751
  entities?: { ... }
2499
2752
  link_kind?: { ... }
2753
+ from_suggestion?: { ... }
2500
2754
  } | {
2501
2755
  type: { ... }
2502
2756
  entities?: { ... }
2503
2757
  link_kind?: { ... }
2758
+ } | {
2759
+ type: { ... }
2760
+ suggestions?: { ... }
2761
+ } | {
2762
+ type: { ... }
2763
+ suggestions?: { ... }
2504
2764
  } | {
2505
2765
  type: { ... }
2506
2766
  reply_message_id?: { ... }
@@ -2600,6 +2860,7 @@ type MessageEntityLinkedEvent = {
2600
2860
  schema?: string
2601
2861
  }>
2602
2862
  link_kind?: "manual" | "auto"
2863
+ from_suggestion?: boolean
2603
2864
  }
2604
2865
  ```
2605
2866
 
@@ -2652,6 +2913,100 @@ type ThreadRestoredEvent = {
2652
2913
  }
2653
2914
  ```
2654
2915
 
2916
+ ### `LinkSuggestionCandidate`
2917
+
2918
+ ```ts
2919
+ type LinkSuggestionCandidate = {
2920
+ entity_id: string
2921
+ schema: string
2922
+ attribute?: string
2923
+ attribute_value?: string
2924
+ title?: string
2925
+ status?: "pending" | "linked" | "dismissed"
2926
+ resolved_by?: {
2927
+ user_id?: string
2928
+ email?: string
2929
+ }
2930
+ resolved_at?: string // date-time
2931
+ }
2932
+ ```
2933
+
2934
+ ### `LinkSuggestion`
2935
+
2936
+ ```ts
2937
+ type LinkSuggestion = {
2938
+ id: string
2939
+ identifier: string
2940
+ found_in?: string
2941
+ status: "pending" | "accepted" | "dismissed"
2942
+ candidates: Array<{
2943
+ entity_id: string
2944
+ schema: string
2945
+ attribute?: string
2946
+ attribute_value?: string
2947
+ title?: string
2948
+ status?: "pending" | "linked" | "dismissed"
2949
+ resolved_by?: {
2950
+ user_id?: { ... }
2951
+ email?: { ... }
2952
+ }
2953
+ resolved_at?: string // date-time
2954
+ }>
2955
+ accepted_entity_ids?: string[]
2956
+ resolved_by?: {
2957
+ user_id?: string
2958
+ email?: string
2959
+ }
2960
+ resolved_at?: string // date-time
2961
+ created_at?: string // date-time
2962
+ }
2963
+ ```
2964
+
2965
+ ### `TimelineLinkSuggestion`
2966
+
2967
+ ```ts
2968
+ type TimelineLinkSuggestion = {
2969
+ id?: string
2970
+ identifier: string
2971
+ candidates?: Array<{
2972
+ entity_id: string
2973
+ schema?: string
2974
+ }>
2975
+ }
2976
+ ```
2977
+
2978
+ ### `MessageEntityLinkSuggestedEvent`
2979
+
2980
+ ```ts
2981
+ type MessageEntityLinkSuggestedEvent = {
2982
+ type: "MESSAGE_ENTITY_LINK_SUGGESTED"
2983
+ suggestions?: Array<{
2984
+ id?: string
2985
+ identifier: string
2986
+ candidates?: Array<{
2987
+ entity_id: { ... }
2988
+ schema?: { ... }
2989
+ }>
2990
+ }>
2991
+ }
2992
+ ```
2993
+
2994
+ ### `MessageEntityLinkSuggestionDismissedEvent`
2995
+
2996
+ ```ts
2997
+ type MessageEntityLinkSuggestionDismissedEvent = {
2998
+ type: "MESSAGE_ENTITY_LINK_SUGGESTION_DISMISSED"
2999
+ suggestions?: Array<{
3000
+ id?: string
3001
+ identifier: string
3002
+ candidates?: Array<{
3003
+ entity_id: { ... }
3004
+ schema?: { ... }
3005
+ }>
3006
+ }>
3007
+ }
3008
+ ```
3009
+
2655
3010
  ### `TimelineLinkedEntity`
2656
3011
 
2657
3012
  ```ts
@@ -2704,6 +3059,7 @@ type TimelineEventData = {
2704
3059
  schema?: string
2705
3060
  }>
2706
3061
  link_kind?: "manual" | "auto"
3062
+ from_suggestion?: boolean
2707
3063
  } | {
2708
3064
  type: "MESSAGE_ENTITY_UNLINKED"
2709
3065
  entities?: Array<{
@@ -2711,6 +3067,26 @@ type TimelineEventData = {
2711
3067
  schema?: string
2712
3068
  }>
2713
3069
  link_kind?: "manual" | "auto"
3070
+ } | {
3071
+ type: "MESSAGE_ENTITY_LINK_SUGGESTED"
3072
+ suggestions?: Array<{
3073
+ id?: string
3074
+ identifier: string
3075
+ candidates?: Array<{
3076
+ entity_id: { ... }
3077
+ schema?: { ... }
3078
+ }>
3079
+ }>
3080
+ } | {
3081
+ type: "MESSAGE_ENTITY_LINK_SUGGESTION_DISMISSED"
3082
+ suggestions?: Array<{
3083
+ id?: string
3084
+ identifier: string
3085
+ candidates?: Array<{
3086
+ entity_id: { ... }
3087
+ schema?: { ... }
3088
+ }>
3089
+ }>
2714
3090
  } | {
2715
3091
  type: "MESSAGE_AUTO_REPLY_SENT"
2716
3092
  reply_message_id?: string
@@ -2762,6 +3138,7 @@ type TimelineEvent = {
2762
3138
  schema?: { ... }
2763
3139
  }>
2764
3140
  link_kind?: "manual" | "auto"
3141
+ from_suggestion?: boolean
2765
3142
  } | {
2766
3143
  type: "MESSAGE_ENTITY_UNLINKED"
2767
3144
  entities?: Array<{
@@ -2769,6 +3146,20 @@ type TimelineEvent = {
2769
3146
  schema?: { ... }
2770
3147
  }>
2771
3148
  link_kind?: "manual" | "auto"
3149
+ } | {
3150
+ type: "MESSAGE_ENTITY_LINK_SUGGESTED"
3151
+ suggestions?: Array<{
3152
+ id?: { ... }
3153
+ identifier: { ... }
3154
+ candidates?: { ... }
3155
+ }>
3156
+ } | {
3157
+ type: "MESSAGE_ENTITY_LINK_SUGGESTION_DISMISSED"
3158
+ suggestions?: Array<{
3159
+ id?: { ... }
3160
+ identifier: { ... }
3161
+ candidates?: { ... }
3162
+ }>
2772
3163
  } | {
2773
3164
  type: "MESSAGE_AUTO_REPLY_SENT"
2774
3165
  reply_message_id?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.20.66",
3
+ "version": "2.20.68",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,7 +0,0 @@
1
- import "./chunk-YPSWSI3M.js";
2
-
3
- // src/docs/chat.json
4
- var chat_default = '# epilot Chat API\n\n- **Base URL:** `https://chat.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/chat](https://docs.epilot.io/api/chat)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.chat.listWebsiteChats(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/chat\'\n\nconst chatClient = getClient()\nauthorize(chatClient, () => \'<token>\')\nconst { data } = await chatClient.listWebsiteChats(...)\n```\n\n## Operations\n\n**Website Chats**\n- [`listWebsiteChats`](#listwebsitechats)\n- [`createWebsiteChat`](#createwebsitechat)\n- [`getWebsiteChat`](#getwebsitechat)\n- [`updateWebsiteChat`](#updatewebsitechat)\n- [`deleteWebsiteChat`](#deletewebsitechat)\n- [`createWebsiteChatPreviewGrant`](#createwebsitechatpreviewgrant)\n\n**Other**\n- [`getPublicWebsiteChat`](#getpublicwebsitechat)\n- [`createPublicChatGrant`](#createpublicchatgrant)\n- [`createAnonymousChatSession`](#createanonymouschatsession)\n- [`sendAnonymousChatMessage`](#sendanonymouschatmessage)\n- [`getChatVerification`](#getchatverification)\n- [`startChatEmailVerification`](#startchatemailverification)\n- [`verifyChatEmailCode`](#verifychatemailcode)\n- [`cancelChatVerification`](#cancelchatverification)\n- [`getChatPortalLogin`](#getchatportallogin)\n- [`getChatPortalJourneyToken`](#getchatportaljourneytoken)\n- [`startChatPortalLogin`](#startchatportallogin)\n- [`verifyChatPortalLogin`](#verifychatportallogin)\n- [`cancelChatPortalLogin`](#cancelchatportallogin)\n- [`signOutChatCustomer`](#signoutchatcustomer)\n- [`getChatAction`](#getchataction)\n- [`startChatAction`](#startchataction)\n- [`reportChatActionEvent`](#reportchatactionevent)\n- [`submitChatAction`](#submitchataction)\n- [`confirmChatAction`](#confirmchataction)\n- [`cancelChatAction`](#cancelchataction)\n\n**Schemas**\n- [`ListWebsiteChatsResponse`](#listwebsitechatsresponse)\n- [`WebsiteChat`](#websitechat)\n- [`WebsiteChatSettings`](#websitechatsettings)\n- [`SelfServiceSettings`](#selfservicesettings)\n- [`SelfServiceAction`](#selfserviceaction)\n- [`WebsiteChatPreviewGrantRequest`](#websitechatpreviewgrantrequest)\n- [`WebsiteChatPreviewGrant`](#websitechatpreviewgrant)\n- [`Error`](#error)\n- [`CreateWebsiteChatRequest`](#createwebsitechatrequest)\n- [`UpdateWebsiteChatRequest`](#updatewebsitechatrequest)\n- [`ActionRevision`](#actionrevision)\n- [`ActionState`](#actionstate)\n- [`VerificationState`](#verificationstate)\n- [`PortalLoginState`](#portalloginstate)\n- [`LoginMethod`](#loginmethod)\n- [`AccessTier`](#accesstier)\n- [`CustomerAccess`](#customeraccess)\n- [`StarterQuestions`](#starterquestions)\n- [`PublicWebsiteChat`](#publicwebsitechat)\n- [`WebsiteChatDesign`](#websitechatdesign)\n- [`PublicEvent`](#publicevent)\n- [`SelfServiceDirective`](#selfservicedirective)\n- [`PublicChatError`](#publicchaterror)\n\n### `listWebsiteChats`\n\n`GET /v1/website-chats`\n\n```ts\nconst { data } = await client.listWebsiteChats({\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "website_chats": [\n {\n "name": "string",\n "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "settings": {\n "allowed_origins": ["string"],\n "organisation_name": "string",\n "default_locale": "en",\n "design_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "authentication": {\n "email_code": {\n "email_template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n },\n "portal": {\n "portal_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n },\n "self_service": {\n "actions": [\n {\n "action": "submit_meter_reading",\n "enabled": true,\n "fulfilment": "in_chat",\n "journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "url": "string",\n "access": "anonymous",\n "guidance": "string"\n }\n ]\n }\n },\n "website_chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "org_id": "string",\n "binding_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "version": 1,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "embed": {\n "script_url": "https://example.com/path",\n "chat_api_origin": "https://example.com/path",\n "demo_url": "https://example.com/path"\n }\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `createWebsiteChat`\n\n`POST /v1/website-chats`\n\n```ts\nconst { data } = await client.createWebsiteChat(\n null,\n {\n name: \'string\',\n agent_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n settings: {\n allowed_origins: [\'string\'],\n organisation_name: \'string\',\n default_locale: \'en\',\n design_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n authentication: {\n email_code: {\n email_template_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\'\n },\n portal: {\n portal_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\'\n }\n },\n self_service: {\n actions: [\n {\n action: \'submit_meter_reading\',\n enabled: true,\n fulfilment: \'in_chat\',\n journey_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n url: \'string\',\n access: \'anonymous\',\n guidance: \'string\'\n }\n ]\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "name": "string",\n "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "settings": {\n "allowed_origins": ["string"],\n "organisation_name": "string",\n "default_locale": "en",\n "design_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "authentication": {\n "email_code": {\n "email_template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n },\n "portal": {\n "portal_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n },\n "self_service": {\n "actions": [\n {\n "action": "submit_meter_reading",\n "enabled": true,\n "fulfilment": "in_chat",\n "journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "url": "string",\n "access": "anonymous",\n "guidance": "string"\n }\n ]\n }\n },\n "website_chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "org_id": "string",\n "binding_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "version": 1,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "embed": {\n "script_url": "https://example.com/path",\n "chat_api_origin": "https://example.com/path",\n "demo_url": "https://example.com/path"\n }\n}\n```\n\n</details>\n\n---\n\n### `getWebsiteChat`\n\n`GET /v1/website-chats/{website_chat_id}`\n\n```ts\nconst { data } = await client.getWebsiteChat({\n website_chat_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "name": "string",\n "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "settings": {\n "allowed_origins": ["string"],\n "organisation_name": "string",\n "default_locale": "en",\n "design_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "authentication": {\n "email_code": {\n "email_template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n },\n "portal": {\n "portal_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n },\n "self_service": {\n "actions": [\n {\n "action": "submit_meter_reading",\n "enabled": true,\n "fulfilment": "in_chat",\n "journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "url": "string",\n "access": "anonymous",\n "guidance": "string"\n }\n ]\n }\n },\n "website_chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "org_id": "string",\n "binding_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "version": 1,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "embed": {\n "script_url": "https://example.com/path",\n "chat_api_origin": "https://example.com/path",\n "demo_url": "https://example.com/path"\n }\n}\n```\n\n</details>\n\n---\n\n### `updateWebsiteChat`\n\n`PUT /v1/website-chats/{website_chat_id}`\n\n```ts\nconst { data } = await client.updateWebsiteChat(\n {\n website_chat_id: \'example\',\n },\n {\n name: \'string\',\n agent_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n settings: {\n allowed_origins: [\'string\'],\n organisation_name: \'string\',\n default_locale: \'en\',\n design_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n authentication: {\n email_code: {\n email_template_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\'\n },\n portal: {\n portal_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\'\n }\n },\n self_service: {\n actions: [\n {\n action: \'submit_meter_reading\',\n enabled: true,\n fulfilment: \'in_chat\',\n journey_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n url: \'string\',\n access: \'anonymous\',\n guidance: \'string\'\n }\n ]\n }\n },\n version: 1\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "name": "string",\n "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "settings": {\n "allowed_origins": ["string"],\n "organisation_name": "string",\n "default_locale": "en",\n "design_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "authentication": {\n "email_code": {\n "email_template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n },\n "portal": {\n "portal_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n },\n "self_service": {\n "actions": [\n {\n "action": "submit_meter_reading",\n "enabled": true,\n "fulfilment": "in_chat",\n "journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "url": "string",\n "access": "anonymous",\n "guidance": "string"\n }\n ]\n }\n },\n "website_chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "org_id": "string",\n "binding_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "version": 1,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "embed": {\n "script_url": "https://example.com/path",\n "chat_api_origin": "https://example.com/path",\n "demo_url": "https://example.com/path"\n }\n}\n```\n\n</details>\n\n---\n\n### `deleteWebsiteChat`\n\n`DELETE /v1/website-chats/{website_chat_id}`\n\n```ts\nconst { data } = await client.deleteWebsiteChat({\n website_chat_id: \'example\',\n version: 1,\n})\n```\n\n---\n\n### `createWebsiteChatPreviewGrant`\n\n`POST /v1/website-chats/{website_chat_id}/preview-grant`\n\n```ts\nconst { data } = await client.createWebsiteChatPreviewGrant(\n {\n website_chat_id: \'example\',\n },\n {\n design_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "grant": "string",\n "expires_in": 0,\n "frame_origin": "https://example.com/path",\n "website_chat": {\n "key": "string",\n "organisationName": "string",\n "assistantName": "string",\n "defaultLocale": "en",\n "login_methods": ["email_code"],\n "starters": {\n "de": ["string"],\n "en": ["string"]\n },\n "actions": {\n "meter_reading": true,\n "meter_reading_journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n },\n "design": {\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "last_modified_at": "string",\n "style": {\n "palette": {\n "primary": "string",\n "background": "string"\n },\n "typography": {\n "font": {\n "font_family": "string"\n }\n },\n "shape": {\n "border_radius": 0\n }\n },\n "spark_theme": {\n "accentColor": "string",\n "backgroundColor": "string",\n "fontBody": "string",\n "fontHeading": "string",\n "radius": "string",\n "scaling": "string",\n "spacing": "string",\n "appearance": "string",\n "neutralColor": "string",\n "styleVariant": "string",\n "labelPosition": "string",\n "inputStyle": "string",\n "inputColor": "string",\n "cardVariant": "string",\n "cardColor": "string",\n "highContrast": true\n }\n },\n "locales": ["en"]\n }\n}\n```\n\n</details>\n\n---\n\n### `getPublicWebsiteChat`\n\n`GET /v1/website-chats/{website_chat_id}/configuration`\n\n```ts\nconst { data } = await client.getPublicWebsiteChat({\n website_chat_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "key": "string",\n "organisationName": "string",\n "assistantName": "string",\n "defaultLocale": "en",\n "login_methods": ["email_code"],\n "starters": {\n "de": ["string"],\n "en": ["string"]\n },\n "actions": {\n "meter_reading": true,\n "meter_reading_journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n },\n "design": {\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "last_modified_at": "string",\n "style": {\n "palette": {\n "primary": "string",\n "background": "string"\n },\n "typography": {\n "font": {\n "font_family": "string"\n }\n },\n "shape": {\n "border_radius": 0\n }\n },\n "spark_theme": {\n "accentColor": "string",\n "backgroundColor": "string",\n "fontBody": "string",\n "fontHeading": "string",\n "radius": "string",\n "scaling": "string",\n "spacing": "string",\n "appearance": "string",\n "neutralColor": "string",\n "styleVariant": "string",\n "labelPosition": "string",\n "inputStyle": "string",\n "inputColor": "string",\n "cardVariant": "string",\n "cardColor": "string",\n "highContrast": true\n }\n },\n "locales": ["en"]\n}\n```\n\n</details>\n\n---\n\n### `createPublicChatGrant`\n\n`POST /v1/bootstrap`\n\n```ts\nconst { data } = await client.createPublicChatGrant(\n null,\n {\n website_chat_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "grant": "string",\n "expires_in": 60,\n "frame_origin": "https://example.com/path"\n}\n```\n\n</details>\n\n---\n\n### `createAnonymousChatSession`\n\n`POST /v1/sessions`\n\n```ts\nconst { data } = await client.createAnonymousChatSession(\n null,\n {\n grant: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "token": "string",\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "expires_at": 0,\n "website_chat": {\n "key": "string",\n "organisationName": "string",\n "assistantName": "string",\n "defaultLocale": "en",\n "login_methods": ["email_code"],\n "starters": {\n "de": ["string"],\n "en": ["string"]\n },\n "actions": {\n "meter_reading": true,\n "meter_reading_journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n },\n "design": {\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "last_modified_at": "string",\n "style": {\n "palette": {\n "primary": "string",\n "background": "string"\n },\n "typography": {\n "font": {\n "font_family": "string"\n }\n },\n "shape": {\n "border_radius": 0\n }\n },\n "spark_theme": {\n "accentColor": "string",\n "backgroundColor": "string",\n "fontBody": "string",\n "fontHeading": "string",\n "radius": "string",\n "scaling": "string",\n "spacing": "string",\n "appearance": "string",\n "neutralColor": "string",\n "styleVariant": "string",\n "labelPosition": "string",\n "inputStyle": "string",\n "inputColor": "string",\n "cardVariant": "string",\n "cardColor": "string",\n "highContrast": true\n }\n },\n "locales": ["en"]\n },\n "preview": true\n}\n```\n\n</details>\n\n---\n\n### `sendAnonymousChatMessage`\n\n`POST /v1/messages`\n\n```ts\nconst { data } = await client.sendAnonymousChatMessage(\n null,\n {\n request_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n message: \'string\',\n locale: \'en\',\n simple_language: true\n },\n)\n```\n\n---\n\n### `getChatVerification`\n\n`GET /v1/verification`\n\n```ts\nconst { data } = await client.getChatVerification()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "available": true,\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "anonymous",\n "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "code_expires_at": 0,\n "resend_after": 0,\n "email": "user@example.com",\n "contact_resolution": "matched",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `startChatEmailVerification`\n\n`POST /v1/verification/email`\n\n```ts\nconst { data } = await client.startChatEmailVerification(\n null,\n {\n request_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n email: \'user@example.com\',\n locale: \'en\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "available": true,\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "anonymous",\n "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "code_expires_at": 0,\n "resend_after": 0,\n "email": "user@example.com",\n "contact_resolution": "matched",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `verifyChatEmailCode`\n\n`POST /v1/verification/code`\n\n```ts\nconst { data } = await client.verifyChatEmailCode(\n null,\n {\n challenge_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n code: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "available": true,\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "anonymous",\n "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "code_expires_at": 0,\n "resend_after": 0,\n "email": "user@example.com",\n "contact_resolution": "matched",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `cancelChatVerification`\n\n`POST /v1/verification/cancel`\n\n```ts\nconst { data } = await client.cancelChatVerification()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "available": true,\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "anonymous",\n "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "code_expires_at": 0,\n "resend_after": 0,\n "email": "user@example.com",\n "contact_resolution": "matched",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `getChatPortalLogin`\n\n`GET /v1/login/portal`\n\n```ts\nconst { data } = await client.getChatPortalLogin()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "available": true,\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "anonymous",\n "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "code_expires_at": 0,\n "attempts_left": 0,\n "email": "user@example.com",\n "contact_resolution": "matched",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `getChatPortalJourneyToken`\n\n`GET /v1/login/portal/journey-token`\n\n```ts\nconst { data } = await client.getChatPortalJourneyToken()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id_token": "string",\n "expires_at": 0\n}\n```\n\n</details>\n\n---\n\n### `startChatPortalLogin`\n\n`POST /v1/login/portal/start`\n\n```ts\nconst { data } = await client.startChatPortalLogin(\n null,\n {\n request_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n email: \'user@example.com\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "available": true,\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "anonymous",\n "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "code_expires_at": 0,\n "attempts_left": 0,\n "email": "user@example.com",\n "contact_resolution": "matched",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `verifyChatPortalLogin`\n\n`POST /v1/login/portal/verify`\n\n```ts\nconst { data } = await client.verifyChatPortalLogin(\n null,\n {\n challenge_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n code: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "available": true,\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "anonymous",\n "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "code_expires_at": 0,\n "attempts_left": 0,\n "email": "user@example.com",\n "contact_resolution": "matched",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `cancelChatPortalLogin`\n\n`POST /v1/login/portal/cancel`\n\n```ts\nconst { data } = await client.cancelChatPortalLogin()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "available": true,\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "anonymous",\n "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "code_expires_at": 0,\n "attempts_left": 0,\n "email": "user@example.com",\n "contact_resolution": "matched",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `signOutChatCustomer`\n\n`POST /v1/login/sign-out`\n\n```ts\nconst { data } = await client.signOutChatCustomer()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "access": {\n "tier": "anonymous",\n "method": "email_code"\n }\n}\n```\n\n</details>\n\n---\n\n### `getChatAction`\n\n`GET /v1/actions`\n\n```ts\nconst { data } = await client.getChatAction()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "none",\n "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "revision": 0,\n "options": [\n {\n "meter_id": "string",\n "counter_id": "string",\n "meter_number": "string",\n "label": "string",\n "unit": "string",\n "min_value": 0,\n "max_value": 0\n }\n ],\n "values": {\n "meter_id": "string",\n "counter_id": "string",\n "value": 0\n },\n "field_error": "VALUE_INVALID",\n "receipt": {\n "reference": "string",\n "meter_number": "string",\n "value": 0,\n "unit": "string",\n "submitted_at": "string"\n },\n "reason": "NO_METERS"\n}\n```\n\n</details>\n\n---\n\n### `startChatAction`\n\n`POST /v1/actions`\n\n```ts\nconst { data } = await client.startChatAction(\n null,\n {\n request_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n action_type: \'submit_meter_reading\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "none",\n "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "revision": 0,\n "options": [\n {\n "meter_id": "string",\n "counter_id": "string",\n "meter_number": "string",\n "label": "string",\n "unit": "string",\n "min_value": 0,\n "max_value": 0\n }\n ],\n "values": {\n "meter_id": "string",\n "counter_id": "string",\n "value": 0\n },\n "field_error": "VALUE_INVALID",\n "receipt": {\n "reference": "string",\n "meter_number": "string",\n "value": 0,\n "unit": "string",\n "submitted_at": "string"\n },\n "reason": "NO_METERS"\n}\n```\n\n</details>\n\n---\n\n### `reportChatActionEvent`\n\n`POST /v1/actions/events`\n\n```ts\nconst { data } = await client.reportChatActionEvent(\n null,\n {\n action: \'string\',\n event: \'journey_submitted\'\n },\n)\n```\n\n---\n\n### `submitChatAction`\n\n`POST /v1/actions/{action_id}/submit`\n\n```ts\nconst { data } = await client.submitChatAction(\n {\n action_id: \'example\',\n },\n {\n expected_revision: 1,\n meter_id: \'string\',\n counter_id: \'string\',\n value: 0\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "none",\n "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "revision": 0,\n "options": [\n {\n "meter_id": "string",\n "counter_id": "string",\n "meter_number": "string",\n "label": "string",\n "unit": "string",\n "min_value": 0,\n "max_value": 0\n }\n ],\n "values": {\n "meter_id": "string",\n "counter_id": "string",\n "value": 0\n },\n "field_error": "VALUE_INVALID",\n "receipt": {\n "reference": "string",\n "meter_number": "string",\n "value": 0,\n "unit": "string",\n "submitted_at": "string"\n },\n "reason": "NO_METERS"\n}\n```\n\n</details>\n\n---\n\n### `confirmChatAction`\n\n`POST /v1/actions/{action_id}/confirm`\n\n```ts\nconst { data } = await client.confirmChatAction(\n {\n action_id: \'example\',\n },\n {\n expected_revision: 1\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "none",\n "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "revision": 0,\n "options": [\n {\n "meter_id": "string",\n "counter_id": "string",\n "meter_number": "string",\n "label": "string",\n "unit": "string",\n "min_value": 0,\n "max_value": 0\n }\n ],\n "values": {\n "meter_id": "string",\n "counter_id": "string",\n "value": 0\n },\n "field_error": "VALUE_INVALID",\n "receipt": {\n "reference": "string",\n "meter_number": "string",\n "value": 0,\n "unit": "string",\n "submitted_at": "string"\n },\n "reason": "NO_METERS"\n}\n```\n\n</details>\n\n---\n\n### `cancelChatAction`\n\n`POST /v1/actions/{action_id}/cancel`\n\n```ts\nconst { data } = await client.cancelChatAction(\n {\n action_id: \'example\',\n },\n {\n expected_revision: 1\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "none",\n "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "revision": 0,\n "options": [\n {\n "meter_id": "string",\n "counter_id": "string",\n "meter_number": "string",\n "label": "string",\n "unit": "string",\n "min_value": 0,\n "max_value": 0\n }\n ],\n "values": {\n "meter_id": "string",\n "counter_id": "string",\n "value": 0\n },\n "field_error": "VALUE_INVALID",\n "receipt": {\n "reference": "string",\n "meter_number": "string",\n "value": 0,\n "unit": "string",\n "submitted_at": "string"\n },\n "reason": "NO_METERS"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ListWebsiteChatsResponse`\n\n```ts\ntype ListWebsiteChatsResponse = {\n website_chats: Array<{\n name: string\n agent_id: string // uuid\n settings: {\n allowed_origins: { ... }\n organisation_name: { ... }\n default_locale: { ... }\n design_id?: { ... }\n authentication?: { ... }\n self_service?: { ... }\n }\n website_chat_id: string // uuid\n org_id: string\n binding_id: string // uuid\n version: number\n created_at: string // date-time\n updated_at: string // date-time\n embed: {\n script_url: { ... }\n chat_api_origin: { ... }\n demo_url: { ... }\n }\n }>\n next_cursor?: string\n}\n```\n\n### `WebsiteChat`\n\n```ts\ntype WebsiteChat = {\n name: string\n agent_id: string // uuid\n settings: {\n allowed_origins: string[]\n organisation_name: string\n default_locale: "en" | "de"\n design_id?: string // uuid\n authentication?: {\n email_code?: { ... }\n portal?: { ... }\n }\n self_service?: {\n actions: { ... }\n }\n }\n website_chat_id: string // uuid\n org_id: string\n binding_id: string // uuid\n version: number\n created_at: string // date-time\n updated_at: string // date-time\n embed: {\n script_url: string // uri\n chat_api_origin: string // uri\n demo_url: string // uri\n }\n}\n```\n\n### `WebsiteChatSettings`\n\n```ts\ntype WebsiteChatSettings = {\n allowed_origins: string[]\n organisation_name: string\n default_locale: "en" | "de"\n design_id?: string // uuid\n authentication?: {\n email_code?: {\n email_template_id?: { ... }\n }\n portal?: {\n portal_id: { ... }\n }\n }\n self_service?: {\n actions: Array<{\n action: { ... }\n enabled: { ... }\n fulfilment: { ... }\n journey_id?: { ... }\n url?: { ... }\n access: { ... }\n guidance?: { ... }\n }>\n }\n}\n```\n\n### `SelfServiceSettings`\n\nSelf-service actions customers can start in this Website Chat. On update, the list is replaced as a whole; null removes all actions.\n\n```ts\ntype SelfServiceSettings = {\n actions: Array<{\n action: "submit_meter_reading" | "change_installment_rate" | "update_payment_method" | "change_billing_address" | "update_customer_details" | "change_tariff" | "report_move" | "terminate_contract"\n enabled: boolean\n fulfilment: "in_chat" | "journey" | "link"\n journey_id?: string // uuid\n url?: string\n access: "anonymous" | "identified" | "verified"\n guidance?: string\n }>\n}\n```\n\n### `SelfServiceAction`\n\nHow a self-service action is done and who can start it. A journey needs journey_id, a link needs url. in_chat is only available for submit_meter_reading and requires a verified customer.\n\n```ts\ntype SelfServiceAction = {\n action: "submit_meter_reading" | "change_installment_rate" | "update_payment_method" | "change_billing_address" | "update_customer_details" | "change_tariff" | "report_move" | "terminate_contract"\n enabled: boolean\n fulfilment: "in_chat" | "journey" | "link"\n journey_id?: string // uuid\n url?: string\n access: "anonymous" | "identified" | "verified"\n guidance?: string\n}\n```\n\n### `WebsiteChatPreviewGrantRequest`\n\n```ts\ntype WebsiteChatPreviewGrantRequest = {\n design_id?: string // uuid\n}\n```\n\n### `WebsiteChatPreviewGrant`\n\n```ts\ntype WebsiteChatPreviewGrant = {\n grant: string\n expires_in: number\n frame_origin: string // uri\n website_chat: {\n key: string\n organisationName: string\n assistantName: string\n defaultLocale: "en" | "de"\n login_methods: "email_code" | "portal_login"[]\n starters?: {\n de?: { ... }\n en?: { ... }\n }\n actions?: {\n meter_reading?: { ... }\n meter_reading_journey_id?: { ... }\n }\n design?: {\n id: { ... }\n last_modified_at?: { ... }\n style?: { ... }\n spark_theme?: { ... }\n }\n locales: "en" | "de"[]\n }\n}\n```\n\n### `Error`\n\n```ts\ntype Error = {\n error?: string\n message?: string\n details?: object\n}\n```\n\n### `CreateWebsiteChatRequest`\n\n```ts\ntype CreateWebsiteChatRequest = {\n name: string\n agent_id: string // uuid\n settings: {\n allowed_origins: string[]\n organisation_name: string\n default_locale: "en" | "de"\n design_id?: string // uuid\n authentication?: {\n email_code?: { ... }\n portal?: { ... }\n }\n self_service?: {\n actions: { ... }\n }\n }\n}\n```\n\n### `UpdateWebsiteChatRequest`\n\n```ts\ntype UpdateWebsiteChatRequest = {\n name?: string\n agent_id?: string // uuid\n settings?: {\n allowed_origins: string[]\n organisation_name: string\n default_locale: "en" | "de"\n design_id?: string // uuid\n authentication?: {\n email_code?: { ... }\n portal?: { ... }\n }\n self_service?: {\n actions: { ... }\n }\n }\n version: number\n}\n```\n\n### `ActionRevision`\n\n```ts\ntype ActionRevision = {\n expected_revision: number\n}\n```\n\n### `ActionState`\n\n```ts\ntype ActionState = {\n conversation_id: string // uuid\n status: "none" | "needs_input" | "needs_confirmation" | "executing" | "completed" | "pending" | "rejected" | "handoff"\n action_id?: string // uuid\n revision?: number\n options?: Array<{\n meter_id: string\n counter_id: string\n meter_number: string\n label: string\n unit: string\n min_value?: number\n max_value?: number\n }>\n values?: {\n meter_id: string\n counter_id: string\n value: number\n }\n field_error?: "VALUE_INVALID" | "VALUE_OUT_OF_RANGE" | "TARGET_UNAVAILABLE"\n receipt?: {\n reference: string\n meter_number: string\n value: number\n unit: string\n submitted_at: string\n }\n reason?: "NO_METERS" | "SUBMISSION_REJECTED" | "SUBMISSION_UNCERTAIN"\n}\n```\n\n### `VerificationState`\n\n```ts\ntype VerificationState = {\n available: boolean\n conversation_id: string // uuid\n status: "anonymous" | "sending" | "pending" | "verified"\n challenge_id?: string // uuid\n code_expires_at?: number\n resend_after?: number\n email?: string // email\n contact_resolution?: "matched" | "ambiguous" | "not_found"\n access: {\n tier: "anonymous" | "identified" | "verified"\n method?: "email_code" | "portal_login"\n }\n}\n```\n\n### `PortalLoginState`\n\n```ts\ntype PortalLoginState = {\n available: boolean\n conversation_id: string // uuid\n status: "anonymous" | "pending" | "verified"\n challenge_id?: string // uuid\n code_expires_at?: number\n attempts_left?: number\n email?: string // email\n contact_resolution?: "matched" | "not_found"\n access: {\n tier: "anonymous" | "identified" | "verified"\n method?: "email_code" | "portal_login"\n }\n}\n```\n\n### `LoginMethod`\n\nHow a customer can log in or verify themselves in the chat.\n\n```ts\ntype LoginMethod = "email_code" | "portal_login"\n```\n\n### `AccessTier`\n\nanonymous: no customer identity. identified: the Contact is known but ownership\nis not proven. verified: ownership is proven (an email code or a portal login).\n\n\n```ts\ntype AccessTier = "anonymous" | "identified" | "verified"\n```\n\n### `CustomerAccess`\n\n```ts\ntype CustomerAccess = {\n tier: "anonymous" | "identified" | "verified"\n method?: "email_code" | "portal_login"\n}\n```\n\n### `StarterQuestions`\n\nAt most six. (No maxItems, which generated clients turn into fixed-length tuples.)\n\n```ts\ntype StarterQuestions = string[]\n```\n\n### `PublicWebsiteChat`\n\n```ts\ntype PublicWebsiteChat = {\n key: string\n organisationName: string\n assistantName: string\n defaultLocale: "en" | "de"\n login_methods: "email_code" | "portal_login"[]\n starters?: {\n de?: string[]\n en?: string[]\n }\n actions?: {\n meter_reading?: boolean\n meter_reading_journey_id?: string // uuid\n }\n design?: {\n id: string // uuid\n last_modified_at?: string\n style?: {\n palette?: { ... }\n typography?: { ... }\n shape?: { ... }\n }\n spark_theme?: {\n accentColor?: { ... }\n backgroundColor?: { ... }\n fontBody?: { ... }\n fontHeading?: { ... }\n radius?: { ... }\n scaling?: { ... }\n spacing?: { ... }\n appearance?: { ... }\n neutralColor?: { ... }\n styleVariant?: { ... }\n labelPosition?: { ... }\n inputStyle?: { ... }\n inputColor?: { ... }\n cardVariant?: { ... }\n cardColor?: { ... }\n highContrast?: { ... }\n }\n }\n locales: "en" | "de"[]\n}\n```\n\n### `WebsiteChatDesign`\n\n```ts\ntype WebsiteChatDesign = {\n id: string // uuid\n last_modified_at?: string\n style?: {\n palette?: {\n primary?: { ... }\n background?: { ... }\n }\n typography?: {\n font?: { ... }\n }\n shape?: {\n border_radius?: { ... }\n }\n }\n spark_theme?: {\n accentColor?: string\n backgroundColor?: string\n fontBody?: string\n fontHeading?: string\n radius?: string\n scaling?: string\n spacing?: string\n appearance?: string\n neutralColor?: string\n styleVariant?: string\n labelPosition?: string\n inputStyle?: string\n inputColor?: string\n cardVariant?: string\n cardColor?: string\n highContrast?: boolean\n }\n}\n```\n\n### `PublicEvent`\n\nJSON payload of one SSE data frame from sendAnonymousChatMessage.\n\n```ts\ntype PublicEvent = {\n type: "delta"\n text: string\n request_id: string // uuid\n} | {\n type: "complete"\n text: string\n request_id: string // uuid\n} | {\n type: "error"\n code: "UNAVAILABLE"\n request_id: string // uuid\n} | {\n type: "action"\n action: {\n action: string\n fulfilment: "in_chat" | "journey" | "link"\n journey_id?: string // uuid\n url?: string\n access: "anonymous" | "identified" | "verified"\n }\n request_id: string // uuid\n}\n```\n\n### `SelfServiceDirective`\n\n```ts\ntype SelfServiceDirective = {\n action: string\n fulfilment: "in_chat" | "journey" | "link"\n journey_id?: string // uuid\n url?: string\n access: "anonymous" | "identified" | "verified"\n}\n```\n\n### `PublicChatError`\n\n```ts\ntype PublicChatError = {\n code: "INVALID_VERIFICATION_CODE" | "VERIFICATION_EXPIRED" | "VERIFICATION_CONFLICT" | "VERIFICATION_DISABLED" | "VERIFICATION_UNAVAILABLE" | "IDENTITY_CHANGED" | "INVALID_REQUEST" | "ORIGIN_DENIED" | "NOT_FOUND" | "INVALID_GRANT" | "SESSION_EXPIRED" | "RATE_LIMITED" | "SESSION_LIMIT" | "USAGE_LIMIT" | "REQUEST_CONFLICT" | "IN_PROGRESS" | "UNAVAILABLE" | "TEMPORARILY_UNAVAILABLE" | "IDENTITY_REQUIRED" | "ACTION_UNAVAILABLE" | "ACTION_CONFLICT" | "ACTION_TARGET_DENIED" | "INVALID_LOGIN_CODE" | "LOGIN_EXPIRED" | "LOGIN_DISABLED" | "LOGIN_UNAVAILABLE" | "LOGIN_CONFLICT" | "LOGIN_REJECTED"\n attempts_left?: number\n}\n```\n';
5
- export {
6
- chat_default as default
7
- };