@smartico/public-api 0.0.254 → 0.0.256
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/Quiz/MarketsAnswersType.d.ts +22 -0
- package/dist/Raffle/GetDrawResponse.d.ts +5 -0
- package/dist/SmarticoAPI.d.ts +6 -2
- package/dist/SmarticoPublicAPI.d.ts +23 -0
- package/dist/Store/BuyShopItemErrorCode.d.ts +10 -0
- package/dist/Store/BuyShopItemRequest.d.ts +4 -0
- package/dist/Store/BuyShopItemResponse.d.ts +4 -0
- package/dist/Store/GetCategoriesShopResponse.d.ts +5 -0
- package/dist/Store/GetShopItemsResponse.d.ts +5 -0
- package/dist/Store/ShopCategory.d.ts +5 -0
- package/dist/Store/ShopCategoryPublicMeta.d.ts +4 -0
- package/dist/Store/ShopItem.d.ts +9 -0
- package/dist/Store/ShopItemPublicMeta.d.ts +10 -0
- package/dist/Store/ShopItemType.d.ts +4 -0
- package/dist/Store/StorItemPruchased.d.ts +6 -0
- package/dist/WSAPI/WSAPITypes.d.ts +6 -0
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +16 -5
- package/dist/index.modern.mjs.map +1 -1
- package/dist/service/index.d.ts +5 -0
- package/dist/service/types/ErrorCodes.d.ts +13 -0
- package/dist/service/types/GRequest.d.ts +16 -0
- package/dist/service/types/GResponse.d.ts +10 -0
- package/dist/service/types/Game/GameAttemptType.d.ts +6 -0
- package/dist/service/types/Game/GameCanPlayType.d.ts +10 -0
- package/dist/service/types/Game/GameExternalStatus.d.ts +6 -0
- package/dist/service/types/Game/GameInfo.d.ts +9 -0
- package/dist/service/types/Game/GamePick.d.ts +90 -0
- package/dist/service/types/Game/GameUtil.d.ts +7 -0
- package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +7 -0
- package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +7 -0
- package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +5 -0
- package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +6 -0
- package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +5 -0
- package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +34 -0
- package/dist/service/types/SmarticoProto/PublicProperties.d.ts +11 -0
- package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +12 -0
- package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +15 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +10 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +3 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +11 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +8 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +13 -0
- package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +21 -0
- package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +31 -0
- package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +12 -0
- package/dist/service/types/SmarticoProto/TranslationArea.d.ts +9 -0
- package/dist/service/types/User/UserInfo.d.ts +10 -0
- package/dist/util/Util.d.ts +51 -0
- package/docs/interfaces/JackpotEligibleGame.md +2 -0
- package/docs/interfaces/TStoreItem.md +24 -0
- package/package.json +1 -1
- package/src/SmarticoAPI.ts +4 -4
- package/src/Store/StoreItem.ts +4 -1
- package/src/WSAPI/WSAPI.ts +3 -3
- package/src/WSAPI/WSAPITypes.ts +6 -0
package/dist/index.modern.mjs
CHANGED
|
@@ -917,7 +917,10 @@ const StoreItemTransform = items => {
|
|
|
917
917
|
category_ids: (_r$categoryIds = r.categoryIds) != null ? _r$categoryIds : [],
|
|
918
918
|
pool: r.shopPool,
|
|
919
919
|
custom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data),
|
|
920
|
-
active_till_date: r.activeTillDate
|
|
920
|
+
active_till_date: r.activeTillDate,
|
|
921
|
+
discounted_price: r.itemPublicMeta.discount_prize,
|
|
922
|
+
discount_price_ribbon: r.itemPublicMeta.discount_prize_ribbon,
|
|
923
|
+
custom_ribbon_image: r.itemPublicMeta.custom_ribbon_image
|
|
921
924
|
};
|
|
922
925
|
return x;
|
|
923
926
|
});
|
|
@@ -2650,7 +2653,9 @@ class WSAPI {
|
|
|
2650
2653
|
if (onUpdate) {
|
|
2651
2654
|
this.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
|
|
2652
2655
|
}
|
|
2653
|
-
return OCache.use(onUpdateContextKey.JackpotEligibleGames, ECacheContext.WSAPI, () => this.api.getJackpotEligibleGamesT(null,
|
|
2656
|
+
return OCache.use(onUpdateContextKey.JackpotEligibleGames + jp_template_id, ECacheContext.WSAPI, () => this.api.getJackpotEligibleGamesT(null, {
|
|
2657
|
+
jp_template_id
|
|
2658
|
+
}), JACKPOT_ELIGIBLE_GAMES_CACHE_SEC);
|
|
2654
2659
|
}
|
|
2655
2660
|
/**
|
|
2656
2661
|
* Returns all the related tournaments and missions for the provided game id for the current user
|
|
@@ -3147,14 +3152,20 @@ class SmarticoAPI {
|
|
|
3147
3152
|
async getJackpotWinnersT(user_ext_id, limit = 20, offset = 0, jp_template_id) {
|
|
3148
3153
|
return GetJackpotWinnersResponseTransform((await this.getJackpotWinners(user_ext_id, limit, offset, jp_template_id)).winners);
|
|
3149
3154
|
}
|
|
3150
|
-
async getJackpotEligibleGames(user_ext_id,
|
|
3155
|
+
async getJackpotEligibleGames(user_ext_id, {
|
|
3156
|
+
jp_template_id
|
|
3157
|
+
}) {
|
|
3151
3158
|
const message = this.buildMessage(user_ext_id, ClassId.JP_GET_ELIGIBLE_GAMES_REQUEST, {
|
|
3152
3159
|
jp_template_id
|
|
3153
3160
|
});
|
|
3154
3161
|
return await this.send(message, ClassId.JP_GET_ELIGIBLE_GAMES_RESPONSE);
|
|
3155
3162
|
}
|
|
3156
|
-
async getJackpotEligibleGamesT(user_ext_id,
|
|
3157
|
-
|
|
3163
|
+
async getJackpotEligibleGamesT(user_ext_id, {
|
|
3164
|
+
jp_template_id
|
|
3165
|
+
}) {
|
|
3166
|
+
return GetJackpotEligibleGamesResponseTransform(await this.getJackpotEligibleGames(user_ext_id, {
|
|
3167
|
+
jp_template_id
|
|
3168
|
+
}));
|
|
3158
3169
|
}
|
|
3159
3170
|
async sawGetTemplates(user_ext_id, force_language, is_visitor_mode = false) {
|
|
3160
3171
|
const message = this.buildMessage(user_ext_id, ClassId.SAW_GET_SPINS_REQUEST, {
|