@opencx/widget 3.0.36 → 3.0.38
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/dist/designs.cjs +2 -2
- package/dist/designs.cjs.map +1 -1
- package/dist/designs.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/src/headless/core/__tests__/context/contact/auth/auto-create-unverified-anonymous.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/context/contact/auth/auto-create-unverified-with-user-data-provided-by-org.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/context/contact/auth/manually-create-unverified-with-user-data-provided-by-user.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/context/contact/auth/with-secure-token.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/context/contact/should-collect-data.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/test-utils.d.ts +377 -0
- package/dist/src/headless/core/__tests__/utils/PrimitiveState.spec.d.ts +1 -0
- package/dist/src/headless/core/__tests__/utils/uuid.spec.d.ts +1 -0
- package/dist/src/headless/core/{api.d.ts → api/api-caller.d.ts} +58 -23
- package/dist/src/headless/core/{sdk → api}/schema.d.ts +51 -1
- package/dist/src/headless/core/context/contact.ctx.d.ts +2 -2
- package/dist/src/headless/core/context/message.ctx.d.ts +4 -2
- package/dist/src/headless/core/context/session.ctx.d.ts +6 -2
- package/dist/src/headless/core/context/widget.ctx.d.ts +5 -3
- package/dist/src/headless/core/types/schemas.d.ts +1 -1
- package/dist/src/headless/core/utils/Poller.d.ts +1 -1
- package/dist/src/headless/react/WidgetProvider.d.ts +2 -2
- package/dist/src/headless/react/hooks/useContact.d.ts +1 -1
- package/dist/src/headless/react/hooks/usePreludeData.d.ts +2 -2
- package/dist/{useUploadFiles-CPnrB5Dm.js → useUploadFiles-CzdpkrRu.js} +200 -198
- package/dist/useUploadFiles-CzdpkrRu.js.map +1 -0
- package/dist/{useUploadFiles-GT7QUmAC.cjs → useUploadFiles-N_eAr5ZY.cjs} +4 -4
- package/dist/useUploadFiles-N_eAr5ZY.cjs.map +1 -0
- package/dist/{widget.ctx-CplVbjtp.js → widget.ctx-BhkkDE2y.js} +262 -226
- package/dist/widget.ctx-BhkkDE2y.js.map +1 -0
- package/dist/widget.ctx-fT1XgDYW.cjs +2 -0
- package/dist/widget.ctx-fT1XgDYW.cjs.map +1 -0
- package/dist-embed/script.js +105 -105
- package/dist-embed/script.js.map +1 -1
- package/package.json +3 -3
- package/dist/useUploadFiles-CPnrB5Dm.js.map +0 -1
- package/dist/useUploadFiles-GT7QUmAC.cjs.map +0 -1
- package/dist/widget.ctx-CplVbjtp.js.map +0 -1
- package/dist/widget.ctx-D_AFA5p3.cjs +0 -2
- package/dist/widget.ctx-D_AFA5p3.cjs.map +0 -1
- /package/dist/src/headless/core/{utils/Poller.spec.d.ts → __tests__/api-caller.mock.d.ts} +0 -0
- /package/dist/src/headless/core/{utils/PrimitiveState.spec.d.ts → __tests__/utils/Poller.spec.d.ts} +0 -0
- /package/dist/src/headless/core/{sdk/index.d.ts → api/client.d.ts} +0 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { ApiCaller } from '../api/api-caller';
|
|
2
|
+
export declare const TestUtils: {
|
|
3
|
+
sleep: (ms: number) => Promise<unknown>;
|
|
4
|
+
mock: {
|
|
5
|
+
ApiCaller: {
|
|
6
|
+
createSession(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
requestBody: {
|
|
14
|
+
content: {
|
|
15
|
+
"application/json": import('../api/schema').components["schemas"]["CreateWidgetChatSessionDto"];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
responses: {
|
|
19
|
+
200: {
|
|
20
|
+
headers: {
|
|
21
|
+
[name: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
content: {
|
|
24
|
+
"application/json": import('../api/schema').components["schemas"]["WidgetSessionDto"];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
500: {
|
|
28
|
+
headers: {
|
|
29
|
+
[name: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
content: {
|
|
32
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}, {
|
|
37
|
+
body: {
|
|
38
|
+
customData?: {
|
|
39
|
+
[key: string]: string | number | boolean | unknown | unknown;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
43
|
+
createUnverifiedContact(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
44
|
+
parameters: {
|
|
45
|
+
query?: never;
|
|
46
|
+
header: {
|
|
47
|
+
"x-bot-token": string;
|
|
48
|
+
};
|
|
49
|
+
path?: never;
|
|
50
|
+
cookie?: never;
|
|
51
|
+
};
|
|
52
|
+
requestBody: {
|
|
53
|
+
content: {
|
|
54
|
+
"application/json": import('../api/schema').components["schemas"]["CreateUnverifiedContactDto"];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
responses: {
|
|
58
|
+
200: {
|
|
59
|
+
headers: {
|
|
60
|
+
[name: string]: unknown;
|
|
61
|
+
};
|
|
62
|
+
content: {
|
|
63
|
+
"application/json": import('../api/schema').components["schemas"]["WidgetContactTokenResponseDto"];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
500: {
|
|
67
|
+
headers: {
|
|
68
|
+
[name: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
content: {
|
|
71
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
params: {
|
|
77
|
+
header: {
|
|
78
|
+
"x-bot-token": string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
body: {
|
|
82
|
+
email?: string;
|
|
83
|
+
name?: string;
|
|
84
|
+
};
|
|
85
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
86
|
+
getSession(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
87
|
+
parameters: {
|
|
88
|
+
query?: never;
|
|
89
|
+
header?: never;
|
|
90
|
+
path: {
|
|
91
|
+
sessionId: string;
|
|
92
|
+
};
|
|
93
|
+
cookie?: never;
|
|
94
|
+
};
|
|
95
|
+
requestBody?: never;
|
|
96
|
+
responses: {
|
|
97
|
+
200: {
|
|
98
|
+
headers: {
|
|
99
|
+
[name: string]: unknown;
|
|
100
|
+
};
|
|
101
|
+
content: {
|
|
102
|
+
"application/json": import('../api/schema').components["schemas"]["WidgetSessionDto"];
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
500: {
|
|
106
|
+
headers: {
|
|
107
|
+
[name: string]: unknown;
|
|
108
|
+
};
|
|
109
|
+
content: {
|
|
110
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
}, {
|
|
115
|
+
params: {
|
|
116
|
+
path: {
|
|
117
|
+
sessionId: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
signal: AbortSignal;
|
|
121
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
122
|
+
getSessionHistory(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
123
|
+
parameters: {
|
|
124
|
+
query?: {
|
|
125
|
+
lastMessageTimestamp?: string;
|
|
126
|
+
};
|
|
127
|
+
header?: never;
|
|
128
|
+
path: {
|
|
129
|
+
sessionId: string;
|
|
130
|
+
};
|
|
131
|
+
cookie?: never;
|
|
132
|
+
};
|
|
133
|
+
requestBody?: never;
|
|
134
|
+
responses: {
|
|
135
|
+
200: {
|
|
136
|
+
headers: {
|
|
137
|
+
[name: string]: unknown;
|
|
138
|
+
};
|
|
139
|
+
content: {
|
|
140
|
+
"application/json": import('../api/schema').components["schemas"]["WidgetHistoryDto"][];
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
500: {
|
|
144
|
+
headers: {
|
|
145
|
+
[name: string]: unknown;
|
|
146
|
+
};
|
|
147
|
+
content: {
|
|
148
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
}, {
|
|
153
|
+
params: {
|
|
154
|
+
path: {
|
|
155
|
+
sessionId: string;
|
|
156
|
+
};
|
|
157
|
+
query: {
|
|
158
|
+
lastMessageTimestamp: string;
|
|
159
|
+
} | undefined;
|
|
160
|
+
};
|
|
161
|
+
signal: AbortSignal;
|
|
162
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
163
|
+
getSessions(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
164
|
+
parameters: {
|
|
165
|
+
query: {
|
|
166
|
+
filters: string;
|
|
167
|
+
cursor?: string;
|
|
168
|
+
};
|
|
169
|
+
header?: never;
|
|
170
|
+
path?: never;
|
|
171
|
+
cookie?: never;
|
|
172
|
+
};
|
|
173
|
+
requestBody?: never;
|
|
174
|
+
responses: {
|
|
175
|
+
200: {
|
|
176
|
+
headers: {
|
|
177
|
+
[name: string]: unknown;
|
|
178
|
+
};
|
|
179
|
+
content: {
|
|
180
|
+
"application/json": import('../api/schema').components["schemas"]["PaginatedWidgetSessionsDto"];
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
500: {
|
|
184
|
+
headers: {
|
|
185
|
+
[name: string]: unknown;
|
|
186
|
+
};
|
|
187
|
+
content: {
|
|
188
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
}, {
|
|
193
|
+
params: {
|
|
194
|
+
query: {
|
|
195
|
+
cursor: string | undefined;
|
|
196
|
+
filters: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
signal: AbortSignal | undefined;
|
|
200
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
201
|
+
sendMessage(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
202
|
+
parameters: {
|
|
203
|
+
query?: never;
|
|
204
|
+
header?: never;
|
|
205
|
+
path?: never;
|
|
206
|
+
cookie?: never;
|
|
207
|
+
};
|
|
208
|
+
requestBody: {
|
|
209
|
+
content: {
|
|
210
|
+
"application/json": import('../api/schema').components["schemas"]["HttpChatInputDto"];
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
responses: {
|
|
214
|
+
200: {
|
|
215
|
+
headers: {
|
|
216
|
+
[name: string]: unknown;
|
|
217
|
+
};
|
|
218
|
+
content: {
|
|
219
|
+
"application/json": import('../api/schema').components["schemas"]["HandleContactMessageOutputDto"];
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
500: {
|
|
223
|
+
headers: {
|
|
224
|
+
[name: string]: unknown;
|
|
225
|
+
};
|
|
226
|
+
content: {
|
|
227
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
}, {
|
|
232
|
+
body: {
|
|
233
|
+
uuid: string;
|
|
234
|
+
content: string;
|
|
235
|
+
session_id: string;
|
|
236
|
+
headers?: {
|
|
237
|
+
[key: string]: string;
|
|
238
|
+
} | null;
|
|
239
|
+
bot_token: string;
|
|
240
|
+
query_params?: {
|
|
241
|
+
[key: string]: string;
|
|
242
|
+
} | null;
|
|
243
|
+
user?: {
|
|
244
|
+
email?: string;
|
|
245
|
+
name?: string;
|
|
246
|
+
phone?: string;
|
|
247
|
+
avatar?: string;
|
|
248
|
+
customData?: {
|
|
249
|
+
[key: string]: string;
|
|
250
|
+
};
|
|
251
|
+
} | null;
|
|
252
|
+
language?: string | null;
|
|
253
|
+
attachments?: {
|
|
254
|
+
id: string;
|
|
255
|
+
name: string;
|
|
256
|
+
size: number;
|
|
257
|
+
type: string;
|
|
258
|
+
url: string;
|
|
259
|
+
}[] | null;
|
|
260
|
+
};
|
|
261
|
+
signal: AbortSignal | undefined;
|
|
262
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
263
|
+
setAuthToken(target: typeof ApiCaller, _returnValue: void | undefined): void;
|
|
264
|
+
uploadFile(target: typeof ApiCaller, _returnValue: Partial<{
|
|
265
|
+
fileName: string;
|
|
266
|
+
fileUrl: string;
|
|
267
|
+
}> | undefined): void;
|
|
268
|
+
vote(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
269
|
+
parameters: {
|
|
270
|
+
query?: never;
|
|
271
|
+
header?: never;
|
|
272
|
+
path?: never;
|
|
273
|
+
cookie?: never;
|
|
274
|
+
};
|
|
275
|
+
requestBody: {
|
|
276
|
+
content: {
|
|
277
|
+
"application/json": import('../api/schema').components["schemas"]["WidgetVoteDto"];
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
responses: {
|
|
281
|
+
200: {
|
|
282
|
+
headers: {
|
|
283
|
+
[name: string]: unknown;
|
|
284
|
+
};
|
|
285
|
+
content: {
|
|
286
|
+
"application/json": import('../api/schema').components["schemas"]["WidgetVoteResponseDto"];
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
500: {
|
|
290
|
+
headers: {
|
|
291
|
+
[name: string]: unknown;
|
|
292
|
+
};
|
|
293
|
+
content: {
|
|
294
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
}, {
|
|
299
|
+
body: {
|
|
300
|
+
action: "upvote" | "downvote";
|
|
301
|
+
sessionId: string;
|
|
302
|
+
messagePublicId: string;
|
|
303
|
+
};
|
|
304
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
305
|
+
widgetPrelude(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
306
|
+
parameters: {
|
|
307
|
+
query?: never;
|
|
308
|
+
header: {
|
|
309
|
+
"X-Bot-Token": string;
|
|
310
|
+
};
|
|
311
|
+
path?: never;
|
|
312
|
+
cookie?: never;
|
|
313
|
+
};
|
|
314
|
+
requestBody?: never;
|
|
315
|
+
responses: {
|
|
316
|
+
200: {
|
|
317
|
+
headers: {
|
|
318
|
+
[name: string]: unknown;
|
|
319
|
+
};
|
|
320
|
+
content: {
|
|
321
|
+
"application/json": import('../api/schema').components["schemas"]["WidgetPreludeDto"];
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
500: {
|
|
325
|
+
headers: {
|
|
326
|
+
[name: string]: unknown;
|
|
327
|
+
};
|
|
328
|
+
content: {
|
|
329
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
}, {
|
|
334
|
+
params: {
|
|
335
|
+
header: {
|
|
336
|
+
"X-Bot-Token": string;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
340
|
+
getExternalWidgetConfig(target: typeof ApiCaller, returnValue: Partial<import('openapi-fetch').FetchResponse<{
|
|
341
|
+
parameters: {
|
|
342
|
+
query?: never;
|
|
343
|
+
header: {
|
|
344
|
+
"X-Bot-Token": string;
|
|
345
|
+
};
|
|
346
|
+
path?: never;
|
|
347
|
+
cookie?: never;
|
|
348
|
+
};
|
|
349
|
+
requestBody?: never;
|
|
350
|
+
responses: {
|
|
351
|
+
200: {
|
|
352
|
+
headers: {
|
|
353
|
+
[name: string]: unknown;
|
|
354
|
+
};
|
|
355
|
+
content: {
|
|
356
|
+
"application/json": import('../api/schema').components["schemas"]["WidgetConfigDto"];
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
500: {
|
|
360
|
+
headers: {
|
|
361
|
+
[name: string]: unknown;
|
|
362
|
+
};
|
|
363
|
+
content: {
|
|
364
|
+
"application/json": import('../api/schema').components["schemas"]["ErrorDto"];
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
}, {
|
|
369
|
+
params: {
|
|
370
|
+
header: {
|
|
371
|
+
"X-Bot-Token": string;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
}, `${string}/${string}`>> | undefined): void;
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
|
-
import { Dto } from './
|
|
3
|
-
import { WidgetConfig } from '
|
|
4
|
-
import { SendMessageDto, VoteInputDto } from '
|
|
2
|
+
import { Dto } from './client';
|
|
3
|
+
import { WidgetConfig } from '../types/widget-config';
|
|
4
|
+
import { SendMessageDto, VoteInputDto } from '../types/schemas';
|
|
5
5
|
export declare class ApiCaller {
|
|
6
6
|
private client;
|
|
7
7
|
private uploadFileClient;
|
|
@@ -13,6 +13,41 @@ export declare class ApiCaller {
|
|
|
13
13
|
private createOpenAPIClient;
|
|
14
14
|
private createAxiosUploadClient;
|
|
15
15
|
setAuthToken: (token: string) => void;
|
|
16
|
+
getExternalWidgetConfig: () => Promise<import('openapi-fetch').FetchResponse<{
|
|
17
|
+
parameters: {
|
|
18
|
+
query?: never;
|
|
19
|
+
header: {
|
|
20
|
+
"X-Bot-Token": string;
|
|
21
|
+
};
|
|
22
|
+
path?: never;
|
|
23
|
+
cookie?: never;
|
|
24
|
+
};
|
|
25
|
+
requestBody?: never;
|
|
26
|
+
responses: {
|
|
27
|
+
200: {
|
|
28
|
+
headers: {
|
|
29
|
+
[name: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
content: {
|
|
32
|
+
"application/json": import('./schema').components["schemas"]["WidgetConfigDto"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
500: {
|
|
36
|
+
headers: {
|
|
37
|
+
[name: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
content: {
|
|
40
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
params: {
|
|
46
|
+
header: {
|
|
47
|
+
"X-Bot-Token": string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}, `${string}/${string}`>>;
|
|
16
51
|
widgetPrelude: () => Promise<import('openapi-fetch').FetchResponse<{
|
|
17
52
|
parameters: {
|
|
18
53
|
query?: never;
|
|
@@ -29,7 +64,7 @@ export declare class ApiCaller {
|
|
|
29
64
|
[name: string]: unknown;
|
|
30
65
|
};
|
|
31
66
|
content: {
|
|
32
|
-
"application/json": import('./
|
|
67
|
+
"application/json": import('./schema').components["schemas"]["WidgetPreludeDto"];
|
|
33
68
|
};
|
|
34
69
|
};
|
|
35
70
|
500: {
|
|
@@ -37,7 +72,7 @@ export declare class ApiCaller {
|
|
|
37
72
|
[name: string]: unknown;
|
|
38
73
|
};
|
|
39
74
|
content: {
|
|
40
|
-
"application/json": import('./
|
|
75
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
41
76
|
};
|
|
42
77
|
};
|
|
43
78
|
};
|
|
@@ -57,7 +92,7 @@ export declare class ApiCaller {
|
|
|
57
92
|
};
|
|
58
93
|
requestBody: {
|
|
59
94
|
content: {
|
|
60
|
-
"application/json": import('./
|
|
95
|
+
"application/json": import('./schema').components["schemas"]["HttpChatInputDto"];
|
|
61
96
|
};
|
|
62
97
|
};
|
|
63
98
|
responses: {
|
|
@@ -66,7 +101,7 @@ export declare class ApiCaller {
|
|
|
66
101
|
[name: string]: unknown;
|
|
67
102
|
};
|
|
68
103
|
content: {
|
|
69
|
-
"application/json": import('./
|
|
104
|
+
"application/json": import('./schema').components["schemas"]["HandleContactMessageOutputDto"];
|
|
70
105
|
};
|
|
71
106
|
};
|
|
72
107
|
500: {
|
|
@@ -74,7 +109,7 @@ export declare class ApiCaller {
|
|
|
74
109
|
[name: string]: unknown;
|
|
75
110
|
};
|
|
76
111
|
content: {
|
|
77
|
-
"application/json": import('./
|
|
112
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
78
113
|
};
|
|
79
114
|
};
|
|
80
115
|
};
|
|
@@ -132,7 +167,7 @@ export declare class ApiCaller {
|
|
|
132
167
|
[name: string]: unknown;
|
|
133
168
|
};
|
|
134
169
|
content: {
|
|
135
|
-
"application/json": import('./
|
|
170
|
+
"application/json": import('./schema').components["schemas"]["WidgetHistoryDto"][];
|
|
136
171
|
};
|
|
137
172
|
};
|
|
138
173
|
500: {
|
|
@@ -140,7 +175,7 @@ export declare class ApiCaller {
|
|
|
140
175
|
[name: string]: unknown;
|
|
141
176
|
};
|
|
142
177
|
content: {
|
|
143
|
-
"application/json": import('./
|
|
178
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
144
179
|
};
|
|
145
180
|
};
|
|
146
181
|
};
|
|
@@ -166,7 +201,7 @@ export declare class ApiCaller {
|
|
|
166
201
|
};
|
|
167
202
|
requestBody: {
|
|
168
203
|
content: {
|
|
169
|
-
"application/json": import('./
|
|
204
|
+
"application/json": import('./schema').components["schemas"]["CreateUnverifiedContactDto"];
|
|
170
205
|
};
|
|
171
206
|
};
|
|
172
207
|
responses: {
|
|
@@ -175,7 +210,7 @@ export declare class ApiCaller {
|
|
|
175
210
|
[name: string]: unknown;
|
|
176
211
|
};
|
|
177
212
|
content: {
|
|
178
|
-
"application/json": import('./
|
|
213
|
+
"application/json": import('./schema').components["schemas"]["WidgetContactTokenResponseDto"];
|
|
179
214
|
};
|
|
180
215
|
};
|
|
181
216
|
500: {
|
|
@@ -183,7 +218,7 @@ export declare class ApiCaller {
|
|
|
183
218
|
[name: string]: unknown;
|
|
184
219
|
};
|
|
185
220
|
content: {
|
|
186
|
-
"application/json": import('./
|
|
221
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
187
222
|
};
|
|
188
223
|
};
|
|
189
224
|
};
|
|
@@ -207,7 +242,7 @@ export declare class ApiCaller {
|
|
|
207
242
|
};
|
|
208
243
|
requestBody: {
|
|
209
244
|
content: {
|
|
210
|
-
"application/json": import('./
|
|
245
|
+
"application/json": import('./schema').components["schemas"]["CreateWidgetChatSessionDto"];
|
|
211
246
|
};
|
|
212
247
|
};
|
|
213
248
|
responses: {
|
|
@@ -216,7 +251,7 @@ export declare class ApiCaller {
|
|
|
216
251
|
[name: string]: unknown;
|
|
217
252
|
};
|
|
218
253
|
content: {
|
|
219
|
-
"application/json": import('./
|
|
254
|
+
"application/json": import('./schema').components["schemas"]["WidgetSessionDto"];
|
|
220
255
|
};
|
|
221
256
|
};
|
|
222
257
|
500: {
|
|
@@ -224,7 +259,7 @@ export declare class ApiCaller {
|
|
|
224
259
|
[name: string]: unknown;
|
|
225
260
|
};
|
|
226
261
|
content: {
|
|
227
|
-
"application/json": import('./
|
|
262
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
228
263
|
};
|
|
229
264
|
};
|
|
230
265
|
};
|
|
@@ -254,7 +289,7 @@ export declare class ApiCaller {
|
|
|
254
289
|
[name: string]: unknown;
|
|
255
290
|
};
|
|
256
291
|
content: {
|
|
257
|
-
"application/json": import('./
|
|
292
|
+
"application/json": import('./schema').components["schemas"]["WidgetSessionDto"];
|
|
258
293
|
};
|
|
259
294
|
};
|
|
260
295
|
500: {
|
|
@@ -262,7 +297,7 @@ export declare class ApiCaller {
|
|
|
262
297
|
[name: string]: unknown;
|
|
263
298
|
};
|
|
264
299
|
content: {
|
|
265
|
-
"application/json": import('./
|
|
300
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
266
301
|
};
|
|
267
302
|
};
|
|
268
303
|
};
|
|
@@ -295,7 +330,7 @@ export declare class ApiCaller {
|
|
|
295
330
|
[name: string]: unknown;
|
|
296
331
|
};
|
|
297
332
|
content: {
|
|
298
|
-
"application/json": import('./
|
|
333
|
+
"application/json": import('./schema').components["schemas"]["PaginatedWidgetSessionsDto"];
|
|
299
334
|
};
|
|
300
335
|
};
|
|
301
336
|
500: {
|
|
@@ -303,7 +338,7 @@ export declare class ApiCaller {
|
|
|
303
338
|
[name: string]: unknown;
|
|
304
339
|
};
|
|
305
340
|
content: {
|
|
306
|
-
"application/json": import('./
|
|
341
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
307
342
|
};
|
|
308
343
|
};
|
|
309
344
|
};
|
|
@@ -332,7 +367,7 @@ export declare class ApiCaller {
|
|
|
332
367
|
};
|
|
333
368
|
requestBody: {
|
|
334
369
|
content: {
|
|
335
|
-
"application/json": import('./
|
|
370
|
+
"application/json": import('./schema').components["schemas"]["WidgetVoteDto"];
|
|
336
371
|
};
|
|
337
372
|
};
|
|
338
373
|
responses: {
|
|
@@ -341,7 +376,7 @@ export declare class ApiCaller {
|
|
|
341
376
|
[name: string]: unknown;
|
|
342
377
|
};
|
|
343
378
|
content: {
|
|
344
|
-
"application/json": import('./
|
|
379
|
+
"application/json": import('./schema').components["schemas"]["WidgetVoteResponseDto"];
|
|
345
380
|
};
|
|
346
381
|
};
|
|
347
382
|
500: {
|
|
@@ -349,7 +384,7 @@ export declare class ApiCaller {
|
|
|
349
384
|
[name: string]: unknown;
|
|
350
385
|
};
|
|
351
386
|
content: {
|
|
352
|
-
"application/json": import('./
|
|
387
|
+
"application/json": import('./schema').components["schemas"]["ErrorDto"];
|
|
353
388
|
};
|
|
354
389
|
};
|
|
355
390
|
};
|
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
* Do not make direct changes to the file.
|
|
4
4
|
*/
|
|
5
5
|
export interface paths {
|
|
6
|
+
"/backend/widget/v2/config": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
get: operations["getWidgetConfig"];
|
|
14
|
+
put?: never;
|
|
15
|
+
post?: never;
|
|
16
|
+
delete?: never;
|
|
17
|
+
options?: never;
|
|
18
|
+
head?: never;
|
|
19
|
+
patch?: never;
|
|
20
|
+
trace?: never;
|
|
21
|
+
};
|
|
6
22
|
"/backend/widget/v2/prelude": {
|
|
7
23
|
parameters: {
|
|
8
24
|
query?: never;
|
|
@@ -255,6 +271,10 @@ export interface components {
|
|
|
255
271
|
fileName: string;
|
|
256
272
|
fileUrl: string;
|
|
257
273
|
};
|
|
274
|
+
WidgetConfigDto: {
|
|
275
|
+
sessionsPollingIntervalSeconds: number;
|
|
276
|
+
sessionPollingIntervalSeconds: number;
|
|
277
|
+
};
|
|
258
278
|
WidgetContactTokenResponseDto: {
|
|
259
279
|
/** @description The JWT token to use for further requests */
|
|
260
280
|
token: string;
|
|
@@ -262,7 +282,7 @@ export interface components {
|
|
|
262
282
|
WidgetHistoryDto: {
|
|
263
283
|
publicId: string;
|
|
264
284
|
/** @enum {string} */
|
|
265
|
-
type: "message" | "handoff" | "handoff_to_zendesk" | "agent_message" | "agent_joined" | "agent_comment" | "agent_took_session_from_ai" | "agent_reopened_session" | "ai_decided_to_resolve_the_issue" | "email_draft_message" | "followup" | "ai_assumed_the_session_resolved" | "user_confirmed_the_session_resolved";
|
|
285
|
+
type: "message" | "handoff" | "handoff_to_zendesk" | "agent_message" | "agent_joined" | "agent_comment" | "agent_took_session_from_ai" | "agent_reopened_session" | "ai_decided_to_resolve_the_issue" | "email_draft_message" | "followup" | "ai_assumed_the_session_resolved" | "user_confirmed_the_session_resolved" | "system_message";
|
|
266
286
|
content: {
|
|
267
287
|
text?: string | null;
|
|
268
288
|
};
|
|
@@ -372,6 +392,36 @@ export interface components {
|
|
|
372
392
|
}
|
|
373
393
|
export type $defs = Record<string, never>;
|
|
374
394
|
export interface operations {
|
|
395
|
+
getWidgetConfig: {
|
|
396
|
+
parameters: {
|
|
397
|
+
query?: never;
|
|
398
|
+
header: {
|
|
399
|
+
"X-Bot-Token": string;
|
|
400
|
+
};
|
|
401
|
+
path?: never;
|
|
402
|
+
cookie?: never;
|
|
403
|
+
};
|
|
404
|
+
requestBody?: never;
|
|
405
|
+
responses: {
|
|
406
|
+
200: {
|
|
407
|
+
headers: {
|
|
408
|
+
[name: string]: unknown;
|
|
409
|
+
};
|
|
410
|
+
content: {
|
|
411
|
+
"application/json": components["schemas"]["WidgetConfigDto"];
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
/** @description Internal Server Error */
|
|
415
|
+
500: {
|
|
416
|
+
headers: {
|
|
417
|
+
[name: string]: unknown;
|
|
418
|
+
};
|
|
419
|
+
content: {
|
|
420
|
+
"application/json": components["schemas"]["ErrorDto"];
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
};
|
|
375
425
|
widgetPrelude: {
|
|
376
426
|
parameters: {
|
|
377
427
|
query?: never;
|