@smartico/public-api 0.0.296 → 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/Raffle/RafflePrize.d.ts +4 -0
- package/dist/SmarticoAPI.d.ts +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +8 -0
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/RafflePrizePublicMeta.md +8 -0
- package/package.json +1 -1
- 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
|
@@ -1909,6 +1909,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1909
1909
|
OCache.clearAll();
|
|
1910
1910
|
if (this.api.tracker) {
|
|
1911
1911
|
var on = this.api.tracker.on;
|
|
1912
|
+
var triggerExternalCallback = this.api.tracker.triggerExternalCallBack;
|
|
1912
1913
|
on(exports.ClassId.SAW_SPINS_COUNT_PUSH, function (data) {
|
|
1913
1914
|
return _this.updateOnSpin(data);
|
|
1914
1915
|
});
|
|
@@ -1968,6 +1969,13 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1968
1969
|
_this.updateRaffles();
|
|
1969
1970
|
OCache.clear(exports.ECacheContext.WSAPI, onUpdateContextKey.Raffles);
|
|
1970
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
|
+
});
|
|
1971
1979
|
}
|
|
1972
1980
|
}
|
|
1973
1981
|
/** @private */
|