@smartico/public-api 0.0.237 → 0.0.238

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.
@@ -129,6 +129,8 @@ var ClassId;
129
129
  ClassId[ClassId["RAF_GET_DRAW_RUN_RESPONSE"] = 905] = "RAF_GET_DRAW_RUN_RESPONSE";
130
130
  ClassId[ClassId["RAF_GET_DRAW_HISTORY_REQUEST"] = 906] = "RAF_GET_DRAW_HISTORY_REQUEST";
131
131
  ClassId[ClassId["RAF_GET_DRAW_HISTORY_RESPONSE"] = 907] = "RAF_GET_DRAW_HISTORY_RESPONSE";
132
+ ClassId[ClassId["RAF_CLAIM_PRIZE_REQUEST"] = 908] = "RAF_CLAIM_PRIZE_REQUEST";
133
+ ClassId[ClassId["RAF_CLAIM_PRIZE_RESPONSE"] = 909] = "RAF_CLAIM_PRIZE_RESPONSE";
132
134
  /*
133
135
  RAF_GET_TICKETS_REQUEST = 902,
134
136
  RAF_GET_TICKETS_RESPONSE = 903,
@@ -2447,22 +2449,29 @@ var AchOverviewMissionsFilter;
2447
2449
  AchOverviewMissionsFilter[AchOverviewMissionsFilter["ALL_EXCEPT_COMPLETED_AND_LOCKED"] = 5] = "ALL_EXCEPT_COMPLETED_AND_LOCKED";
2448
2450
  })(AchOverviewMissionsFilter || (AchOverviewMissionsFilter = {}));
2449
2451
 
2450
- const UICustomSectionTransform = items => {
2451
- return items.filter(r => r.section_type_id !== undefined && r.section_type_id >= 1).map(r => {
2452
- const x = {
2453
- body: r.body,
2454
- menu_img: r.menu_img,
2455
- menu_name: r.menu_name,
2456
- section_type_id: r.section_type_id,
2457
- custom_skin_images: r.custom_skin_images,
2458
- generic_custom_css: r.generic_custom_css,
2459
- mission_tabs_options: r.mission_tabs_options,
2460
- overview_missions_count: r.overview_missions_count,
2461
- overview_missions_filter: r.overview_missions_filter,
2462
- theme: r.theme
2463
- };
2464
- return x;
2452
+ const UICustomSectionTransform = response => {
2453
+ const items = [];
2454
+ Object.keys(response.customSections).forEach(key => {
2455
+ const r = response.customSections[key];
2456
+ const id = parseInt(key);
2457
+ if (r.section_type_id !== undefined && r.section_type_id >= 1) {
2458
+ const x = {
2459
+ id: id,
2460
+ body: r.body,
2461
+ menu_img: r.menu_img,
2462
+ menu_name: r.menu_name,
2463
+ section_type_id: r.section_type_id,
2464
+ custom_skin_images: r.custom_skin_images,
2465
+ generic_custom_css: r.generic_custom_css,
2466
+ mission_tabs_options: r.mission_tabs_options,
2467
+ overview_missions_count: r.overview_missions_count,
2468
+ overview_missions_filter: r.overview_missions_filter,
2469
+ theme: r.theme
2470
+ };
2471
+ items.push(x);
2472
+ }
2465
2473
  });
2474
+ return items;
2466
2475
  };
2467
2476
 
2468
2477
  const BonusItemsTransform = items => {
@@ -3047,7 +3056,7 @@ class SmarticoAPI {
3047
3056
  return await this.send(message, ClassId.GET_CUSTOM_SECTIONS_RESPONSE);
3048
3057
  }
3049
3058
  async getCustomSectionsT(user_ext_id) {
3050
- return UICustomSectionTransform(Object.values((await this.getCustomSections(user_ext_id)).customSections));
3059
+ return UICustomSectionTransform(await this.getCustomSections(user_ext_id));
3051
3060
  }
3052
3061
  async getTranslationsT(user_ext_id, lang_code, areas, cacheSec = 60) {
3053
3062
  return await this.coreGetTranslations(user_ext_id, lang_code, areas, 30);