@smartico/public-api 0.0.139 → 0.0.140

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.
@@ -726,6 +726,7 @@ var AchievementStatus;
726
726
  AchievementStatus[AchievementStatus["Archived"] = 4] = "Archived";
727
727
  AchievementStatus[AchievementStatus["FeaturedManually"] = 5] = "FeaturedManually";
728
728
  AchievementStatus[AchievementStatus["FeaturedAI"] = 6] = "FeaturedAI";
729
+ AchievementStatus[AchievementStatus["Recurring"] = 7] = "Recurring";
729
730
  })(AchievementStatus || (AchievementStatus = {}));
730
731
 
731
732
  var AchievementTaskType;
@@ -1130,6 +1131,8 @@ class WSAPI {
1130
1131
  on(ClassId.LOGOUT_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));
1131
1132
  on(ClassId.IDENTIFY_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));
1132
1133
  on(ClassId.JP_WIN_PUSH, data => this.jackpotClearCache());
1134
+ on(ClassId.JP_OPTOUT_RESPONSE, data => this.jackpotClearCache());
1135
+ on(ClassId.JP_OPTIN_RESPONSE, data => this.jackpotClearCache());
1133
1136
  }
1134
1137
  /** Returns information about current user
1135
1138
  * Example usage:
@@ -1527,7 +1530,6 @@ class WSAPI {
1527
1530
  throw new Error('jp_template_id is required in jackpotOptIn');
1528
1531
  }
1529
1532
  const result = await this.api.jackpotOptIn(null, filter);
1530
- this.jackpotClearCache();
1531
1533
  return result;
1532
1534
  }
1533
1535
  /** Opt-out currently logged in user from the jackpot with the specified jp_template_id.
@@ -1544,7 +1546,6 @@ class WSAPI {
1544
1546
  throw new Error('jp_template_id is required in jackpotOptOut');
1545
1547
  }
1546
1548
  const result = await this.api.jackpotOptOut(null, filter);
1547
- this.jackpotClearCache();
1548
1549
  return result;
1549
1550
  }
1550
1551
  }
@@ -1708,6 +1709,8 @@ class SmarticoAPI {
1708
1709
  }
1709
1710
  buildMessage(user_ext_id, cid, payload = {}) {
1710
1711
  const message = _extends({
1712
+ // AA: in fact we need api and brand keys and ext_user_id only in the context of HTTP
1713
+ // its not needed in WebSocket and can be deleted
1711
1714
  api_key: this.label_api_key,
1712
1715
  brand_key: this.brand_api_key,
1713
1716
  ext_user_id: user_ext_id,