wineater-bot 4.7.0 → 4.9.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/dist/wineater-chatbot.mjs +1513 -1502
- package/dist/wineater-chatbot.umd.js +24 -24
- package/package.json +1 -1
- package/src/services/api/api.ts +1 -7
package/package.json
CHANGED
package/src/services/api/api.ts
CHANGED
|
@@ -115,13 +115,7 @@ class WineaterApi {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
function getApiVersion(): string {
|
|
119
|
-
const scriptTag = (document.currentScript as HTMLScriptElement | null)
|
|
120
|
-
|| document.querySelector('script[src*="embed.js"]');
|
|
121
|
-
return scriptTag?.getAttribute('api-version') || '1';
|
|
122
|
-
}
|
|
123
|
-
|
|
124
118
|
const DEMO_TOKEN = 'HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG';
|
|
125
119
|
const token = window?.wineaterData?.CLIENT_TOKEN || DEMO_TOKEN;
|
|
126
|
-
const apiVersion =
|
|
120
|
+
const apiVersion = String(window?.wineaterData?.apiVersion || '1');
|
|
127
121
|
export const wineaterApi = new WineaterApi(token, apiVersion)
|