@smartico/public-api 0.0.188 → 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.
@@ -42,6 +42,14 @@ User reached max number of game attempts defined in the BackOffice
42
42
 
43
43
  ___
44
44
 
45
+ ### SAW\_TEMPLATE\_NOT\_ACTIVE
46
+
47
+ • **SAW\_TEMPLATE\_NOT\_ACTIVE** = ``40007``
48
+
49
+ User tries to play a template that is restricted by date
50
+
51
+ ___
52
+
45
53
  ### SAW\_VISITOR\_STOP\_SPIN\_REQUEST
46
54
 
47
55
  • **SAW\_VISITOR\_STOP\_SPIN\_REQUEST** = ``-40001``
@@ -151,3 +151,13 @@ ___
151
151
  ### expose\_game\_stat\_on\_api
152
152
 
153
153
  • `Optional` **expose\_game\_stat\_on\_api**: `boolean`
154
+
155
+ When enabled, the number of items in the pool and number of won items will be exposed in the Retention API and in the UI Widgets
156
+
157
+ ___
158
+
159
+ ### relative\_period\_timezone
160
+
161
+ • `Optional` **relative\_period\_timezone**: `number`
162
+
163
+ Time zone to ensure each day aligns with your local midnight.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.188",
3
+ "version": "0.0.189",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,6 +12,8 @@ export enum SAWSpinErrorCode {
12
12
  SAW_NOT_ENOUGH_POINTS = 40003,
13
13
  /** User reached max number of game attempts defined in the BackOffice */
14
14
  SAW_FAILED_MAX_SPINS_REACHED = 40004,
15
+ /** User tries to play a template that is restricted by date */
16
+ SAW_TEMPLATE_NOT_ACTIVE = 40007,
15
17
  /** Special code for the 'visitor' mode */
16
18
  SAW_VISITOR_STOP_SPIN_REQUEST = -40001,
17
19
  }
@@ -18,6 +18,9 @@ export interface SAWTemplate {
18
18
 
19
19
  is_visible: boolean;
20
20
 
21
+ activeFromDate: number;
22
+ activeTillDate: number;
23
+
21
24
  jackpot_add_on_attempt: number;
22
25
  jackpot_current: number;
23
26
  jackpot_guaranteed: number;
@@ -38,4 +41,5 @@ export interface SAWTemplate {
38
41
 
39
42
  // AA: releavnt only in the context of the SAWPrizeDropWinPush
40
43
  requires_prize_claim?: boolean;
44
+ relative_period_timezone?: number;
41
45
  }
@@ -538,6 +538,7 @@ class SmarticoAPI {
538
538
  [SAWSpinErrorCode.SAW_PRIZE_POOL_EMPTY]: 'PRIZE POOL IS EMPTY',
539
539
  [SAWSpinErrorCode.SAW_NOT_ENOUGH_POINTS]: 'NOT ENOUGH POINTS',
540
540
  [SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED]: 'MAX SPIN ATTEMPTS REACHED',
541
+ [SAWSpinErrorCode.SAW_TEMPLATE_NOT_ACTIVE]: "MINIGAME IS NOT IN ACTIVE PERIOD",
541
542
  }[spinAttemptResponse.errCode] || 'OTHER';
542
543
 
543
544
  await this.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {
@@ -140,6 +140,9 @@ export interface TMiniGameTemplate {
140
140
 
141
141
  /* When enabled, the number of items in the pool and number of won items will be exposed in the Retention API and in the UI Widgets */
142
142
  expose_game_stat_on_api?: boolean;
143
+
144
+ /* Time zone to ensure each day aligns with your local midnight. */
145
+ relative_period_timezone?: number;
143
146
  }
144
147
 
145
148
  /**