@smartico/public-api 0.0.203 → 0.0.205
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/PrizeModifiers.d.ts +20 -0
- package/dist/MiniGames/SAWPrizeUI.d.ts +3 -0
- package/dist/MiniGames/SAWTemplateUI.d.ts +1 -0
- package/dist/MiniGames/index.d.ts +1 -0
- package/dist/WSAPI/WSAPITypes.d.ts +7 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +27 -2
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/TMiniGamePrize.md +19 -1
- package/docs/interfaces/TMiniGameTemplate.md +10 -0
- package/package.json +1 -1
- package/src/MiniGames/PrizeModifiers.ts +21 -0
- package/src/MiniGames/SAWGetTemplatesResponse.ts +3 -0
- package/src/MiniGames/SAWPrizeUI.ts +3 -0
- package/src/MiniGames/SAWTemplateUI.ts +5 -0
- package/src/MiniGames/index.ts +1 -0
- package/src/WSAPI/WSAPITypes.ts +8 -1
|
@@ -164,4 +164,22 @@ ___
|
|
|
164
164
|
|
|
165
165
|
• **custom\_data**: `any`
|
|
166
166
|
|
|
167
|
-
The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number
|
|
167
|
+
The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number
|
|
168
|
+
|
|
169
|
+
___
|
|
170
|
+
|
|
171
|
+
### prize\_modifiers
|
|
172
|
+
|
|
173
|
+
• `Optional` **prize\_modifiers**: `PrizeModifiers`
|
|
174
|
+
|
|
175
|
+
Prize modifiers that will multiply by 2x, 5x or 10x the current total. This will not affect the final Prize Amount that will be awarded.
|
|
176
|
+
|
|
177
|
+
___
|
|
178
|
+
|
|
179
|
+
### allow\_split\_decimal
|
|
180
|
+
|
|
181
|
+
• `Optional` **allow\_split\_decimal**: `boolean`
|
|
182
|
+
|
|
183
|
+
When enabled, you can split prize value by decimal values
|
|
184
|
+
|
|
185
|
+
___
|
|
@@ -177,3 +177,13 @@ ___
|
|
|
177
177
|
• `Optional` **activeTillDate**: `number`
|
|
178
178
|
|
|
179
179
|
Holds time till which template will become available, for the templates that are targeted to be available from specific time (UNIX timestamp)
|
|
180
|
+
|
|
181
|
+
___
|
|
182
|
+
|
|
183
|
+
### steps\_to\_finish\_game
|
|
184
|
+
|
|
185
|
+
• `Optional` **steps\_to\_finish\_game**: `number`
|
|
186
|
+
|
|
187
|
+
The amount of steps to complete the game and gather the prize
|
|
188
|
+
|
|
189
|
+
___
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export enum PrizeModifiers {
|
|
2
|
+
'2x' = 1,
|
|
3
|
+
'5x' = 2,
|
|
4
|
+
'10x' = 3,
|
|
5
|
+
'/2' = 4,
|
|
6
|
+
'/5' = 5,
|
|
7
|
+
'/10' = 6,
|
|
8
|
+
'0x' = 7,
|
|
9
|
+
"reset" = 8,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const PrizeModifiersKeysNames = {
|
|
13
|
+
[PrizeModifiers['2x']]: '2x',
|
|
14
|
+
[PrizeModifiers['5x']]: '5x',
|
|
15
|
+
[PrizeModifiers['10x']]: '10x',
|
|
16
|
+
[PrizeModifiers['/2']]: '/2',
|
|
17
|
+
[PrizeModifiers['/5']]: '/5',
|
|
18
|
+
[PrizeModifiers['/10']]: '/10',
|
|
19
|
+
[PrizeModifiers['0x']]: '0',
|
|
20
|
+
[PrizeModifiers['reset']]: 'Reset to 0',
|
|
21
|
+
};
|
|
@@ -39,6 +39,7 @@ export const SAWTemplatesTransform = (items: SAWTemplate[]): TMiniGameTemplate[]
|
|
|
39
39
|
activeFromDate: r.activeFromDate,
|
|
40
40
|
activeTillDate: r.activeTillDate,
|
|
41
41
|
next_available_spin_ts: r.next_available_spin_ts,
|
|
42
|
+
steps_to_finish_game: r.saw_template_ui_definition.steps_to_finish_game,
|
|
42
43
|
|
|
43
44
|
prizes: r.prizes.map((p) => {
|
|
44
45
|
const y: TMiniGamePrize = {
|
|
@@ -66,6 +67,8 @@ export const SAWTemplatesTransform = (items: SAWTemplate[]): TMiniGameTemplate[]
|
|
|
66
67
|
relative_period_timezone: p.relative_period_timezone,
|
|
67
68
|
is_surcharge: p.is_surcharge,
|
|
68
69
|
custom_data: IntUtils.JsonOrText(r.saw_template_ui_definition.custom_data),
|
|
70
|
+
prize_modifiers: p.saw_prize_ui_definition.prize_modifiers,
|
|
71
|
+
allow_split_decimal: p.saw_prize_ui_definition.allow_split_decimal,
|
|
69
72
|
};
|
|
70
73
|
return y;
|
|
71
74
|
}),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PrizeModifiers } from './PrizeModifiers';
|
|
1
2
|
import { SAWAcknowledgeType } from './SAWAcknowledgeType';
|
|
2
3
|
import { SAWWinSoundType } from './SAWWinSoundType';
|
|
3
4
|
|
|
@@ -20,4 +21,6 @@ export interface SAWPrizeUI {
|
|
|
20
21
|
custom_win_sound?: string;
|
|
21
22
|
out_of_stock_message?: string;
|
|
22
23
|
custom_data?: any;
|
|
24
|
+
prize_modifiers?: PrizeModifiers; // treasure hunt specific
|
|
25
|
+
allow_split_decimal?: boolean; // treasure hunt specific
|
|
23
26
|
}
|
package/src/MiniGames/index.ts
CHANGED
package/src/WSAPI/WSAPITypes.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { AchCategory } from '../Missions';
|
|
|
5
5
|
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
6
6
|
import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from '../CustomSections';
|
|
7
7
|
import { BonusStatus , BonusTemplateMetaMap, BonusMetaMap} from '../Bonuses';
|
|
8
|
+
import { PrizeModifiers } from '../MiniGames/PrizeModifiers';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string;
|
|
@@ -60,7 +61,11 @@ export interface TMiniGamePrize {
|
|
|
60
61
|
/* Flag indicating that the prize is surcharged (available all the time, despite pool numbers) */
|
|
61
62
|
is_surcharge?: boolean;
|
|
62
63
|
/** The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number */
|
|
63
|
-
custom_data
|
|
64
|
+
custom_data?: any;
|
|
65
|
+
/** Prize modifiers that will multiply by 2x, 5x or 10x the current total. This will not affect the final Prize Amount that will be awarded. */
|
|
66
|
+
prize_modifiers?: PrizeModifiers;
|
|
67
|
+
/** When enabled, you can split prize value by decimal values */
|
|
68
|
+
allow_split_decimal?: boolean;
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
/**
|
|
@@ -149,6 +154,8 @@ export interface TMiniGameTemplate {
|
|
|
149
154
|
activeFromDate?: number;
|
|
150
155
|
/* Holds time till which template will become available, for the templates that are targeted to be available from specific time (UNIX timestamp) */
|
|
151
156
|
activeTillDate?: number;
|
|
157
|
+
/* The amount of steps to complete the game and gather the prize */
|
|
158
|
+
steps_to_finish_game?: number;
|
|
152
159
|
}
|
|
153
160
|
|
|
154
161
|
/**
|