@botpress/webchat 2.2.19 → 2.3.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 (52) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/dist/adapters/adapters/webchat-to-target.d.ts +46 -0
  3. package/dist/adapters/webchat.d.ts +816 -0
  4. package/dist/client/{PushpinClient/index.d.ts → client.d.ts} +6 -5
  5. package/dist/client/index.d.ts +1 -2
  6. package/dist/client/{PushpinClient/inner-client → inner-client}/index.d.ts +3 -3
  7. package/dist/client/{PushpinClient/inner-client → inner-client}/signal-listener.d.ts +1 -1
  8. package/dist/client/types.d.ts +3 -26
  9. package/dist/components/Block.d.ts +2 -2
  10. package/dist/components/Message/Message.d.ts +4 -2
  11. package/dist/components/renderers/Audio/Audio.d.ts +3 -1
  12. package/dist/components/renderers/Bubble/Bubble.d.ts +2 -2
  13. package/dist/components/renderers/Button/Button.d.ts +2 -2
  14. package/dist/components/renderers/Carousel/Carousel.d.ts +3 -1
  15. package/dist/components/renderers/Column/Column.d.ts +2 -2
  16. package/dist/components/renderers/Dropdown/Dropdown.d.ts +2 -2
  17. package/dist/components/renderers/File/File.d.ts +3 -1
  18. package/dist/components/renderers/Image/Image.d.ts +3 -1
  19. package/dist/components/renderers/Location/Location.d.ts +3 -1
  20. package/dist/components/renderers/Row/Row.d.ts +2 -2
  21. package/dist/components/renderers/Text/Text.d.ts +2 -2
  22. package/dist/components/renderers/Video/Video.d.ts +3 -1
  23. package/dist/gen/client/models.d.ts +61 -0
  24. package/dist/gen/client/operations/createMessage.d.ts +122 -0
  25. package/dist/gen/client/operations/getMessage.d.ts +61 -0
  26. package/dist/gen/client/operations/listConversationMessages.d.ts +61 -0
  27. package/dist/gen/signals/index.d.ts +416 -8
  28. package/dist/gen/signals/messageCreated.t.d.ts +61 -0
  29. package/dist/gen/signals/messageCreated.z.d.ts +415 -0
  30. package/dist/get-client.d.ts +1 -2
  31. package/dist/hooks/useClient.d.ts +1 -2
  32. package/dist/index.js +12119 -14476
  33. package/dist/index.umd.cjs +88 -88
  34. package/dist/schemas/init.d.ts +0 -7
  35. package/dist/stores/offlineStore.d.ts +1 -1
  36. package/dist/stores/webchatStore.d.ts +1 -0
  37. package/dist/style.css +1 -1
  38. package/dist/types/block-type.d.ts +3 -0
  39. package/dist/types/init.d.ts +0 -1
  40. package/openapi.ts +1 -1
  41. package/package.json +3 -2
  42. package/dist/client/MessagingClient/client.d.ts +0 -35
  43. package/dist/client/MessagingClient/index.d.ts +0 -1
  44. package/dist/gen/signals/custom.j.d.ts +0 -3
  45. package/dist/gen/signals/messageCreated.j.d.ts +0 -3
  46. package/dist/gen/signals/typingStarted.j.d.ts +0 -3
  47. package/dist/gen/signals/typingStopped.j.d.ts +0 -3
  48. package/dist/gen/signals/webchatConfig.j.d.ts +0 -3
  49. package/dist/gen/signals/webchatVisibility.j.d.ts +0 -3
  50. /package/dist/client/{PushpinClient/inner-client → inner-client}/event-emitter.d.ts +0 -0
  51. /package/dist/client/{PushpinClient/inner-client → inner-client}/eventsource.d.ts +0 -0
  52. /package/dist/client/{PushpinClient/state-machine.d.ts → state-machine.d.ts} +0 -0
@@ -4,14 +4,7 @@ import type { WebchatConfig } from './webchatConfig.t';
4
4
  import type { Custom } from './custom.t';
5
5
  import type { TypingStarted } from './typingStarted.t';
6
6
  import type { TypingStopped } from './typingStopped.t';
7
- export declare const json: {
8
- messageCreated: import("json-schema").JSONSchema7;
9
- webchatVisibility: import("json-schema").JSONSchema7;
10
- webchatConfig: import("json-schema").JSONSchema7;
11
- custom: import("json-schema").JSONSchema7;
12
- typingStarted: import("json-schema").JSONSchema7;
13
- typingStopped: import("json-schema").JSONSchema7;
14
- };
7
+ export declare const json: {};
15
8
  export declare const zod: {
16
9
  messageCreated: import("zod").ZodObject<{
17
10
  type: import("zod").ZodLiteral<"message_created">;
@@ -288,6 +281,249 @@ export declare const zod: {
288
281
  type: "video";
289
282
  videoUrl: string;
290
283
  className?: string | undefined;
284
+ }>, import("zod").ZodObject<{
285
+ items: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
286
+ type: import("zod").ZodLiteral<"text">;
287
+ payload: import("zod").ZodObject<{
288
+ text: import("zod").ZodString;
289
+ }, "strip", import("zod").ZodTypeAny, {
290
+ text: string;
291
+ }, {
292
+ text: string;
293
+ }>;
294
+ }, "strip", import("zod").ZodTypeAny, {
295
+ type: "text";
296
+ payload: {
297
+ text: string;
298
+ };
299
+ }, {
300
+ type: "text";
301
+ payload: {
302
+ text: string;
303
+ };
304
+ }>, import("zod").ZodObject<{
305
+ type: import("zod").ZodLiteral<"markdown">;
306
+ payload: import("zod").ZodObject<{
307
+ markdown: import("zod").ZodString;
308
+ }, "strip", import("zod").ZodTypeAny, {
309
+ markdown: string;
310
+ }, {
311
+ markdown: string;
312
+ }>;
313
+ }, "strip", import("zod").ZodTypeAny, {
314
+ type: "markdown";
315
+ payload: {
316
+ markdown: string;
317
+ };
318
+ }, {
319
+ type: "markdown";
320
+ payload: {
321
+ markdown: string;
322
+ };
323
+ }>, import("zod").ZodObject<{
324
+ type: import("zod").ZodLiteral<"image">;
325
+ payload: import("zod").ZodObject<{
326
+ imageUrl: import("zod").ZodString;
327
+ }, "strip", import("zod").ZodTypeAny, {
328
+ imageUrl: string;
329
+ }, {
330
+ imageUrl: string;
331
+ }>;
332
+ }, "strip", import("zod").ZodTypeAny, {
333
+ type: "image";
334
+ payload: {
335
+ imageUrl: string;
336
+ };
337
+ }, {
338
+ type: "image";
339
+ payload: {
340
+ imageUrl: string;
341
+ };
342
+ }>, import("zod").ZodObject<{
343
+ type: import("zod").ZodLiteral<"audio">;
344
+ payload: import("zod").ZodObject<{
345
+ audioUrl: import("zod").ZodString;
346
+ }, "strip", import("zod").ZodTypeAny, {
347
+ audioUrl: string;
348
+ }, {
349
+ audioUrl: string;
350
+ }>;
351
+ }, "strip", import("zod").ZodTypeAny, {
352
+ type: "audio";
353
+ payload: {
354
+ audioUrl: string;
355
+ };
356
+ }, {
357
+ type: "audio";
358
+ payload: {
359
+ audioUrl: string;
360
+ };
361
+ }>, import("zod").ZodObject<{
362
+ type: import("zod").ZodLiteral<"video">;
363
+ payload: import("zod").ZodObject<{
364
+ videoUrl: import("zod").ZodString;
365
+ }, "strip", import("zod").ZodTypeAny, {
366
+ videoUrl: string;
367
+ }, {
368
+ videoUrl: string;
369
+ }>;
370
+ }, "strip", import("zod").ZodTypeAny, {
371
+ type: "video";
372
+ payload: {
373
+ videoUrl: string;
374
+ };
375
+ }, {
376
+ type: "video";
377
+ payload: {
378
+ videoUrl: string;
379
+ };
380
+ }>, import("zod").ZodObject<{
381
+ type: import("zod").ZodLiteral<"file">;
382
+ payload: import("zod").ZodObject<{
383
+ fileUrl: import("zod").ZodString;
384
+ title: import("zod").ZodOptional<import("zod").ZodString>;
385
+ }, "strip", import("zod").ZodTypeAny, {
386
+ fileUrl: string;
387
+ title?: string | undefined;
388
+ }, {
389
+ fileUrl: string;
390
+ title?: string | undefined;
391
+ }>;
392
+ }, "strip", import("zod").ZodTypeAny, {
393
+ type: "file";
394
+ payload: {
395
+ fileUrl: string;
396
+ title?: string | undefined;
397
+ };
398
+ }, {
399
+ type: "file";
400
+ payload: {
401
+ fileUrl: string;
402
+ title?: string | undefined;
403
+ };
404
+ }>, import("zod").ZodObject<{
405
+ type: import("zod").ZodLiteral<"location">;
406
+ payload: import("zod").ZodObject<{
407
+ latitude: import("zod").ZodNumber;
408
+ longitude: import("zod").ZodNumber;
409
+ address: import("zod").ZodOptional<import("zod").ZodString>;
410
+ title: import("zod").ZodOptional<import("zod").ZodString>;
411
+ }, "strip", import("zod").ZodTypeAny, {
412
+ latitude: number;
413
+ longitude: number;
414
+ address?: string | undefined;
415
+ title?: string | undefined;
416
+ }, {
417
+ latitude: number;
418
+ longitude: number;
419
+ address?: string | undefined;
420
+ title?: string | undefined;
421
+ }>;
422
+ }, "strip", import("zod").ZodTypeAny, {
423
+ type: "location";
424
+ payload: {
425
+ latitude: number;
426
+ longitude: number;
427
+ address?: string | undefined;
428
+ title?: string | undefined;
429
+ };
430
+ }, {
431
+ type: "location";
432
+ payload: {
433
+ latitude: number;
434
+ longitude: number;
435
+ address?: string | undefined;
436
+ title?: string | undefined;
437
+ };
438
+ }>]>, "many">;
439
+ className: import("zod").ZodOptional<import("zod").ZodString>;
440
+ type: import("zod").ZodLiteral<"bloc">;
441
+ }, "strip", import("zod").ZodTypeAny, {
442
+ type: "bloc";
443
+ items: ({
444
+ type: "text";
445
+ payload: {
446
+ text: string;
447
+ };
448
+ } | {
449
+ type: "markdown";
450
+ payload: {
451
+ markdown: string;
452
+ };
453
+ } | {
454
+ type: "image";
455
+ payload: {
456
+ imageUrl: string;
457
+ };
458
+ } | {
459
+ type: "audio";
460
+ payload: {
461
+ audioUrl: string;
462
+ };
463
+ } | {
464
+ type: "video";
465
+ payload: {
466
+ videoUrl: string;
467
+ };
468
+ } | {
469
+ type: "file";
470
+ payload: {
471
+ fileUrl: string;
472
+ title?: string | undefined;
473
+ };
474
+ } | {
475
+ type: "location";
476
+ payload: {
477
+ latitude: number;
478
+ longitude: number;
479
+ address?: string | undefined;
480
+ title?: string | undefined;
481
+ };
482
+ })[];
483
+ className?: string | undefined;
484
+ }, {
485
+ type: "bloc";
486
+ items: ({
487
+ type: "text";
488
+ payload: {
489
+ text: string;
490
+ };
491
+ } | {
492
+ type: "markdown";
493
+ payload: {
494
+ markdown: string;
495
+ };
496
+ } | {
497
+ type: "image";
498
+ payload: {
499
+ imageUrl: string;
500
+ };
501
+ } | {
502
+ type: "audio";
503
+ payload: {
504
+ audioUrl: string;
505
+ };
506
+ } | {
507
+ type: "video";
508
+ payload: {
509
+ videoUrl: string;
510
+ };
511
+ } | {
512
+ type: "file";
513
+ payload: {
514
+ fileUrl: string;
515
+ title?: string | undefined;
516
+ };
517
+ } | {
518
+ type: "location";
519
+ payload: {
520
+ latitude: number;
521
+ longitude: number;
522
+ address?: string | undefined;
523
+ title?: string | undefined;
524
+ };
525
+ })[];
526
+ className?: string | undefined;
291
527
  }>]>;
292
528
  userId: import("zod").ZodString;
293
529
  conversationId: import("zod").ZodString;
@@ -366,6 +602,49 @@ export declare const zod: {
366
602
  type: "video";
367
603
  videoUrl: string;
368
604
  className?: string | undefined;
605
+ } | {
606
+ type: "bloc";
607
+ items: ({
608
+ type: "text";
609
+ payload: {
610
+ text: string;
611
+ };
612
+ } | {
613
+ type: "markdown";
614
+ payload: {
615
+ markdown: string;
616
+ };
617
+ } | {
618
+ type: "image";
619
+ payload: {
620
+ imageUrl: string;
621
+ };
622
+ } | {
623
+ type: "audio";
624
+ payload: {
625
+ audioUrl: string;
626
+ };
627
+ } | {
628
+ type: "video";
629
+ payload: {
630
+ videoUrl: string;
631
+ };
632
+ } | {
633
+ type: "file";
634
+ payload: {
635
+ fileUrl: string;
636
+ title?: string | undefined;
637
+ };
638
+ } | {
639
+ type: "location";
640
+ payload: {
641
+ latitude: number;
642
+ longitude: number;
643
+ address?: string | undefined;
644
+ title?: string | undefined;
645
+ };
646
+ })[];
647
+ className?: string | undefined;
369
648
  };
370
649
  id: string;
371
650
  userId: string;
@@ -446,6 +725,49 @@ export declare const zod: {
446
725
  type: "video";
447
726
  videoUrl: string;
448
727
  className?: string | undefined;
728
+ } | {
729
+ type: "bloc";
730
+ items: ({
731
+ type: "text";
732
+ payload: {
733
+ text: string;
734
+ };
735
+ } | {
736
+ type: "markdown";
737
+ payload: {
738
+ markdown: string;
739
+ };
740
+ } | {
741
+ type: "image";
742
+ payload: {
743
+ imageUrl: string;
744
+ };
745
+ } | {
746
+ type: "audio";
747
+ payload: {
748
+ audioUrl: string;
749
+ };
750
+ } | {
751
+ type: "video";
752
+ payload: {
753
+ videoUrl: string;
754
+ };
755
+ } | {
756
+ type: "file";
757
+ payload: {
758
+ fileUrl: string;
759
+ title?: string | undefined;
760
+ };
761
+ } | {
762
+ type: "location";
763
+ payload: {
764
+ latitude: number;
765
+ longitude: number;
766
+ address?: string | undefined;
767
+ title?: string | undefined;
768
+ };
769
+ })[];
770
+ className?: string | undefined;
449
771
  };
450
772
  id: string;
451
773
  userId: string;
@@ -529,6 +851,49 @@ export declare const zod: {
529
851
  type: "video";
530
852
  videoUrl: string;
531
853
  className?: string | undefined;
854
+ } | {
855
+ type: "bloc";
856
+ items: ({
857
+ type: "text";
858
+ payload: {
859
+ text: string;
860
+ };
861
+ } | {
862
+ type: "markdown";
863
+ payload: {
864
+ markdown: string;
865
+ };
866
+ } | {
867
+ type: "image";
868
+ payload: {
869
+ imageUrl: string;
870
+ };
871
+ } | {
872
+ type: "audio";
873
+ payload: {
874
+ audioUrl: string;
875
+ };
876
+ } | {
877
+ type: "video";
878
+ payload: {
879
+ videoUrl: string;
880
+ };
881
+ } | {
882
+ type: "file";
883
+ payload: {
884
+ fileUrl: string;
885
+ title?: string | undefined;
886
+ };
887
+ } | {
888
+ type: "location";
889
+ payload: {
890
+ latitude: number;
891
+ longitude: number;
892
+ address?: string | undefined;
893
+ title?: string | undefined;
894
+ };
895
+ })[];
896
+ className?: string | undefined;
532
897
  };
533
898
  id: string;
534
899
  userId: string;
@@ -612,6 +977,49 @@ export declare const zod: {
612
977
  type: "video";
613
978
  videoUrl: string;
614
979
  className?: string | undefined;
980
+ } | {
981
+ type: "bloc";
982
+ items: ({
983
+ type: "text";
984
+ payload: {
985
+ text: string;
986
+ };
987
+ } | {
988
+ type: "markdown";
989
+ payload: {
990
+ markdown: string;
991
+ };
992
+ } | {
993
+ type: "image";
994
+ payload: {
995
+ imageUrl: string;
996
+ };
997
+ } | {
998
+ type: "audio";
999
+ payload: {
1000
+ audioUrl: string;
1001
+ };
1002
+ } | {
1003
+ type: "video";
1004
+ payload: {
1005
+ videoUrl: string;
1006
+ };
1007
+ } | {
1008
+ type: "file";
1009
+ payload: {
1010
+ fileUrl: string;
1011
+ title?: string | undefined;
1012
+ };
1013
+ } | {
1014
+ type: "location";
1015
+ payload: {
1016
+ latitude: number;
1017
+ longitude: number;
1018
+ address?: string | undefined;
1019
+ title?: string | undefined;
1020
+ };
1021
+ })[];
1022
+ className?: string | undefined;
615
1023
  };
616
1024
  id: string;
617
1025
  userId: string;
@@ -141,6 +141,67 @@ export interface MessageCreated {
141
141
  className?: string;
142
142
  type: "video";
143
143
  [k: string]: any;
144
+ } | {
145
+ items: ({
146
+ type: "text";
147
+ payload: {
148
+ text: string;
149
+ [k: string]: any;
150
+ };
151
+ [k: string]: any;
152
+ } | {
153
+ type: "markdown";
154
+ payload: {
155
+ markdown: string;
156
+ [k: string]: any;
157
+ };
158
+ [k: string]: any;
159
+ } | {
160
+ type: "image";
161
+ payload: {
162
+ imageUrl: string;
163
+ [k: string]: any;
164
+ };
165
+ [k: string]: any;
166
+ } | {
167
+ type: "audio";
168
+ payload: {
169
+ audioUrl: string;
170
+ [k: string]: any;
171
+ };
172
+ [k: string]: any;
173
+ } | {
174
+ type: "video";
175
+ payload: {
176
+ videoUrl: string;
177
+ [k: string]: any;
178
+ };
179
+ [k: string]: any;
180
+ } | {
181
+ type: "file";
182
+ payload: {
183
+ fileUrl: string;
184
+ title?: string;
185
+ [k: string]: any;
186
+ };
187
+ [k: string]: any;
188
+ } | {
189
+ type: "location";
190
+ payload: {
191
+ latitude: number;
192
+ longitude: number;
193
+ address?: string;
194
+ title?: string;
195
+ [k: string]: any;
196
+ };
197
+ [k: string]: any;
198
+ })[];
199
+ /**
200
+ * CSS className to apply to the message
201
+ */
202
+ className?: string;
203
+ type: "bloc";
204
+ [k: string]: any;
144
205
  };
145
206
  /**
146
207
  * ID of the [User](#schema_user)