@botpress/webchat 1.1.1 → 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.
Files changed (99) hide show
  1. package/dist/client/MessagingClient/client.d.ts +8 -19
  2. package/dist/client/{ChatClient → PushpinClient}/index.d.ts +7 -5
  3. package/dist/client/PushpinClient/inner-client/event-emitter.d.ts +10 -0
  4. package/dist/client/PushpinClient/inner-client/eventsource.d.ts +22 -0
  5. package/dist/client/PushpinClient/inner-client/index.d.ts +41 -0
  6. package/dist/client/PushpinClient/inner-client/signal-listener.d.ts +47 -0
  7. package/dist/client/{ChatClient → PushpinClient}/state-machine.d.ts +13 -13
  8. package/dist/client/index.d.ts +1 -1
  9. package/dist/client/types.d.ts +8 -2
  10. package/dist/components/Avatar.d.ts +2 -3
  11. package/dist/components/Block.d.ts +3 -2
  12. package/dist/components/CloseWindow.d.ts +5 -0
  13. package/dist/components/Composer.d.ts +2 -2
  14. package/dist/components/Header.d.ts +1 -1
  15. package/dist/components/LoadingIndicator.d.ts +1 -1
  16. package/dist/components/MessageList.d.ts +1 -1
  17. package/dist/components/Modal.d.ts +2 -2
  18. package/dist/components/RestartConversation.d.ts +1 -1
  19. package/dist/components/Webchat.d.ts +1 -1
  20. package/dist/components/renderers/Audio.d.ts +1 -1
  21. package/dist/components/renderers/Button.d.ts +1 -1
  22. package/dist/components/renderers/Carousel.d.ts +1 -1
  23. package/dist/components/renderers/Dropdown.d.ts +1 -1
  24. package/dist/components/renderers/File.d.ts +1 -1
  25. package/dist/components/renderers/Image.d.ts +1 -1
  26. package/dist/components/renderers/Location.d.ts +1 -1
  27. package/dist/components/renderers/Text.d.ts +1 -1
  28. package/dist/components/renderers/Video.d.ts +1 -1
  29. package/dist/contexts/WebchatContext.d.ts +6 -6
  30. package/dist/gen/client/api.d.ts +2012 -0
  31. package/dist/gen/client/base.d.ts +54 -0
  32. package/dist/gen/client/client.d.ts +61 -0
  33. package/dist/gen/client/common.d.ts +65 -0
  34. package/dist/gen/client/configuration.d.ts +83 -0
  35. package/dist/gen/client/errors.d.ts +204 -0
  36. package/dist/gen/client/index.d.ts +13 -0
  37. package/dist/gen/models/conversation.j.d.ts +20 -0
  38. package/dist/gen/models/conversation.t.d.ts +10 -0
  39. package/dist/gen/models/conversation.z.d.ts +15 -0
  40. package/dist/gen/models/index.d.ts +1014 -0
  41. package/dist/gen/models/message.j.d.ts +490 -0
  42. package/dist/gen/models/message.t.d.ts +122 -0
  43. package/dist/gen/models/message.z.d.ts +439 -0
  44. package/dist/gen/models/user.j.d.ts +26 -0
  45. package/dist/gen/models/user.t.d.ts +12 -0
  46. package/dist/gen/models/user.z.d.ts +21 -0
  47. package/dist/gen/signals/customSignal.j.d.ts +24 -0
  48. package/dist/gen/signals/customSignal.t.d.ts +13 -0
  49. package/dist/gen/signals/customSignal.z.d.ts +22 -0
  50. package/dist/gen/signals/index.d.ts +1249 -0
  51. package/dist/gen/signals/messageCreatedSignal.j.d.ts +501 -0
  52. package/dist/gen/signals/messageCreatedSignal.t.d.ts +125 -0
  53. package/dist/gen/signals/messageCreatedSignal.z.d.ts +608 -0
  54. package/dist/gen/signals/webchatConfigSignal.j.d.ts +24 -0
  55. package/dist/gen/signals/webchatConfigSignal.t.d.ts +13 -0
  56. package/dist/gen/signals/webchatConfigSignal.z.d.ts +22 -0
  57. package/dist/gen/signals/webchatVisibilitySignal.j.d.ts +24 -0
  58. package/dist/gen/signals/webchatVisibilitySignal.t.d.ts +11 -0
  59. package/dist/gen/signals/webchatVisibilitySignal.z.d.ts +22 -0
  60. package/dist/get-client.d.ts +8 -0
  61. package/dist/hooks/useClient.d.ts +3 -3
  62. package/dist/hooks/useWebchatStore.d.ts +3 -0
  63. package/dist/index.d.ts +3 -4
  64. package/dist/index.js +31976 -85703
  65. package/dist/index.umd.cjs +117 -187
  66. package/dist/providers/ModalProvider.d.ts +1 -1
  67. package/dist/providers/WebchatProvider.d.ts +6 -5
  68. package/dist/schemas/configuration.d.ts +117 -0
  69. package/dist/schemas/index.d.ts +2 -0
  70. package/dist/schemas/init.d.ts +3844 -0
  71. package/dist/schemas/theme.d.ts +231 -232
  72. package/dist/types/block-type.d.ts +3 -6
  73. package/dist/types/configuration.d.ts +4 -16
  74. package/dist/types/index.d.ts +2 -0
  75. package/dist/types/init.d.ts +6 -0
  76. package/dist/types/theme.d.ts +7 -0
  77. package/dist/utils/index.d.ts +0 -2
  78. package/openapi/index.ts +31 -0
  79. package/openapi/package.json +5 -0
  80. package/openapi/readme.md +1 -0
  81. package/package.json +18 -38
  82. package/dist/App.d.ts +0 -11
  83. package/dist/client/MessagingClient/adapters/Trigger.d.ts +0 -33
  84. package/dist/components/dev-tools/DevTools.d.ts +0 -1
  85. package/dist/components/dev-tools/configuration.d.ts +0 -2
  86. package/dist/components/dev-tools/helpers.d.ts +0 -5
  87. package/dist/main.d.ts +0 -0
  88. package/dist/options.d.ts +0 -11
  89. package/dist/themes/base.d.ts +0 -3
  90. package/dist/themes/baseColors.d.ts +0 -736
  91. package/dist/themes/dawn.d.ts +0 -4
  92. package/dist/themes/eggplant.d.ts +0 -4
  93. package/dist/themes/index.d.ts +0 -3
  94. package/dist/themes/prism.d.ts +0 -4
  95. package/dist/themes/themeBuilder.d.ts +0 -27
  96. package/dist/twind.config.d.ts +0 -9
  97. package/dist/twind.d.ts +0 -16
  98. package/dist/utils/mergeThemes.d.ts +0 -2
  99. package/dist/utils/withBaseTheme.d.ts +0 -384
@@ -4,5 +4,5 @@ export type ModalProps = {
4
4
  content: ReactNode | null;
5
5
  };
6
6
  type Props = PropsWithChildren;
7
- export declare const ModalProvider: ({ children }: Props) => JSX.Element;
7
+ export declare const ModalProvider: ({ children }: Props) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -1,15 +1,16 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
- import { type WebChatClient } from '../client';
2
+ import { type WebchatClient } from '../client';
3
3
  import { ContextVaue, Renderers, WebchatContext } from '../contexts';
4
- import { Theme } from '../schemas';
5
- import { Configuration } from '../types';
4
+ import { Theme, Configuration } from '../types';
6
5
  type Props = {
7
6
  theme?: Theme;
8
7
  renderers?: Renderers;
9
- client?: WebChatClient;
8
+ client?: WebchatClient;
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) => 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
+ }>;
@@ -1 +1,3 @@
1
+ export * from './configuration';
1
2
  export * from './theme';
3
+ export * from './init';