@klevu/core
Advanced tools
@@ -18,4 +18,4 @@ "use strict"; | ||
| const MAX_MESSAGES = 10; | ||
| const saveProductInfo = (config, productInfo) => __awaiter(void 0, void 0, void 0, function* () { | ||
| return yield (0, fetch_js_1.post)(`${config.moiApiUrl}chat/productInfo`, productInfo); | ||
| const saveProductInfo = (config, productInfo, widgetId) => __awaiter(void 0, void 0, void 0, function* () { | ||
| return yield (0, fetch_js_1.post)(`${config.moiApiUrl}chat/${widgetId}/productInfo`, productInfo); | ||
| }); | ||
@@ -68,3 +68,3 @@ function startMoi(options = {}) { | ||
| if (options.productInfo && options.mode === "PQA") | ||
| yield saveProductInfo(config, options.productInfo); | ||
| yield saveProductInfo(config, options.productInfo, options.pqaWidgetId || 'NA'); | ||
| } | ||
@@ -71,0 +71,0 @@ catch (err) { |
@@ -15,4 +15,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| const MAX_MESSAGES = 10; | ||
| const saveProductInfo = (config, productInfo) => __awaiter(void 0, void 0, void 0, function* () { | ||
| return yield post(`${config.moiApiUrl}chat/productInfo`, productInfo); | ||
| const saveProductInfo = (config, productInfo, widgetId) => __awaiter(void 0, void 0, void 0, function* () { | ||
| return yield post(`${config.moiApiUrl}chat/${widgetId}/productInfo`, productInfo); | ||
| }); | ||
@@ -65,3 +65,3 @@ export function startMoi(options = {}) { | ||
| if (options.productInfo && options.mode === "PQA") | ||
| yield saveProductInfo(config, options.productInfo); | ||
| yield saveProductInfo(config, options.productInfo, options.pqaWidgetId || 'NA'); | ||
| } | ||
@@ -68,0 +68,0 @@ catch (err) { |
+1
-1
| { | ||
| "name": "@klevu/core", | ||
| "sideEffects": false, | ||
| "version": "5.7.0", | ||
| "version": "5.8.0", | ||
| "description": "Typescript SDK that simplifies development on Klevu backend. Klevu provides advanced AI-powered search and discovery solutions for online retailers.", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
772518
0.01%