@smartico/public-api 0.0.269 → 0.0.271
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/CustomSections/AchCustomSection.d.ts +1 -2
- package/dist/Jackpots/JackPotWinner.d.ts +2 -0
- package/dist/Jackpots/JackpotDetails.d.ts +2 -0
- package/dist/Level/LevelPublicMeta.d.ts +1 -1
- package/dist/Quiz/MarketsAnswersType.d.ts +22 -0
- package/dist/Raffle/GetDrawResponse.d.ts +5 -0
- package/dist/SmarticoAPI.d.ts +2 -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/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +10 -8
- 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/JackPotWinner.md +8 -0
- package/docs/interfaces/JackpotDetails.md +8 -0
- package/package.json +1 -1
- package/src/CustomSections/AchCustomSection.ts +1 -2
- package/src/CustomSections/UICustomSection.ts +1 -1
- package/src/Jackpots/JackPotWinner.ts +2 -0
- package/src/Jackpots/JackpotDetails.ts +2 -1
- package/src/Level/LevelPublicMeta.ts +1 -1
- package/src/SmarticoAPI.ts +9 -4
- package/src/WSAPI/WSAPI.ts +1 -1
package/dist/index.modern.mjs
CHANGED
|
@@ -2169,7 +2169,7 @@ class WSAPI {
|
|
|
2169
2169
|
*
|
|
2170
2170
|
* */
|
|
2171
2171
|
async getCustomSections() {
|
|
2172
|
-
return OCache.use(onUpdateContextKey.CustomSections, ECacheContext.WSAPI, () => this.api.
|
|
2172
|
+
return OCache.use(onUpdateContextKey.CustomSections, ECacheContext.WSAPI, () => this.api.customSectionsGetT(null), CACHE_DATA_SEC);
|
|
2173
2173
|
}
|
|
2174
2174
|
/**
|
|
2175
2175
|
* Returns the list of mini-games available for user
|
|
@@ -2810,8 +2810,7 @@ var AchCustomSectionType;
|
|
|
2810
2810
|
AchCustomSectionType[AchCustomSectionType["LEVELS"] = 4] = "LEVELS";
|
|
2811
2811
|
AchCustomSectionType[AchCustomSectionType["MINI_GAMES"] = 5] = "MINI_GAMES";
|
|
2812
2812
|
AchCustomSectionType[AchCustomSectionType["MISSION_CUSTOM_LAYOUT"] = 6] = "MISSION_CUSTOM_LAYOUT";
|
|
2813
|
-
AchCustomSectionType[AchCustomSectionType["
|
|
2814
|
-
AchCustomSectionType[AchCustomSectionType["QUIZ"] = 8] = "QUIZ";
|
|
2813
|
+
AchCustomSectionType[AchCustomSectionType["MATCH_X_AND_QUIZ"] = 7] = "MATCH_X_AND_QUIZ";
|
|
2815
2814
|
AchCustomSectionType[AchCustomSectionType["REDIRECT_LINK"] = 9] = "REDIRECT_LINK";
|
|
2816
2815
|
AchCustomSectionType[AchCustomSectionType["LOOTBOX_WEEKLY"] = 10] = "LOOTBOX_WEEKLY";
|
|
2817
2816
|
AchCustomSectionType[AchCustomSectionType["LOOTBOX_CALENDAR_DAYS"] = 11] = "LOOTBOX_CALENDAR_DAYS";
|
|
@@ -2841,7 +2840,7 @@ var AchOverviewMissionsFilter;
|
|
|
2841
2840
|
|
|
2842
2841
|
const UICustomSectionTransform = response => {
|
|
2843
2842
|
const items = [];
|
|
2844
|
-
Object.keys(response.customSections).forEach(key => {
|
|
2843
|
+
Object.keys(response.customSections || []).forEach(key => {
|
|
2845
2844
|
const r = response.customSections[key];
|
|
2846
2845
|
const id = parseInt(key);
|
|
2847
2846
|
if (r.section_type_id !== undefined && r.section_type_id >= 1) {
|
|
@@ -3023,6 +3022,9 @@ class SmarticoAPI {
|
|
|
3023
3022
|
try {
|
|
3024
3023
|
const timeStart = new Date().getTime();
|
|
3025
3024
|
result = await this.messageSender(message, this.publicUrl, expectCID);
|
|
3025
|
+
if (result.errCode && result.errSetup) {
|
|
3026
|
+
throw new Error(result.errMessage);
|
|
3027
|
+
}
|
|
3026
3028
|
result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
|
|
3027
3029
|
const timeEnd = new Date().getTime();
|
|
3028
3030
|
if (this.logHTTPTiming) {
|
|
@@ -3498,12 +3500,12 @@ class SmarticoAPI {
|
|
|
3498
3500
|
async levelsGetT(user_ext_id) {
|
|
3499
3501
|
return GetLevelMapResponseTransform(await this.levelsGet(user_ext_id));
|
|
3500
3502
|
}
|
|
3501
|
-
async
|
|
3503
|
+
async customSectionsGet(user_ext_id, force_language) {
|
|
3502
3504
|
const message = this.buildMessage(user_ext_id, ClassId.GET_CUSTOM_SECTIONS_REQUEST);
|
|
3503
|
-
return await this.send(message, ClassId.GET_CUSTOM_SECTIONS_RESPONSE);
|
|
3505
|
+
return await this.send(message, ClassId.GET_CUSTOM_SECTIONS_RESPONSE, force_language);
|
|
3504
3506
|
}
|
|
3505
|
-
async
|
|
3506
|
-
return UICustomSectionTransform(await this.
|
|
3507
|
+
async customSectionsGetT(user_ext_id) {
|
|
3508
|
+
return UICustomSectionTransform(await this.customSectionsGet(user_ext_id));
|
|
3507
3509
|
}
|
|
3508
3510
|
async getTranslationsT(user_ext_id, lang_code, areas, cacheSec = 60) {
|
|
3509
3511
|
return await this.coreGetTranslations(user_ext_id, lang_code, areas, 30);
|