@botpress/webchat 2.1.3 → 2.1.5
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 +9 -9
- package/dist/adapters/messaging-to-target.d.ts +12 -12
- package/dist/adapters/webchat-to-target.d.ts +6 -6
- package/dist/components/Block.d.ts +1 -1
- package/dist/gen/client/models.d.ts +19 -3
- package/dist/gen/client/operations/createEvent.d.ts +6 -6
- package/dist/gen/client/operations/createMessage.d.ts +32 -0
- package/dist/gen/client/operations/getEvent.d.ts +3 -3
- package/dist/gen/client/operations/getMessage.d.ts +16 -0
- package/dist/gen/client/operations/listConversationMessages.d.ts +16 -0
- package/dist/gen/signals/custom.j.d.ts +3 -24
- package/dist/gen/signals/custom.t.d.ts +0 -5
- package/dist/gen/signals/custom.z.d.ts +1 -1
- package/dist/gen/signals/index.d.ts +27 -592
- package/dist/gen/signals/messageCreated.j.d.ts +3 -501
- package/dist/gen/signals/messageCreated.t.d.ts +34 -5
- package/dist/gen/signals/messageCreated.z.d.ts +18 -18
- package/dist/gen/signals/webchatConfig.j.d.ts +3 -24
- package/dist/gen/signals/webchatConfig.t.d.ts +0 -5
- package/dist/gen/signals/webchatConfig.z.d.ts +1 -1
- package/dist/gen/signals/webchatVisibility.j.d.ts +3 -24
- package/dist/gen/signals/webchatVisibility.t.d.ts +0 -5
- package/dist/gen/signals/webchatVisibility.z.d.ts +1 -1
- package/dist/{index-d2d96fc2.js → index-ba8c56be.js} +31978 -31717
- package/dist/{index-2c165908.js → index-e890d9a1.js} +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +19 -18
- package/dist/index.umd.cjs +182 -182
- package/dist/schemas/init.d.ts +14 -14
- package/dist/schemas/theme.d.ts +8 -8
- package/dist/stores/webchatStore.d.ts +5 -0
- package/dist/types/block-type.d.ts +1 -1
- package/package.json +1 -1
package/dist/schemas/init.d.ts
CHANGED
|
@@ -2358,7 +2358,7 @@ export declare const configPropsSchema: z.ZodObject<{
|
|
|
2358
2358
|
} | undefined;
|
|
2359
2359
|
}>>;
|
|
2360
2360
|
}, "strip", z.ZodTypeAny, {
|
|
2361
|
-
text: Partial<Record<"
|
|
2361
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
2362
2362
|
className?: string | undefined;
|
|
2363
2363
|
style?: import("react").CSSProperties | undefined;
|
|
2364
2364
|
} | undefined>>;
|
|
@@ -2469,7 +2469,7 @@ export declare const configPropsSchema: z.ZodObject<{
|
|
|
2469
2469
|
} | undefined;
|
|
2470
2470
|
} | undefined;
|
|
2471
2471
|
}, {
|
|
2472
|
-
text: Partial<Record<"
|
|
2472
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
2473
2473
|
className?: string | undefined;
|
|
2474
2474
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
2475
2475
|
} | undefined>>;
|
|
@@ -2600,7 +2600,7 @@ export declare const configPropsSchema: z.ZodObject<{
|
|
|
2600
2600
|
} | undefined;
|
|
2601
2601
|
} | undefined;
|
|
2602
2602
|
blocks?: {
|
|
2603
|
-
text: Partial<Record<"
|
|
2603
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
2604
2604
|
className?: string | undefined;
|
|
2605
2605
|
style?: import("react").CSSProperties | undefined;
|
|
2606
2606
|
} | undefined>>;
|
|
@@ -2731,7 +2731,7 @@ export declare const configPropsSchema: z.ZodObject<{
|
|
|
2731
2731
|
} | undefined;
|
|
2732
2732
|
} | undefined;
|
|
2733
2733
|
blocks?: {
|
|
2734
|
-
text: Partial<Record<"
|
|
2734
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
2735
2735
|
className?: string | undefined;
|
|
2736
2736
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
2737
2737
|
} | undefined>>;
|
|
@@ -3182,7 +3182,7 @@ export declare const configPropsSchema: z.ZodObject<{
|
|
|
3182
3182
|
} | undefined;
|
|
3183
3183
|
} | undefined;
|
|
3184
3184
|
blocks?: {
|
|
3185
|
-
text: Partial<Record<"
|
|
3185
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
3186
3186
|
className?: string | undefined;
|
|
3187
3187
|
style?: import("react").CSSProperties | undefined;
|
|
3188
3188
|
} | undefined>>;
|
|
@@ -3603,7 +3603,7 @@ export declare const configPropsSchema: z.ZodObject<{
|
|
|
3603
3603
|
} | undefined;
|
|
3604
3604
|
} | undefined;
|
|
3605
3605
|
blocks?: {
|
|
3606
|
-
text: Partial<Record<"
|
|
3606
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
3607
3607
|
className?: string | undefined;
|
|
3608
3608
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3609
3609
|
} | undefined>>;
|
|
@@ -4060,7 +4060,7 @@ export declare const configPropsSchema: z.ZodObject<{
|
|
|
4060
4060
|
} | undefined;
|
|
4061
4061
|
} | undefined;
|
|
4062
4062
|
blocks?: {
|
|
4063
|
-
text: Partial<Record<"
|
|
4063
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
4064
4064
|
className?: string | undefined;
|
|
4065
4065
|
style?: import("react").CSSProperties | undefined;
|
|
4066
4066
|
} | undefined>>;
|
|
@@ -6543,7 +6543,7 @@ export declare const initPropsSchema: z.ZodObject<{
|
|
|
6543
6543
|
} | undefined;
|
|
6544
6544
|
}>>;
|
|
6545
6545
|
}, "strip", z.ZodTypeAny, {
|
|
6546
|
-
text: Partial<Record<"
|
|
6546
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
6547
6547
|
className?: string | undefined;
|
|
6548
6548
|
style?: import("react").CSSProperties | undefined;
|
|
6549
6549
|
} | undefined>>;
|
|
@@ -6654,7 +6654,7 @@ export declare const initPropsSchema: z.ZodObject<{
|
|
|
6654
6654
|
} | undefined;
|
|
6655
6655
|
} | undefined;
|
|
6656
6656
|
}, {
|
|
6657
|
-
text: Partial<Record<"
|
|
6657
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
6658
6658
|
className?: string | undefined;
|
|
6659
6659
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
6660
6660
|
} | undefined>>;
|
|
@@ -6785,7 +6785,7 @@ export declare const initPropsSchema: z.ZodObject<{
|
|
|
6785
6785
|
} | undefined;
|
|
6786
6786
|
} | undefined;
|
|
6787
6787
|
blocks?: {
|
|
6788
|
-
text: Partial<Record<"
|
|
6788
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
6789
6789
|
className?: string | undefined;
|
|
6790
6790
|
style?: import("react").CSSProperties | undefined;
|
|
6791
6791
|
} | undefined>>;
|
|
@@ -6916,7 +6916,7 @@ export declare const initPropsSchema: z.ZodObject<{
|
|
|
6916
6916
|
} | undefined;
|
|
6917
6917
|
} | undefined;
|
|
6918
6918
|
blocks?: {
|
|
6919
|
-
text: Partial<Record<"
|
|
6919
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
6920
6920
|
className?: string | undefined;
|
|
6921
6921
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
6922
6922
|
} | undefined>>;
|
|
@@ -7367,7 +7367,7 @@ export declare const initPropsSchema: z.ZodObject<{
|
|
|
7367
7367
|
} | undefined;
|
|
7368
7368
|
} | undefined;
|
|
7369
7369
|
blocks?: {
|
|
7370
|
-
text: Partial<Record<"
|
|
7370
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
7371
7371
|
className?: string | undefined;
|
|
7372
7372
|
style?: import("react").CSSProperties | undefined;
|
|
7373
7373
|
} | undefined>>;
|
|
@@ -7788,7 +7788,7 @@ export declare const initPropsSchema: z.ZodObject<{
|
|
|
7788
7788
|
} | undefined;
|
|
7789
7789
|
} | undefined;
|
|
7790
7790
|
blocks?: {
|
|
7791
|
-
text: Partial<Record<"
|
|
7791
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
7792
7792
|
className?: string | undefined;
|
|
7793
7793
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
7794
7794
|
} | undefined>>;
|
|
@@ -8256,7 +8256,7 @@ export declare const initPropsSchema: z.ZodObject<{
|
|
|
8256
8256
|
} | undefined;
|
|
8257
8257
|
} | undefined;
|
|
8258
8258
|
blocks?: {
|
|
8259
|
-
text: Partial<Record<"
|
|
8259
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
8260
8260
|
className?: string | undefined;
|
|
8261
8261
|
style?: import("react").CSSProperties | undefined;
|
|
8262
8262
|
} | undefined>>;
|
package/dist/schemas/theme.d.ts
CHANGED
|
@@ -524,7 +524,7 @@ export declare const blockThemeSchema: z.ZodObject<{
|
|
|
524
524
|
} | undefined;
|
|
525
525
|
}>>;
|
|
526
526
|
}, "strip", z.ZodTypeAny, {
|
|
527
|
-
text: Partial<Record<"
|
|
527
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
528
528
|
className?: string | undefined;
|
|
529
529
|
style?: CSSProperties | undefined;
|
|
530
530
|
} | undefined>>;
|
|
@@ -635,7 +635,7 @@ export declare const blockThemeSchema: z.ZodObject<{
|
|
|
635
635
|
} | undefined;
|
|
636
636
|
} | undefined;
|
|
637
637
|
}, {
|
|
638
|
-
text: Partial<Record<"
|
|
638
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
639
639
|
className?: string | undefined;
|
|
640
640
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
641
641
|
} | undefined>>;
|
|
@@ -2988,7 +2988,7 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
2988
2988
|
} | undefined;
|
|
2989
2989
|
}>>;
|
|
2990
2990
|
}, "strip", z.ZodTypeAny, {
|
|
2991
|
-
text: Partial<Record<"
|
|
2991
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
2992
2992
|
className?: string | undefined;
|
|
2993
2993
|
style?: CSSProperties | undefined;
|
|
2994
2994
|
} | undefined>>;
|
|
@@ -3099,7 +3099,7 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3099
3099
|
} | undefined;
|
|
3100
3100
|
} | undefined;
|
|
3101
3101
|
}, {
|
|
3102
|
-
text: Partial<Record<"
|
|
3102
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
3103
3103
|
className?: string | undefined;
|
|
3104
3104
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3105
3105
|
} | undefined>>;
|
|
@@ -3230,7 +3230,7 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3230
3230
|
} | undefined;
|
|
3231
3231
|
} | undefined;
|
|
3232
3232
|
blocks?: {
|
|
3233
|
-
text: Partial<Record<"
|
|
3233
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
3234
3234
|
className?: string | undefined;
|
|
3235
3235
|
style?: CSSProperties | undefined;
|
|
3236
3236
|
} | undefined>>;
|
|
@@ -3361,7 +3361,7 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3361
3361
|
} | undefined;
|
|
3362
3362
|
} | undefined;
|
|
3363
3363
|
blocks?: {
|
|
3364
|
-
text: Partial<Record<"
|
|
3364
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
3365
3365
|
className?: string | undefined;
|
|
3366
3366
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3367
3367
|
} | undefined>>;
|
|
@@ -3812,7 +3812,7 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3812
3812
|
} | undefined;
|
|
3813
3813
|
} | undefined;
|
|
3814
3814
|
blocks?: {
|
|
3815
|
-
text: Partial<Record<"
|
|
3815
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
3816
3816
|
className?: string | undefined;
|
|
3817
3817
|
style?: CSSProperties | undefined;
|
|
3818
3818
|
} | undefined>>;
|
|
@@ -4233,7 +4233,7 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
4233
4233
|
} | undefined;
|
|
4234
4234
|
} | undefined;
|
|
4235
4235
|
blocks?: {
|
|
4236
|
-
text: Partial<Record<"
|
|
4236
|
+
text: Partial<Record<"text" | "link" | "heading1" | "heading2" | "heading3" | "horizontalRule" | "italic" | "bold" | "orderedList" | "unorderedList" | "listItem" | "lineBreak" | "pre", {
|
|
4237
4237
|
className?: string | undefined;
|
|
4238
4238
|
style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
4239
4239
|
} | undefined>>;
|
|
@@ -17,6 +17,11 @@ export type WebchatProps = {
|
|
|
17
17
|
userData: Record<string, unknown>;
|
|
18
18
|
messageContainerRef: RefObject<HTMLDivElement>;
|
|
19
19
|
closeWindow?: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* The conversation ID to use when loading the chat.
|
|
22
|
+
* If not found, a new conversation will be started.
|
|
23
|
+
*/
|
|
24
|
+
conversationId?: string;
|
|
20
25
|
};
|
|
21
26
|
export type WebchatState = WebchatProps & {
|
|
22
27
|
setState: (newState: Partial<WebchatState>) => void;
|
|
@@ -36,4 +36,4 @@ export type BlockObjects = {
|
|
|
36
36
|
};
|
|
37
37
|
export declare const fileTypes: readonly ["audio", "file", "image", "video"];
|
|
38
38
|
export type FileType = (typeof fileTypes)[number];
|
|
39
|
-
export declare const isFileType: (type: string) => type is "
|
|
39
|
+
export declare const isFileType: (type: string) => type is "audio" | "file" | "image" | "video";
|