@epilot/sdk 2.20.35 → 2.20.37

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 (141) hide show
  1. package/definitions/chat-runtime.json +1 -1
  2. package/definitions/chat.json +749 -126
  3. package/definitions/integration-toolkit.json +25 -2
  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 +8 -8
  25. package/dist/apis/chat.d.cts +2 -2
  26. package/dist/apis/chat.d.ts +2 -2
  27. package/dist/apis/chat.js +2 -2
  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/file.cjs +6 -6
  57. package/dist/apis/file.js +1 -1
  58. package/dist/apis/iban.cjs +6 -6
  59. package/dist/apis/iban.js +1 -1
  60. package/dist/apis/integration-toolkit.cjs +6 -6
  61. package/dist/apis/integration-toolkit.d.cts +2 -2
  62. package/dist/apis/integration-toolkit.d.ts +2 -2
  63. package/dist/apis/integration-toolkit.js +1 -1
  64. package/dist/apis/journey.cjs +6 -6
  65. package/dist/apis/journey.js +1 -1
  66. package/dist/apis/kanban.cjs +6 -6
  67. package/dist/apis/kanban.js +1 -1
  68. package/dist/apis/message.cjs +6 -6
  69. package/dist/apis/message.js +1 -1
  70. package/dist/apis/metering.cjs +6 -6
  71. package/dist/apis/metering.js +1 -1
  72. package/dist/apis/notes.cjs +6 -6
  73. package/dist/apis/notes.js +1 -1
  74. package/dist/apis/notification.cjs +6 -6
  75. package/dist/apis/notification.js +1 -1
  76. package/dist/apis/organization.cjs +6 -6
  77. package/dist/apis/organization.js +1 -1
  78. package/dist/apis/partner-directory.cjs +6 -6
  79. package/dist/apis/partner-directory.js +1 -1
  80. package/dist/apis/permissions.cjs +6 -6
  81. package/dist/apis/permissions.js +1 -1
  82. package/dist/apis/pricing-tier.cjs +6 -6
  83. package/dist/apis/pricing-tier.js +1 -1
  84. package/dist/apis/pricing.cjs +6 -6
  85. package/dist/apis/pricing.js +1 -1
  86. package/dist/apis/purpose.cjs +6 -6
  87. package/dist/apis/purpose.js +1 -1
  88. package/dist/apis/query.cjs +6 -6
  89. package/dist/apis/query.js +1 -1
  90. package/dist/apis/sandbox.cjs +6 -6
  91. package/dist/apis/sandbox.js +1 -1
  92. package/dist/apis/sharing.cjs +6 -6
  93. package/dist/apis/sharing.js +1 -1
  94. package/dist/apis/snapshot.cjs +6 -6
  95. package/dist/apis/snapshot.js +1 -1
  96. package/dist/apis/submission.cjs +6 -6
  97. package/dist/apis/submission.js +1 -1
  98. package/dist/apis/target.cjs +6 -6
  99. package/dist/apis/target.js +1 -1
  100. package/dist/apis/targeting.cjs +6 -6
  101. package/dist/apis/targeting.js +1 -1
  102. package/dist/apis/template-variables.cjs +6 -6
  103. package/dist/apis/template-variables.js +1 -1
  104. package/dist/apis/user.cjs +6 -6
  105. package/dist/apis/user.js +1 -1
  106. package/dist/apis/validation-rules.cjs +6 -6
  107. package/dist/apis/validation-rules.js +1 -1
  108. package/dist/apis/webhooks.cjs +6 -6
  109. package/dist/apis/webhooks.js +1 -1
  110. package/dist/apis/workflow-definition.cjs +6 -6
  111. package/dist/apis/workflow-definition.js +1 -1
  112. package/dist/apis/workflow.cjs +6 -6
  113. package/dist/apis/workflow.js +1 -1
  114. package/dist/chat-3MIK7DUI.js +7 -0
  115. package/dist/chat-IWMQEXCD.cjs +7 -0
  116. package/dist/{chat-runtime-MF35HI2U.js → chat-runtime-O46V7MCD.js} +1 -1
  117. package/dist/chat-runtime-QSGSW6SL.cjs +5 -0
  118. package/dist/{chat.d-0w0TaT-a.d.cts → chat.d-mUHenLz7.d.cts} +564 -365
  119. package/dist/{chat.d-0w0TaT-a.d.ts → chat.d-mUHenLz7.d.ts} +564 -365
  120. package/dist/chunk-2F4JXHGX.js +14 -0
  121. package/dist/{chunk-OXXS3O7X.js → chunk-FWZRP5HX.js} +3 -3
  122. package/dist/chunk-QWQ6UINA.cjs +14 -0
  123. package/dist/{chunk-RE2KDGKQ.cjs → chunk-R2J3UNRP.cjs} +3 -3
  124. package/dist/index.cjs +10 -10
  125. package/dist/index.d.cts +2 -2
  126. package/dist/index.d.ts +2 -2
  127. package/dist/index.js +2 -2
  128. package/dist/integration-toolkit-4W2SXQZZ.cjs +7 -0
  129. package/dist/integration-toolkit-WZ324PVF.js +7 -0
  130. package/dist/{integration-toolkit.d-BQ0Fj-48.d.cts → integration-toolkit.d-DRYMfItg.d.cts} +21 -2
  131. package/dist/{integration-toolkit.d-BQ0Fj-48.d.ts → integration-toolkit.d-DRYMfItg.d.ts} +21 -2
  132. package/docs/chat.md +231 -77
  133. package/docs/integration-toolkit.md +7 -1
  134. package/package.json +1 -1
  135. package/dist/chat-5EOD2OPN.cjs +0 -7
  136. package/dist/chat-D5KXPRYY.js +0 -7
  137. package/dist/chat-runtime-MYMUFT3Y.cjs +0 -5
  138. package/dist/chunk-6ZTP7EQE.js +0 -14
  139. package/dist/chunk-A5THJ4SF.cjs +0 -14
  140. package/dist/integration-toolkit-4ADZMNTB.cjs +0 -7
  141. package/dist/integration-toolkit-BCRYMKLW.js +0 -7
@@ -4055,6 +4055,21 @@ declare namespace Components {
4055
4055
  * 2025-01-31T23:59:59Z
4056
4056
  */
4057
4057
  to_date?: string; // date-time
4058
+ /**
4059
+ * Count only the events of ONE run. Every span a run produces carries its `correlation_id` (for a file import, the `import_id`), so this turns the stats call into an exact per-run readout — no time range to guess at, no pagination, and no 2000-span cap as on `/monitoring/traces/{correlationId}`. Applies to the `monitoring` source; the `incoming` feed is counted per received event and ignores it.
4060
+ * example:
4061
+ * imp_01M3799K98B6TG7GV7Q2DQT554
4062
+ */
4063
+ correlation_id?: string;
4064
+ /**
4065
+ * Count the events of THESE runs (matches any). Takes precedence over `correlation_id` when both are present. With `group_by=correlation_id` this returns one row per run, which is how a list of jobs gets a per-row readout in a single query instead of one call per row.
4066
+ * example:
4067
+ * [
4068
+ * "imp_01M3799K98B6TG7GV7Q2DQT554",
4069
+ * "imp_01M374YPQ0E7ZB0VYJZSK72M4E"
4070
+ * ]
4071
+ */
4072
+ correlation_ids?: string[];
4058
4073
  /**
4059
4074
  * Filter stats by a single use case type
4060
4075
  */
@@ -4064,9 +4079,9 @@ declare namespace Components {
4064
4079
  */
4065
4080
  use_case_types?: ("inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy")[];
4066
4081
  /**
4067
- * Field to group the breakdown by
4082
+ * Field to group the breakdown by. `correlation_id` gives one row per run — pair it with `correlation_ids` to bound the result to the runs on screen.
4068
4083
  */
4069
- group_by?: "use_case_id" | "use_case_type" | "level" | "code" | "date";
4084
+ group_by?: "use_case_id" | "use_case_type" | "level" | "code" | "correlation_id" | "date";
4070
4085
  /**
4071
4086
  * Data source for the stats. "monitoring" (default) aggregates processed events from erp_monitoring_v2 — this counts every event produced throughout the processing tree (fan-out children, post-actions, relation resolutions, etc.). "incoming" counts only the initial inbound events actually received (distinct event_id from erp_incoming_events); only group_by=use_case_id is supported and status/level breakdown is not available for this source (success/error/warning/skipped counts are returned as 0).
4072
4087
  *
@@ -5931,6 +5946,10 @@ declare namespace Components {
5931
5946
  * Timestamp of the most recent error
5932
5947
  */
5933
5948
  last_error_at?: string | null; // date-time
5949
+ /**
5950
+ * Timestamp of the most recent event of ANY level — "is this still moving?", which is a different question from when it last broke. Null when the filter matched nothing.
5951
+ */
5952
+ last_event_at?: string | null; // date-time
5934
5953
  /**
5935
5954
  * Statistics breakdown by requested group_by field
5936
5955
  */
@@ -4055,6 +4055,21 @@ declare namespace Components {
4055
4055
  * 2025-01-31T23:59:59Z
4056
4056
  */
4057
4057
  to_date?: string; // date-time
4058
+ /**
4059
+ * Count only the events of ONE run. Every span a run produces carries its `correlation_id` (for a file import, the `import_id`), so this turns the stats call into an exact per-run readout — no time range to guess at, no pagination, and no 2000-span cap as on `/monitoring/traces/{correlationId}`. Applies to the `monitoring` source; the `incoming` feed is counted per received event and ignores it.
4060
+ * example:
4061
+ * imp_01M3799K98B6TG7GV7Q2DQT554
4062
+ */
4063
+ correlation_id?: string;
4064
+ /**
4065
+ * Count the events of THESE runs (matches any). Takes precedence over `correlation_id` when both are present. With `group_by=correlation_id` this returns one row per run, which is how a list of jobs gets a per-row readout in a single query instead of one call per row.
4066
+ * example:
4067
+ * [
4068
+ * "imp_01M3799K98B6TG7GV7Q2DQT554",
4069
+ * "imp_01M374YPQ0E7ZB0VYJZSK72M4E"
4070
+ * ]
4071
+ */
4072
+ correlation_ids?: string[];
4058
4073
  /**
4059
4074
  * Filter stats by a single use case type
4060
4075
  */
@@ -4064,9 +4079,9 @@ declare namespace Components {
4064
4079
  */
4065
4080
  use_case_types?: ("inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy")[];
4066
4081
  /**
4067
- * Field to group the breakdown by
4082
+ * Field to group the breakdown by. `correlation_id` gives one row per run — pair it with `correlation_ids` to bound the result to the runs on screen.
4068
4083
  */
4069
- group_by?: "use_case_id" | "use_case_type" | "level" | "code" | "date";
4084
+ group_by?: "use_case_id" | "use_case_type" | "level" | "code" | "correlation_id" | "date";
4070
4085
  /**
4071
4086
  * Data source for the stats. "monitoring" (default) aggregates processed events from erp_monitoring_v2 — this counts every event produced throughout the processing tree (fan-out children, post-actions, relation resolutions, etc.). "incoming" counts only the initial inbound events actually received (distinct event_id from erp_incoming_events); only group_by=use_case_id is supported and status/level breakdown is not available for this source (success/error/warning/skipped counts are returned as 0).
4072
4087
  *
@@ -5931,6 +5946,10 @@ declare namespace Components {
5931
5946
  * Timestamp of the most recent error
5932
5947
  */
5933
5948
  last_error_at?: string | null; // date-time
5949
+ /**
5950
+ * Timestamp of the most recent event of ANY level — "is this still moving?", which is a different question from when it last broke. Null when the filter matched nothing.
5951
+ */
5952
+ last_event_at?: string | null; // date-time
5934
5953
  /**
5935
5954
  * Statistics breakdown by requested group_by field
5936
5955
  */
package/docs/chat.md CHANGED
@@ -9,7 +9,7 @@
9
9
  import { epilot } from '@epilot/sdk'
10
10
 
11
11
  epilot.authorize(() => '<token>')
12
- const { data } = await epilot.chat.listChatWidgets(...)
12
+ const { data } = await epilot.chat.listWebsiteChats(...)
13
13
  ```
14
14
 
15
15
  ### Tree-shakeable import
@@ -19,42 +19,47 @@ import { getClient, authorize } from '@epilot/sdk/chat'
19
19
 
20
20
  const chatClient = getClient()
21
21
  authorize(chatClient, () => '<token>')
22
- const { data } = await chatClient.listChatWidgets(...)
22
+ const { data } = await chatClient.listWebsiteChats(...)
23
23
  ```
24
24
 
25
25
  ## Operations
26
26
 
27
- **Chat widgets**
28
- - [`listChatWidgets`](#listchatwidgets)
29
- - [`createChatWidget`](#createchatwidget)
30
- - [`getChatWidget`](#getchatwidget)
31
- - [`updateChatWidget`](#updatechatwidget)
32
- - [`deleteChatWidget`](#deletechatwidget)
27
+ **Website Chats**
28
+ - [`listWebsiteChats`](#listwebsitechats)
29
+ - [`createWebsiteChat`](#createwebsitechat)
30
+ - [`getWebsiteChat`](#getwebsitechat)
31
+ - [`updateWebsiteChat`](#updatewebsitechat)
32
+ - [`deleteWebsiteChat`](#deletewebsitechat)
33
33
 
34
34
  **Other**
35
- - [`getPublicChatWidget`](#getpublicchatwidget)
35
+ - [`getPublicWebsiteChat`](#getpublicwebsitechat)
36
36
  - [`createPublicChatGrant`](#createpublicchatgrant)
37
37
  - [`createAnonymousChatSession`](#createanonymouschatsession)
38
38
  - [`sendAnonymousChatMessage`](#sendanonymouschatmessage)
39
+ - [`getChatVerification`](#getchatverification)
40
+ - [`startChatEmailVerification`](#startchatemailverification)
41
+ - [`verifyChatEmailCode`](#verifychatemailcode)
42
+ - [`cancelChatVerification`](#cancelchatverification)
39
43
 
40
44
  **Schemas**
41
- - [`ListChatWidgetsResponse`](#listchatwidgetsresponse)
42
- - [`ChatWidget`](#chatwidget)
45
+ - [`ListWebsiteChatsResponse`](#listwebsitechatsresponse)
46
+ - [`WebsiteChat`](#websitechat)
43
47
  - [`WebsiteChatSettings`](#websitechatsettings)
44
48
  - [`Error`](#error)
45
- - [`CreateChatWidgetRequest`](#createchatwidgetrequest)
46
- - [`UpdateChatWidgetRequest`](#updatechatwidgetrequest)
47
- - [`Widget`](#widget)
48
- - [`WidgetDesign`](#widgetdesign)
49
+ - [`CreateWebsiteChatRequest`](#createwebsitechatrequest)
50
+ - [`UpdateWebsiteChatRequest`](#updatewebsitechatrequest)
51
+ - [`VerificationState`](#verificationstate)
52
+ - [`PublicWebsiteChat`](#publicwebsitechat)
53
+ - [`WebsiteChatDesign`](#websitechatdesign)
49
54
  - [`PublicEvent`](#publicevent)
50
55
  - [`PublicChatError`](#publicchaterror)
51
56
 
52
- ### `listChatWidgets`
57
+ ### `listWebsiteChats`
53
58
 
54
- `GET /v1/widgets`
59
+ `GET /v1/website-chats`
55
60
 
56
61
  ```ts
57
- const { data } = await client.listChatWidgets({
62
+ const { data } = await client.listWebsiteChats({
58
63
  cursor: 'example',
59
64
  })
60
65
  ```
@@ -64,11 +69,11 @@ const { data } = await client.listChatWidgets({
64
69
 
65
70
  ```json
66
71
  {
67
- "widgets": [
72
+ "website_chats": [
68
73
  {
69
74
  "name": "string",
70
75
  "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
71
- "website_chat": {
76
+ "settings": {
72
77
  "allowed_origins": ["string"],
73
78
  "organisation_name": "string",
74
79
  "default_locale": "en",
@@ -79,13 +84,13 @@ const { data } = await client.listChatWidgets({
79
84
  }
80
85
  }
81
86
  },
82
- "widget_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
87
+ "website_chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
83
88
  "org_id": "string",
84
89
  "binding_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
85
90
  "version": 1,
86
91
  "created_at": "1970-01-01T00:00:00.000Z",
87
92
  "updated_at": "1970-01-01T00:00:00.000Z",
88
- "website_chat_embed": {
93
+ "embed": {
89
94
  "script_url": "https://example.com/path",
90
95
  "chat_api_origin": "https://example.com/path",
91
96
  "demo_url": "https://example.com/path"
@@ -100,17 +105,17 @@ const { data } = await client.listChatWidgets({
100
105
 
101
106
  ---
102
107
 
103
- ### `createChatWidget`
108
+ ### `createWebsiteChat`
104
109
 
105
- `POST /v1/widgets`
110
+ `POST /v1/website-chats`
106
111
 
107
112
  ```ts
108
- const { data } = await client.createChatWidget(
113
+ const { data } = await client.createWebsiteChat(
109
114
  null,
110
115
  {
111
116
  name: 'string',
112
117
  agent_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
113
- website_chat: {
118
+ settings: {
114
119
  allowed_origins: ['string'],
115
120
  organisation_name: 'string',
116
121
  default_locale: 'en',
@@ -132,7 +137,7 @@ const { data } = await client.createChatWidget(
132
137
  {
133
138
  "name": "string",
134
139
  "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
135
- "website_chat": {
140
+ "settings": {
136
141
  "allowed_origins": ["string"],
137
142
  "organisation_name": "string",
138
143
  "default_locale": "en",
@@ -143,13 +148,13 @@ const { data } = await client.createChatWidget(
143
148
  }
144
149
  }
145
150
  },
146
- "widget_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
151
+ "website_chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
147
152
  "org_id": "string",
148
153
  "binding_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
149
154
  "version": 1,
150
155
  "created_at": "1970-01-01T00:00:00.000Z",
151
156
  "updated_at": "1970-01-01T00:00:00.000Z",
152
- "website_chat_embed": {
157
+ "embed": {
153
158
  "script_url": "https://example.com/path",
154
159
  "chat_api_origin": "https://example.com/path",
155
160
  "demo_url": "https://example.com/path"
@@ -161,13 +166,13 @@ const { data } = await client.createChatWidget(
161
166
 
162
167
  ---
163
168
 
164
- ### `getChatWidget`
169
+ ### `getWebsiteChat`
165
170
 
166
- `GET /v1/widgets/{widget_id}`
171
+ `GET /v1/website-chats/{website_chat_id}`
167
172
 
168
173
  ```ts
169
- const { data } = await client.getChatWidget({
170
- widget_id: 'example',
174
+ const { data } = await client.getWebsiteChat({
175
+ website_chat_id: 'example',
171
176
  })
172
177
  ```
173
178
 
@@ -178,7 +183,7 @@ const { data } = await client.getChatWidget({
178
183
  {
179
184
  "name": "string",
180
185
  "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
181
- "website_chat": {
186
+ "settings": {
182
187
  "allowed_origins": ["string"],
183
188
  "organisation_name": "string",
184
189
  "default_locale": "en",
@@ -189,13 +194,13 @@ const { data } = await client.getChatWidget({
189
194
  }
190
195
  }
191
196
  },
192
- "widget_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
197
+ "website_chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
193
198
  "org_id": "string",
194
199
  "binding_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
195
200
  "version": 1,
196
201
  "created_at": "1970-01-01T00:00:00.000Z",
197
202
  "updated_at": "1970-01-01T00:00:00.000Z",
198
- "website_chat_embed": {
203
+ "embed": {
199
204
  "script_url": "https://example.com/path",
200
205
  "chat_api_origin": "https://example.com/path",
201
206
  "demo_url": "https://example.com/path"
@@ -207,19 +212,19 @@ const { data } = await client.getChatWidget({
207
212
 
208
213
  ---
209
214
 
210
- ### `updateChatWidget`
215
+ ### `updateWebsiteChat`
211
216
 
212
- `PUT /v1/widgets/{widget_id}`
217
+ `PUT /v1/website-chats/{website_chat_id}`
213
218
 
214
219
  ```ts
215
- const { data } = await client.updateChatWidget(
220
+ const { data } = await client.updateWebsiteChat(
216
221
  {
217
- widget_id: 'example',
222
+ website_chat_id: 'example',
218
223
  },
219
224
  {
220
225
  name: 'string',
221
226
  agent_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
222
- website_chat: {
227
+ settings: {
223
228
  allowed_origins: ['string'],
224
229
  organisation_name: 'string',
225
230
  default_locale: 'en',
@@ -242,7 +247,7 @@ const { data } = await client.updateChatWidget(
242
247
  {
243
248
  "name": "string",
244
249
  "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
245
- "website_chat": {
250
+ "settings": {
246
251
  "allowed_origins": ["string"],
247
252
  "organisation_name": "string",
248
253
  "default_locale": "en",
@@ -253,13 +258,13 @@ const { data } = await client.updateChatWidget(
253
258
  }
254
259
  }
255
260
  },
256
- "widget_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
261
+ "website_chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
257
262
  "org_id": "string",
258
263
  "binding_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
259
264
  "version": 1,
260
265
  "created_at": "1970-01-01T00:00:00.000Z",
261
266
  "updated_at": "1970-01-01T00:00:00.000Z",
262
- "website_chat_embed": {
267
+ "embed": {
263
268
  "script_url": "https://example.com/path",
264
269
  "chat_api_origin": "https://example.com/path",
265
270
  "demo_url": "https://example.com/path"
@@ -271,26 +276,26 @@ const { data } = await client.updateChatWidget(
271
276
 
272
277
  ---
273
278
 
274
- ### `deleteChatWidget`
279
+ ### `deleteWebsiteChat`
275
280
 
276
- `DELETE /v1/widgets/{widget_id}`
281
+ `DELETE /v1/website-chats/{website_chat_id}`
277
282
 
278
283
  ```ts
279
- const { data } = await client.deleteChatWidget({
280
- widget_id: 'example',
284
+ const { data } = await client.deleteWebsiteChat({
285
+ website_chat_id: 'example',
281
286
  version: 1,
282
287
  })
283
288
  ```
284
289
 
285
290
  ---
286
291
 
287
- ### `getPublicChatWidget`
292
+ ### `getPublicWebsiteChat`
288
293
 
289
- `GET /v1/widgets/{widget_id}/configuration`
294
+ `GET /v1/website-chats/{website_chat_id}/configuration`
290
295
 
291
296
  ```ts
292
- const { data } = await client.getPublicChatWidget({
293
- widget_id: 'example',
297
+ const { data } = await client.getPublicWebsiteChat({
298
+ website_chat_id: 'example',
294
299
  })
295
300
  ```
296
301
 
@@ -303,6 +308,9 @@ const { data } = await client.getPublicChatWidget({
303
308
  "organisationName": "string",
304
309
  "assistantName": "string",
305
310
  "defaultLocale": "en",
311
+ "authentication": {
312
+ "email_code": true
313
+ },
306
314
  "design": {
307
315
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
308
316
  "last_modified_at": "string",
@@ -355,7 +363,7 @@ const { data } = await client.getPublicChatWidget({
355
363
  const { data } = await client.createPublicChatGrant(
356
364
  null,
357
365
  {
358
- widget_key: 'string'
366
+ website_chat_id: 'string'
359
367
  },
360
368
  )
361
369
  ```
@@ -367,7 +375,7 @@ const { data } = await client.createPublicChatGrant(
367
375
  {
368
376
  "grant": "string",
369
377
  "expires_in": 60,
370
- "widget_origin": "https://example.com/path"
378
+ "frame_origin": "https://example.com/path"
371
379
  }
372
380
  ```
373
381
 
@@ -396,11 +404,14 @@ const { data } = await client.createAnonymousChatSession(
396
404
  "token": "string",
397
405
  "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
398
406
  "expires_at": 0,
399
- "widget": {
407
+ "website_chat": {
400
408
  "key": "string",
401
409
  "organisationName": "string",
402
410
  "assistantName": "string",
403
411
  "defaultLocale": "en",
412
+ "authentication": {
413
+ "email_code": true
414
+ },
404
415
  "design": {
405
416
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
406
417
  "last_modified_at": "string",
@@ -464,29 +475,154 @@ const { data } = await client.sendAnonymousChatMessage(
464
475
 
465
476
  ---
466
477
 
478
+ ### `getChatVerification`
479
+
480
+ `GET /v1/verification`
481
+
482
+ ```ts
483
+ const { data } = await client.getChatVerification()
484
+ ```
485
+
486
+ <details>
487
+ <summary>Response</summary>
488
+
489
+ ```json
490
+ {
491
+ "available": true,
492
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
493
+ "status": "anonymous",
494
+ "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
495
+ "code_expires_at": 0,
496
+ "resend_after": 0,
497
+ "email": "user@example.com",
498
+ "contact_resolution": "matched"
499
+ }
500
+ ```
501
+
502
+ </details>
503
+
504
+ ---
505
+
506
+ ### `startChatEmailVerification`
507
+
508
+ `POST /v1/verification/email`
509
+
510
+ ```ts
511
+ const { data } = await client.startChatEmailVerification(
512
+ null,
513
+ {
514
+ request_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
515
+ email: 'user@example.com',
516
+ locale: 'en'
517
+ },
518
+ )
519
+ ```
520
+
521
+ <details>
522
+ <summary>Response</summary>
523
+
524
+ ```json
525
+ {
526
+ "available": true,
527
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
528
+ "status": "anonymous",
529
+ "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
530
+ "code_expires_at": 0,
531
+ "resend_after": 0,
532
+ "email": "user@example.com",
533
+ "contact_resolution": "matched"
534
+ }
535
+ ```
536
+
537
+ </details>
538
+
539
+ ---
540
+
541
+ ### `verifyChatEmailCode`
542
+
543
+ `POST /v1/verification/code`
544
+
545
+ ```ts
546
+ const { data } = await client.verifyChatEmailCode(
547
+ null,
548
+ {
549
+ challenge_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
550
+ code: 'string'
551
+ },
552
+ )
553
+ ```
554
+
555
+ <details>
556
+ <summary>Response</summary>
557
+
558
+ ```json
559
+ {
560
+ "available": true,
561
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
562
+ "status": "anonymous",
563
+ "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
564
+ "code_expires_at": 0,
565
+ "resend_after": 0,
566
+ "email": "user@example.com",
567
+ "contact_resolution": "matched"
568
+ }
569
+ ```
570
+
571
+ </details>
572
+
573
+ ---
574
+
575
+ ### `cancelChatVerification`
576
+
577
+ `POST /v1/verification/cancel`
578
+
579
+ ```ts
580
+ const { data } = await client.cancelChatVerification()
581
+ ```
582
+
583
+ <details>
584
+ <summary>Response</summary>
585
+
586
+ ```json
587
+ {
588
+ "available": true,
589
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
590
+ "status": "anonymous",
591
+ "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
592
+ "code_expires_at": 0,
593
+ "resend_after": 0,
594
+ "email": "user@example.com",
595
+ "contact_resolution": "matched"
596
+ }
597
+ ```
598
+
599
+ </details>
600
+
601
+ ---
602
+
467
603
  ## Schemas
468
604
 
469
- ### `ListChatWidgetsResponse`
605
+ ### `ListWebsiteChatsResponse`
470
606
 
471
607
  ```ts
472
- type ListChatWidgetsResponse = {
473
- widgets: Array<{
608
+ type ListWebsiteChatsResponse = {
609
+ website_chats: Array<{
474
610
  name: string
475
611
  agent_id: string // uuid
476
- website_chat: {
612
+ settings: {
477
613
  allowed_origins: { ... }
478
614
  organisation_name: { ... }
479
615
  default_locale: { ... }
480
616
  design_id?: { ... }
481
617
  authentication?: { ... }
482
618
  }
483
- widget_id: string // uuid
619
+ website_chat_id: string // uuid
484
620
  org_id: string
485
621
  binding_id: string // uuid
486
622
  version: number
487
623
  created_at: string // date-time
488
624
  updated_at: string // date-time
489
- website_chat_embed: {
625
+ embed: {
490
626
  script_url: { ... }
491
627
  chat_api_origin: { ... }
492
628
  demo_url: { ... }
@@ -496,13 +632,13 @@ type ListChatWidgetsResponse = {
496
632
  }
497
633
  ```
498
634
 
499
- ### `ChatWidget`
635
+ ### `WebsiteChat`
500
636
 
501
637
  ```ts
502
- type ChatWidget = {
638
+ type WebsiteChat = {
503
639
  name: string
504
640
  agent_id: string // uuid
505
- website_chat: {
641
+ settings: {
506
642
  allowed_origins: string[]
507
643
  organisation_name: string
508
644
  default_locale: "en" | "de"
@@ -511,13 +647,13 @@ type ChatWidget = {
511
647
  email_code: { ... }
512
648
  }
513
649
  }
514
- widget_id: string // uuid
650
+ website_chat_id: string // uuid
515
651
  org_id: string
516
652
  binding_id: string // uuid
517
653
  version: number
518
654
  created_at: string // date-time
519
655
  updated_at: string // date-time
520
- website_chat_embed: {
656
+ embed: {
521
657
  script_url: string // uri
522
658
  chat_api_origin: string // uri
523
659
  demo_url: string // uri
@@ -551,13 +687,13 @@ type Error = {
551
687
  }
552
688
  ```
553
689
 
554
- ### `CreateChatWidgetRequest`
690
+ ### `CreateWebsiteChatRequest`
555
691
 
556
692
  ```ts
557
- type CreateChatWidgetRequest = {
693
+ type CreateWebsiteChatRequest = {
558
694
  name: string
559
695
  agent_id: string // uuid
560
- website_chat: {
696
+ settings: {
561
697
  allowed_origins: string[]
562
698
  organisation_name: string
563
699
  default_locale: "en" | "de"
@@ -569,13 +705,13 @@ type CreateChatWidgetRequest = {
569
705
  }
570
706
  ```
571
707
 
572
- ### `UpdateChatWidgetRequest`
708
+ ### `UpdateWebsiteChatRequest`
573
709
 
574
710
  ```ts
575
- type UpdateChatWidgetRequest = {
711
+ type UpdateWebsiteChatRequest = {
576
712
  name?: string
577
713
  agent_id?: string // uuid
578
- website_chat?: {
714
+ settings?: {
579
715
  allowed_origins: string[]
580
716
  organisation_name: string
581
717
  default_locale: "en" | "de"
@@ -588,14 +724,32 @@ type UpdateChatWidgetRequest = {
588
724
  }
589
725
  ```
590
726
 
591
- ### `Widget`
727
+ ### `VerificationState`
592
728
 
593
729
  ```ts
594
- type Widget = {
730
+ type VerificationState = {
731
+ available: boolean
732
+ conversation_id: string // uuid
733
+ status: "anonymous" | "sending" | "pending" | "verified"
734
+ challenge_id?: string // uuid
735
+ code_expires_at?: number
736
+ resend_after?: number
737
+ email?: string // email
738
+ contact_resolution?: "matched" | "ambiguous" | "not_found"
739
+ }
740
+ ```
741
+
742
+ ### `PublicWebsiteChat`
743
+
744
+ ```ts
745
+ type PublicWebsiteChat = {
595
746
  key: string
596
747
  organisationName: string
597
748
  assistantName: string
598
749
  defaultLocale: "en" | "de"
750
+ authentication?: {
751
+ email_code: boolean
752
+ }
599
753
  design?: {
600
754
  id: string // uuid
601
755
  last_modified_at?: string
@@ -627,10 +781,10 @@ type Widget = {
627
781
  }
628
782
  ```
629
783
 
630
- ### `WidgetDesign`
784
+ ### `WebsiteChatDesign`
631
785
 
632
786
  ```ts
633
- type WidgetDesign = {
787
+ type WebsiteChatDesign = {
634
788
  id: string // uuid
635
789
  last_modified_at?: string
636
790
  style?: {
@@ -690,6 +844,6 @@ type PublicEvent = {
690
844
 
691
845
  ```ts
692
846
  type PublicChatError = {
693
- code: "INVALID_REQUEST" | "ORIGIN_DENIED" | "NOT_FOUND" | "INVALID_GRANT" | "SESSION_EXPIRED" | "RATE_LIMITED" | "SESSION_LIMIT" | "USAGE_LIMIT" | "REQUEST_CONFLICT" | "IN_PROGRESS" | "UNAVAILABLE" | "TEMPORARILY_UNAVAILABLE"
847
+ 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"
694
848
  }
695
849
  ```