@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.
- package/README.md +8 -0
- package/dist/client/assets/index-Ces-s9t_.js +111 -0
- package/dist/client/assets/index-Ces-s9t_.js.map +1 -0
- package/dist/client/assets/index-IZ7KnhKS.css +1 -0
- package/dist/client/fab.svg +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/manifest.json +1 -1
- package/dist/createSessionInfo.d.ts +1 -1
- package/dist/createSessionInfo.js +3 -4
- package/dist/createSessionInfo.test.js +6 -9
- package/dist/embed/bundle.js +11 -11
- package/dist/index.d.ts +5 -1
- package/dist/index.js +96 -86
- package/dist/requestSessionData.d.ts +1 -1
- package/dist/requestSessionData.js +10 -7
- package/dist/requestSessionData.test.js +12 -7
- package/package.json +5 -5
- package/dist/client/assets/index-CtRHUofL.js +0 -111
- package/dist/client/assets/index-CtRHUofL.js.map +0 -1
- package/dist/client/assets/index-vVZBi9_F.css +0 -1
|
@@ -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(
|
|
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(
|
|
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.
|
|
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.
|
|
23
|
+
"@botfabrik/engine-core": "^4.66.0",
|
|
24
24
|
"@botfabrik/engine-domain": "^4.64.0",
|
|
25
|
-
"@botfabrik/engine-transcript-export": "^4.
|
|
25
|
+
"@botfabrik/engine-transcript-export": "^4.66.0",
|
|
26
26
|
"@botfabrik/engine-utils": "^4.64.0",
|
|
27
|
-
"@google-cloud/speech": "^6.6.
|
|
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": "
|
|
43
|
+
"gitHead": "cd345fceb4010234b47b2b95991cb98121eac9d9"
|
|
44
44
|
}
|