@smartico/public-api 0.0.188 → 0.0.190

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.
@@ -18,4 +18,5 @@ export interface SAWPrizeUI {
18
18
  acknowledge_action_title?: string;
19
19
  custom_win_sound?: string;
20
20
  out_of_stock_message?: string;
21
+ custom_data?: any;
21
22
  }
@@ -9,6 +9,8 @@ export declare enum SAWSpinErrorCode {
9
9
  SAW_NOT_ENOUGH_POINTS = 40003,
10
10
  /** User reached max number of game attempts defined in the BackOffice */
11
11
  SAW_FAILED_MAX_SPINS_REACHED = 40004,
12
+ /** User tries to play a template that is restricted by date */
13
+ SAW_TEMPLATE_NOT_ACTIVE = 40007,
12
14
  /** Special code for the 'visitor' mode */
13
15
  SAW_VISITOR_STOP_SPIN_REQUEST = -40001
14
16
  }
@@ -12,6 +12,8 @@ export interface SAWTemplate {
12
12
  spin_count?: number;
13
13
  prizes: SAWPrize[];
14
14
  is_visible: boolean;
15
+ activeFromDate: number;
16
+ activeTillDate: number;
15
17
  jackpot_add_on_attempt: number;
16
18
  jackpot_current: number;
17
19
  jackpot_guaranteed: number;
@@ -26,4 +28,5 @@ export interface SAWTemplate {
26
28
  };
27
29
  expose_game_stat_on_api?: boolean;
28
30
  requires_prize_claim?: boolean;
31
+ relative_period_timezone?: number;
29
32
  }
@@ -39,6 +39,8 @@ export interface TMiniGamePrize {
39
39
  active_till_ts?: number;
40
40
  relative_period_timezone?: number;
41
41
  is_surcharge?: boolean;
42
+ /** The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number */
43
+ custom_data: any;
42
44
  }
43
45
  /**
44
46
  * TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
@@ -108,6 +110,7 @@ export interface TMiniGameTemplate {
108
110
  /** List of prizes for mini-games */
109
111
  prizes: TMiniGamePrize[];
110
112
  expose_game_stat_on_api?: boolean;
113
+ relative_period_timezone?: number;
111
114
  }
112
115
  /**
113
116
  * TUser describes the information of the user
package/dist/index.js CHANGED
@@ -423,7 +423,8 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
423
423
  active_from_ts: p.active_from_ts,
424
424
  active_till_ts: p.active_till_ts,
425
425
  relative_period_timezone: p.relative_period_timezone,
426
- is_surcharge: p.is_surcharge
426
+ is_surcharge: p.is_surcharge,
427
+ custom_data: IntUtils.JsonOrText(r.saw_template_ui_definition.custom_data)
427
428
  };
428
429
  return y;
429
430
  })
@@ -447,6 +448,8 @@ exports.SAWSpinErrorCode = void 0;
447
448
  SAWSpinErrorCode[SAWSpinErrorCode["SAW_NOT_ENOUGH_POINTS"] = 40003] = "SAW_NOT_ENOUGH_POINTS";
448
449
  /** User reached max number of game attempts defined in the BackOffice */
449
450
  SAWSpinErrorCode[SAWSpinErrorCode["SAW_FAILED_MAX_SPINS_REACHED"] = 40004] = "SAW_FAILED_MAX_SPINS_REACHED";
451
+ /** User tries to play a template that is restricted by date */
452
+ SAWSpinErrorCode[SAWSpinErrorCode["SAW_TEMPLATE_NOT_ACTIVE"] = 40007] = "SAW_TEMPLATE_NOT_ACTIVE";
450
453
  /** Special code for the 'visitor' mode */
451
454
  SAWSpinErrorCode[SAWSpinErrorCode["SAW_VISITOR_STOP_SPIN_REQUEST"] = -40001] = "SAW_VISITOR_STOP_SPIN_REQUEST";
452
455
  })(exports.SAWSpinErrorCode || (exports.SAWSpinErrorCode = {}));
@@ -2916,7 +2919,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
2916
2919
  var _SAWSpinErrorCode$SAW;
2917
2920
  // to simulate fail
2918
2921
  // response.errCode = SAWSpinErrorCode.SAW_NO_SPINS;
2919
- 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)[spinAttemptResponse.errCode] || 'OTHER';
2922
+ 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';
2920
2923
  return Promise.resolve(_this15.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {
2921
2924
  saw_template_id: saw_template_id,
2922
2925
  status: status,