@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.
- package/definitions/chat-runtime.json +1 -1
- package/definitions/chat.json +749 -126
- package/definitions/integration-toolkit.json +25 -2
- 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.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/chat.cjs +8 -8
- package/dist/apis/chat.d.cts +2 -2
- package/dist/apis/chat.d.ts +2 -2
- package/dist/apis/chat.js +2 -2
- 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 +6 -6
- package/dist/apis/customer-portal.js +1 -1
- 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.d.cts +2 -2
- package/dist/apis/integration-toolkit.d.ts +2 -2
- 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/chat-3MIK7DUI.js +7 -0
- package/dist/chat-IWMQEXCD.cjs +7 -0
- package/dist/{chat-runtime-MF35HI2U.js → chat-runtime-O46V7MCD.js} +1 -1
- package/dist/chat-runtime-QSGSW6SL.cjs +5 -0
- package/dist/{chat.d-0w0TaT-a.d.cts → chat.d-mUHenLz7.d.cts} +564 -365
- package/dist/{chat.d-0w0TaT-a.d.ts → chat.d-mUHenLz7.d.ts} +564 -365
- package/dist/chunk-2F4JXHGX.js +14 -0
- package/dist/{chunk-OXXS3O7X.js → chunk-FWZRP5HX.js} +3 -3
- package/dist/chunk-QWQ6UINA.cjs +14 -0
- package/dist/{chunk-RE2KDGKQ.cjs → chunk-R2J3UNRP.cjs} +3 -3
- 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/dist/integration-toolkit-4W2SXQZZ.cjs +7 -0
- package/dist/integration-toolkit-WZ324PVF.js +7 -0
- package/dist/{integration-toolkit.d-BQ0Fj-48.d.cts → integration-toolkit.d-DRYMfItg.d.cts} +21 -2
- package/dist/{integration-toolkit.d-BQ0Fj-48.d.ts → integration-toolkit.d-DRYMfItg.d.ts} +21 -2
- package/docs/chat.md +231 -77
- package/docs/integration-toolkit.md +7 -1
- package/package.json +1 -1
- package/dist/chat-5EOD2OPN.cjs +0 -7
- package/dist/chat-D5KXPRYY.js +0 -7
- package/dist/chat-runtime-MYMUFT3Y.cjs +0 -5
- package/dist/chunk-6ZTP7EQE.js +0 -14
- package/dist/chunk-A5THJ4SF.cjs +0 -14
- package/dist/integration-toolkit-4ADZMNTB.cjs +0 -7
- 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.
|
|
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.
|
|
22
|
+
const { data } = await chatClient.listWebsiteChats(...)
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Operations
|
|
26
26
|
|
|
27
|
-
**
|
|
28
|
-
- [`
|
|
29
|
-
- [`
|
|
30
|
-
- [`
|
|
31
|
-
- [`
|
|
32
|
-
- [`
|
|
27
|
+
**Website Chats**
|
|
28
|
+
- [`listWebsiteChats`](#listwebsitechats)
|
|
29
|
+
- [`createWebsiteChat`](#createwebsitechat)
|
|
30
|
+
- [`getWebsiteChat`](#getwebsitechat)
|
|
31
|
+
- [`updateWebsiteChat`](#updatewebsitechat)
|
|
32
|
+
- [`deleteWebsiteChat`](#deletewebsitechat)
|
|
33
33
|
|
|
34
34
|
**Other**
|
|
35
|
-
- [`
|
|
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
|
-
- [`
|
|
42
|
-
- [`
|
|
45
|
+
- [`ListWebsiteChatsResponse`](#listwebsitechatsresponse)
|
|
46
|
+
- [`WebsiteChat`](#websitechat)
|
|
43
47
|
- [`WebsiteChatSettings`](#websitechatsettings)
|
|
44
48
|
- [`Error`](#error)
|
|
45
|
-
- [`
|
|
46
|
-
- [`
|
|
47
|
-
- [`
|
|
48
|
-
- [`
|
|
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
|
-
### `
|
|
57
|
+
### `listWebsiteChats`
|
|
53
58
|
|
|
54
|
-
`GET /v1/
|
|
59
|
+
`GET /v1/website-chats`
|
|
55
60
|
|
|
56
61
|
```ts
|
|
57
|
-
const { data } = await client.
|
|
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
|
-
"
|
|
72
|
+
"website_chats": [
|
|
68
73
|
{
|
|
69
74
|
"name": "string",
|
|
70
75
|
"agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
71
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
### `
|
|
108
|
+
### `createWebsiteChat`
|
|
104
109
|
|
|
105
|
-
`POST /v1/
|
|
110
|
+
`POST /v1/website-chats`
|
|
106
111
|
|
|
107
112
|
```ts
|
|
108
|
-
const { data } = await client.
|
|
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
|
-
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
### `
|
|
169
|
+
### `getWebsiteChat`
|
|
165
170
|
|
|
166
|
-
`GET /v1/
|
|
171
|
+
`GET /v1/website-chats/{website_chat_id}`
|
|
167
172
|
|
|
168
173
|
```ts
|
|
169
|
-
const { data } = await client.
|
|
170
|
-
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
### `
|
|
215
|
+
### `updateWebsiteChat`
|
|
211
216
|
|
|
212
|
-
`PUT /v1/
|
|
217
|
+
`PUT /v1/website-chats/{website_chat_id}`
|
|
213
218
|
|
|
214
219
|
```ts
|
|
215
|
-
const { data } = await client.
|
|
220
|
+
const { data } = await client.updateWebsiteChat(
|
|
216
221
|
{
|
|
217
|
-
|
|
222
|
+
website_chat_id: 'example',
|
|
218
223
|
},
|
|
219
224
|
{
|
|
220
225
|
name: 'string',
|
|
221
226
|
agent_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
|
|
222
|
-
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
### `
|
|
279
|
+
### `deleteWebsiteChat`
|
|
275
280
|
|
|
276
|
-
`DELETE /v1/
|
|
281
|
+
`DELETE /v1/website-chats/{website_chat_id}`
|
|
277
282
|
|
|
278
283
|
```ts
|
|
279
|
-
const { data } = await client.
|
|
280
|
-
|
|
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
|
-
### `
|
|
292
|
+
### `getPublicWebsiteChat`
|
|
288
293
|
|
|
289
|
-
`GET /v1/
|
|
294
|
+
`GET /v1/website-chats/{website_chat_id}/configuration`
|
|
290
295
|
|
|
291
296
|
```ts
|
|
292
|
-
const { data } = await client.
|
|
293
|
-
|
|
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
|
-
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
### `
|
|
605
|
+
### `ListWebsiteChatsResponse`
|
|
470
606
|
|
|
471
607
|
```ts
|
|
472
|
-
type
|
|
473
|
-
|
|
608
|
+
type ListWebsiteChatsResponse = {
|
|
609
|
+
website_chats: Array<{
|
|
474
610
|
name: string
|
|
475
611
|
agent_id: string // uuid
|
|
476
|
-
|
|
612
|
+
settings: {
|
|
477
613
|
allowed_origins: { ... }
|
|
478
614
|
organisation_name: { ... }
|
|
479
615
|
default_locale: { ... }
|
|
480
616
|
design_id?: { ... }
|
|
481
617
|
authentication?: { ... }
|
|
482
618
|
}
|
|
483
|
-
|
|
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
|
-
|
|
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
|
-
### `
|
|
635
|
+
### `WebsiteChat`
|
|
500
636
|
|
|
501
637
|
```ts
|
|
502
|
-
type
|
|
638
|
+
type WebsiteChat = {
|
|
503
639
|
name: string
|
|
504
640
|
agent_id: string // uuid
|
|
505
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
### `
|
|
690
|
+
### `CreateWebsiteChatRequest`
|
|
555
691
|
|
|
556
692
|
```ts
|
|
557
|
-
type
|
|
693
|
+
type CreateWebsiteChatRequest = {
|
|
558
694
|
name: string
|
|
559
695
|
agent_id: string // uuid
|
|
560
|
-
|
|
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
|
-
### `
|
|
708
|
+
### `UpdateWebsiteChatRequest`
|
|
573
709
|
|
|
574
710
|
```ts
|
|
575
|
-
type
|
|
711
|
+
type UpdateWebsiteChatRequest = {
|
|
576
712
|
name?: string
|
|
577
713
|
agent_id?: string // uuid
|
|
578
|
-
|
|
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
|
-
### `
|
|
727
|
+
### `VerificationState`
|
|
592
728
|
|
|
593
729
|
```ts
|
|
594
|
-
type
|
|
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
|
-
### `
|
|
784
|
+
### `WebsiteChatDesign`
|
|
631
785
|
|
|
632
786
|
```ts
|
|
633
|
-
type
|
|
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
|
```
|