@smartico/public-api 0.0.290 → 0.0.292

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.
@@ -9,7 +9,8 @@ export declare enum AchCustomSectionType {
9
9
  REDIRECT_LINK = 9,
10
10
  LOOTBOX_WEEKLY = 10,
11
11
  LOOTBOX_CALENDAR_DAYS = 11,
12
- TREASURE_HUNT = 12
12
+ TREASURE_HUNT = 12,
13
+ RAFFLE = 13
13
14
  }
14
15
  export declare enum AchCustomLayoutTheme {
15
16
  VALENTINES_LIGHT = "valentines-light",
@@ -29,3 +30,15 @@ export declare enum AchOverviewMissionsFilter {
29
30
  ALL_EXCEPT_LOCKED = 4,
30
31
  ALL_EXCEPT_COMPLETED_AND_LOCKED = 5
31
32
  }
33
+ export declare enum LiquidEntityData {
34
+ Missions = 1,
35
+ Store = 2,
36
+ Tournaments = 3,
37
+ MiniGames = 4,
38
+ Levels = 5,
39
+ Jackpots = 6,
40
+ Bonus = 7,
41
+ Leaderboard = 8,
42
+ Badges = 9,
43
+ Tournament = 10
44
+ }
@@ -1,5 +1,5 @@
1
1
  import { TUICustomSection } from '../WSAPI/WSAPITypes';
2
- import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from './AchCustomSection';
2
+ import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter, LiquidEntityData } from './AchCustomSection';
3
3
  import { GetCustomSectionsResponse } from './GetCustomSectionsResponse';
4
4
  export interface UICustomSection {
5
5
  body?: string;
@@ -12,5 +12,9 @@ export interface UICustomSection {
12
12
  mission_tabs_options?: AchMissionsTabsOptions;
13
13
  overview_missions_filter?: AchOverviewMissionsFilter;
14
14
  overview_missions_count?: number;
15
+ liquid_entity_data?: LiquidEntityData[];
16
+ ach_tournament_id?: number;
17
+ show_raw_data?: boolean;
18
+ liquid_template?: number;
15
19
  }
16
20
  export declare const UICustomSectionTransform: (response: GetCustomSectionsResponse) => TUICustomSection[];
@@ -141,6 +141,9 @@ export declare class WSAPI {
141
141
  /**
142
142
  *
143
143
  * Returns all the store items available the current user
144
+ * The returned store items are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
145
+ * Note that each time you call getStoreItems with a new onUpdate callback, the old one will be overwritten by the new one.
146
+ * The onUpdate callback will be called on purchase of the store item.
144
147
  *
145
148
  * **Example**:
146
149
  * ```
@@ -155,8 +158,12 @@ export declare class WSAPI {
155
158
  * console.log(result);
156
159
  * });
157
160
  * ```
161
+ * @param params
162
+ * @param params.onUpdate - callback function that will be called when the store items are updated
158
163
  */
159
- getStoreItems(): Promise<TStoreItem[]>;
164
+ getStoreItems({ onUpdate }?: {
165
+ onUpdate?: (data: TStoreItem[]) => void;
166
+ }): Promise<TStoreItem[]>;
160
167
  /** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
161
168
  * **Example**:
162
169
  * ```
@@ -482,6 +489,7 @@ export declare class WSAPI {
482
489
  private updateBonuses;
483
490
  private updateTournaments;
484
491
  private updateStorePurchasedItems;
492
+ private updateStoreItems;
485
493
  private updateInboxMessages;
486
494
  private updateRaffles;
487
495
  private updateEntity;
@@ -3,7 +3,7 @@ import { MiniGamePrizeTypeName, SAWAcknowledgeTypeName, SAWAskForUsername, SAWBu
3
3
  import { TournamentRegistrationError, TournamentRegistrationStatusName, TournamentRegistrationTypeName } from '../Tournaments';
4
4
  import { AchievementAvailabilityStatus } from '../Missions';
5
5
  import { LeaderBoardPeriodType } from '../Leaderboard';
6
- import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from '../CustomSections';
6
+ import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter, LiquidEntityData } from '../CustomSections';
7
7
  import { PrizeModifiers } from '../MiniGames/PrizeModifiers';
8
8
  import { InboxCategories } from '../Inbox/InboxCategories';
9
9
  import { RaffleDrawInstanceState, RaffleDrawTypeExecution } from '../Raffle';
@@ -797,6 +797,14 @@ export interface TUICustomSection {
797
797
  overview_missions_filter?: AchOverviewMissionsFilter;
798
798
  /** Quantity of missions to be shown in overview */
799
799
  overview_missions_count?: number;
800
+ /** Data to be used for Liquid templates */
801
+ liquid_entity_data?: LiquidEntityData[];
802
+ /** Tournament ID to be used for Liquid templates */
803
+ ach_tournament_id?: number;
804
+ /** Indicates if the data should be shown as raw data (for Liquid templates) */
805
+ show_raw_data?: boolean;
806
+ /** Liquid template id to be used for Liquid templates */
807
+ liquid_template?: number;
800
808
  }
801
809
  export interface TBonus {
802
810
  /** ID of the bonus */
package/dist/index.d.ts CHANGED
@@ -15,3 +15,4 @@ export * from './Quiz';
15
15
  export * from './Jackpots';
16
16
  export * from './OCache';
17
17
  export * from './Bonuses';
18
+ export * from './CustomSections';
package/dist/index.js CHANGED
@@ -1934,7 +1934,8 @@ var WSAPI = /*#__PURE__*/function () {
1934
1934
  return _this.updateTournaments();
1935
1935
  });
1936
1936
  on(exports.ClassId.BUY_SHOP_ITEM_RESPONSE, function () {
1937
- return _this.updateStorePurchasedItems();
1937
+ _this.updateStorePurchasedItems();
1938
+ _this.updateStoreItems();
1938
1939
  });
1939
1940
  on(exports.ClassId.CLIENT_ENGAGEMENT_EVENT_NEW, function () {
1940
1941
  return _this.updateInboxMessages();
@@ -2213,6 +2214,9 @@ var WSAPI = /*#__PURE__*/function () {
2213
2214
  /**
2214
2215
  *
2215
2216
  * Returns all the store items available the current user
2217
+ * The returned store items are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
2218
+ * Note that each time you call getStoreItems with a new onUpdate callback, the old one will be overwritten by the new one.
2219
+ * The onUpdate callback will be called on purchase of the store item.
2216
2220
  *
2217
2221
  * **Example**:
2218
2222
  * ```
@@ -2227,11 +2231,18 @@ var WSAPI = /*#__PURE__*/function () {
2227
2231
  * console.log(result);
2228
2232
  * });
2229
2233
  * ```
2234
+ * @param params
2235
+ * @param params.onUpdate - callback function that will be called when the store items are updated
2230
2236
  */
2231
2237
  ;
2232
- _proto.getStoreItems = function getStoreItems() {
2238
+ _proto.getStoreItems = function getStoreItems(_temp3) {
2239
+ var _ref3 = _temp3 === void 0 ? {} : _temp3,
2240
+ onUpdate = _ref3.onUpdate;
2233
2241
  try {
2234
2242
  var _this11 = this;
2243
+ if (onUpdate) {
2244
+ _this11.onUpdateCallback.set(onUpdateContextKey.StoreItems, onUpdate);
2245
+ }
2235
2246
  return Promise.resolve(OCache.use(onUpdateContextKey.StoreItems, exports.ECacheContext.WSAPI, function () {
2236
2247
  return _this11.api.storeGetItemsT(null);
2237
2248
  }, CACHE_DATA_SEC));
@@ -2311,11 +2322,11 @@ var WSAPI = /*#__PURE__*/function () {
2311
2322
  * **Visitor mode: not supported**
2312
2323
  */
2313
2324
  ;
2314
- _proto.getStorePurchasedItems = function getStorePurchasedItems(_temp3) {
2315
- var _ref3 = _temp3 === void 0 ? {} : _temp3,
2316
- limit = _ref3.limit,
2317
- offset = _ref3.offset,
2318
- onUpdate = _ref3.onUpdate;
2325
+ _proto.getStorePurchasedItems = function getStorePurchasedItems(_temp4) {
2326
+ var _ref4 = _temp4 === void 0 ? {} : _temp4,
2327
+ limit = _ref4.limit,
2328
+ offset = _ref4.offset,
2329
+ onUpdate = _ref4.onUpdate;
2319
2330
  try {
2320
2331
  var _this14 = this;
2321
2332
  if (onUpdate) {
@@ -2407,9 +2418,9 @@ var WSAPI = /*#__PURE__*/function () {
2407
2418
  *
2408
2419
  */
2409
2420
  ;
2410
- _proto.getMiniGames = function getMiniGames(_temp4) {
2411
- var _ref4 = _temp4 === void 0 ? {} : _temp4,
2412
- onUpdate = _ref4.onUpdate;
2421
+ _proto.getMiniGames = function getMiniGames(_temp5) {
2422
+ var _ref5 = _temp5 === void 0 ? {} : _temp5,
2423
+ onUpdate = _ref5.onUpdate;
2413
2424
  try {
2414
2425
  var _this17 = this;
2415
2426
  if (onUpdate) {
@@ -2438,10 +2449,10 @@ var WSAPI = /*#__PURE__*/function () {
2438
2449
  * **Visitor mode: not supported**
2439
2450
  */
2440
2451
  ;
2441
- _proto.getMiniGamesHistory = function getMiniGamesHistory(_ref5) {
2442
- var limit = _ref5.limit,
2443
- offset = _ref5.offset,
2444
- saw_template_id = _ref5.saw_template_id;
2452
+ _proto.getMiniGamesHistory = function getMiniGamesHistory(_ref6) {
2453
+ var limit = _ref6.limit,
2454
+ offset = _ref6.offset,
2455
+ saw_template_id = _ref6.saw_template_id;
2445
2456
  try {
2446
2457
  var _this18 = this;
2447
2458
  return Promise.resolve(OCache.use(onUpdateContextKey.SAWHistory, exports.ECacheContext.WSAPI, function () {
@@ -2466,9 +2477,9 @@ var WSAPI = /*#__PURE__*/function () {
2466
2477
  * **Visitor mode: not supported**
2467
2478
  */
2468
2479
  ;
2469
- _proto.playMiniGame = function playMiniGame(template_id, _temp5) {
2470
- var _ref6 = _temp5 === void 0 ? {} : _temp5,
2471
- onUpdate = _ref6.onUpdate;
2480
+ _proto.playMiniGame = function playMiniGame(template_id, _temp6) {
2481
+ var _ref7 = _temp6 === void 0 ? {} : _temp6,
2482
+ onUpdate = _ref7.onUpdate;
2472
2483
  try {
2473
2484
  var _this19 = this;
2474
2485
  if (onUpdate) {
@@ -2519,9 +2530,9 @@ var WSAPI = /*#__PURE__*/function () {
2519
2530
  * **Visitor mode: not supported**
2520
2531
  */
2521
2532
  ;
2522
- _proto.playMiniGameBatch = function playMiniGameBatch(template_id, spin_count, _temp6) {
2523
- var _ref7 = _temp6 === void 0 ? {} : _temp6,
2524
- onUpdate = _ref7.onUpdate;
2533
+ _proto.playMiniGameBatch = function playMiniGameBatch(template_id, spin_count, _temp7) {
2534
+ var _ref8 = _temp7 === void 0 ? {} : _temp7,
2535
+ onUpdate = _ref8.onUpdate;
2525
2536
  try {
2526
2537
  var _this21 = this;
2527
2538
  if (onUpdate) {
@@ -2606,9 +2617,9 @@ var WSAPI = /*#__PURE__*/function () {
2606
2617
  * ```
2607
2618
  * */
2608
2619
  ;
2609
- _proto.getTournamentsList = function getTournamentsList(_temp7) {
2610
- var _ref8 = _temp7 === void 0 ? {} : _temp7,
2611
- onUpdate = _ref8.onUpdate;
2620
+ _proto.getTournamentsList = function getTournamentsList(_temp8) {
2621
+ var _ref9 = _temp8 === void 0 ? {} : _temp8,
2622
+ onUpdate = _ref9.onUpdate;
2612
2623
  try {
2613
2624
  var _this24 = this;
2614
2625
  if (onUpdate) {
@@ -2717,13 +2728,13 @@ var WSAPI = /*#__PURE__*/function () {
2717
2728
  * @param params
2718
2729
  */
2719
2730
  ;
2720
- _proto.getInboxMessages = function getInboxMessages(_temp8) {
2721
- var _ref9 = _temp8 === void 0 ? {} : _temp8,
2722
- from = _ref9.from,
2723
- to = _ref9.to,
2724
- onlyFavorite = _ref9.onlyFavorite,
2725
- categoryId = _ref9.categoryId,
2726
- onUpdate = _ref9.onUpdate;
2731
+ _proto.getInboxMessages = function getInboxMessages(_temp9) {
2732
+ var _ref10 = _temp9 === void 0 ? {} : _temp9,
2733
+ from = _ref10.from,
2734
+ to = _ref10.to,
2735
+ onlyFavorite = _ref10.onlyFavorite,
2736
+ categoryId = _ref10.categoryId,
2737
+ onUpdate = _ref10.onUpdate;
2727
2738
  try {
2728
2739
  var _this28 = this;
2729
2740
  if (onUpdate) {
@@ -2925,31 +2936,41 @@ var WSAPI = /*#__PURE__*/function () {
2925
2936
  return Promise.reject(e);
2926
2937
  }
2927
2938
  };
2928
- _proto.updateInboxMessages = function updateInboxMessages() {
2939
+ _proto.updateStoreItems = function updateStoreItems() {
2929
2940
  try {
2930
2941
  var _this42 = this;
2931
- return Promise.resolve(_this42.api.getInboxMessagesT(null)).then(function (payload) {
2932
- _this42.updateEntity(onUpdateContextKey.InboxMessages, payload);
2942
+ return Promise.resolve(_this42.api.storeGetItemsT(null)).then(function (payload) {
2943
+ _this42.updateEntity(onUpdateContextKey.StoreItems, payload);
2933
2944
  });
2934
2945
  } catch (e) {
2935
2946
  return Promise.reject(e);
2936
2947
  }
2937
2948
  };
2938
- _proto.updateRaffles = function updateRaffles() {
2949
+ _proto.updateInboxMessages = function updateInboxMessages() {
2939
2950
  try {
2940
2951
  var _this43 = this;
2941
- return Promise.resolve(_this43.api.getRafflesT(null)).then(function (payload) {
2942
- _this43.updateEntity(onUpdateContextKey.Raffles, payload);
2952
+ return Promise.resolve(_this43.api.getInboxMessagesT(null)).then(function (payload) {
2953
+ _this43.updateEntity(onUpdateContextKey.InboxMessages, payload);
2943
2954
  });
2944
2955
  } catch (e) {
2945
2956
  return Promise.reject(e);
2946
2957
  }
2947
2958
  };
2948
- _proto.updateEntity = function updateEntity(contextKey, payload) {
2959
+ _proto.updateRaffles = function updateRaffles() {
2949
2960
  try {
2950
2961
  var _this44 = this;
2962
+ return Promise.resolve(_this44.api.getRafflesT(null)).then(function (payload) {
2963
+ _this44.updateEntity(onUpdateContextKey.Raffles, payload);
2964
+ });
2965
+ } catch (e) {
2966
+ return Promise.reject(e);
2967
+ }
2968
+ };
2969
+ _proto.updateEntity = function updateEntity(contextKey, payload) {
2970
+ try {
2971
+ var _this45 = this;
2951
2972
  OCache.set(contextKey, payload, exports.ECacheContext.WSAPI);
2952
- var onUpdate = _this44.onUpdateCallback.get(contextKey);
2973
+ var onUpdate = _this45.onUpdateCallback.get(contextKey);
2953
2974
  if (onUpdate) {
2954
2975
  onUpdate(payload);
2955
2976
  }
@@ -2990,17 +3011,17 @@ var WSAPI = /*#__PURE__*/function () {
2990
3011
  ;
2991
3012
  _proto.jackpotGet = function jackpotGet(filter) {
2992
3013
  try {
2993
- var _this45 = this;
3014
+ var _this46 = this;
2994
3015
  var signature = (filter == null ? void 0 : filter.jp_template_id) + ":" + (filter == null ? void 0 : filter.related_game_id);
2995
- if (signature !== _this45.jackpotGetSignature) {
2996
- _this45.jackpotGetSignature = signature;
2997
- _this45.jackpotClearCache();
3016
+ if (signature !== _this46.jackpotGetSignature) {
3017
+ _this46.jackpotGetSignature = signature;
3018
+ _this46.jackpotClearCache();
2998
3019
  }
2999
3020
  var jackpots = [];
3000
3021
  var pots = [];
3001
3022
  return Promise.resolve(OCache.use(onUpdateContextKey.Jackpots, exports.ECacheContext.WSAPI, function () {
3002
3023
  try {
3003
- return Promise.resolve(_this45.api.jackpotGet(null, filter)).then(function (_jackpots) {
3024
+ return Promise.resolve(_this46.api.jackpotGet(null, filter)).then(function (_jackpots) {
3004
3025
  var _pots = _jackpots.items.map(function (jp) {
3005
3026
  return jp.pot;
3006
3027
  });
@@ -3014,7 +3035,7 @@ var WSAPI = /*#__PURE__*/function () {
3014
3035
  return Promise.reject(e);
3015
3036
  }
3016
3037
  }, JACKPOT_TEMPLATE_CACHE_SEC)).then(function (_OCache$use) {
3017
- function _temp10() {
3038
+ function _temp11() {
3018
3039
  return jackpots.map(function (jp) {
3019
3040
  var _jp = _extends({}, jp, {
3020
3041
  pot: pots.find(function (p) {
@@ -3025,17 +3046,17 @@ var WSAPI = /*#__PURE__*/function () {
3025
3046
  });
3026
3047
  }
3027
3048
  jackpots = _OCache$use;
3028
- var _temp9 = function () {
3049
+ var _temp10 = function () {
3029
3050
  if (jackpots.length > 0) {
3030
3051
  return Promise.resolve(OCache.use(onUpdateContextKey.Pots, exports.ECacheContext.WSAPI, function () {
3031
3052
  try {
3032
3053
  var jp_template_ids = jackpots.map(function (jp) {
3033
3054
  return jp.jp_template_id;
3034
3055
  });
3035
- return Promise.resolve(_this45.api.potGet(null, {
3056
+ return Promise.resolve(_this46.api.potGet(null, {
3036
3057
  jp_template_ids: jp_template_ids
3037
- })).then(function (_this45$api$potGet) {
3038
- return _this45$api$potGet.items;
3058
+ })).then(function (_this46$api$potGet) {
3059
+ return _this46$api$potGet.items;
3039
3060
  });
3040
3061
  } catch (e) {
3041
3062
  return Promise.reject(e);
@@ -3045,7 +3066,7 @@ var WSAPI = /*#__PURE__*/function () {
3045
3066
  });
3046
3067
  }
3047
3068
  }();
3048
- return _temp9 && _temp9.then ? _temp9.then(_temp10) : _temp10(_temp9);
3069
+ return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
3049
3070
  });
3050
3071
  } catch (e) {
3051
3072
  return Promise.reject(e);
@@ -3068,11 +3089,11 @@ var WSAPI = /*#__PURE__*/function () {
3068
3089
  ;
3069
3090
  _proto.jackpotOptIn = function jackpotOptIn(filter) {
3070
3091
  try {
3071
- var _this46 = this;
3092
+ var _this47 = this;
3072
3093
  if (!filter.jp_template_id) {
3073
3094
  throw new Error('jp_template_id is required in jackpotOptIn');
3074
3095
  }
3075
- return Promise.resolve(_this46.api.jackpotOptIn(null, filter));
3096
+ return Promise.resolve(_this47.api.jackpotOptIn(null, filter));
3076
3097
  } catch (e) {
3077
3098
  return Promise.reject(e);
3078
3099
  }
@@ -3094,11 +3115,11 @@ var WSAPI = /*#__PURE__*/function () {
3094
3115
  ;
3095
3116
  _proto.jackpotOptOut = function jackpotOptOut(filter) {
3096
3117
  try {
3097
- var _this47 = this;
3118
+ var _this48 = this;
3098
3119
  if (!filter.jp_template_id) {
3099
3120
  throw new Error('jp_template_id is required in jackpotOptOut');
3100
3121
  }
3101
- return Promise.resolve(_this47.api.jackpotOptOut(null, filter));
3122
+ return Promise.resolve(_this48.api.jackpotOptOut(null, filter));
3102
3123
  } catch (e) {
3103
3124
  return Promise.reject(e);
3104
3125
  }
@@ -3119,14 +3140,14 @@ var WSAPI = /*#__PURE__*/function () {
3119
3140
  *
3120
3141
  */
3121
3142
  ;
3122
- _proto.getJackpotWinners = function getJackpotWinners(_ref10) {
3123
- var limit = _ref10.limit,
3124
- offset = _ref10.offset,
3125
- jp_template_id = _ref10.jp_template_id;
3143
+ _proto.getJackpotWinners = function getJackpotWinners(_ref11) {
3144
+ var limit = _ref11.limit,
3145
+ offset = _ref11.offset,
3146
+ jp_template_id = _ref11.jp_template_id;
3126
3147
  try {
3127
- var _this48 = this;
3148
+ var _this49 = this;
3128
3149
  return Promise.resolve(OCache.use(onUpdateContextKey.JackpotWinners + jp_template_id, exports.ECacheContext.WSAPI, function () {
3129
- return _this48.api.getJackpotWinnersT(null, limit, offset, jp_template_id);
3150
+ return _this49.api.getJackpotWinnersT(null, limit, offset, jp_template_id);
3130
3151
  }, JACKPOT_WINNERS_CACHE_SEC));
3131
3152
  } catch (e) {
3132
3153
  return Promise.reject(e);
@@ -3146,16 +3167,16 @@ var WSAPI = /*#__PURE__*/function () {
3146
3167
  *
3147
3168
  */
3148
3169
  ;
3149
- _proto.getJackpotEligibleGames = function getJackpotEligibleGames(_ref11) {
3150
- var jp_template_id = _ref11.jp_template_id,
3151
- onUpdate = _ref11.onUpdate;
3170
+ _proto.getJackpotEligibleGames = function getJackpotEligibleGames(_ref12) {
3171
+ var jp_template_id = _ref12.jp_template_id,
3172
+ onUpdate = _ref12.onUpdate;
3152
3173
  try {
3153
- var _this49 = this;
3174
+ var _this50 = this;
3154
3175
  if (onUpdate) {
3155
- _this49.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
3176
+ _this50.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
3156
3177
  }
3157
3178
  return Promise.resolve(OCache.use(onUpdateContextKey.JackpotEligibleGames + jp_template_id, exports.ECacheContext.WSAPI, function () {
3158
- return _this49.api.getJackpotEligibleGamesT(null, {
3179
+ return _this50.api.getJackpotEligibleGamesT(null, {
3159
3180
  jp_template_id: jp_template_id
3160
3181
  });
3161
3182
  }, JACKPOT_ELIGIBLE_GAMES_CACHE_SEC));
@@ -3184,8 +3205,8 @@ var WSAPI = /*#__PURE__*/function () {
3184
3205
  ;
3185
3206
  _proto.getRelatedItemsForGame = function getRelatedItemsForGame(related_game_id) {
3186
3207
  try {
3187
- var _this50 = this;
3188
- return Promise.resolve(_this50.api.getRelatedItemsForGame(null, related_game_id));
3208
+ var _this51 = this;
3209
+ return Promise.resolve(_this51.api.getRelatedItemsForGame(null, related_game_id));
3189
3210
  } catch (e) {
3190
3211
  return Promise.reject(e);
3191
3212
  }
@@ -3213,16 +3234,16 @@ var WSAPI = /*#__PURE__*/function () {
3213
3234
  *
3214
3235
  */
3215
3236
  ;
3216
- _proto.getRaffles = function getRaffles(_temp11) {
3217
- var _ref12 = _temp11 === void 0 ? {} : _temp11,
3218
- onUpdate = _ref12.onUpdate;
3237
+ _proto.getRaffles = function getRaffles(_temp12) {
3238
+ var _ref13 = _temp12 === void 0 ? {} : _temp12,
3239
+ onUpdate = _ref13.onUpdate;
3219
3240
  try {
3220
- var _this51 = this;
3241
+ var _this52 = this;
3221
3242
  if (onUpdate) {
3222
- _this51.onUpdateCallback.set(onUpdateContextKey.Raffles, onUpdate);
3243
+ _this52.onUpdateCallback.set(onUpdateContextKey.Raffles, onUpdate);
3223
3244
  }
3224
3245
  return Promise.resolve(OCache.use(onUpdateContextKey.Raffles, exports.ECacheContext.WSAPI, function () {
3225
- return _this51.api.getRafflesT(null);
3246
+ return _this52.api.getRafflesT(null);
3226
3247
  }, CACHE_DATA_SEC));
3227
3248
  } catch (e) {
3228
3249
  return Promise.reject(e);
@@ -3253,8 +3274,8 @@ var WSAPI = /*#__PURE__*/function () {
3253
3274
  ;
3254
3275
  _proto.getRaffleDrawRun = function getRaffleDrawRun(props) {
3255
3276
  try {
3256
- var _this52 = this;
3257
- return Promise.resolve(_this52.api.getRaffleDrawRun(null, props)).then(function (res) {
3277
+ var _this53 = this;
3278
+ return Promise.resolve(_this53.api.getRaffleDrawRun(null, props)).then(function (res) {
3258
3279
  if (!props.raffle_id || !props.run_id) {
3259
3280
  throw new Error('both raffle_id and run_id are required');
3260
3281
  }
@@ -3288,8 +3309,8 @@ var WSAPI = /*#__PURE__*/function () {
3288
3309
  ;
3289
3310
  _proto.getRaffleDrawRunsHistory = function getRaffleDrawRunsHistory(props) {
3290
3311
  try {
3291
- var _this53 = this;
3292
- return Promise.resolve(_this53.api.getRaffleDrawRunsHistory(null, props)).then(function (res) {
3312
+ var _this54 = this;
3313
+ return Promise.resolve(_this54.api.getRaffleDrawRunsHistory(null, props)).then(function (res) {
3293
3314
  if (!props.raffle_id) {
3294
3315
  throw new Error('raffle_id is required');
3295
3316
  }
@@ -3323,11 +3344,11 @@ var WSAPI = /*#__PURE__*/function () {
3323
3344
  ;
3324
3345
  _proto.claimRafflePrize = function claimRafflePrize(props) {
3325
3346
  try {
3326
- var _this54 = this;
3347
+ var _this55 = this;
3327
3348
  if (!props.won_id) {
3328
3349
  throw new Error('won_id is required');
3329
3350
  }
3330
- return Promise.resolve(_this54.api.claimRafflePrize(null, {
3351
+ return Promise.resolve(_this55.api.claimRafflePrize(null, {
3331
3352
  won_id: props.won_id
3332
3353
  })).then(raffleClaimPrizeResponseTransform);
3333
3354
  } catch (e) {
@@ -3337,7 +3358,7 @@ var WSAPI = /*#__PURE__*/function () {
3337
3358
  return WSAPI;
3338
3359
  }();
3339
3360
 
3340
- var AchCustomSectionType;
3361
+ exports.AchCustomSectionType = void 0;
3341
3362
  (function (AchCustomSectionType) {
3342
3363
  AchCustomSectionType[AchCustomSectionType["HTML_PAGE"] = 1] = "HTML_PAGE";
3343
3364
  AchCustomSectionType[AchCustomSectionType["MISSIONS_CATEGORY"] = 2] = "MISSIONS_CATEGORY";
@@ -3350,28 +3371,42 @@ var AchCustomSectionType;
3350
3371
  AchCustomSectionType[AchCustomSectionType["LOOTBOX_WEEKLY"] = 10] = "LOOTBOX_WEEKLY";
3351
3372
  AchCustomSectionType[AchCustomSectionType["LOOTBOX_CALENDAR_DAYS"] = 11] = "LOOTBOX_CALENDAR_DAYS";
3352
3373
  AchCustomSectionType[AchCustomSectionType["TREASURE_HUNT"] = 12] = "TREASURE_HUNT";
3353
- })(AchCustomSectionType || (AchCustomSectionType = {}));
3354
- var AchCustomLayoutTheme;
3374
+ AchCustomSectionType[AchCustomSectionType["RAFFLE"] = 13] = "RAFFLE";
3375
+ })(exports.AchCustomSectionType || (exports.AchCustomSectionType = {}));
3376
+ exports.AchCustomLayoutTheme = void 0;
3355
3377
  (function (AchCustomLayoutTheme) {
3356
3378
  AchCustomLayoutTheme["VALENTINES_LIGHT"] = "valentines-light";
3357
3379
  AchCustomLayoutTheme["VALENTINES_DARK"] = "valentines-dark";
3358
3380
  AchCustomLayoutTheme["EURO_2024"] = "euro-2024";
3359
3381
  AchCustomLayoutTheme["GENERIC"] = "generic";
3360
- })(AchCustomLayoutTheme || (AchCustomLayoutTheme = {}));
3361
- var AchMissionsTabsOptions;
3382
+ })(exports.AchCustomLayoutTheme || (exports.AchCustomLayoutTheme = {}));
3383
+ exports.AchMissionsTabsOptions = void 0;
3362
3384
  (function (AchMissionsTabsOptions) {
3363
3385
  AchMissionsTabsOptions[AchMissionsTabsOptions["ONLY_OVERVIEW"] = 1] = "ONLY_OVERVIEW";
3364
3386
  AchMissionsTabsOptions[AchMissionsTabsOptions["NO_OVERVIEW"] = 2] = "NO_OVERVIEW";
3365
3387
  AchMissionsTabsOptions[AchMissionsTabsOptions["ALL"] = 3] = "ALL";
3366
- })(AchMissionsTabsOptions || (AchMissionsTabsOptions = {}));
3367
- var AchOverviewMissionsFilter;
3388
+ })(exports.AchMissionsTabsOptions || (exports.AchMissionsTabsOptions = {}));
3389
+ exports.AchOverviewMissionsFilter = void 0;
3368
3390
  (function (AchOverviewMissionsFilter) {
3369
3391
  AchOverviewMissionsFilter[AchOverviewMissionsFilter["ANY"] = 1] = "ANY";
3370
3392
  AchOverviewMissionsFilter[AchOverviewMissionsFilter["ALL_MISSIONS"] = 2] = "ALL_MISSIONS";
3371
3393
  AchOverviewMissionsFilter[AchOverviewMissionsFilter["ALL_EXCEPT_COMPLETED"] = 3] = "ALL_EXCEPT_COMPLETED";
3372
3394
  AchOverviewMissionsFilter[AchOverviewMissionsFilter["ALL_EXCEPT_LOCKED"] = 4] = "ALL_EXCEPT_LOCKED";
3373
3395
  AchOverviewMissionsFilter[AchOverviewMissionsFilter["ALL_EXCEPT_COMPLETED_AND_LOCKED"] = 5] = "ALL_EXCEPT_COMPLETED_AND_LOCKED";
3374
- })(AchOverviewMissionsFilter || (AchOverviewMissionsFilter = {}));
3396
+ })(exports.AchOverviewMissionsFilter || (exports.AchOverviewMissionsFilter = {}));
3397
+ exports.LiquidEntityData = void 0;
3398
+ (function (LiquidEntityData) {
3399
+ LiquidEntityData[LiquidEntityData["Missions"] = 1] = "Missions";
3400
+ LiquidEntityData[LiquidEntityData["Store"] = 2] = "Store";
3401
+ LiquidEntityData[LiquidEntityData["Tournaments"] = 3] = "Tournaments";
3402
+ LiquidEntityData[LiquidEntityData["MiniGames"] = 4] = "MiniGames";
3403
+ LiquidEntityData[LiquidEntityData["Levels"] = 5] = "Levels";
3404
+ LiquidEntityData[LiquidEntityData["Jackpots"] = 6] = "Jackpots";
3405
+ LiquidEntityData[LiquidEntityData["Bonus"] = 7] = "Bonus";
3406
+ LiquidEntityData[LiquidEntityData["Leaderboard"] = 8] = "Leaderboard";
3407
+ LiquidEntityData[LiquidEntityData["Badges"] = 9] = "Badges";
3408
+ LiquidEntityData[LiquidEntityData["Tournament"] = 10] = "Tournament";
3409
+ })(exports.LiquidEntityData || (exports.LiquidEntityData = {}));
3375
3410
 
3376
3411
  var UICustomSectionTransform = function UICustomSectionTransform(response) {
3377
3412
  var items = [];
@@ -3379,7 +3414,7 @@ var UICustomSectionTransform = function UICustomSectionTransform(response) {
3379
3414
  var r = response.customSections[key];
3380
3415
  var id = parseInt(key);
3381
3416
  if (r.section_type_id !== undefined && r.section_type_id >= 1) {
3382
- var x = {
3417
+ var x = _extends({
3383
3418
  id: id,
3384
3419
  body: r.body,
3385
3420
  menu_img: r.menu_img,
@@ -3391,7 +3426,12 @@ var UICustomSectionTransform = function UICustomSectionTransform(response) {
3391
3426
  overview_missions_count: r.overview_missions_count,
3392
3427
  overview_missions_filter: r.overview_missions_filter,
3393
3428
  theme: r.theme
3394
- };
3429
+ }, r.section_type_id === exports.AchCustomSectionType.LEVELS ? {
3430
+ liquid_entity_data: r.liquid_entity_data,
3431
+ ach_tournament_id: r.ach_tournament_id,
3432
+ show_raw_data: r.show_raw_data,
3433
+ liquid_template: r.liquid_template
3434
+ } : {});
3395
3435
  items.push(x);
3396
3436
  }
3397
3437
  });
@@ -5122,6 +5162,7 @@ exports.TournamentItemsTransform = TournamentItemsTransform;
5122
5162
  exports.TournamentRegistrationStatusNamed = TournamentRegistrationStatusNamed;
5123
5163
  exports.TournamentRegistrationTypeGetName = TournamentRegistrationTypeGetName;
5124
5164
  exports.TournamentUtils = TournamentUtils;
5165
+ exports.UICustomSectionTransform = UICustomSectionTransform;
5125
5166
  exports.UserAchievementTransform = UserAchievementTransform;
5126
5167
  exports.getLeaderBoardTransform = getLeaderBoardTransform;
5127
5168
  exports.marketsInfo = marketsInfo;