@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.
- package/dist/Core/TranslationArea.d.ts +2 -1
- package/dist/Raffle/RafflePrize.d.ts +4 -0
- package/dist/SmarticoAPI.d.ts +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +9 -0
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/RafflePrizePublicMeta.md +8 -0
- package/package.json +1 -1
- package/src/Core/TranslationArea.ts +1 -0
- package/src/Raffle/RafflePrize.ts +4 -0
- package/src/SmarticoAPI.ts +1 -0
- package/src/WSAPI/WSAPI.ts +9 -0
|
@@ -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.
|
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -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 */
|