@smartico/public-api 0.0.241 → 0.0.243
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/Jackpots/JackpotPublicMeta.d.ts +6 -0
- package/dist/Level/LevelPublicMeta.d.ts +5 -1
- package/dist/Quiz/MarketsAnswersType.d.ts +22 -0
- package/dist/Raffle/GetDrawResponse.d.ts +5 -0
- package/dist/Raffle/Raffle.d.ts +6 -0
- package/dist/SmarticoLib/index.d.ts +5 -1
- 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/BuyStoreItemErrorCode.d.ts +8 -1
- 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 +5 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +12 -2
- 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/enums/BuyStoreItemErrorCode.md +16 -6
- package/docs/interfaces/JackpotPublicMeta.md +8 -0
- package/package.json +1 -1
- package/src/IntUtils.ts +1 -1
- package/src/Jackpots/JackpotPublicMeta.ts +6 -0
- package/src/Level/LevelPublicMeta.ts +5 -1
- package/src/Raffle/Raffle.ts +6 -0
- package/src/SmarticoLib/index.ts +5 -1
- package/src/Store/BuyStoreItemErrorCode.ts +9 -2
- package/src/WSAPI/WSAPI.ts +5 -0
- package/src/WSAPI/WSAPITypes.ts +5 -1
package/dist/index.modern.mjs
CHANGED
|
@@ -199,7 +199,7 @@ IntUtils.JsonOrText = str => {
|
|
|
199
199
|
return str;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
return str;
|
|
202
|
+
return str || {};
|
|
203
203
|
};
|
|
204
204
|
// public static wsTimeToEpoch = (time: string): number => {
|
|
205
205
|
// if (time) {
|
|
@@ -813,14 +813,21 @@ var InboxCategories;
|
|
|
813
813
|
|
|
814
814
|
var BuyStoreItemErrorCode;
|
|
815
815
|
(function (BuyStoreItemErrorCode) {
|
|
816
|
-
|
|
816
|
+
/** User don't have enough points on balance */
|
|
817
817
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_NO_BALANCE"] = 11000] = "SHOP_NO_BALANCE";
|
|
818
|
+
/** Wrong shop item id */
|
|
818
819
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_WRONG_LABEL"] = 11001] = "SHOP_WRONG_LABEL";
|
|
820
|
+
/** Failed to buy bonus item, probably something wrong with the bonus configuration. */
|
|
819
821
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_TO_BUY_BONUS"] = 11002] = "SHOP_FAILED_TO_BUY_BONUS";
|
|
822
|
+
/** Failed to buy store item because segment conditions are set by operator for specific CRM item */
|
|
820
823
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION"] = 11003] = "SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION";
|
|
824
|
+
/** Segment conditions are set by operator for specific CRM item and user not matching to this conditions */
|
|
821
825
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE"] = 11004] = "SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE";
|
|
826
|
+
/** Failed to buy matching bonus item */
|
|
822
827
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_TO_BUY_MATCHING_BONUS"] = 11005] = "SHOP_FAILED_TO_BUY_MATCHING_BONUS";
|
|
828
|
+
/** Failed to buy item because of limit of max items is reached */
|
|
823
829
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED"] = 11006] = "SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED";
|
|
830
|
+
/** Failed to buy item because no more items are available */
|
|
824
831
|
BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_POOL_EMPTY"] = 11009] = "SHOP_FAILED_POOL_EMPTY";
|
|
825
832
|
})(BuyStoreItemErrorCode || (BuyStoreItemErrorCode = {}));
|
|
826
833
|
|
|
@@ -2277,6 +2284,9 @@ class WSAPI {
|
|
|
2277
2284
|
jackpots = await OCache.use(onUpdateContextKey.Jackpots, ECacheContext.WSAPI, async function () {
|
|
2278
2285
|
const _jackpots = await _this.api.jackpotGet(null, filter);
|
|
2279
2286
|
const _pots = _jackpots.items.map(jp => jp.pot);
|
|
2287
|
+
_jackpots.items.forEach(jp => {
|
|
2288
|
+
jp.jp_public_meta.custom_data = IntUtils.JsonOrText(jp.jp_public_meta.custom_data);
|
|
2289
|
+
});
|
|
2280
2290
|
OCache.set(onUpdateContextKey.Pots, _pots, ECacheContext.WSAPI, JACKPOT_POT_CACHE_SEC);
|
|
2281
2291
|
return _jackpots.items;
|
|
2282
2292
|
}, JACKPOT_TEMPLATE_CACHE_SEC);
|