@botpress/webchat 2.2.20 → 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.
- package/.turbo/turbo-build.log +8 -8
- package/dist/adapters/adapters/webchat-to-target.d.ts +46 -0
- package/dist/adapters/webchat.d.ts +816 -0
- package/dist/client/{PushpinClient/index.d.ts → client.d.ts} +6 -5
- package/dist/client/index.d.ts +1 -2
- package/dist/client/{PushpinClient/inner-client → inner-client}/index.d.ts +3 -3
- package/dist/client/{PushpinClient/inner-client → inner-client}/signal-listener.d.ts +1 -1
- package/dist/client/types.d.ts +3 -26
- package/dist/components/Block.d.ts +1 -1
- package/dist/components/Message/Message.d.ts +4 -2
- package/dist/components/renderers/Audio/Audio.d.ts +3 -1
- package/dist/components/renderers/Bubble/Bubble.d.ts +2 -2
- package/dist/components/renderers/Button/Button.d.ts +2 -2
- package/dist/components/renderers/Carousel/Carousel.d.ts +3 -1
- package/dist/components/renderers/Column/Column.d.ts +2 -2
- package/dist/components/renderers/Dropdown/Dropdown.d.ts +2 -2
- package/dist/components/renderers/File/File.d.ts +3 -1
- package/dist/components/renderers/Image/Image.d.ts +3 -1
- package/dist/components/renderers/Location/Location.d.ts +3 -1
- package/dist/components/renderers/Row/Row.d.ts +2 -2
- package/dist/components/renderers/Text/Text.d.ts +2 -2
- package/dist/components/renderers/Video/Video.d.ts +3 -1
- package/dist/gen/client/models.d.ts +61 -0
- package/dist/gen/client/operations/createMessage.d.ts +122 -0
- package/dist/gen/client/operations/getMessage.d.ts +61 -0
- package/dist/gen/client/operations/listConversationMessages.d.ts +61 -0
- package/dist/gen/signals/index.d.ts +416 -8
- package/dist/gen/signals/messageCreated.t.d.ts +61 -0
- package/dist/gen/signals/messageCreated.z.d.ts +415 -0
- package/dist/get-client.d.ts +1 -2
- package/dist/hooks/useClient.d.ts +1 -2
- package/dist/index.js +12106 -14465
- package/dist/index.umd.cjs +88 -88
- package/dist/schemas/init.d.ts +0 -7
- package/dist/stores/offlineStore.d.ts +1 -1
- package/dist/stores/webchatStore.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/types/block-type.d.ts +16 -14
- package/dist/types/init.d.ts +0 -1
- package/openapi.ts +1 -1
- package/package.json +3 -2
- package/dist/client/MessagingClient/client.d.ts +0 -35
- package/dist/client/MessagingClient/index.d.ts +0 -1
- package/dist/gen/signals/custom.j.d.ts +0 -3
- package/dist/gen/signals/messageCreated.j.d.ts +0 -3
- package/dist/gen/signals/typingStarted.j.d.ts +0 -3
- package/dist/gen/signals/typingStopped.j.d.ts +0 -3
- package/dist/gen/signals/webchatConfig.j.d.ts +0 -3
- package/dist/gen/signals/webchatVisibility.j.d.ts +0 -3
- /package/dist/client/{PushpinClient/inner-client → inner-client}/event-emitter.d.ts +0 -0
- /package/dist/client/{PushpinClient/inner-client → inner-client}/eventsource.d.ts +0 -0
- /package/dist/client/{PushpinClient/state-machine.d.ts → state-machine.d.ts} +0 -0
|
@@ -274,6 +274,249 @@ declare const _default: z.ZodObject<{
|
|
|
274
274
|
type: "video";
|
|
275
275
|
videoUrl: string;
|
|
276
276
|
className?: string | undefined;
|
|
277
|
+
}>, z.ZodObject<{
|
|
278
|
+
items: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
279
|
+
type: z.ZodLiteral<"text">;
|
|
280
|
+
payload: z.ZodObject<{
|
|
281
|
+
text: z.ZodString;
|
|
282
|
+
}, "strip", z.ZodTypeAny, {
|
|
283
|
+
text: string;
|
|
284
|
+
}, {
|
|
285
|
+
text: string;
|
|
286
|
+
}>;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
type: "text";
|
|
289
|
+
payload: {
|
|
290
|
+
text: string;
|
|
291
|
+
};
|
|
292
|
+
}, {
|
|
293
|
+
type: "text";
|
|
294
|
+
payload: {
|
|
295
|
+
text: string;
|
|
296
|
+
};
|
|
297
|
+
}>, z.ZodObject<{
|
|
298
|
+
type: z.ZodLiteral<"markdown">;
|
|
299
|
+
payload: z.ZodObject<{
|
|
300
|
+
markdown: z.ZodString;
|
|
301
|
+
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
markdown: string;
|
|
303
|
+
}, {
|
|
304
|
+
markdown: string;
|
|
305
|
+
}>;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
type: "markdown";
|
|
308
|
+
payload: {
|
|
309
|
+
markdown: string;
|
|
310
|
+
};
|
|
311
|
+
}, {
|
|
312
|
+
type: "markdown";
|
|
313
|
+
payload: {
|
|
314
|
+
markdown: string;
|
|
315
|
+
};
|
|
316
|
+
}>, z.ZodObject<{
|
|
317
|
+
type: z.ZodLiteral<"image">;
|
|
318
|
+
payload: z.ZodObject<{
|
|
319
|
+
imageUrl: z.ZodString;
|
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
|
321
|
+
imageUrl: string;
|
|
322
|
+
}, {
|
|
323
|
+
imageUrl: string;
|
|
324
|
+
}>;
|
|
325
|
+
}, "strip", z.ZodTypeAny, {
|
|
326
|
+
type: "image";
|
|
327
|
+
payload: {
|
|
328
|
+
imageUrl: string;
|
|
329
|
+
};
|
|
330
|
+
}, {
|
|
331
|
+
type: "image";
|
|
332
|
+
payload: {
|
|
333
|
+
imageUrl: string;
|
|
334
|
+
};
|
|
335
|
+
}>, z.ZodObject<{
|
|
336
|
+
type: z.ZodLiteral<"audio">;
|
|
337
|
+
payload: z.ZodObject<{
|
|
338
|
+
audioUrl: z.ZodString;
|
|
339
|
+
}, "strip", z.ZodTypeAny, {
|
|
340
|
+
audioUrl: string;
|
|
341
|
+
}, {
|
|
342
|
+
audioUrl: string;
|
|
343
|
+
}>;
|
|
344
|
+
}, "strip", z.ZodTypeAny, {
|
|
345
|
+
type: "audio";
|
|
346
|
+
payload: {
|
|
347
|
+
audioUrl: string;
|
|
348
|
+
};
|
|
349
|
+
}, {
|
|
350
|
+
type: "audio";
|
|
351
|
+
payload: {
|
|
352
|
+
audioUrl: string;
|
|
353
|
+
};
|
|
354
|
+
}>, z.ZodObject<{
|
|
355
|
+
type: z.ZodLiteral<"video">;
|
|
356
|
+
payload: z.ZodObject<{
|
|
357
|
+
videoUrl: z.ZodString;
|
|
358
|
+
}, "strip", z.ZodTypeAny, {
|
|
359
|
+
videoUrl: string;
|
|
360
|
+
}, {
|
|
361
|
+
videoUrl: string;
|
|
362
|
+
}>;
|
|
363
|
+
}, "strip", z.ZodTypeAny, {
|
|
364
|
+
type: "video";
|
|
365
|
+
payload: {
|
|
366
|
+
videoUrl: string;
|
|
367
|
+
};
|
|
368
|
+
}, {
|
|
369
|
+
type: "video";
|
|
370
|
+
payload: {
|
|
371
|
+
videoUrl: string;
|
|
372
|
+
};
|
|
373
|
+
}>, z.ZodObject<{
|
|
374
|
+
type: z.ZodLiteral<"file">;
|
|
375
|
+
payload: z.ZodObject<{
|
|
376
|
+
fileUrl: z.ZodString;
|
|
377
|
+
title: z.ZodOptional<z.ZodString>;
|
|
378
|
+
}, "strip", z.ZodTypeAny, {
|
|
379
|
+
fileUrl: string;
|
|
380
|
+
title?: string | undefined;
|
|
381
|
+
}, {
|
|
382
|
+
fileUrl: string;
|
|
383
|
+
title?: string | undefined;
|
|
384
|
+
}>;
|
|
385
|
+
}, "strip", z.ZodTypeAny, {
|
|
386
|
+
type: "file";
|
|
387
|
+
payload: {
|
|
388
|
+
fileUrl: string;
|
|
389
|
+
title?: string | undefined;
|
|
390
|
+
};
|
|
391
|
+
}, {
|
|
392
|
+
type: "file";
|
|
393
|
+
payload: {
|
|
394
|
+
fileUrl: string;
|
|
395
|
+
title?: string | undefined;
|
|
396
|
+
};
|
|
397
|
+
}>, z.ZodObject<{
|
|
398
|
+
type: z.ZodLiteral<"location">;
|
|
399
|
+
payload: z.ZodObject<{
|
|
400
|
+
latitude: z.ZodNumber;
|
|
401
|
+
longitude: z.ZodNumber;
|
|
402
|
+
address: z.ZodOptional<z.ZodString>;
|
|
403
|
+
title: z.ZodOptional<z.ZodString>;
|
|
404
|
+
}, "strip", z.ZodTypeAny, {
|
|
405
|
+
latitude: number;
|
|
406
|
+
longitude: number;
|
|
407
|
+
address?: string | undefined;
|
|
408
|
+
title?: string | undefined;
|
|
409
|
+
}, {
|
|
410
|
+
latitude: number;
|
|
411
|
+
longitude: number;
|
|
412
|
+
address?: string | undefined;
|
|
413
|
+
title?: string | undefined;
|
|
414
|
+
}>;
|
|
415
|
+
}, "strip", z.ZodTypeAny, {
|
|
416
|
+
type: "location";
|
|
417
|
+
payload: {
|
|
418
|
+
latitude: number;
|
|
419
|
+
longitude: number;
|
|
420
|
+
address?: string | undefined;
|
|
421
|
+
title?: string | undefined;
|
|
422
|
+
};
|
|
423
|
+
}, {
|
|
424
|
+
type: "location";
|
|
425
|
+
payload: {
|
|
426
|
+
latitude: number;
|
|
427
|
+
longitude: number;
|
|
428
|
+
address?: string | undefined;
|
|
429
|
+
title?: string | undefined;
|
|
430
|
+
};
|
|
431
|
+
}>]>, "many">;
|
|
432
|
+
className: z.ZodOptional<z.ZodString>;
|
|
433
|
+
type: z.ZodLiteral<"bloc">;
|
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
|
435
|
+
type: "bloc";
|
|
436
|
+
items: ({
|
|
437
|
+
type: "text";
|
|
438
|
+
payload: {
|
|
439
|
+
text: string;
|
|
440
|
+
};
|
|
441
|
+
} | {
|
|
442
|
+
type: "markdown";
|
|
443
|
+
payload: {
|
|
444
|
+
markdown: string;
|
|
445
|
+
};
|
|
446
|
+
} | {
|
|
447
|
+
type: "image";
|
|
448
|
+
payload: {
|
|
449
|
+
imageUrl: string;
|
|
450
|
+
};
|
|
451
|
+
} | {
|
|
452
|
+
type: "audio";
|
|
453
|
+
payload: {
|
|
454
|
+
audioUrl: string;
|
|
455
|
+
};
|
|
456
|
+
} | {
|
|
457
|
+
type: "video";
|
|
458
|
+
payload: {
|
|
459
|
+
videoUrl: string;
|
|
460
|
+
};
|
|
461
|
+
} | {
|
|
462
|
+
type: "file";
|
|
463
|
+
payload: {
|
|
464
|
+
fileUrl: string;
|
|
465
|
+
title?: string | undefined;
|
|
466
|
+
};
|
|
467
|
+
} | {
|
|
468
|
+
type: "location";
|
|
469
|
+
payload: {
|
|
470
|
+
latitude: number;
|
|
471
|
+
longitude: number;
|
|
472
|
+
address?: string | undefined;
|
|
473
|
+
title?: string | undefined;
|
|
474
|
+
};
|
|
475
|
+
})[];
|
|
476
|
+
className?: string | undefined;
|
|
477
|
+
}, {
|
|
478
|
+
type: "bloc";
|
|
479
|
+
items: ({
|
|
480
|
+
type: "text";
|
|
481
|
+
payload: {
|
|
482
|
+
text: string;
|
|
483
|
+
};
|
|
484
|
+
} | {
|
|
485
|
+
type: "markdown";
|
|
486
|
+
payload: {
|
|
487
|
+
markdown: string;
|
|
488
|
+
};
|
|
489
|
+
} | {
|
|
490
|
+
type: "image";
|
|
491
|
+
payload: {
|
|
492
|
+
imageUrl: string;
|
|
493
|
+
};
|
|
494
|
+
} | {
|
|
495
|
+
type: "audio";
|
|
496
|
+
payload: {
|
|
497
|
+
audioUrl: string;
|
|
498
|
+
};
|
|
499
|
+
} | {
|
|
500
|
+
type: "video";
|
|
501
|
+
payload: {
|
|
502
|
+
videoUrl: string;
|
|
503
|
+
};
|
|
504
|
+
} | {
|
|
505
|
+
type: "file";
|
|
506
|
+
payload: {
|
|
507
|
+
fileUrl: string;
|
|
508
|
+
title?: string | undefined;
|
|
509
|
+
};
|
|
510
|
+
} | {
|
|
511
|
+
type: "location";
|
|
512
|
+
payload: {
|
|
513
|
+
latitude: number;
|
|
514
|
+
longitude: number;
|
|
515
|
+
address?: string | undefined;
|
|
516
|
+
title?: string | undefined;
|
|
517
|
+
};
|
|
518
|
+
})[];
|
|
519
|
+
className?: string | undefined;
|
|
277
520
|
}>]>;
|
|
278
521
|
userId: z.ZodString;
|
|
279
522
|
conversationId: z.ZodString;
|
|
@@ -352,6 +595,49 @@ declare const _default: z.ZodObject<{
|
|
|
352
595
|
type: "video";
|
|
353
596
|
videoUrl: string;
|
|
354
597
|
className?: string | undefined;
|
|
598
|
+
} | {
|
|
599
|
+
type: "bloc";
|
|
600
|
+
items: ({
|
|
601
|
+
type: "text";
|
|
602
|
+
payload: {
|
|
603
|
+
text: string;
|
|
604
|
+
};
|
|
605
|
+
} | {
|
|
606
|
+
type: "markdown";
|
|
607
|
+
payload: {
|
|
608
|
+
markdown: string;
|
|
609
|
+
};
|
|
610
|
+
} | {
|
|
611
|
+
type: "image";
|
|
612
|
+
payload: {
|
|
613
|
+
imageUrl: string;
|
|
614
|
+
};
|
|
615
|
+
} | {
|
|
616
|
+
type: "audio";
|
|
617
|
+
payload: {
|
|
618
|
+
audioUrl: string;
|
|
619
|
+
};
|
|
620
|
+
} | {
|
|
621
|
+
type: "video";
|
|
622
|
+
payload: {
|
|
623
|
+
videoUrl: string;
|
|
624
|
+
};
|
|
625
|
+
} | {
|
|
626
|
+
type: "file";
|
|
627
|
+
payload: {
|
|
628
|
+
fileUrl: string;
|
|
629
|
+
title?: string | undefined;
|
|
630
|
+
};
|
|
631
|
+
} | {
|
|
632
|
+
type: "location";
|
|
633
|
+
payload: {
|
|
634
|
+
latitude: number;
|
|
635
|
+
longitude: number;
|
|
636
|
+
address?: string | undefined;
|
|
637
|
+
title?: string | undefined;
|
|
638
|
+
};
|
|
639
|
+
})[];
|
|
640
|
+
className?: string | undefined;
|
|
355
641
|
};
|
|
356
642
|
id: string;
|
|
357
643
|
userId: string;
|
|
@@ -432,6 +718,49 @@ declare const _default: z.ZodObject<{
|
|
|
432
718
|
type: "video";
|
|
433
719
|
videoUrl: string;
|
|
434
720
|
className?: string | undefined;
|
|
721
|
+
} | {
|
|
722
|
+
type: "bloc";
|
|
723
|
+
items: ({
|
|
724
|
+
type: "text";
|
|
725
|
+
payload: {
|
|
726
|
+
text: string;
|
|
727
|
+
};
|
|
728
|
+
} | {
|
|
729
|
+
type: "markdown";
|
|
730
|
+
payload: {
|
|
731
|
+
markdown: string;
|
|
732
|
+
};
|
|
733
|
+
} | {
|
|
734
|
+
type: "image";
|
|
735
|
+
payload: {
|
|
736
|
+
imageUrl: string;
|
|
737
|
+
};
|
|
738
|
+
} | {
|
|
739
|
+
type: "audio";
|
|
740
|
+
payload: {
|
|
741
|
+
audioUrl: string;
|
|
742
|
+
};
|
|
743
|
+
} | {
|
|
744
|
+
type: "video";
|
|
745
|
+
payload: {
|
|
746
|
+
videoUrl: string;
|
|
747
|
+
};
|
|
748
|
+
} | {
|
|
749
|
+
type: "file";
|
|
750
|
+
payload: {
|
|
751
|
+
fileUrl: string;
|
|
752
|
+
title?: string | undefined;
|
|
753
|
+
};
|
|
754
|
+
} | {
|
|
755
|
+
type: "location";
|
|
756
|
+
payload: {
|
|
757
|
+
latitude: number;
|
|
758
|
+
longitude: number;
|
|
759
|
+
address?: string | undefined;
|
|
760
|
+
title?: string | undefined;
|
|
761
|
+
};
|
|
762
|
+
})[];
|
|
763
|
+
className?: string | undefined;
|
|
435
764
|
};
|
|
436
765
|
id: string;
|
|
437
766
|
userId: string;
|
|
@@ -515,6 +844,49 @@ declare const _default: z.ZodObject<{
|
|
|
515
844
|
type: "video";
|
|
516
845
|
videoUrl: string;
|
|
517
846
|
className?: string | undefined;
|
|
847
|
+
} | {
|
|
848
|
+
type: "bloc";
|
|
849
|
+
items: ({
|
|
850
|
+
type: "text";
|
|
851
|
+
payload: {
|
|
852
|
+
text: string;
|
|
853
|
+
};
|
|
854
|
+
} | {
|
|
855
|
+
type: "markdown";
|
|
856
|
+
payload: {
|
|
857
|
+
markdown: string;
|
|
858
|
+
};
|
|
859
|
+
} | {
|
|
860
|
+
type: "image";
|
|
861
|
+
payload: {
|
|
862
|
+
imageUrl: string;
|
|
863
|
+
};
|
|
864
|
+
} | {
|
|
865
|
+
type: "audio";
|
|
866
|
+
payload: {
|
|
867
|
+
audioUrl: string;
|
|
868
|
+
};
|
|
869
|
+
} | {
|
|
870
|
+
type: "video";
|
|
871
|
+
payload: {
|
|
872
|
+
videoUrl: string;
|
|
873
|
+
};
|
|
874
|
+
} | {
|
|
875
|
+
type: "file";
|
|
876
|
+
payload: {
|
|
877
|
+
fileUrl: string;
|
|
878
|
+
title?: string | undefined;
|
|
879
|
+
};
|
|
880
|
+
} | {
|
|
881
|
+
type: "location";
|
|
882
|
+
payload: {
|
|
883
|
+
latitude: number;
|
|
884
|
+
longitude: number;
|
|
885
|
+
address?: string | undefined;
|
|
886
|
+
title?: string | undefined;
|
|
887
|
+
};
|
|
888
|
+
})[];
|
|
889
|
+
className?: string | undefined;
|
|
518
890
|
};
|
|
519
891
|
id: string;
|
|
520
892
|
userId: string;
|
|
@@ -598,6 +970,49 @@ declare const _default: z.ZodObject<{
|
|
|
598
970
|
type: "video";
|
|
599
971
|
videoUrl: string;
|
|
600
972
|
className?: string | undefined;
|
|
973
|
+
} | {
|
|
974
|
+
type: "bloc";
|
|
975
|
+
items: ({
|
|
976
|
+
type: "text";
|
|
977
|
+
payload: {
|
|
978
|
+
text: string;
|
|
979
|
+
};
|
|
980
|
+
} | {
|
|
981
|
+
type: "markdown";
|
|
982
|
+
payload: {
|
|
983
|
+
markdown: string;
|
|
984
|
+
};
|
|
985
|
+
} | {
|
|
986
|
+
type: "image";
|
|
987
|
+
payload: {
|
|
988
|
+
imageUrl: string;
|
|
989
|
+
};
|
|
990
|
+
} | {
|
|
991
|
+
type: "audio";
|
|
992
|
+
payload: {
|
|
993
|
+
audioUrl: string;
|
|
994
|
+
};
|
|
995
|
+
} | {
|
|
996
|
+
type: "video";
|
|
997
|
+
payload: {
|
|
998
|
+
videoUrl: string;
|
|
999
|
+
};
|
|
1000
|
+
} | {
|
|
1001
|
+
type: "file";
|
|
1002
|
+
payload: {
|
|
1003
|
+
fileUrl: string;
|
|
1004
|
+
title?: string | undefined;
|
|
1005
|
+
};
|
|
1006
|
+
} | {
|
|
1007
|
+
type: "location";
|
|
1008
|
+
payload: {
|
|
1009
|
+
latitude: number;
|
|
1010
|
+
longitude: number;
|
|
1011
|
+
address?: string | undefined;
|
|
1012
|
+
title?: string | undefined;
|
|
1013
|
+
};
|
|
1014
|
+
})[];
|
|
1015
|
+
className?: string | undefined;
|
|
601
1016
|
};
|
|
602
1017
|
id: string;
|
|
603
1018
|
userId: string;
|
package/dist/get-client.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { WebchatClient } from './client';
|
|
2
2
|
type GetClientOptions = {
|
|
3
|
-
mode?: 'messaging' | 'pushpin';
|
|
4
3
|
clientId: string;
|
|
5
4
|
apiUrl?: string;
|
|
6
5
|
};
|
|
7
|
-
export declare const getClient: ({ clientId, apiUrl
|
|
6
|
+
export declare const getClient: ({ clientId, apiUrl }: GetClientOptions) => WebchatClient;
|
|
8
7
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
type UseClientOptions = {
|
|
2
|
-
mode?: 'messaging' | 'pushpin';
|
|
3
2
|
clientId: string;
|
|
4
3
|
apiUrl?: string;
|
|
5
4
|
};
|
|
6
|
-
export declare const useClient: ({ clientId, apiUrl
|
|
5
|
+
export declare const useClient: ({ clientId, apiUrl }: UseClientOptions) => import("..").WebchatClient;
|
|
7
6
|
export {};
|