@opencx/widget-core 4.0.0

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 (40) hide show
  1. package/README.md +5 -0
  2. package/dist/__tests__/api-caller.mock.d.ts +1 -0
  3. package/dist/__tests__/context/contact/auth/auto-create-unverified-anonymous.spec.d.ts +0 -0
  4. package/dist/__tests__/context/contact/auth/auto-create-unverified-with-user-data-provided-by-org.spec.d.ts +0 -0
  5. package/dist/__tests__/context/contact/auth/manually-create-unverified-with-user-data-provided-by-user.spec.d.ts +0 -0
  6. package/dist/__tests__/context/contact/auth/with-secure-token.spec.d.ts +0 -0
  7. package/dist/__tests__/context/contact/should-collect-data.spec.d.ts +0 -0
  8. package/dist/__tests__/test-utils.d.ts +419 -0
  9. package/dist/__tests__/utils/Poller.spec.d.ts +1 -0
  10. package/dist/__tests__/utils/PrimitiveState.spec.d.ts +1 -0
  11. package/dist/api/api-caller.d.ts +437 -0
  12. package/dist/api/client.d.ts +12 -0
  13. package/dist/api/schema.d.ts +928 -0
  14. package/dist/context/active-session-polling.ctx.d.ts +25 -0
  15. package/dist/context/contact.ctx.d.ts +30 -0
  16. package/dist/context/message.ctx.d.ts +38 -0
  17. package/dist/context/router.ctx.d.ts +33 -0
  18. package/dist/context/session.ctx.d.ts +119 -0
  19. package/dist/context/storage.ctx.d.ts +15 -0
  20. package/dist/context/widget.ctx.d.ts +27 -0
  21. package/dist/index.cjs +5 -0
  22. package/dist/index.cjs.map +1 -0
  23. package/dist/index.d.ts +15 -0
  24. package/dist/index.js +699 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/types/agent-or-bot.d.ts +6 -0
  27. package/dist/types/component-name.d.ts +1 -0
  28. package/dist/types/dtos.d.ts +12 -0
  29. package/dist/types/external-storage.d.ts +5 -0
  30. package/dist/types/helpers.d.ts +2 -0
  31. package/dist/types/icons.d.ts +3 -0
  32. package/dist/types/json-value.d.ts +7 -0
  33. package/dist/types/messages.d.ts +55 -0
  34. package/dist/types/widget-config.d.ts +400 -0
  35. package/dist/utils/Poller.d.ts +12 -0
  36. package/dist/utils/PrimitiveState.d.ts +13 -0
  37. package/dist/utils/is-exhaustive.d.ts +1 -0
  38. package/dist/utils/run-catching.d.ts +13 -0
  39. package/dist/utils/uuid.d.ts +1 -0
  40. package/package.json +49 -0
@@ -0,0 +1,928 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
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
+ };
22
+ '/backend/widget/v2/prelude': {
23
+ parameters: {
24
+ query?: never;
25
+ header?: never;
26
+ path?: never;
27
+ cookie?: never;
28
+ };
29
+ get: operations['widgetPrelude'];
30
+ put?: never;
31
+ post?: never;
32
+ delete?: never;
33
+ options?: never;
34
+ head?: never;
35
+ patch?: never;
36
+ trace?: never;
37
+ };
38
+ '/backend/widget/v2/sessions': {
39
+ parameters: {
40
+ query?: never;
41
+ header?: never;
42
+ path?: never;
43
+ cookie?: never;
44
+ };
45
+ get: operations['getSessions'];
46
+ put?: never;
47
+ post?: never;
48
+ delete?: never;
49
+ options?: never;
50
+ head?: never;
51
+ patch?: never;
52
+ trace?: never;
53
+ };
54
+ '/backend/widget/v2/session/history/{sessionId}': {
55
+ parameters: {
56
+ query?: never;
57
+ header?: never;
58
+ path?: never;
59
+ cookie?: never;
60
+ };
61
+ get: operations['getSessionHistory'];
62
+ put?: never;
63
+ post?: never;
64
+ delete?: never;
65
+ options?: never;
66
+ head?: never;
67
+ patch?: never;
68
+ trace?: never;
69
+ };
70
+ '/backend/widget/v2/poll/{sessionId}': {
71
+ parameters: {
72
+ query?: never;
73
+ header?: never;
74
+ path?: never;
75
+ cookie?: never;
76
+ };
77
+ get: operations['pollSessionAndHistory'];
78
+ put?: never;
79
+ post?: never;
80
+ delete?: never;
81
+ options?: never;
82
+ head?: never;
83
+ patch?: never;
84
+ trace?: never;
85
+ };
86
+ '/backend/widget/v2/create-session': {
87
+ parameters: {
88
+ query?: never;
89
+ header?: never;
90
+ path?: never;
91
+ cookie?: never;
92
+ };
93
+ get?: never;
94
+ put?: never;
95
+ post: operations['createChatSession'];
96
+ delete?: never;
97
+ options?: never;
98
+ head?: never;
99
+ patch?: never;
100
+ trace?: never;
101
+ };
102
+ '/backend/widget/v2/chat/send': {
103
+ parameters: {
104
+ query?: never;
105
+ header?: never;
106
+ path?: never;
107
+ cookie?: never;
108
+ };
109
+ get?: never;
110
+ put?: never;
111
+ post: operations['chatSend'];
112
+ delete?: never;
113
+ options?: never;
114
+ head?: never;
115
+ patch?: never;
116
+ trace?: never;
117
+ };
118
+ '/backend/widget/v2/checkpoint': {
119
+ parameters: {
120
+ query?: never;
121
+ header?: never;
122
+ path?: never;
123
+ cookie?: never;
124
+ };
125
+ get?: never;
126
+ put?: never;
127
+ post: operations['createStateCheckpoint'];
128
+ delete?: never;
129
+ options?: never;
130
+ head?: never;
131
+ patch?: never;
132
+ trace?: never;
133
+ };
134
+ '/backend/widget/v2/upload': {
135
+ parameters: {
136
+ query?: never;
137
+ header?: never;
138
+ path?: never;
139
+ cookie?: never;
140
+ };
141
+ get?: never;
142
+ put?: never;
143
+ post: operations['uploadFile'];
144
+ delete?: never;
145
+ options?: never;
146
+ head?: never;
147
+ patch?: never;
148
+ trace?: never;
149
+ };
150
+ '/backend/widget/v2/chat/vote': {
151
+ parameters: {
152
+ query?: never;
153
+ header?: never;
154
+ path?: never;
155
+ cookie?: never;
156
+ };
157
+ get?: never;
158
+ put?: never;
159
+ post: operations['voteMessage'];
160
+ delete?: never;
161
+ options?: never;
162
+ head?: never;
163
+ patch?: never;
164
+ trace?: never;
165
+ };
166
+ '/backend/widget/v2/session/resolve': {
167
+ parameters: {
168
+ query?: never;
169
+ header?: never;
170
+ path?: never;
171
+ cookie?: never;
172
+ };
173
+ get?: never;
174
+ put?: never;
175
+ post: operations['resolveSession'];
176
+ delete?: never;
177
+ options?: never;
178
+ head?: never;
179
+ patch?: never;
180
+ trace?: never;
181
+ };
182
+ '/backend/widget/v2/contact/create-unverified': {
183
+ parameters: {
184
+ query?: never;
185
+ header?: never;
186
+ path?: never;
187
+ cookie?: never;
188
+ };
189
+ get?: never;
190
+ put?: never;
191
+ post: operations['createUnverifiedContact'];
192
+ delete?: never;
193
+ options?: never;
194
+ head?: never;
195
+ patch?: never;
196
+ trace?: never;
197
+ };
198
+ }
199
+ export type webhooks = Record<string, never>;
200
+ export interface components {
201
+ schemas: {
202
+ CreateUnverifiedContactDto: {
203
+ email?: string;
204
+ non_verified_name?: string;
205
+ non_verified_custom_data?: {
206
+ [key: string]: string | number | boolean;
207
+ };
208
+ };
209
+ CreateWidgetSessionDto: {
210
+ customData?: {
211
+ [key: string]: string | number | boolean | unknown | unknown;
212
+ };
213
+ };
214
+ FileUploadDto: {
215
+ /** Format: binary */
216
+ file: string;
217
+ };
218
+ /** @description Paginated response. */
219
+ PaginatedWidgetSessionsDto: {
220
+ items: {
221
+ /** Format: uuid */
222
+ id: string;
223
+ createdAt: string;
224
+ updatedAt: string;
225
+ isHandedOff: boolean;
226
+ isOpened: boolean;
227
+ assignee: {
228
+ /** @enum {string} */
229
+ kind: 'human' | 'ai' | 'none' | 'unknown';
230
+ name: string | null;
231
+ avatarUrl: string | null;
232
+ };
233
+ channel: string;
234
+ isVerified: boolean;
235
+ lastMessage: string | null;
236
+ modeId: string | null;
237
+ latestStateCheckpointPayload: {
238
+ [key: string]: unknown;
239
+ } | null;
240
+ }[];
241
+ /** @description The `cursor` for the request to get the next set of items. Null if there is no more data. */
242
+ next: string | null;
243
+ };
244
+ UploadWidgetFileResponseDto: {
245
+ fileName: string;
246
+ fileUrl: string;
247
+ };
248
+ WidgetConfigDto: {
249
+ sessionsPollingIntervalSeconds: number;
250
+ sessionPollingIntervalSeconds: number;
251
+ modes: {
252
+ id: string;
253
+ name: string;
254
+ slug?: string | null;
255
+ }[];
256
+ };
257
+ WidgetContactTokenResponseDto: {
258
+ /** @description The JWT token to use for further requests */
259
+ token: string;
260
+ };
261
+ WidgetCreateStateCheckpointInputDto: {
262
+ session_id: string;
263
+ payload: {
264
+ [key: string]: unknown;
265
+ };
266
+ };
267
+ WidgetCreateStateCheckpointOutputDto: {
268
+ success: boolean;
269
+ };
270
+ WidgetHistoryDto: {
271
+ publicId: string;
272
+ /** @enum {string} */
273
+ type: 'agent_comment' | 'agent_joined' | 'agent_message' | 'agent_reopened_session' | 'agent_took_session_from_ai' | 'ai_assumed_the_session_resolved' | 'ai_decided_to_resolve_the_issue' | 'email_draft_message' | 'handoff' | 'handoff_to_salesforce_miaw' | 'handoff_to_zendesk' | 'message' | 'state_checkpoint' | 'user_confirmed_the_session_resolved';
274
+ content: {
275
+ text?: string | null;
276
+ };
277
+ sender: {
278
+ /** @enum {string} */
279
+ kind: 'user' | 'agent' | 'ai' | 'none' | 'unknown';
280
+ name?: string | null;
281
+ avatar?: string | null;
282
+ };
283
+ sentAt?: string | null;
284
+ actionCalls?: {
285
+ actionName: string;
286
+ args?: unknown;
287
+ result?: unknown;
288
+ }[] | null;
289
+ attachments?: {
290
+ id: string;
291
+ name: string;
292
+ size: number;
293
+ type: string;
294
+ url: string;
295
+ }[] | null;
296
+ };
297
+ WidgetPreludeDto: {
298
+ initialQuestions: string[];
299
+ aiEnabled: boolean;
300
+ officeHours: unknown & {
301
+ monday?: {
302
+ from: string;
303
+ to: string;
304
+ };
305
+ tuesday?: {
306
+ from: string;
307
+ to: string;
308
+ };
309
+ wednesday?: {
310
+ from: string;
311
+ to: string;
312
+ };
313
+ thursday?: {
314
+ from: string;
315
+ to: string;
316
+ };
317
+ friday?: {
318
+ from: string;
319
+ to: string;
320
+ };
321
+ saturday?: {
322
+ from: string;
323
+ to: string;
324
+ };
325
+ sunday?: {
326
+ from: string;
327
+ to: string;
328
+ };
329
+ Everyday?: {
330
+ from: string;
331
+ to: string;
332
+ };
333
+ WeekDays?: {
334
+ from: string;
335
+ to: string;
336
+ };
337
+ };
338
+ officeHoursTimezone: string | null;
339
+ organizationName: string;
340
+ };
341
+ WidgetResolveSessionInputDto: {
342
+ session_id: string;
343
+ };
344
+ WidgetSendMessageInputDto: {
345
+ /** Format: uuid */
346
+ uuid: string;
347
+ content: string;
348
+ session_id: string;
349
+ bot_token: string;
350
+ /** @description Additional headers to be included in the request of action calls */
351
+ headers?: {
352
+ [key: string]: string;
353
+ } | null;
354
+ /** @description Additional query parameters to be included in the query of action calls */
355
+ query_params?: {
356
+ [key: string]: string;
357
+ } | null;
358
+ /** @description Additional body properties to be included in the body of action calls */
359
+ body_properties?: {
360
+ [key: string]: unknown;
361
+ } | null;
362
+ language?: string | null;
363
+ attachments?: {
364
+ id: string;
365
+ name: string;
366
+ size: number;
367
+ type: string;
368
+ url: string;
369
+ }[] | null;
370
+ /** @description Context for the AI to be sent with each contact message */
371
+ clientContext?: {
372
+ [key: string]: unknown;
373
+ } | null;
374
+ /** @description Custom data to be sent with each contact message */
375
+ custom_data?: {
376
+ [key: string]: unknown;
377
+ } | null;
378
+ /** @description If there is an active mode, it will be exited and the prompt will be given to the AI for a customized response */
379
+ exit_mode_prompt?: string;
380
+ };
381
+ WidgetSendMessageOutputDto: {
382
+ /** @enum {boolean} */
383
+ success: true;
384
+ code?: string | 'session_assigned_to_human_agent' | 'response_cancelled';
385
+ autopilotResponse?: {
386
+ /** @enum {string} */
387
+ type: 'text';
388
+ value: {
389
+ error: boolean;
390
+ content: string;
391
+ };
392
+ id?: string;
393
+ mightSolveUserIssue: boolean;
394
+ completelyAndFullyCoveredUserIssue: boolean;
395
+ mode?: {
396
+ id: string;
397
+ name: string;
398
+ slug?: string;
399
+ };
400
+ didExitMode?: boolean;
401
+ };
402
+ uiResponse?: {
403
+ /** @enum {string} */
404
+ type: 'ui';
405
+ value: {
406
+ /** @enum {string} */
407
+ type: 'ui_component';
408
+ request_response?: unknown;
409
+ name: string;
410
+ content?: string;
411
+ };
412
+ mightSolveUserIssue: boolean;
413
+ };
414
+ sessionIsHandedOff?: boolean;
415
+ /** @description WidgetSession */
416
+ session?: {
417
+ /** Format: uuid */
418
+ id: string;
419
+ createdAt: string;
420
+ updatedAt: string;
421
+ isHandedOff: boolean;
422
+ isOpened: boolean;
423
+ assignee: {
424
+ /** @enum {string} */
425
+ kind: 'human' | 'ai' | 'none' | 'unknown';
426
+ name: string | null;
427
+ avatarUrl: string | null;
428
+ };
429
+ channel: string;
430
+ isVerified: boolean;
431
+ lastMessage: string | null;
432
+ modeId: string | null;
433
+ latestStateCheckpointPayload: {
434
+ [key: string]: unknown;
435
+ } | null;
436
+ };
437
+ } | {
438
+ /** @enum {boolean} */
439
+ success: false;
440
+ error: {
441
+ code?: string;
442
+ message?: string;
443
+ };
444
+ };
445
+ WidgetSessionAndHistoryDto: {
446
+ /** @description WidgetSession */
447
+ session: {
448
+ /** Format: uuid */
449
+ id: string;
450
+ createdAt: string;
451
+ updatedAt: string;
452
+ isHandedOff: boolean;
453
+ isOpened: boolean;
454
+ assignee: {
455
+ /** @enum {string} */
456
+ kind: 'human' | 'ai' | 'none' | 'unknown';
457
+ name: string | null;
458
+ avatarUrl: string | null;
459
+ };
460
+ channel: string;
461
+ isVerified: boolean;
462
+ lastMessage: string | null;
463
+ modeId: string | null;
464
+ latestStateCheckpointPayload: {
465
+ [key: string]: unknown;
466
+ } | null;
467
+ };
468
+ history: {
469
+ publicId: string;
470
+ /** @enum {string} */
471
+ type: 'agent_comment' | 'agent_joined' | 'agent_message' | 'agent_reopened_session' | 'agent_took_session_from_ai' | 'ai_assumed_the_session_resolved' | 'ai_decided_to_resolve_the_issue' | 'email_draft_message' | 'handoff' | 'handoff_to_salesforce_miaw' | 'handoff_to_zendesk' | 'message' | 'state_checkpoint' | 'user_confirmed_the_session_resolved';
472
+ content: {
473
+ text?: string | null;
474
+ };
475
+ sender: {
476
+ /** @enum {string} */
477
+ kind: 'user' | 'agent' | 'ai' | 'none' | 'unknown';
478
+ name?: string | null;
479
+ avatar?: string | null;
480
+ };
481
+ sentAt?: string | null;
482
+ actionCalls?: {
483
+ actionName: string;
484
+ args?: unknown;
485
+ result?: unknown;
486
+ }[] | null;
487
+ attachments?: {
488
+ id: string;
489
+ name: string;
490
+ size: number;
491
+ type: string;
492
+ url: string;
493
+ }[] | null;
494
+ }[];
495
+ };
496
+ /** @description WidgetSession */
497
+ WidgetSessionDto: {
498
+ /** Format: uuid */
499
+ id: string;
500
+ createdAt: string;
501
+ updatedAt: string;
502
+ isHandedOff: boolean;
503
+ isOpened: boolean;
504
+ assignee: {
505
+ /** @enum {string} */
506
+ kind: 'human' | 'ai' | 'none' | 'unknown';
507
+ name: string | null;
508
+ avatarUrl: string | null;
509
+ };
510
+ channel: string;
511
+ isVerified: boolean;
512
+ lastMessage: string | null;
513
+ modeId: string | null;
514
+ latestStateCheckpointPayload: {
515
+ [key: string]: unknown;
516
+ } | null;
517
+ };
518
+ WidgetVoteDto: {
519
+ /** @enum {string} */
520
+ action: 'upvote' | 'downvote';
521
+ sessionId: string;
522
+ messagePublicId: string;
523
+ };
524
+ WidgetVoteResponseDto: {
525
+ messagePublicId: string | null;
526
+ success: boolean;
527
+ };
528
+ ErrorDto: {
529
+ statusCode?: number;
530
+ message?: string;
531
+ error?: string;
532
+ };
533
+ };
534
+ responses: never;
535
+ parameters: never;
536
+ requestBodies: never;
537
+ headers: never;
538
+ pathItems: never;
539
+ }
540
+ export type $defs = Record<string, never>;
541
+ export interface operations {
542
+ getWidgetConfig: {
543
+ parameters: {
544
+ query?: never;
545
+ header: {
546
+ 'X-Bot-Token': string;
547
+ };
548
+ path?: never;
549
+ cookie?: never;
550
+ };
551
+ requestBody?: never;
552
+ responses: {
553
+ 200: {
554
+ headers: {
555
+ [name: string]: unknown;
556
+ };
557
+ content: {
558
+ 'application/json': components['schemas']['WidgetConfigDto'];
559
+ };
560
+ };
561
+ /** @description Internal Server Error */
562
+ 500: {
563
+ headers: {
564
+ [name: string]: unknown;
565
+ };
566
+ content: {
567
+ 'application/json': components['schemas']['ErrorDto'];
568
+ };
569
+ };
570
+ };
571
+ };
572
+ widgetPrelude: {
573
+ parameters: {
574
+ query?: never;
575
+ header: {
576
+ 'X-Bot-Token': string;
577
+ };
578
+ path?: never;
579
+ cookie?: never;
580
+ };
581
+ requestBody?: never;
582
+ responses: {
583
+ 200: {
584
+ headers: {
585
+ [name: string]: unknown;
586
+ };
587
+ content: {
588
+ 'application/json': components['schemas']['WidgetPreludeDto'];
589
+ };
590
+ };
591
+ /** @description Internal Server Error */
592
+ 500: {
593
+ headers: {
594
+ [name: string]: unknown;
595
+ };
596
+ content: {
597
+ 'application/json': components['schemas']['ErrorDto'];
598
+ };
599
+ };
600
+ };
601
+ };
602
+ getSessions: {
603
+ parameters: {
604
+ query: {
605
+ /** @description A JSON-stringified Record<string, string>. These filters will be compared against the sessions' custom_data */
606
+ filters: string;
607
+ /** @description Pagination cursor to fetch the next set of results */
608
+ cursor?: string;
609
+ };
610
+ header?: never;
611
+ path?: never;
612
+ cookie?: never;
613
+ };
614
+ requestBody?: never;
615
+ responses: {
616
+ 200: {
617
+ headers: {
618
+ [name: string]: unknown;
619
+ };
620
+ content: {
621
+ 'application/json': components['schemas']['PaginatedWidgetSessionsDto'];
622
+ };
623
+ };
624
+ /** @description Internal Server Error */
625
+ 500: {
626
+ headers: {
627
+ [name: string]: unknown;
628
+ };
629
+ content: {
630
+ 'application/json': components['schemas']['ErrorDto'];
631
+ };
632
+ };
633
+ };
634
+ };
635
+ getSessionHistory: {
636
+ parameters: {
637
+ query?: {
638
+ /** @description The timestamp of the last message received by the widget in order to get any messages after. */
639
+ lastMessageTimestamp?: string;
640
+ };
641
+ header?: never;
642
+ path: {
643
+ sessionId: string;
644
+ };
645
+ cookie?: never;
646
+ };
647
+ requestBody?: never;
648
+ responses: {
649
+ 200: {
650
+ headers: {
651
+ [name: string]: unknown;
652
+ };
653
+ content: {
654
+ 'application/json': components['schemas']['WidgetHistoryDto'][];
655
+ };
656
+ };
657
+ /** @description Internal Server Error */
658
+ 500: {
659
+ headers: {
660
+ [name: string]: unknown;
661
+ };
662
+ content: {
663
+ 'application/json': components['schemas']['ErrorDto'];
664
+ };
665
+ };
666
+ };
667
+ };
668
+ pollSessionAndHistory: {
669
+ parameters: {
670
+ query?: {
671
+ /** @description The timestamp of the last message received by the widget in order to get any messages after. */
672
+ lastMessageTimestamp?: string;
673
+ };
674
+ header?: never;
675
+ path: {
676
+ sessionId: string;
677
+ };
678
+ cookie?: never;
679
+ };
680
+ requestBody?: never;
681
+ responses: {
682
+ 200: {
683
+ headers: {
684
+ [name: string]: unknown;
685
+ };
686
+ content: {
687
+ 'application/json': components['schemas']['WidgetSessionAndHistoryDto'];
688
+ };
689
+ };
690
+ /** @description Internal Server Error */
691
+ 500: {
692
+ headers: {
693
+ [name: string]: unknown;
694
+ };
695
+ content: {
696
+ 'application/json': components['schemas']['ErrorDto'];
697
+ };
698
+ };
699
+ };
700
+ };
701
+ createChatSession: {
702
+ parameters: {
703
+ query?: never;
704
+ header?: never;
705
+ path?: never;
706
+ cookie?: never;
707
+ };
708
+ requestBody: {
709
+ content: {
710
+ 'application/json': components['schemas']['CreateWidgetSessionDto'];
711
+ };
712
+ };
713
+ responses: {
714
+ 200: {
715
+ headers: {
716
+ [name: string]: unknown;
717
+ };
718
+ content: {
719
+ 'application/json': components['schemas']['WidgetSessionDto'];
720
+ };
721
+ };
722
+ /** @description Internal Server Error */
723
+ 500: {
724
+ headers: {
725
+ [name: string]: unknown;
726
+ };
727
+ content: {
728
+ 'application/json': components['schemas']['ErrorDto'];
729
+ };
730
+ };
731
+ };
732
+ };
733
+ chatSend: {
734
+ parameters: {
735
+ query?: never;
736
+ header?: never;
737
+ path?: never;
738
+ cookie?: never;
739
+ };
740
+ requestBody: {
741
+ content: {
742
+ 'application/json': components['schemas']['WidgetSendMessageInputDto'];
743
+ };
744
+ };
745
+ responses: {
746
+ 200: {
747
+ headers: {
748
+ [name: string]: unknown;
749
+ };
750
+ content: {
751
+ 'application/json': components['schemas']['WidgetSendMessageOutputDto'];
752
+ };
753
+ };
754
+ /** @description Internal Server Error */
755
+ 500: {
756
+ headers: {
757
+ [name: string]: unknown;
758
+ };
759
+ content: {
760
+ 'application/json': components['schemas']['ErrorDto'];
761
+ };
762
+ };
763
+ };
764
+ };
765
+ createStateCheckpoint: {
766
+ parameters: {
767
+ query?: never;
768
+ header?: never;
769
+ path?: never;
770
+ cookie?: never;
771
+ };
772
+ requestBody: {
773
+ content: {
774
+ 'application/json': components['schemas']['WidgetCreateStateCheckpointInputDto'];
775
+ };
776
+ };
777
+ responses: {
778
+ 200: {
779
+ headers: {
780
+ [name: string]: unknown;
781
+ };
782
+ content: {
783
+ 'application/json': components['schemas']['WidgetCreateStateCheckpointOutputDto'];
784
+ };
785
+ };
786
+ /** @description Internal Server Error */
787
+ 500: {
788
+ headers: {
789
+ [name: string]: unknown;
790
+ };
791
+ content: {
792
+ 'application/json': components['schemas']['ErrorDto'];
793
+ };
794
+ };
795
+ };
796
+ };
797
+ uploadFile: {
798
+ parameters: {
799
+ query?: never;
800
+ header?: never;
801
+ path?: never;
802
+ cookie?: never;
803
+ };
804
+ /** @description The file to upload */
805
+ requestBody: {
806
+ content: {
807
+ 'multipart/form-data': components['schemas']['FileUploadDto'];
808
+ };
809
+ };
810
+ responses: {
811
+ 200: {
812
+ headers: {
813
+ [name: string]: unknown;
814
+ };
815
+ content: {
816
+ 'application/json': components['schemas']['UploadWidgetFileResponseDto'];
817
+ };
818
+ };
819
+ /** @description Internal Server Error */
820
+ 500: {
821
+ headers: {
822
+ [name: string]: unknown;
823
+ };
824
+ content: {
825
+ 'application/json': components['schemas']['ErrorDto'];
826
+ };
827
+ };
828
+ };
829
+ };
830
+ voteMessage: {
831
+ parameters: {
832
+ query?: never;
833
+ header?: never;
834
+ path?: never;
835
+ cookie?: never;
836
+ };
837
+ requestBody: {
838
+ content: {
839
+ 'application/json': components['schemas']['WidgetVoteDto'];
840
+ };
841
+ };
842
+ responses: {
843
+ 200: {
844
+ headers: {
845
+ [name: string]: unknown;
846
+ };
847
+ content: {
848
+ 'application/json': components['schemas']['WidgetVoteResponseDto'];
849
+ };
850
+ };
851
+ /** @description Internal Server Error */
852
+ 500: {
853
+ headers: {
854
+ [name: string]: unknown;
855
+ };
856
+ content: {
857
+ 'application/json': components['schemas']['ErrorDto'];
858
+ };
859
+ };
860
+ };
861
+ };
862
+ resolveSession: {
863
+ parameters: {
864
+ query?: never;
865
+ header?: never;
866
+ path?: never;
867
+ cookie?: never;
868
+ };
869
+ requestBody: {
870
+ content: {
871
+ 'application/json': components['schemas']['WidgetResolveSessionInputDto'];
872
+ };
873
+ };
874
+ responses: {
875
+ 200: {
876
+ headers: {
877
+ [name: string]: unknown;
878
+ };
879
+ content: {
880
+ 'application/json': components['schemas']['WidgetSessionDto'];
881
+ };
882
+ };
883
+ /** @description Internal Server Error */
884
+ 500: {
885
+ headers: {
886
+ [name: string]: unknown;
887
+ };
888
+ content: {
889
+ 'application/json': components['schemas']['ErrorDto'];
890
+ };
891
+ };
892
+ };
893
+ };
894
+ createUnverifiedContact: {
895
+ parameters: {
896
+ query?: never;
897
+ header: {
898
+ 'x-bot-token': string;
899
+ };
900
+ path?: never;
901
+ cookie?: never;
902
+ };
903
+ requestBody: {
904
+ content: {
905
+ 'application/json': components['schemas']['CreateUnverifiedContactDto'];
906
+ };
907
+ };
908
+ responses: {
909
+ 200: {
910
+ headers: {
911
+ [name: string]: unknown;
912
+ };
913
+ content: {
914
+ 'application/json': components['schemas']['WidgetContactTokenResponseDto'];
915
+ };
916
+ };
917
+ /** @description Internal Server Error */
918
+ 500: {
919
+ headers: {
920
+ [name: string]: unknown;
921
+ };
922
+ content: {
923
+ 'application/json': components['schemas']['ErrorDto'];
924
+ };
925
+ };
926
+ };
927
+ };
928
+ }