@smartico/public-api 0.0.390 → 0.0.392
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/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +7 -1
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SmarticoAPI.ts +6 -0
- package/src/WSAPI/WSAPI.ts +6 -1
package/package.json
CHANGED
package/src/SmarticoAPI.ts
CHANGED
|
@@ -766,6 +766,9 @@ class SmarticoAPI {
|
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
public async getSawWinningHistoryT(user_ext_id: string, limit?: number, offset?: number, saw_template_id?: number): Promise<SAWPrizesHistory[]> {
|
|
769
|
+
if (IntUtils.isNotNull(limit) && IntUtils.isNotNull(offset) && limit > 50) {
|
|
770
|
+
limit = 50;
|
|
771
|
+
}
|
|
769
772
|
return SAWHistoryTransform((await this.getSawWinningHistory(user_ext_id, limit, offset, saw_template_id)).prizes);
|
|
770
773
|
}
|
|
771
774
|
|
|
@@ -888,6 +891,9 @@ class SmarticoAPI {
|
|
|
888
891
|
}
|
|
889
892
|
|
|
890
893
|
public async storeGetPurchasedItemsT(user_ext_id: string, limit?: number, offset?: number): Promise<TStoreItem[]> {
|
|
894
|
+
if (IntUtils.isNotNull(limit) && IntUtils.isNotNull(offset) && limit > 50) {
|
|
895
|
+
limit = 50;
|
|
896
|
+
}
|
|
891
897
|
return StoreItemPurchasedTransform((await this.storeGetPurchasedItems(user_ext_id, limit, offset)).items);
|
|
892
898
|
}
|
|
893
899
|
|
package/src/WSAPI/WSAPI.ts
CHANGED
|
@@ -69,7 +69,12 @@ export class WSAPI extends WSAPIInbox {
|
|
|
69
69
|
if (data?.props?.core_inbox_unread_count !== undefined && data?.props?.core_inbox_unread_count !== null) {
|
|
70
70
|
this.updateInboxUnreadCount(data.props.core_inbox_unread_count);
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
72
|
+
if (
|
|
73
|
+
(
|
|
74
|
+
data?.props?.ach_points_balance !== undefined ||
|
|
75
|
+
data?.props?.ach_gems_balance !== undefined ||
|
|
76
|
+
data?.props?.ach_diamonds_balance !== undefined
|
|
77
|
+
) && OCache.get(onUpdateContextKey.ActivityLog, ECacheContext.WSAPI)) {
|
|
73
78
|
this.notifyActivityLogUpdate();
|
|
74
79
|
}
|
|
75
80
|
OCache.clear(ECacheContext.WSAPI, onUpdateContextKey.CurrentLevel);
|