@opencx/widget 2.6.0 → 2.6.2

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 (102) hide show
  1. package/dist/api-BEtFfKMB.cjs +2 -0
  2. package/dist/api-BEtFfKMB.cjs.map +1 -0
  3. package/dist/api-Cez5T-se.js +1393 -0
  4. package/dist/api-Cez5T-se.js.map +1 -0
  5. package/dist/basic.cjs +85 -85
  6. package/dist/basic.cjs.map +1 -1
  7. package/dist/basic.js +13159 -12639
  8. package/dist/basic.js.map +1 -1
  9. package/dist/core/client/api.d.ts +414 -40
  10. package/dist/core/client/chat.d.ts +33 -19
  11. package/dist/core/client/config.d.ts +13 -3
  12. package/dist/core/client/contact.d.ts +9 -13
  13. package/dist/core/client/index.d.ts +1 -1
  14. package/dist/core/index.d.ts +1 -1
  15. package/dist/core/sdk/index.d.ts +11 -0
  16. package/dist/core/types/contact.d.ts +2 -0
  17. package/dist/core/types/helpers.d.ts +5 -2
  18. package/dist/core/types/index.d.ts +6 -6
  19. package/dist/core/types/messages.d.ts +20 -9
  20. package/dist/core/types/schemas-v2.d.ts +10 -713
  21. package/dist/index-BzidnDPX.cjs +18 -0
  22. package/dist/index-BzidnDPX.cjs.map +1 -0
  23. package/dist/index-DUlnC30_.js +1219 -0
  24. package/dist/index-DUlnC30_.js.map +1 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.js +22 -1071
  28. package/dist/index.js.map +1 -1
  29. package/dist/react-web/core-integration/ChatProvider.d.ts +107 -0
  30. package/dist/react-web/core-integration/components.d.ts +11 -0
  31. package/dist/react-web/core-integration/hooks/useChatMessages.d.ts +70 -0
  32. package/dist/react-web/core-integration/hooks/useChatSession.d.ts +83 -0
  33. package/dist/react-web/core-integration/hooks/useConfig.d.ts +1 -0
  34. package/dist/react-web/core-integration/hooks/useContact.d.ts +17 -0
  35. package/dist/react-web/core-integration/hooks/useLocale.d.ts +4 -0
  36. package/dist/react-web/core-integration/hooks/usePreludeData.d.ts +36 -0
  37. package/dist/react-web/core-integration/hooks/usePubsub.d.ts +2 -0
  38. package/dist/react-web/{hooks → core-integration/hooks}/useUploadFiles.d.ts +2 -2
  39. package/dist/react-web/{hooks → core-integration/hooks}/useVote.d.ts +2 -2
  40. package/dist/react-web/core-integration/hooks.d.ts +9 -0
  41. package/dist/react-web/core-integration/index.d.ts +2 -0
  42. package/dist/react-web/index.d.ts +4 -10
  43. package/dist/react-web/types/components.d.ts +6 -3
  44. package/dist/react-web/types/index.d.ts +3 -2
  45. package/dist/react-web/types/options.d.ts +4 -30
  46. package/dist/react.cjs +1 -1
  47. package/dist/react.cjs.map +1 -1
  48. package/dist/react.js +10 -46
  49. package/dist/react.js.map +1 -1
  50. package/dist/src/@components/BotOrAgentMessageGroup.d.ts +1 -2
  51. package/dist/src/@components/BotOrAgentMessageWrapper.d.ts +2 -2
  52. package/dist/src/@components/ChatEvent.component.d.ts +3 -3
  53. package/dist/src/@components/Text.component.d.ts +1 -1
  54. package/dist/src/components/button.d.ts +1 -1
  55. package/dist/src/components/dialog.d.ts +9 -9
  56. package/dist/src/designs/basic/index.d.ts +1 -1
  57. package/dist/style.css +1 -1
  58. package/dist-embed/script.js +119 -124
  59. package/dist-embed/script.js.map +1 -1
  60. package/package.json +7 -4
  61. package/dist/core/tests/utils/create-fetch.test.d.ts +0 -1
  62. package/dist/core/types/schemas.d.ts +0 -543
  63. package/dist/core/utils/create-fetch.d.ts +0 -25
  64. package/dist/core/utils/genId.d.ts +0 -2
  65. package/dist/core/utils/history-to-widget-messages.d.ts +0 -4
  66. package/dist/genUuid-C12yFv3j.js +0 -137
  67. package/dist/genUuid-C12yFv3j.js.map +0 -1
  68. package/dist/genUuid-DdeSE04H.cjs +0 -2
  69. package/dist/genUuid-DdeSE04H.cjs.map +0 -1
  70. package/dist/index-C87obATS.js +0 -2616
  71. package/dist/index-C87obATS.js.map +0 -1
  72. package/dist/index-ChwS_h0D.cjs +0 -18
  73. package/dist/index-ChwS_h0D.cjs.map +0 -1
  74. package/dist/package.json.d.ts +0 -158
  75. package/dist/react-web/Root.d.ts +0 -6
  76. package/dist/react-web/hooks/index.d.ts +0 -6
  77. package/dist/react-web/hooks/use-sound.d.ts +0 -13
  78. package/dist/react-web/hooks/use-sound.test.d.ts +0 -1
  79. package/dist/react-web/hooks/use-sync-state.test.d.ts +0 -1
  80. package/dist/react-web/hooks/useAbstractChat.d.ts +0 -157
  81. package/dist/react-web/hooks/useAxiosInstance.d.ts +0 -190
  82. package/dist/react-web/hooks/useSyncState.d.ts +0 -4
  83. package/dist/react-web/hooks/useTimeoutState.d.ts +0 -3
  84. package/dist/react-web/providers/ChatProvider.d.ts +0 -143
  85. package/dist/react-web/providers/ConfigDataProvider.d.ts +0 -62
  86. package/dist/react-web/providers/ContactProvider.d.ts +0 -58
  87. package/dist/react-web/providers/LocalesProvider.d.ts +0 -11
  88. package/dist/react-web/providers/componentRegistry.d.ts +0 -13
  89. package/dist/react-web/providers/use-widget-sfx.d.ts +0 -7
  90. package/dist/react-web/providers/usePreludeData.d.ts +0 -2
  91. package/dist/react-web/utils/debug.d.ts +0 -2
  92. package/dist/react-web/utils/getters.d.ts +0 -24
  93. package/dist/react-web/utils/index.d.ts +0 -1
  94. package/dist/src/hooks/useShouldCollectData.d.ts +0 -3
  95. /package/dist/react-web/{locales → core-integration/locales}/ar.locale.d.ts +0 -0
  96. /package/dist/react-web/{locales → core-integration/locales}/de.locale.d.ts +0 -0
  97. /package/dist/react-web/{locales → core-integration/locales}/en.locale.d.ts +0 -0
  98. /package/dist/react-web/{locales → core-integration/locales}/fr.locale.d.ts +0 -0
  99. /package/dist/react-web/{locales → core-integration/locales}/helper.d.ts +0 -0
  100. /package/dist/react-web/{locales → core-integration/locales}/index.d.ts +0 -0
  101. /package/dist/react-web/{locales → core-integration/locales}/nl.locale.d.ts +0 -0
  102. /package/dist/react-web/{locales → core-integration/locales}/pt.locale.d.ts +0 -0
@@ -1,713 +1,10 @@
1
- import { z } from 'zod';
2
- declare const widgetPreludeSchema: z.ZodObject<{
3
- initialQuestions: z.ZodArray<z.ZodString, "many">;
4
- aiEnabled: z.ZodBoolean;
5
- officeHours: z.ZodObject<{
6
- monday: z.ZodOptional<z.ZodObject<{
7
- from: z.ZodString;
8
- to: z.ZodString;
9
- }, "strip", z.ZodTypeAny, {
10
- from: string;
11
- to: string;
12
- }, {
13
- from: string;
14
- to: string;
15
- }>>;
16
- tuesday: z.ZodOptional<z.ZodObject<{
17
- from: z.ZodString;
18
- to: z.ZodString;
19
- }, "strip", z.ZodTypeAny, {
20
- from: string;
21
- to: string;
22
- }, {
23
- from: string;
24
- to: string;
25
- }>>;
26
- wednesday: z.ZodOptional<z.ZodObject<{
27
- from: z.ZodString;
28
- to: z.ZodString;
29
- }, "strip", z.ZodTypeAny, {
30
- from: string;
31
- to: string;
32
- }, {
33
- from: string;
34
- to: string;
35
- }>>;
36
- thursday: z.ZodOptional<z.ZodObject<{
37
- from: z.ZodString;
38
- to: z.ZodString;
39
- }, "strip", z.ZodTypeAny, {
40
- from: string;
41
- to: string;
42
- }, {
43
- from: string;
44
- to: string;
45
- }>>;
46
- friday: z.ZodOptional<z.ZodObject<{
47
- from: z.ZodString;
48
- to: z.ZodString;
49
- }, "strip", z.ZodTypeAny, {
50
- from: string;
51
- to: string;
52
- }, {
53
- from: string;
54
- to: string;
55
- }>>;
56
- saturday: z.ZodOptional<z.ZodObject<{
57
- from: z.ZodString;
58
- to: z.ZodString;
59
- }, "strip", z.ZodTypeAny, {
60
- from: string;
61
- to: string;
62
- }, {
63
- from: string;
64
- to: string;
65
- }>>;
66
- sunday: z.ZodOptional<z.ZodObject<{
67
- from: z.ZodString;
68
- to: z.ZodString;
69
- }, "strip", z.ZodTypeAny, {
70
- from: string;
71
- to: string;
72
- }, {
73
- from: string;
74
- to: string;
75
- }>>;
76
- Everyday: z.ZodOptional<z.ZodObject<{
77
- from: z.ZodString;
78
- to: z.ZodString;
79
- }, "strip", z.ZodTypeAny, {
80
- from: string;
81
- to: string;
82
- }, {
83
- from: string;
84
- to: string;
85
- }>>;
86
- WeekDays: z.ZodOptional<z.ZodObject<{
87
- from: z.ZodString;
88
- to: z.ZodString;
89
- }, "strip", z.ZodTypeAny, {
90
- from: string;
91
- to: string;
92
- }, {
93
- from: string;
94
- to: string;
95
- }>>;
96
- }, "strip", z.ZodTypeAny, {
97
- monday?: {
98
- from: string;
99
- to: string;
100
- } | undefined;
101
- tuesday?: {
102
- from: string;
103
- to: string;
104
- } | undefined;
105
- wednesday?: {
106
- from: string;
107
- to: string;
108
- } | undefined;
109
- thursday?: {
110
- from: string;
111
- to: string;
112
- } | undefined;
113
- friday?: {
114
- from: string;
115
- to: string;
116
- } | undefined;
117
- saturday?: {
118
- from: string;
119
- to: string;
120
- } | undefined;
121
- sunday?: {
122
- from: string;
123
- to: string;
124
- } | undefined;
125
- Everyday?: {
126
- from: string;
127
- to: string;
128
- } | undefined;
129
- WeekDays?: {
130
- from: string;
131
- to: string;
132
- } | undefined;
133
- }, {
134
- monday?: {
135
- from: string;
136
- to: string;
137
- } | undefined;
138
- tuesday?: {
139
- from: string;
140
- to: string;
141
- } | undefined;
142
- wednesday?: {
143
- from: string;
144
- to: string;
145
- } | undefined;
146
- thursday?: {
147
- from: string;
148
- to: string;
149
- } | undefined;
150
- friday?: {
151
- from: string;
152
- to: string;
153
- } | undefined;
154
- saturday?: {
155
- from: string;
156
- to: string;
157
- } | undefined;
158
- sunday?: {
159
- from: string;
160
- to: string;
161
- } | undefined;
162
- Everyday?: {
163
- from: string;
164
- to: string;
165
- } | undefined;
166
- WeekDays?: {
167
- from: string;
168
- to: string;
169
- } | undefined;
170
- }>;
171
- officeHoursTimezone: z.ZodNullable<z.ZodString>;
172
- organizationName: z.ZodString;
173
- }, "strip", z.ZodTypeAny, {
174
- initialQuestions: string[];
175
- aiEnabled: boolean;
176
- officeHours: {
177
- monday?: {
178
- from: string;
179
- to: string;
180
- } | undefined;
181
- tuesday?: {
182
- from: string;
183
- to: string;
184
- } | undefined;
185
- wednesday?: {
186
- from: string;
187
- to: string;
188
- } | undefined;
189
- thursday?: {
190
- from: string;
191
- to: string;
192
- } | undefined;
193
- friday?: {
194
- from: string;
195
- to: string;
196
- } | undefined;
197
- saturday?: {
198
- from: string;
199
- to: string;
200
- } | undefined;
201
- sunday?: {
202
- from: string;
203
- to: string;
204
- } | undefined;
205
- Everyday?: {
206
- from: string;
207
- to: string;
208
- } | undefined;
209
- WeekDays?: {
210
- from: string;
211
- to: string;
212
- } | undefined;
213
- };
214
- officeHoursTimezone: string | null;
215
- organizationName: string;
216
- }, {
217
- initialQuestions: string[];
218
- aiEnabled: boolean;
219
- officeHours: {
220
- monday?: {
221
- from: string;
222
- to: string;
223
- } | undefined;
224
- tuesday?: {
225
- from: string;
226
- to: string;
227
- } | undefined;
228
- wednesday?: {
229
- from: string;
230
- to: string;
231
- } | undefined;
232
- thursday?: {
233
- from: string;
234
- to: string;
235
- } | undefined;
236
- friday?: {
237
- from: string;
238
- to: string;
239
- } | undefined;
240
- saturday?: {
241
- from: string;
242
- to: string;
243
- } | undefined;
244
- sunday?: {
245
- from: string;
246
- to: string;
247
- } | undefined;
248
- Everyday?: {
249
- from: string;
250
- to: string;
251
- } | undefined;
252
- WeekDays?: {
253
- from: string;
254
- to: string;
255
- } | undefined;
256
- };
257
- officeHoursTimezone: string | null;
258
- organizationName: string;
259
- }>;
260
- export declare const chatAttachmentSchema: z.ZodObject<{
261
- id: z.ZodString;
262
- name: z.ZodString;
263
- size: z.ZodNumber;
264
- type: z.ZodString;
265
- url: z.ZodString;
266
- }, "strip", z.ZodTypeAny, {
267
- type: string;
268
- id: string;
269
- name: string;
270
- size: number;
271
- url: string;
272
- }, {
273
- type: string;
274
- id: string;
275
- name: string;
276
- size: number;
277
- url: string;
278
- }>;
279
- export declare enum MessageTypeEnum {
280
- MESSAGE = "message",
281
- HANDOFF = "handoff",
282
- HANDOFF_TO_ZENDESK = "handoff_to_zendesk",
283
- AGENT_MESSAGE = "agent_message",
284
- AGENT_JOINED = "agent_joined",
285
- AGENT_COMMENT = "agent_comment",
286
- AGENT_TOOK_SESSION_FROM_AI = "agent_took_session_from_ai",
287
- AGENT_REOPENED_SESSION = "agent_reopened_session",
288
- AI_DECIDED_TO_RESOLVE_THE_ISSUE = "ai_decided_to_resolve_the_issue",
289
- EMAIL_DRAFT_MESSAGE = "email_draft_message",
290
- FOLLOWUP = "followup",
291
- AI_ASSUMED_THE_SESSION_RESOLVED = "ai_assumed_the_session_resolved",
292
- CONTACT_RESOLVED_THE_SESSION = "user_confirmed_the_session_resolved"
293
- }
294
- declare const widgetHistorySchema: z.ZodObject<{
295
- publicId: z.ZodString;
296
- type: z.ZodNativeEnum<typeof MessageTypeEnum>;
297
- sender: z.ZodObject<{
298
- kind: z.ZodEnum<["user", "agent", "ai", "none", "unknown"]>;
299
- name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
300
- avatar: z.ZodNullable<z.ZodOptional<z.ZodString>>;
301
- }, "strip", z.ZodTypeAny, {
302
- kind: "unknown" | "user" | "agent" | "ai" | "none";
303
- name?: string | null | undefined;
304
- avatar?: string | null | undefined;
305
- }, {
306
- kind: "unknown" | "user" | "agent" | "ai" | "none";
307
- name?: string | null | undefined;
308
- avatar?: string | null | undefined;
309
- }>;
310
- content: z.ZodObject<{
311
- text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
312
- }, "strip", z.ZodTypeAny, {
313
- text?: string | null | undefined;
314
- }, {
315
- text?: string | null | undefined;
316
- }>;
317
- sentAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
318
- actionCalls: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
319
- actionName: z.ZodString;
320
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
321
- result: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
322
- }, "strip", z.ZodTypeAny, {
323
- actionName: string;
324
- args: Record<string, unknown>;
325
- result?: Record<string, unknown> | null | undefined;
326
- }, {
327
- actionName: string;
328
- args: Record<string, unknown>;
329
- result?: Record<string, unknown> | null | undefined;
330
- }>, "many">>>;
331
- attachments: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
332
- id: z.ZodString;
333
- name: z.ZodString;
334
- size: z.ZodNumber;
335
- type: z.ZodString;
336
- url: z.ZodString;
337
- }, "strip", z.ZodTypeAny, {
338
- type: string;
339
- id: string;
340
- name: string;
341
- size: number;
342
- url: string;
343
- }, {
344
- type: string;
345
- id: string;
346
- name: string;
347
- size: number;
348
- url: string;
349
- }>, "many">>>;
350
- }, "strip", z.ZodTypeAny, {
351
- type: MessageTypeEnum;
352
- publicId: string;
353
- sender: {
354
- kind: "unknown" | "user" | "agent" | "ai" | "none";
355
- name?: string | null | undefined;
356
- avatar?: string | null | undefined;
357
- };
358
- content: {
359
- text?: string | null | undefined;
360
- };
361
- sentAt?: string | null | undefined;
362
- actionCalls?: {
363
- actionName: string;
364
- args: Record<string, unknown>;
365
- result?: Record<string, unknown> | null | undefined;
366
- }[] | null | undefined;
367
- attachments?: {
368
- type: string;
369
- id: string;
370
- name: string;
371
- size: number;
372
- url: string;
373
- }[] | null | undefined;
374
- }, {
375
- type: MessageTypeEnum;
376
- publicId: string;
377
- sender: {
378
- kind: "unknown" | "user" | "agent" | "ai" | "none";
379
- name?: string | null | undefined;
380
- avatar?: string | null | undefined;
381
- };
382
- content: {
383
- text?: string | null | undefined;
384
- };
385
- sentAt?: string | null | undefined;
386
- actionCalls?: {
387
- actionName: string;
388
- args: Record<string, unknown>;
389
- result?: Record<string, unknown> | null | undefined;
390
- }[] | null | undefined;
391
- attachments?: {
392
- type: string;
393
- id: string;
394
- name: string;
395
- size: number;
396
- url: string;
397
- }[] | null | undefined;
398
- }>;
399
- declare const widgetSessionSchema: z.ZodObject<{
400
- id: z.ZodString;
401
- createdAt: z.ZodDate;
402
- updatedAt: z.ZodDate;
403
- isHandedOff: z.ZodBoolean;
404
- isOpened: z.ZodBoolean;
405
- assignee: z.ZodObject<{
406
- kind: z.ZodEnum<["human", "ai", "none", "unknown"]>;
407
- name: z.ZodNullable<z.ZodString>;
408
- }, "strip", z.ZodTypeAny, {
409
- name: string | null;
410
- kind: "unknown" | "ai" | "none" | "human";
411
- }, {
412
- name: string | null;
413
- kind: "unknown" | "ai" | "none" | "human";
414
- }>;
415
- channel: z.ZodString;
416
- }, "strip", z.ZodTypeAny, {
417
- id: string;
418
- createdAt: Date;
419
- updatedAt: Date;
420
- isHandedOff: boolean;
421
- isOpened: boolean;
422
- assignee: {
423
- name: string | null;
424
- kind: "unknown" | "ai" | "none" | "human";
425
- };
426
- channel: string;
427
- }, {
428
- id: string;
429
- createdAt: Date;
430
- updatedAt: Date;
431
- isHandedOff: boolean;
432
- isOpened: boolean;
433
- assignee: {
434
- name: string | null;
435
- kind: "unknown" | "ai" | "none" | "human";
436
- };
437
- channel: string;
438
- }>;
439
- declare const httpChatInputDto: z.ZodObject<{
440
- uuid: z.ZodOptional<z.ZodString>;
441
- content: z.ZodString;
442
- session_id: z.ZodString;
443
- headers: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
444
- bot_token: z.ZodString;
445
- query_params: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
446
- user: z.ZodNullable<z.ZodOptional<z.ZodObject<{
447
- email: z.ZodOptional<z.ZodString>;
448
- name: z.ZodOptional<z.ZodString>;
449
- phone: z.ZodOptional<z.ZodString>;
450
- avatar: z.ZodOptional<z.ZodString>;
451
- customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
452
- }, "strip", z.ZodTypeAny, {
453
- name?: string | undefined;
454
- avatar?: string | undefined;
455
- email?: string | undefined;
456
- phone?: string | undefined;
457
- customData?: Record<string, string> | undefined;
458
- }, {
459
- name?: string | undefined;
460
- avatar?: string | undefined;
461
- email?: string | undefined;
462
- phone?: string | undefined;
463
- customData?: Record<string, string> | undefined;
464
- }>>>;
465
- language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
466
- attachments: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
467
- id: z.ZodString;
468
- name: z.ZodString;
469
- size: z.ZodNumber;
470
- type: z.ZodString;
471
- url: z.ZodString;
472
- }, "strip", z.ZodTypeAny, {
473
- type: string;
474
- id: string;
475
- name: string;
476
- size: number;
477
- url: string;
478
- }, {
479
- type: string;
480
- id: string;
481
- name: string;
482
- size: number;
483
- url: string;
484
- }>, "many">>>;
485
- }, "strip", z.ZodTypeAny, {
486
- content: string;
487
- session_id: string;
488
- bot_token: string;
489
- user?: {
490
- name?: string | undefined;
491
- avatar?: string | undefined;
492
- email?: string | undefined;
493
- phone?: string | undefined;
494
- customData?: Record<string, string> | undefined;
495
- } | null | undefined;
496
- attachments?: {
497
- type: string;
498
- id: string;
499
- name: string;
500
- size: number;
501
- url: string;
502
- }[] | null | undefined;
503
- uuid?: string | undefined;
504
- headers?: Record<string, string> | null | undefined;
505
- query_params?: Record<string, string> | null | undefined;
506
- language?: string | null | undefined;
507
- }, {
508
- content: string;
509
- session_id: string;
510
- bot_token: string;
511
- user?: {
512
- name?: string | undefined;
513
- avatar?: string | undefined;
514
- email?: string | undefined;
515
- phone?: string | undefined;
516
- customData?: Record<string, string> | undefined;
517
- } | null | undefined;
518
- attachments?: {
519
- type: string;
520
- id: string;
521
- name: string;
522
- size: number;
523
- url: string;
524
- }[] | null | undefined;
525
- uuid?: string | undefined;
526
- headers?: Record<string, string> | null | undefined;
527
- query_params?: Record<string, string> | null | undefined;
528
- language?: string | null | undefined;
529
- }>;
530
- declare const handleContactMessageOutputSchema: z.ZodDiscriminatedUnion<"success", [z.ZodObject<{
531
- success: z.ZodLiteral<true>;
532
- code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"session_assigned_to_human_agent">]>>;
533
- options: z.ZodOptional<z.ZodObject<{
534
- type: z.ZodLiteral<"options">;
535
- value: z.ZodArray<z.ZodString, "many">;
536
- }, "strip", z.ZodTypeAny, {
537
- type: "options";
538
- value: string[];
539
- }, {
540
- type: "options";
541
- value: string[];
542
- }>>;
543
- autopilotResponse: z.ZodOptional<z.ZodObject<{
544
- type: z.ZodLiteral<"text">;
545
- value: z.ZodObject<{
546
- error: z.ZodBoolean;
547
- content: z.ZodString;
548
- }, "strip", z.ZodTypeAny, {
549
- content: string;
550
- error: boolean;
551
- }, {
552
- content: string;
553
- error: boolean;
554
- }>;
555
- id: z.ZodOptional<z.ZodString>;
556
- }, "strip", z.ZodTypeAny, {
557
- type: "text";
558
- value: {
559
- content: string;
560
- error: boolean;
561
- };
562
- id?: string | undefined;
563
- }, {
564
- type: "text";
565
- value: {
566
- content: string;
567
- error: boolean;
568
- };
569
- id?: string | undefined;
570
- }>>;
571
- uiResponse: z.ZodOptional<z.ZodObject<{
572
- type: z.ZodLiteral<"ui">;
573
- value: z.ZodObject<{
574
- type: z.ZodLiteral<"ui_component">;
575
- request_response: z.ZodUnknown;
576
- name: z.ZodString;
577
- content: z.ZodOptional<z.ZodString>;
578
- }, "strip", z.ZodTypeAny, {
579
- type: "ui_component";
580
- name: string;
581
- content?: string | undefined;
582
- request_response?: unknown;
583
- }, {
584
- type: "ui_component";
585
- name: string;
586
- content?: string | undefined;
587
- request_response?: unknown;
588
- }>;
589
- }, "strip", z.ZodTypeAny, {
590
- type: "ui";
591
- value: {
592
- type: "ui_component";
593
- name: string;
594
- content?: string | undefined;
595
- request_response?: unknown;
596
- };
597
- }, {
598
- type: "ui";
599
- value: {
600
- type: "ui_component";
601
- name: string;
602
- content?: string | undefined;
603
- request_response?: unknown;
604
- };
605
- }>>;
606
- sessionIsHandedOff: z.ZodOptional<z.ZodBoolean>;
607
- }, "strip", z.ZodTypeAny, {
608
- success: true;
609
- code?: string | undefined;
610
- options?: {
611
- type: "options";
612
- value: string[];
613
- } | undefined;
614
- autopilotResponse?: {
615
- type: "text";
616
- value: {
617
- content: string;
618
- error: boolean;
619
- };
620
- id?: string | undefined;
621
- } | undefined;
622
- uiResponse?: {
623
- type: "ui";
624
- value: {
625
- type: "ui_component";
626
- name: string;
627
- content?: string | undefined;
628
- request_response?: unknown;
629
- };
630
- } | undefined;
631
- sessionIsHandedOff?: boolean | undefined;
632
- }, {
633
- success: true;
634
- code?: string | undefined;
635
- options?: {
636
- type: "options";
637
- value: string[];
638
- } | undefined;
639
- autopilotResponse?: {
640
- type: "text";
641
- value: {
642
- content: string;
643
- error: boolean;
644
- };
645
- id?: string | undefined;
646
- } | undefined;
647
- uiResponse?: {
648
- type: "ui";
649
- value: {
650
- type: "ui_component";
651
- name: string;
652
- content?: string | undefined;
653
- request_response?: unknown;
654
- };
655
- } | undefined;
656
- sessionIsHandedOff?: boolean | undefined;
657
- }>, z.ZodObject<{
658
- success: z.ZodLiteral<false>;
659
- error: z.ZodObject<{
660
- code: z.ZodOptional<z.ZodString>;
661
- message: z.ZodOptional<z.ZodString>;
662
- }, "strip", z.ZodTypeAny, {
663
- code?: string | undefined;
664
- message?: string | undefined;
665
- }, {
666
- code?: string | undefined;
667
- message?: string | undefined;
668
- }>;
669
- }, "strip", z.ZodTypeAny, {
670
- success: false;
671
- error: {
672
- code?: string | undefined;
673
- message?: string | undefined;
674
- };
675
- }, {
676
- success: false;
677
- error: {
678
- code?: string | undefined;
679
- message?: string | undefined;
680
- };
681
- }>]>;
682
- declare const widgetVoteSchema: z.ZodObject<{
683
- action: z.ZodEnum<["upvote", "downvote"]>;
684
- sessionId: z.ZodString;
685
- messagePublicId: z.ZodString;
686
- }, "strip", z.ZodTypeAny, {
687
- action: "upvote" | "downvote";
688
- sessionId: string;
689
- messagePublicId: string;
690
- }, {
691
- action: "upvote" | "downvote";
692
- sessionId: string;
693
- messagePublicId: string;
694
- }>;
695
- declare const widgetVoteResponseSchema: z.ZodObject<{
696
- messagePublicId: z.ZodNullable<z.ZodString>;
697
- success: z.ZodBoolean;
698
- }, "strip", z.ZodTypeAny, {
699
- success: boolean;
700
- messagePublicId: string | null;
701
- }, {
702
- success: boolean;
703
- messagePublicId: string | null;
704
- }>;
705
- export type WidgetVoteResponseSchema = z.infer<typeof widgetVoteResponseSchema>;
706
- export type HandleContactMessageOutputSchema = z.infer<typeof handleContactMessageOutputSchema>;
707
- export type HttpChatInputSchema = z.infer<typeof httpChatInputDto>;
708
- export type WidgetSessionSchema = z.infer<typeof widgetSessionSchema>;
709
- export type WidgetHistorySchema = z.infer<typeof widgetHistorySchema>;
710
- export type WidgetPreludeSchema = z.infer<typeof widgetPreludeSchema>;
711
- export type WidgetVoteSchema = z.infer<typeof widgetVoteSchema>;
712
- export type ChatAttachmentType = z.infer<typeof chatAttachmentSchema>;
713
- export {};
1
+ import { Dto } from '../sdk';
2
+ export type WidgetVoteResponseDto = Dto['WidgetVoteResponseDto'];
3
+ export type HandleContactMessageOutputSchema = Dto['HandleContactMessageOutputDto'];
4
+ export type SendChatDto = Dto['HttpChatInputDto'];
5
+ export type WidgetSessionDto = Dto['WidgetSessionDto'];
6
+ export type WidgetHistoryDto = Dto['WidgetHistoryDto'];
7
+ export type WidgetPreludeDto = Dto['WidgetPreludeDto'];
8
+ export type WidgetVoteDto = Dto['WidgetVoteDto'];
9
+ export type ChatAttachmentType = NonNullable<Dto['WidgetHistoryDto']['attachments']>[number];
10
+ export type MessageTypeU = Dto['WidgetHistoryDto']['type'];