@evergis/api 3.0.76 → 3.0.77

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/api.esm.js CHANGED
@@ -839,12 +839,13 @@ let Notification = /*#__PURE__*/function (_NotificationService) {
839
839
 
840
840
  var _super = /*#__PURE__*/_createSuper(Notification);
841
841
 
842
- function Notification(http) {
842
+ function Notification(http, api) {
843
843
  var _this;
844
844
 
845
845
  _classCallCheck(this, Notification);
846
846
 
847
847
  _this = _super.call(this, http);
848
+ _this.api = api;
848
849
  _this.MAX_WS_RECONNECT_TRIES = 10;
849
850
  _this.reconnectTries = 0;
850
851
  _this.subscriptions = [];
@@ -931,7 +932,7 @@ let Notification = /*#__PURE__*/function (_NotificationService) {
931
932
  value: async function subscribe(tag) {
932
933
  this.subscriptions.push(tag);
933
934
  setTimeout(() => {
934
- if (this.subscriptions.length) {
935
+ if (!this.api.isShared && this.subscriptions.length) {
935
936
  this.subscribeListOperation(this.subscriptions);
936
937
  }
937
938
 
@@ -5900,7 +5901,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
5900
5901
  _this.accountPreview = new AccountPreview(_this.http, _this.account);
5901
5902
  _this.bulk = new BulkOperations(_this.http);
5902
5903
  _this.security = new Security(_this.http, _this.account);
5903
- _this.notification = new Notification(_this.http);
5904
+ _this.notification = new Notification(_this.http, _assertThisInitialized(_this));
5904
5905
  _this.scheduler = new Scheduler(_this.http);
5905
5906
  _this.file = new FileUpload(_this.http);
5906
5907
  _this.import = new Import(_this.http);