@botfabrik/engine-webclient 4.89.0 → 4.90.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.
@@ -13,7 +13,7 @@
13
13
  <meta name="theme-color" content="#000000" />
14
14
  <meta name="google" content="notranslate" />
15
15
  <title>Bubble Chat Client</title>
16
- <script type="module" crossorigin src="./assets/index-Dudp437V.js"></script>
16
+ <script type="module" crossorigin src="./assets/index-Dsewv1TL.js"></script>
17
17
  <link rel="stylesheet" crossorigin href="./assets/index-D5Y4qYek.css">
18
18
  </head>
19
19
 
package/dist/index.js CHANGED
@@ -84,7 +84,7 @@ exports.default = (clientName, environment, props) => async (bot) => {
84
84
  logger.error('Error while connecting webclient with backend.');
85
85
  logger.error(error);
86
86
  const errorMessage = new engine_domain_1.TextMessage('Sorry I can’t talk at the moment. Please try again later.', new engine_domain_1.BotUser());
87
- socket.emit('action', (0, engine_domain_1.sendMessageToGuest)(errorMessage));
87
+ socket.emit('action', engine_domain_1.Actions.sendMessageToGuest(errorMessage));
88
88
  }
89
89
  });
90
90
  const client = {
@@ -114,7 +114,7 @@ const onTerminateSession = (socket, bot) => async ({ sessionId, // passed if the
114
114
  }) => {
115
115
  const session = await bot.createSession(sessionId);
116
116
  socket.leave(sessionId);
117
- await session.dispatch((0, engine_domain_1.guestDisconnected)(sessionId));
117
+ await session.dispatch(engine_domain_1.Actions.guestDisconnected(sessionId));
118
118
  };
119
119
  const onStartChat = (socket, props, bot, clientName, environment, logger) => async ({ sessionId: sessionIdFromClient, userId: defaultUserId, querystrings, }) => {
120
120
  const locale = (0, extractLocale_1.default)(querystrings, socket.request.headers['accept-language']);
@@ -138,7 +138,7 @@ const onStartChat = (socket, props, bot, clientName, environment, logger) => asy
138
138
  });
139
139
  }
140
140
  // Notify middlewares about a connected or reconnected guest
141
- await session.dispatch((0, engine_domain_1.guestConnected)(sessionId));
141
+ await session.dispatch(engine_domain_1.Actions.guestConnected(sessionId));
142
142
  if (isNew && props.getStartedAction) {
143
143
  await session.dispatch(props.getStartedAction);
144
144
  }
@@ -146,7 +146,7 @@ const onStartChat = (socket, props, bot, clientName, environment, logger) => asy
146
146
  await session.dispatch(JSON.parse(action));
147
147
  });
148
148
  registerListener(socket, 'disconnect', async () => {
149
- await session.dispatch((0, engine_domain_1.guestDisconnected)(sessionId));
149
+ await session.dispatch(engine_domain_1.Actions.guestDisconnected(sessionId));
150
150
  });
151
151
  registerListener(socket, 'conversation-rating', async (rating) => {
152
152
  sessionsCollection.updateOne({ _id: sessionId }, { $set: { 'sessionInfo.client.payload.conversationRating': rating } });
@@ -161,7 +161,7 @@ const onStartChat = (socket, props, bot, clientName, environment, logger) => asy
161
161
  const text = await (0, speechToText_1.default)(props.speech, session.translator.locale, buffer);
162
162
  if (text && text.length) {
163
163
  socket.emit('speech-transcription', text);
164
- session.dispatch((0, engine_domain_1.receiveTextMessageFromGuest)(text));
164
+ session.dispatch(engine_domain_1.Actions.receiveTextMessageFromGuest(text));
165
165
  }
166
166
  }
167
167
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botfabrik/engine-webclient",
3
- "version": "4.89.0",
3
+ "version": "4.90.0",
4
4
  "description": "Webclient for Botfabriks Bot Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,17 +20,17 @@
20
20
  "dev:embed": "tsx --watch ./run-embed-local.ts"
21
21
  },
22
22
  "dependencies": {
23
- "@botfabrik/engine-domain": "^4.89.0",
24
- "@botfabrik/engine-transcript-export": "^4.89.0",
25
- "@botfabrik/engine-utils": "^4.89.0",
26
- "@google-cloud/speech": "^7.0.1",
23
+ "@botfabrik/engine-domain": "^4.90.0",
24
+ "@botfabrik/engine-transcript-export": "^4.90.0",
25
+ "@botfabrik/engine-utils": "^4.90.0",
26
+ "@google-cloud/speech": "^7.1.0",
27
27
  "accept-language-parser": "^1.5.0",
28
28
  "express": "^5.1.0",
29
29
  "uuid": "^11.1.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/accept-language-parser": "^1.5.8",
33
- "@types/express": "^5.0.1",
33
+ "@types/express": "^5.0.2",
34
34
  "@types/serve-static": "^1.15.7",
35
35
  "@types/ua-parser-js": "^0.7.39",
36
36
  "copyfiles": "^2.4.1",
@@ -39,5 +39,5 @@
39
39
  "tsx": "^4.19.4",
40
40
  "typescript": "5.8.3"
41
41
  },
42
- "gitHead": "04a36aeb965d40b67ee5dc12b5a1b8fcd55c1e92"
42
+ "gitHead": "1081771280b6910cd27d27fd0fa61c02e0ff3cbc"
43
43
  }