@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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.203",
3
+ "version": "0.0.205",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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
  }
@@ -49,5 +49,10 @@ export interface SAWTemplateUI {
49
49
  id: string;
50
50
  content: string;
51
51
  };
52
+
53
+ // lootbox specific
52
54
  game_layout?: SAWGameLayout;
55
+
56
+ // treasure hunt specific
57
+ steps_to_finish_game?: number;
53
58
  }
@@ -25,3 +25,4 @@ export * from './SAWAcknowledgeSpinPushRequest';
25
25
  export * from './SAWWinningHistoryRequest';
26
26
  export * from './SAWWinningHistoryResponse';
27
27
  export * from './SAWGameLayout';
28
+ export * from './PrizeModifiers';
@@ -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: any;
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
  /**