wineater-bot 4.5.10 → 4.5.12

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/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <title>Chatbot</title>
8
8
  <!-- TODO: replace later with __WINEATER_WIDGET_DATA__ -->
9
- <script>window.wineaterData = { CLIENT_TOKEN: 'l3yovIe7qdAkOCO9ZJMb0sOZLWJArwQkHkeC5Fj7IBox5GPGJoaL32dC4WRQ4Yli', WIDGET_TYPE: 'store' };</script>
9
+ <script>window.wineaterData = { CLIENT_TOKEN: 'emZGQHlITdVpwvK2hLXRopFS2emvorRsHadgaKbJThiVCPRWRzD0JyZrxrtgt10a', WIDGET_TYPE: 'store' };</script>
10
10
  <!-- Production build checks -->
11
11
  <!-- <script type="module" src="./dist/wineater-chatbot.mjs"></script> -->
12
12
  <!-- Production CDN -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wineater-bot",
3
- "version": "4.5.10",
3
+ "version": "4.5.12",
4
4
  "description": "",
5
5
  "main": "dist/wineater-chatbot.mjs",
6
6
  "module": "src/index.js",
package/src/App.svelte CHANGED
@@ -98,6 +98,7 @@
98
98
  try {
99
99
  results = await wineaterApi.getInstantRecommendations();
100
100
  } catch (error) {
101
+ console.error('[wineater] instant recommendations error:', error);
101
102
  setSearchError();
102
103
  } finally {
103
104
  isLoading = false;
@@ -155,6 +156,7 @@
155
156
  }
156
157
  } catch (error) {
157
158
  results = [];
159
+ console.error('[wineater] search error:', error);
158
160
  trackWidgetEvent(WIDGET_EVENTS.ERROR_OCCURRED, storeId, {
159
161
  error_message: error?.message,
160
162
  query
@@ -34,7 +34,7 @@ export type RecommendedWine = Omit<Wine, "shortDescription" | "producer" | "pair
34
34
  };
35
35
 
36
36
  class WineaterApi {
37
- #baseUrl = 'https://api.wineater.com/';
37
+ #baseUrl = 'http://localhost:3000/';
38
38
  #token: string;
39
39
 
40
40
  constructor(token: string) {
@@ -57,7 +57,7 @@ class WineaterApi {
57
57
  throw new Error(`API call failed with status ${response.status}: ${data.message || 'No additional error information'}`);
58
58
  }
59
59
 
60
- const deserializedData: Wine[] = data.map(deserializeInstantRecommendation);
60
+ const deserializedData: Wine[] = data.filter(Boolean).map(deserializeInstantRecommendation);
61
61
  return deserializedData;
62
62
  } catch (error) {
63
63
  throw new Error(`Error in getInstantRecommendations: ${error.message}`);
@@ -81,7 +81,7 @@ class WineaterApi {
81
81
  throw new Error(`API call failed with status ${response.status}: ${data.message || 'No additional error information'}`);
82
82
  }
83
83
 
84
- const deserializedData: RecommendedWine[] = data.map(deserializeRecommendedWine);
84
+ const deserializedData: RecommendedWine[] = data.filter(Boolean).map(deserializeRecommendedWine);
85
85
  return deserializedData;
86
86
  } catch (error) {
87
87
  throw new Error(`Error in getWineRecommendations: ${error.message}`);
@@ -85,5 +85,13 @@ export const projectConfigs: Record<string, ProjectUiConfig> = {
85
85
  buttonUppercase: true,
86
86
  customCss: "",
87
87
  translations: {}
88
+ },
89
+ "28": {
90
+ logoUrl: "https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/ryba_moya.png",
91
+ brandColor: "#de4e2a",
92
+ wineaterColor: "#7B2BEB",
93
+ buttonUppercase: true,
94
+ customCss: "",
95
+ translations: {}
88
96
  }
89
97
  };