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

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.
@@ -7,6 +7,7 @@ export declare class HttpClient {
7
7
  private options;
8
8
  private middlewareClient;
9
9
  private chatClient;
10
+ private container;
10
11
  constructor(endpoint: string, clientId: string, container: Container);
11
12
  firstHit(): Promise<any>;
12
13
  handleUpdate(action: string): void;
@@ -51,9 +51,12 @@ var HttpClient = /** @class */ (function () {
51
51
  this.clientId = this.options.clientId;
52
52
  this.middlewareClient = new MiddlewareClient(container);
53
53
  this.chatClient = new ChatClient(container);
54
+ this.container = container;
54
55
  }
55
56
  HttpClient.prototype.firstHit = function () {
56
57
  var _this = this;
58
+ MiddlewareHelper.setContainer(this.container);
59
+ MiddlewareHelper.setWidget(this.container.get('$widget'));
57
60
  // On first hit if there are entries stored in the storage, use them
58
61
  // Otherwise start a new session
59
62
  return MiddlewareHelper.getEntrySessionStorage().then(function (o) { return __awaiter(_this, void 0, void 0, function () {
@@ -7,6 +7,7 @@ export declare class HttpClient {
7
7
  private options;
8
8
  private middlewareClient;
9
9
  private chatClient;
10
+ private container;
10
11
  constructor(endpoint: string, clientId: string, container: Container);
11
12
  firstHit(): Promise<any>;
12
13
  handleUpdate(action: string): void;
@@ -51,9 +51,12 @@ var HttpClient = /** @class */ (function () {
51
51
  this.clientId = this.options.clientId;
52
52
  this.middlewareClient = new MiddlewareClient(container);
53
53
  this.chatClient = new ChatClient(container);
54
+ this.container = container;
54
55
  }
55
56
  HttpClient.prototype.firstHit = function () {
56
57
  var _this = this;
58
+ MiddlewareHelper.setContainer(this.container);
59
+ MiddlewareHelper.setWidget(this.container.get('$widget'));
57
60
  // On first hit if there are entries stored in the storage, use them
58
61
  // Otherwise start a new session
59
62
  return MiddlewareHelper.getEntrySessionStorage().then(function (o) { return __awaiter(_this, void 0, void 0, function () {
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.32",
3
+ "version": "0.0.1-alpha.33",
4
4
  "description": "Bot Provider Plugin ACE Knowledge Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",