@smartico/public-api 0.0.276 → 0.0.278

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.
@@ -6,6 +6,9 @@ export declare enum ActivityTypeLimited {
6
6
  MiniGameAttempt = 16,
7
7
  DeductPoints = 21,
8
8
  ResetPoints = 22,
9
+ AddGemsAndDiamonds = 25,
10
+ DeductGemsAndDiamonds = 26,
11
+ ResetGemsAndDiamonds = 27,
9
12
  Popup = 30,
10
13
  Inbox = 31,
11
14
  Slack = 70,
@@ -17,4 +17,7 @@ export interface SAWPrize {
17
17
  relative_period_timezone?: number;
18
18
  is_surcharge?: boolean;
19
19
  is_deleted?: boolean;
20
+ prize_details_json?: {
21
+ [key: string]: any;
22
+ };
20
23
  }
@@ -26,6 +26,7 @@ export interface SAWTemplate {
26
26
  skin_folder: string;
27
27
  skin_css: string;
28
28
  use_new_popups?: boolean;
29
+ lottie_animation_speed?: number;
29
30
  };
30
31
  expose_game_stat_on_api?: boolean;
31
32
  requires_prize_claim?: boolean;
@@ -7,4 +7,6 @@ export interface TournamentPrize {
7
7
  place_to: number;
8
8
  type: ActivityTypeLimited;
9
9
  points: number;
10
+ gems: number;
11
+ diamonds: number;
10
12
  }
@@ -23,5 +23,7 @@ export declare class TournamentUtils {
23
23
  place_from: number;
24
24
  place_to: number;
25
25
  points: number;
26
+ gems: number;
27
+ diamonds: number;
26
28
  };
27
29
  }
@@ -126,7 +126,12 @@ export interface TMiniGameTemplate {
126
126
  buyin_cost_diamonds?: number;
127
127
  /** in case of charging type 'Spin attempts', shows the current number of spin attempts that user has */
128
128
  spin_count?: number;
129
- /** if the game is limit to the number of spins that user can do during period of time, this property shows the epoch time in UTC when the next attempt will be available */
129
+ /**
130
+ * if the game is limit to the number of spins that user can do during period of time,
131
+ * this property shows the epoch time in UTC when the next attempt will be available.
132
+ * Note that you need to enable 'Show time to the next available spin' setting on mini-game template in the backoffice
133
+ * Important: this field will not be populated if “Max number of attempts a user can do” is set to value different from 1
134
+ * */
130
135
  next_available_spin_ts: number;
131
136
  /** The message that should be shown to the user when he cannot play the game, server rejected attempt with error code SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED */
132
137
  over_limit_message: string;
package/dist/index.js CHANGED
@@ -733,6 +733,9 @@ exports.ActivityTypeLimited = void 0;
733
733
  ActivityTypeLimited[ActivityTypeLimited["MiniGameAttempt"] = 16] = "MiniGameAttempt";
734
734
  ActivityTypeLimited[ActivityTypeLimited["DeductPoints"] = 21] = "DeductPoints";
735
735
  ActivityTypeLimited[ActivityTypeLimited["ResetPoints"] = 22] = "ResetPoints";
736
+ ActivityTypeLimited[ActivityTypeLimited["AddGemsAndDiamonds"] = 25] = "AddGemsAndDiamonds";
737
+ ActivityTypeLimited[ActivityTypeLimited["DeductGemsAndDiamonds"] = 26] = "DeductGemsAndDiamonds";
738
+ ActivityTypeLimited[ActivityTypeLimited["ResetGemsAndDiamonds"] = 27] = "ResetGemsAndDiamonds";
736
739
  ActivityTypeLimited[ActivityTypeLimited["Popup"] = 30] = "Popup";
737
740
  ActivityTypeLimited[ActivityTypeLimited["Inbox"] = 31] = "Inbox";
738
741
  ActivityTypeLimited[ActivityTypeLimited["Slack"] = 70] = "Slack";
@@ -1477,7 +1480,7 @@ var TournamentInstanceStatusName = function TournamentInstanceStatusName(s) {
1477
1480
 
1478
1481
  var tournamentPrizeTypeToPrizeName = function tournamentPrizeTypeToPrizeName(type) {
1479
1482
  var _ActivityTypeLimited$;
1480
- return (_ActivityTypeLimited$ = {}, _ActivityTypeLimited$[exports.ActivityTypeLimited.DoNothing] = 'TANGIBLE', _ActivityTypeLimited$[exports.ActivityTypeLimited.Points] = 'POINTS_ADD', _ActivityTypeLimited$[exports.ActivityTypeLimited.DeductPoints] = 'POINTS_DEDUCT', _ActivityTypeLimited$[exports.ActivityTypeLimited.ResetPoints] = 'POINTS_RESET', _ActivityTypeLimited$[exports.ActivityTypeLimited.MiniGameAttempt] = 'MINI_GAME_ATTEMPT', _ActivityTypeLimited$[exports.ActivityTypeLimited.Bonus] = 'BONUS', _ActivityTypeLimited$)[type];
1483
+ return (_ActivityTypeLimited$ = {}, _ActivityTypeLimited$[exports.ActivityTypeLimited.DoNothing] = 'TANGIBLE', _ActivityTypeLimited$[exports.ActivityTypeLimited.Points] = 'POINTS_ADD', _ActivityTypeLimited$[exports.ActivityTypeLimited.DeductPoints] = 'POINTS_DEDUCT', _ActivityTypeLimited$[exports.ActivityTypeLimited.ResetPoints] = 'POINTS_RESET', _ActivityTypeLimited$[exports.ActivityTypeLimited.MiniGameAttempt] = 'MINI_GAME_ATTEMPT', _ActivityTypeLimited$[exports.ActivityTypeLimited.Bonus] = 'BONUS', _ActivityTypeLimited$[exports.ActivityTypeLimited.AddGemsAndDiamonds] = 'GEMS_AND_DIAMONDS_ADD', _ActivityTypeLimited$[exports.ActivityTypeLimited.DeductGemsAndDiamonds] = 'GEMS_AND_DIAMONDS_DEDUCT', _ActivityTypeLimited$[exports.ActivityTypeLimited.ResetGemsAndDiamonds] = 'GEMS_AND_DIAMONDS_RESET', _ActivityTypeLimited$)[type];
1481
1484
  };
1482
1485
  var TournamentUtils = function TournamentUtils() {};
1483
1486
  TournamentUtils.isCanRegister = function (tournament) {
@@ -3858,7 +3861,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
3858
3861
  var _SAWSpinErrorCode$SAW;
3859
3862
  // to simulate fail
3860
3863
  // response.errCode = SAWSpinErrorCode.SAW_NO_SPINS;
3861
- var status = (_SAWSpinErrorCode$SAW = {}, _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_OK] = 'OK', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_NO_SPINS] = 'NO SPINS AVAILABLE', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_PRIZE_POOL_EMPTY] = 'PRIZE POOL IS EMPTY', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_NOT_ENOUGH_POINTS] = 'NOT ENOUGH POINTS', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED] = 'MAX SPIN ATTEMPTS REACHED', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_TEMPLATE_NOT_ACTIVE] = "MINIGAME IS NOT IN ACTIVE PERIOD", _SAWSpinErrorCode$SAW)[spinAttemptResponse.errCode] || 'OTHER';
3864
+ var status = (_SAWSpinErrorCode$SAW = {}, _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_OK] = 'OK', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_NO_SPINS] = 'NO SPINS AVAILABLE', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_PRIZE_POOL_EMPTY] = 'PRIZE POOL IS EMPTY', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_NOT_ENOUGH_POINTS] = 'NOT ENOUGH POINTS', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED] = 'MAX SPIN ATTEMPTS REACHED', _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_TEMPLATE_NOT_ACTIVE] = "MINIGAME IS NOT IN ACTIVE PERIOD", _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_NOT_IN_SEGMENT] = "USER IS NOT IN SEGMENT", _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_NO_BALANCE_GEMS] = "NOT ENOUGH GEMS", _SAWSpinErrorCode$SAW[exports.SAWSpinErrorCode.SAW_NO_BALANCE_DIAMONDS] = "NOT ENOUGH DIAMONDS", _SAWSpinErrorCode$SAW)[spinAttemptResponse.errCode] || 'OTHER';
3862
3865
  return Promise.resolve(_this19.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {
3863
3866
  saw_template_id: saw_template_id,
3864
3867
  status: status,
@@ -4287,7 +4290,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
4287
4290
  });
4288
4291
  return Promise.resolve(_this50.send(message, exports.ClassId.GET_LEADERS_BOARD_RESPONSE, force_language)).then(function (response) {
4289
4292
  var _response$map$boardKe, _response$map$boardKe2;
4290
- var boardKey = Object.keys(response.map).find(function (k) {
4293
+ var boardKey = Object.keys(response.map || {}).find(function (k) {
4291
4294
  return period_type_id === undefined || k === (period_type_id == null ? void 0 : period_type_id.toString());
4292
4295
  });
4293
4296
  if (boardKey === undefined) {