@smartico/public-api 0.0.295 → 0.0.297

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.
@@ -5,6 +5,7 @@ declare enum TranslationArea {
5
5
  Archived = 4,
6
6
  Affiliation = 5,
7
7
  RetentionGames = 6,
8
- AffIliateAdminNew = 7
8
+ AffIliateAdminNew = 7,
9
+ Academy = 8
9
10
  }
10
11
  export { TranslationArea };
@@ -6,6 +6,10 @@ interface RafflePrizePublicMeta {
6
6
  description: string;
7
7
  /** URL of the image that represents the prize */
8
8
  image_url: string;
9
+ /**
10
+ * Indicates whether the chance to win should be hidden in the UI.
11
+ */
12
+ hide_chance_to_win: boolean;
9
13
  }
10
14
  /**
11
15
  * Represents a prize in a draw.
@@ -29,6 +29,7 @@ interface Tracker {
29
29
  userPublicProps: any;
30
30
  on: (callBackKey: ClassId, func: (data: any) => void) => void;
31
31
  getLabelSetting: (key: PublicLabelSettings) => any;
32
+ triggerExternalCallBack: (callBackKey: string, payload: any) => void;
32
33
  }
33
34
  interface IOptions {
34
35
  logger?: ILogger;
package/dist/index.js CHANGED
@@ -822,6 +822,7 @@ exports.TranslationArea = void 0;
822
822
  TranslationArea[TranslationArea["Affiliation"] = 5] = "Affiliation";
823
823
  TranslationArea[TranslationArea["RetentionGames"] = 6] = "RetentionGames";
824
824
  TranslationArea[TranslationArea["AffIliateAdminNew"] = 7] = "AffIliateAdminNew";
825
+ TranslationArea[TranslationArea["Academy"] = 8] = "Academy";
825
826
  })(exports.TranslationArea || (exports.TranslationArea = {}));
826
827
 
827
828
  var InboxMessagesTransform = function InboxMessagesTransform(items) {
@@ -1908,6 +1909,7 @@ var WSAPI = /*#__PURE__*/function () {
1908
1909
  OCache.clearAll();
1909
1910
  if (this.api.tracker) {
1910
1911
  var on = this.api.tracker.on;
1912
+ var triggerExternalCallback = this.api.tracker.triggerExternalCallBack;
1911
1913
  on(exports.ClassId.SAW_SPINS_COUNT_PUSH, function (data) {
1912
1914
  return _this.updateOnSpin(data);
1913
1915
  });
@@ -1967,6 +1969,13 @@ var WSAPI = /*#__PURE__*/function () {
1967
1969
  _this.updateRaffles();
1968
1970
  OCache.clear(exports.ECacheContext.WSAPI, onUpdateContextKey.Raffles);
1969
1971
  });
1972
+ on(exports.ClassId.GET_INBOX_MESSAGES_RESPONSE, function (res) {
1973
+ if (res.unread_count && triggerExternalCallback) {
1974
+ triggerExternalCallback('props_change', {
1975
+ core_inbox_unread_count: res.unread_count
1976
+ });
1977
+ }
1978
+ });
1970
1979
  }
1971
1980
  }
1972
1981
  /** @private */