@botpress/webchat 1.2.0 → 1.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/dist/client/MessagingClient/client.d.ts +7 -4
- package/dist/client/PushpinClient/index.d.ts +4 -2
- package/dist/client/PushpinClient/inner-client/index.d.ts +2 -0
- package/dist/client/types.d.ts +4 -1
- package/dist/components/Avatar.d.ts +2 -3
- package/dist/components/Block.d.ts +3 -2
- package/dist/components/CloseWindow.d.ts +5 -0
- package/dist/components/Composer.d.ts +1 -1
- package/dist/components/renderers/Audio.d.ts +1 -1
- package/dist/components/renderers/Carousel.d.ts +1 -1
- package/dist/components/renderers/File.d.ts +1 -1
- package/dist/components/renderers/Image.d.ts +1 -1
- package/dist/components/renderers/Location.d.ts +1 -1
- package/dist/components/renderers/Video.d.ts +1 -1
- package/dist/contexts/WebchatContext.d.ts +3 -3
- package/dist/gen/client/api.d.ts +330 -12
- package/dist/gen/client/client.d.ts +5 -1
- package/dist/gen/client/errors.d.ts +9 -2
- package/dist/gen/models/index.d.ts +186 -23
- package/dist/gen/models/message.j.d.ts +107 -5
- package/dist/gen/models/message.t.d.ts +49 -0
- package/dist/gen/models/message.z.d.ts +79 -12
- package/dist/gen/models/user.j.d.ts +0 -3
- package/dist/gen/models/user.t.d.ts +0 -1
- package/dist/gen/models/user.z.d.ts +0 -3
- package/dist/gen/signals/index.d.ts +218 -23
- package/dist/gen/signals/messageCreatedSignal.j.d.ts +107 -5
- package/dist/gen/signals/messageCreatedSignal.t.d.ts +49 -0
- package/dist/gen/signals/messageCreatedSignal.z.d.ts +111 -18
- package/dist/get-client.d.ts +8 -0
- package/dist/hooks/useClient.d.ts +2 -2
- package/dist/hooks/useWebchatStore.d.ts +3 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.js +33089 -40901
- package/dist/index.umd.cjs +96 -125
- package/dist/providers/WebchatProvider.d.ts +4 -3
- package/dist/schemas/configuration.d.ts +117 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/init.d.ts +3844 -0
- package/dist/schemas/theme.d.ts +231 -232
- package/dist/types/block-type.d.ts +3 -6
- package/dist/types/configuration.d.ts +4 -16
- package/dist/types/index.d.ts +2 -0
- package/dist/types/init.d.ts +6 -0
- package/dist/types/theme.d.ts +7 -0
- package/dist/utils/index.d.ts +0 -2
- package/package.json +11 -37
- package/dist/App.d.ts +0 -11
- package/dist/components/dev-tools/DevTools.d.ts +0 -1
- package/dist/components/dev-tools/configuration.d.ts +0 -2
- package/dist/components/dev-tools/helpers.d.ts +0 -5
- package/dist/main.d.ts +0 -0
- package/dist/options.d.ts +0 -11
- package/dist/themes/base.d.ts +0 -3
- package/dist/themes/baseColors.d.ts +0 -736
- package/dist/themes/dawn.d.ts +0 -4
- package/dist/themes/eggplant.d.ts +0 -4
- package/dist/themes/index.d.ts +0 -3
- package/dist/themes/prism.d.ts +0 -4
- package/dist/themes/themeBuilder.d.ts +0 -27
- package/dist/twind.config.d.ts +0 -9
- package/dist/twind.d.ts +0 -16
- package/dist/utils/mergeThemes.d.ts +0 -2
- package/dist/utils/withBaseTheme.d.ts +0 -384
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { type WebchatClient } from '../client';
|
|
3
3
|
import { ContextVaue, Renderers, WebchatContext } from '../contexts';
|
|
4
|
-
import { Theme } from '../
|
|
5
|
-
import { Configuration } from '../types';
|
|
4
|
+
import { Theme, Configuration } from '../types';
|
|
6
5
|
type Props = {
|
|
7
6
|
theme?: Theme;
|
|
8
7
|
renderers?: Renderers;
|
|
@@ -10,6 +9,8 @@ type Props = {
|
|
|
10
9
|
configuration?: Configuration;
|
|
11
10
|
defaultState?: Partial<ContextVaue['state']>;
|
|
12
11
|
children?: ReactNode | ((configuration: Configuration) => ReactNode);
|
|
12
|
+
userData?: Record<string, string>;
|
|
13
|
+
closeWindow?: () => void;
|
|
13
14
|
} & Omit<ComponentProps<typeof WebchatContext.Provider>, 'value' | 'children'>;
|
|
14
|
-
export declare const WebchatProvider: ({ theme: initialTheme, renderers, client, children, configuration, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const WebchatProvider: ({ theme: initialTheme, renderers, client, children, configuration, userData, closeWindow, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const descriptionItemSchema: z.ZodObject<{
|
|
3
|
+
title: z.ZodString;
|
|
4
|
+
link: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
title: string;
|
|
7
|
+
link?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
title: string;
|
|
10
|
+
link?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const configurationSchema: z.ZodObject<{
|
|
13
|
+
composerPlaceholder: z.ZodOptional<z.ZodString>;
|
|
14
|
+
botName: z.ZodOptional<z.ZodString>;
|
|
15
|
+
botAvatar: z.ZodOptional<z.ZodString>;
|
|
16
|
+
botDescription: z.ZodOptional<z.ZodString>;
|
|
17
|
+
website: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
title: z.ZodString;
|
|
19
|
+
link: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
title: string;
|
|
22
|
+
link?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
title: string;
|
|
25
|
+
link?: string | undefined;
|
|
26
|
+
}>>;
|
|
27
|
+
email: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
title: z.ZodString;
|
|
29
|
+
link: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
title: string;
|
|
32
|
+
link?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
title: string;
|
|
35
|
+
link?: string | undefined;
|
|
36
|
+
}>>;
|
|
37
|
+
phone: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
title: z.ZodString;
|
|
39
|
+
link: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
title: string;
|
|
42
|
+
link?: string | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
title: string;
|
|
45
|
+
link?: string | undefined;
|
|
46
|
+
}>>;
|
|
47
|
+
privacyPolicy: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
title: z.ZodString;
|
|
49
|
+
link: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
title: string;
|
|
52
|
+
link?: string | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
title: string;
|
|
55
|
+
link?: string | undefined;
|
|
56
|
+
}>>;
|
|
57
|
+
termsOfService: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
title: z.ZodString;
|
|
59
|
+
link: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
title: string;
|
|
62
|
+
link?: string | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
title: string;
|
|
65
|
+
link?: string | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
composerPlaceholder?: string | undefined;
|
|
69
|
+
botName?: string | undefined;
|
|
70
|
+
botAvatar?: string | undefined;
|
|
71
|
+
botDescription?: string | undefined;
|
|
72
|
+
website?: {
|
|
73
|
+
title: string;
|
|
74
|
+
link?: string | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
email?: {
|
|
77
|
+
title: string;
|
|
78
|
+
link?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
phone?: {
|
|
81
|
+
title: string;
|
|
82
|
+
link?: string | undefined;
|
|
83
|
+
} | undefined;
|
|
84
|
+
privacyPolicy?: {
|
|
85
|
+
title: string;
|
|
86
|
+
link?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
termsOfService?: {
|
|
89
|
+
title: string;
|
|
90
|
+
link?: string | undefined;
|
|
91
|
+
} | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
composerPlaceholder?: string | undefined;
|
|
94
|
+
botName?: string | undefined;
|
|
95
|
+
botAvatar?: string | undefined;
|
|
96
|
+
botDescription?: string | undefined;
|
|
97
|
+
website?: {
|
|
98
|
+
title: string;
|
|
99
|
+
link?: string | undefined;
|
|
100
|
+
} | undefined;
|
|
101
|
+
email?: {
|
|
102
|
+
title: string;
|
|
103
|
+
link?: string | undefined;
|
|
104
|
+
} | undefined;
|
|
105
|
+
phone?: {
|
|
106
|
+
title: string;
|
|
107
|
+
link?: string | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
privacyPolicy?: {
|
|
110
|
+
title: string;
|
|
111
|
+
link?: string | undefined;
|
|
112
|
+
} | undefined;
|
|
113
|
+
termsOfService?: {
|
|
114
|
+
title: string;
|
|
115
|
+
link?: string | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
}>;
|
package/dist/schemas/index.d.ts
CHANGED