@telia-ace/knowledge-widget-bot-provider 0.0.1-alpha.31 → 0.0.1-alpha.32

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/lib/plugin.js CHANGED
@@ -71,8 +71,6 @@ var KnowledgeBotProviderPlugin = function (container) { return __awaiter(void 0,
71
71
  platform.registerProvider('chat.bot', function (conversation, component) {
72
72
  var endpoint = getKnowledgeBotEndpoint(container, component);
73
73
  var clientId = v4();
74
- // passes the container and the widget to the Middleware Store
75
- MiddlewareClient.initialize(container, container.get('$widget'));
76
74
  // executes to decide on what to do on first load
77
75
  var httpClient = new HttpClient(endpoint, clientId, container);
78
76
  httpClient.firstHit().then(function (response) {
@@ -86,6 +84,8 @@ var KnowledgeBotProviderPlugin = function (container) { return __awaiter(void 0,
86
84
  avatar: 'https://www.site.com/avatar.jpg',
87
85
  });
88
86
  console.log('widget entry', widgetEntry);
87
+ // passes the container and the widget to the Middleware Store
88
+ MiddlewareClient.initialize(container, container.get('$widget'));
89
89
  // passes the user and the agent to the Chat Helper
90
90
  ChatClient.initialize(conversation.user, agent);
91
91
  // passes the conversation provider to the Contact Method Client
package/lib-esm/plugin.js CHANGED
@@ -71,8 +71,6 @@ var KnowledgeBotProviderPlugin = function (container) { return __awaiter(void 0,
71
71
  platform.registerProvider('chat.bot', function (conversation, component) {
72
72
  var endpoint = getKnowledgeBotEndpoint(container, component);
73
73
  var clientId = v4();
74
- // passes the container and the widget to the Middleware Store
75
- MiddlewareClient.initialize(container, container.get('$widget'));
76
74
  // executes to decide on what to do on first load
77
75
  var httpClient = new HttpClient(endpoint, clientId, container);
78
76
  httpClient.firstHit().then(function (response) {
@@ -86,6 +84,8 @@ var KnowledgeBotProviderPlugin = function (container) { return __awaiter(void 0,
86
84
  avatar: 'https://www.site.com/avatar.jpg',
87
85
  });
88
86
  console.log('widget entry', widgetEntry);
87
+ // passes the container and the widget to the Middleware Store
88
+ MiddlewareClient.initialize(container, container.get('$widget'));
89
89
  // passes the user and the agent to the Chat Helper
90
90
  ChatClient.initialize(conversation.user, agent);
91
91
  // passes the conversation provider to the Contact Method Client
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/knowledge-widget-bot-provider",
3
- "version": "0.0.1-alpha.31",
3
+ "version": "0.0.1-alpha.32",
4
4
  "description": "Bot Provider Plugin ACE Knowledge Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",