@botfabrik/engine-webclient 4.65.2 → 4.66.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.
@@ -18,7 +18,6 @@ globals_1.jest.mock('crypto', () => {
18
18
  globals_1.jest.clearAllMocks();
19
19
  });
20
20
  const querystrings = {
21
- sessionId: 'session-id',
22
21
  accessToken: 'access-token',
23
22
  };
24
23
  (0, globals_1.it)('when sessionId has been passed by query param but does not exists in db', async () => {
@@ -27,7 +26,7 @@ globals_1.jest.mock('crypto', () => {
27
26
  const sessionsCollection = {
28
27
  findOne,
29
28
  };
30
- const { sessionId, isNew } = await (0, requestSessionData_1.default)(querystrings, sessionsCollection, 'test-bot', 'de_DE', {});
29
+ const { sessionId, isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', 'de_DE', {});
31
30
  (0, globals_1.expect)(findOne).toHaveBeenCalledTimes(1);
32
31
  (0, globals_1.expect)(findOne).toHaveBeenCalledWith({
33
32
  _id: 'session-id',
@@ -44,7 +43,7 @@ globals_1.jest.mock('crypto', () => {
44
43
  const sessionsCollection = {
45
44
  findOne,
46
45
  };
47
- const { sessionId, isNew } = await (0, requestSessionData_1.default)(querystrings, sessionsCollection, 'test-bot', 'de_DE', {});
46
+ const { sessionId, isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', 'de_DE', {});
48
47
  (0, globals_1.expect)(findOne).toHaveBeenCalledTimes(1);
49
48
  (0, globals_1.expect)(findOne).toHaveBeenCalledWith({
50
49
  _id: 'session-id',
@@ -66,9 +65,12 @@ globals_1.jest.mock('crypto', () => {
66
65
  requestSessionRecordQuery,
67
66
  };
68
67
  requestSessionRecordQuery.mockReturnValueOnce(Promise.resolve({ 'sessionInfo.user.id': 'hans@apptiva.ch' }));
69
- const { sessionId, isNew } = await (0, requestSessionData_1.default)(querystrings, sessionsCollection, 'test-bot', 'de_DE', props);
68
+ const { sessionId, isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', 'de_DE', props);
70
69
  (0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledTimes(1);
71
- (0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledWith(querystrings);
70
+ (0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledWith({
71
+ querystrings,
72
+ sessionId: 'session-id',
73
+ });
72
74
  (0, globals_1.expect)(findOne).toHaveBeenCalledTimes(1);
73
75
  (0, globals_1.expect)(findOne).toHaveBeenCalledWith({
74
76
  'sessionInfo.client.name': 'test-bot',
@@ -89,9 +91,12 @@ globals_1.jest.mock('crypto', () => {
89
91
  requestSessionRecordQuery,
90
92
  };
91
93
  requestSessionRecordQuery.mockReturnValueOnce(Promise.resolve({ 'sessionInfo.user.id': 'hans@apptiva.ch' }));
92
- const { sessionId, isNew } = await (0, requestSessionData_1.default)(querystrings, sessionsCollection, 'test-bot', 'de_DE', props);
94
+ const { sessionId, isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', 'de_DE', props);
93
95
  (0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledTimes(1);
94
- (0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledWith(querystrings);
96
+ (0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledWith({
97
+ querystrings,
98
+ sessionId: 'session-id',
99
+ });
95
100
  (0, globals_1.expect)(findOne).toHaveBeenCalledTimes(1);
96
101
  (0, globals_1.expect)(findOne).toHaveBeenCalledWith({
97
102
  'sessionInfo.client.name': 'test-bot',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botfabrik/engine-webclient",
3
- "version": "4.65.2",
3
+ "version": "4.66.0",
4
4
  "description": "Webclient for Botfabriks Bot Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,11 +20,11 @@
20
20
  "dev:embed": "tsx --watch ./run-embed-local.ts"
21
21
  },
22
22
  "dependencies": {
23
- "@botfabrik/engine-core": "^4.65.2",
23
+ "@botfabrik/engine-core": "^4.66.0",
24
24
  "@botfabrik/engine-domain": "^4.64.0",
25
- "@botfabrik/engine-transcript-export": "^4.65.2",
25
+ "@botfabrik/engine-transcript-export": "^4.66.0",
26
26
  "@botfabrik/engine-utils": "^4.64.0",
27
- "@google-cloud/speech": "^6.6.0",
27
+ "@google-cloud/speech": "^6.6.1",
28
28
  "accept-language-parser": "^1.5.0",
29
29
  "express": "^4.19.2",
30
30
  "socket.io": "^4.7.5",
@@ -40,5 +40,5 @@
40
40
  "tsx": "^4.16.2",
41
41
  "typescript": "5.1.6"
42
42
  },
43
- "gitHead": "96769367de828835784938cc28cf3bbe8c22fb96"
43
+ "gitHead": "cd345fceb4010234b47b2b95991cb98121eac9d9"
44
44
  }