@botpress/webchat 2.3.1 → 2.3.2

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 (37) hide show
  1. package/.eslintrc.js +11 -0
  2. package/.turbo/turbo-build.log +16 -15
  3. package/dist/adapters/index.d.ts +1 -6
  4. package/dist/adapters/target.d.ts +1 -6
  5. package/dist/adapters/typings.d.ts +1 -6
  6. package/dist/adapters/webchat-to-target.d.ts +8 -0
  7. package/dist/adapters/webchat.d.ts +3 -1986
  8. package/dist/client/state-machine.d.ts +1 -1
  9. package/dist/client/types.d.ts +1 -0
  10. package/dist/components/MessageList/MessageList.d.ts +1 -1
  11. package/dist/components/renderers/Audio/Audio.d.ts +1 -0
  12. package/dist/components/renderers/Carousel/Carousel.d.ts +1 -0
  13. package/dist/components/renderers/File/File.d.ts +1 -0
  14. package/dist/components/renderers/Image/Image.d.ts +1 -0
  15. package/dist/components/renderers/Location/Location.d.ts +1 -0
  16. package/dist/components/renderers/Video/Video.d.ts +1 -0
  17. package/dist/gen/signals/index.d.ts +34 -34
  18. package/dist/gen/signals/messageCreated.z.d.ts +34 -34
  19. package/dist/index.js +67478 -25250
  20. package/dist/index.umd.cjs +172 -127
  21. package/dist/schemas/init.d.ts +14 -14
  22. package/dist/schemas/theme.d.ts +8 -8
  23. package/dist/stores/offlineStore.d.ts +1 -1
  24. package/dist/stores/webchatStore.d.ts +2 -2
  25. package/dist/types/block-type.d.ts +2 -0
  26. package/package.json +21 -22
  27. package/dist/adapters/adapters/messaging-to-target.d.ts +0 -184
  28. package/dist/adapters/adapters/messaging-to-webchat.d.ts +0 -5
  29. package/dist/adapters/adapters/webchat-to-messaging.d.ts +0 -223
  30. package/dist/adapters/adapters/webchat-to-target.d.ts +0 -197
  31. package/dist/adapters/messaging.d.ts +0 -1455
  32. package/dist/adapters/sdk.d.ts +0 -472
  33. package/dist/client/inner-client/event-emitter.d.ts +0 -10
  34. package/dist/client/inner-client/eventsource.d.ts +0 -22
  35. package/dist/client/inner-client/index.d.ts +0 -42
  36. package/dist/client/inner-client/signal-listener.d.ts +0 -47
  37. package/openapi.ts +0 -35
package/.eslintrc.js ADDED
@@ -0,0 +1,11 @@
1
+ /** @type {import("eslint").Linter.Config} */
2
+ module.exports = {
3
+ root: true,
4
+ extends: ["@repo/eslint-config/react-internal.js"],
5
+ parser: "@typescript-eslint/parser",
6
+ ignorePatterns: ["dist", "node_modules", "storybook-static", ".turbo", "turbo/*"],
7
+ parserOptions: {
8
+ project: "./tsconfig.json",
9
+ tsconfigRootDir: __dirname,
10
+ },
11
+ };
@@ -1,24 +1,25 @@
1
1
 
2
- > @botpress/webchat@2.3.1 build /home/runner/work/echo/echo/packages/webchat-frontend
2
+ > @botpress/webchat@2.3.2 build /home/runner/work/genisys/genisys/packages/webchat-components
3
3
  > vite build
4
4
 
5
- vite v4.4.11 building for production...
5
+ vite v5.4.8 building for production...
6
6
  transforming...
7
- [vite:css] /home/runner/work/echo/echo/packages/webchat-frontend/src/components/renderers/Audio/styles.css is empty
7
+ [vite:css] /home/runner/work/genisys/genisys/packages/webchat-components/src/components/renderers/Audio/styles.css is empty
8
8
  1 | @import './resets.css';
9
- | ^
9
+ | ^^^^^^^^^^^^^^^^^^^^^^^
10
10
  2 | @import './theme.css';
11
+ | ^^^^^^
11
12
  3 | @import '../components/index.css'
12
- [plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/packages/webchat-frontend/src/gen/client/errors.ts". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
13
- ✓ 3125 modules transformed.
13
+ ../../node_modules/.pnpm/@bpinternal+webchat-http-client@0.2.0/node_modules/@bpinternal/webchat-http-client/dist/index.mjs (36076:9): Use of eval in "../../node_modules/.pnpm/@bpinternal+webchat-http-client@0.2.0/node_modules/@bpinternal/webchat-http-client/dist/index.mjs" is strongly discouraged as it poses security risks and may cause issues with minification.
14
+ ✓ 3137 modules transformed.
14
15
  rendering chunks...
15
- 
16
- [vite:dts] Start generate declaration files...
16
+
17
+ [vite:dts] Start generate declaration files...
17
18
  computing gzip size...
18
- dist/style.css  31.15 kB │ gzip: 5.80 kB
19
- dist/index.js 965.47 kB │ gzip: 256.17 kB
20
- [vite:dts] Declaration files built in 15479ms.
21
- 
22
- dist/style.css  31.15 kB │ gzip: 5.80 kB
23
- dist/index.umd.cjs 661.15 kB │ gzip: 214.42 kB
24
- ✓ built in 24.49s
19
+ [vite:dts] Declaration files built in 10392ms.
20
+
21
+ dist/style.css  31.15 kB │ gzip: 5.80 kB
22
+ dist/index.js 3,559.83 kB │ gzip: 818.09 kB
23
+ dist/style.css  31.15 kB │ gzip: 5.80 kB
24
+ dist/index.umd.cjs 2,716.16 kB │ gzip: 734.79 kB
25
+ ✓ built in 23.94s
@@ -1,7 +1,2 @@
1
- export * as webchat from './webchat';
2
- export * as messaging from './messaging';
3
1
  export * as target from './target';
4
- export * as messagingToTarget from './adapters/messaging-to-target';
5
- export * as messagingToWebChat from './adapters/messaging-to-webchat';
6
- export * as webchatToMessaging from './adapters/webchat-to-messaging';
7
- export * as webchatToTarget from './adapters/webchat-to-target';
2
+ export * as webchatToTarget from './webchat-to-target';
@@ -74,9 +74,4 @@ export type ColumnOf<T extends Message> = Omit<ColumnMessage, 'blocks'> & {
74
74
  export type RowOf<T extends Message> = Omit<RowMessage, 'blocks'> & {
75
75
  blocks: T[];
76
76
  };
77
- export type Messages = types.MessagesOf<Message>;
78
- export type AdapterOutput = {
79
- payload: Message;
80
- disableInput?: boolean;
81
- };
82
- export type AdaptersOutput = Record<keyof Messages, AdapterOutput>;
77
+ export type Messages = types.ByType<Message>;
@@ -1,12 +1,7 @@
1
- type ValueOf<T> = T[keyof T];
2
- export type MessagesOf<M extends {
1
+ export type ByType<M extends {
3
2
  type: string;
4
3
  }> = {
5
4
  [Type in M['type']]: Extract<M, {
6
5
  type: Type;
7
6
  }>;
8
7
  };
9
- export type Adapter<A extends Record<string, object>, B extends Record<string, object>> = {
10
- [Type in keyof A]: (message: A[Type]) => ValueOf<B>;
11
- };
12
- export {};
@@ -0,0 +1,8 @@
1
+ import * as target from './target';
2
+ import * as webchat from './webchat';
3
+ type AdapterOutput = {
4
+ payload: target.Message;
5
+ disableInput?: boolean;
6
+ };
7
+ export declare const messageAdapter: (message: webchat.Message) => AdapterOutput;
8
+ export {};