@smartico/public-api 0.0.187 → 0.0.189
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/MiniGames/SAWPrize.d.ts +1 -0
- package/dist/MiniGames/SAWPrizeUI.d.ts +1 -0
- package/dist/MiniGames/SAWSpinErrorCode.d.ts +2 -0
- package/dist/MiniGames/SAWTemplate.d.ts +3 -0
- package/dist/WSAPI/WSAPITypes.d.ts +3 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +7 -2
- package/dist/index.modern.mjs.map +1 -1
- package/docs/enums/SAWSpinErrorCode.md +8 -0
- package/docs/interfaces/TMiniGamePrize.md +16 -0
- package/docs/interfaces/TMiniGameTemplate.md +10 -0
- package/package.json +1 -1
- package/src/MiniGames/SAWGetTemplatesResponse.ts +2 -0
- package/src/MiniGames/SAWPrize.ts +1 -0
- package/src/MiniGames/SAWPrizeUI.ts +1 -0
- package/src/MiniGames/SAWSpinErrorCode.ts +2 -0
- package/src/MiniGames/SAWTemplate.ts +4 -0
- package/src/SmarticoAPI.ts +1 -0
- package/src/WSAPI/WSAPITypes.ts +7 -0
|
@@ -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
|
}
|
|
@@ -30,6 +30,7 @@ export interface TMiniGamePrize {
|
|
|
30
30
|
acknowledge_action_title: string;
|
|
31
31
|
acknowledge_dp_additional?: string;
|
|
32
32
|
acknowledge_action_title_additional?: string;
|
|
33
|
+
out_of_stock_message?: string;
|
|
33
34
|
pool?: number;
|
|
34
35
|
pool_initial?: number;
|
|
35
36
|
wins_count?: number;
|
|
@@ -37,6 +38,7 @@ export interface TMiniGamePrize {
|
|
|
37
38
|
active_from_ts?: number;
|
|
38
39
|
active_till_ts?: number;
|
|
39
40
|
relative_period_timezone?: number;
|
|
41
|
+
is_surcharge?: boolean;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
* TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
|
|
@@ -106,6 +108,7 @@ export interface TMiniGameTemplate {
|
|
|
106
108
|
/** List of prizes for mini-games */
|
|
107
109
|
prizes: TMiniGamePrize[];
|
|
108
110
|
expose_game_stat_on_api?: boolean;
|
|
111
|
+
relative_period_timezone?: number;
|
|
109
112
|
}
|
|
110
113
|
/**
|
|
111
114
|
* TUser describes the information of the user
|
package/dist/index.js
CHANGED
|
@@ -415,13 +415,15 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
|
|
|
415
415
|
acknowledge_action_title: p.saw_prize_ui_definition.acknowledge_action_title,
|
|
416
416
|
acknowledge_dp_additional: p.saw_prize_ui_definition.acknowledge_dp_additional,
|
|
417
417
|
acknowledge_action_title_additional: p.saw_prize_ui_definition.acknowledge_action_title_additional,
|
|
418
|
+
out_of_stock_message: p.saw_prize_ui_definition.out_of_stock_message,
|
|
418
419
|
pool: p.pool,
|
|
419
420
|
pool_initial: p.pool_initial,
|
|
420
421
|
wins_count: p.wins_count,
|
|
421
422
|
weekdays: p.weekdays,
|
|
422
423
|
active_from_ts: p.active_from_ts,
|
|
423
424
|
active_till_ts: p.active_till_ts,
|
|
424
|
-
relative_period_timezone: p.relative_period_timezone
|
|
425
|
+
relative_period_timezone: p.relative_period_timezone,
|
|
426
|
+
is_surcharge: p.is_surcharge
|
|
425
427
|
};
|
|
426
428
|
return y;
|
|
427
429
|
})
|
|
@@ -445,6 +447,8 @@ exports.SAWSpinErrorCode = void 0;
|
|
|
445
447
|
SAWSpinErrorCode[SAWSpinErrorCode["SAW_NOT_ENOUGH_POINTS"] = 40003] = "SAW_NOT_ENOUGH_POINTS";
|
|
446
448
|
/** User reached max number of game attempts defined in the BackOffice */
|
|
447
449
|
SAWSpinErrorCode[SAWSpinErrorCode["SAW_FAILED_MAX_SPINS_REACHED"] = 40004] = "SAW_FAILED_MAX_SPINS_REACHED";
|
|
450
|
+
/** User tries to play a template that is restricted by date */
|
|
451
|
+
SAWSpinErrorCode[SAWSpinErrorCode["SAW_TEMPLATE_NOT_ACTIVE"] = 40007] = "SAW_TEMPLATE_NOT_ACTIVE";
|
|
448
452
|
/** Special code for the 'visitor' mode */
|
|
449
453
|
SAWSpinErrorCode[SAWSpinErrorCode["SAW_VISITOR_STOP_SPIN_REQUEST"] = -40001] = "SAW_VISITOR_STOP_SPIN_REQUEST";
|
|
450
454
|
})(exports.SAWSpinErrorCode || (exports.SAWSpinErrorCode = {}));
|
|
@@ -2914,7 +2918,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
2914
2918
|
var _SAWSpinErrorCode$SAW;
|
|
2915
2919
|
// to simulate fail
|
|
2916
2920
|
// response.errCode = SAWSpinErrorCode.SAW_NO_SPINS;
|
|
2917
|
-
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';
|
|
2921
|
+
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';
|
|
2918
2922
|
return Promise.resolve(_this15.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {
|
|
2919
2923
|
saw_template_id: saw_template_id,
|
|
2920
2924
|
status: status,
|