@smartico/public-api 0.0.276 → 0.0.277

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.276",
3
+ "version": "0.0.277",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,6 +6,9 @@ export enum ActivityTypeLimited {
6
6
  MiniGameAttempt = 16,
7
7
  DeductPoints = 21,
8
8
  ResetPoints = 22,
9
+ AddGemsAndDiamonds = 25,
10
+ DeductGemsAndDiamonds = 26,
11
+ ResetGemsAndDiamonds = 27,
9
12
  Popup = 30,
10
13
  Inbox = 31,
11
14
  Slack = 70,
@@ -18,4 +18,5 @@ export interface SAWPrize {
18
18
  relative_period_timezone?: number;
19
19
  is_surcharge?: boolean;
20
20
  is_deleted?: boolean;
21
+ prize_details_json?: {[key: string]: any};
21
22
  }
@@ -621,6 +621,9 @@ class SmarticoAPI {
621
621
  [SAWSpinErrorCode.SAW_NOT_ENOUGH_POINTS]: 'NOT ENOUGH POINTS',
622
622
  [SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED]: 'MAX SPIN ATTEMPTS REACHED',
623
623
  [SAWSpinErrorCode.SAW_TEMPLATE_NOT_ACTIVE]: "MINIGAME IS NOT IN ACTIVE PERIOD",
624
+ [SAWSpinErrorCode.SAW_NOT_IN_SEGMENT]: "USER IS NOT IN SEGMENT",
625
+ [SAWSpinErrorCode.SAW_NO_BALANCE_GEMS]: "NOT ENOUGH GEMS",
626
+ [SAWSpinErrorCode.SAW_NO_BALANCE_DIAMONDS]: "NOT ENOUGH DIAMONDS",
624
627
  }[spinAttemptResponse.errCode] || 'OTHER';
625
628
 
626
629
  await this.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {
@@ -8,4 +8,6 @@ export interface TournamentPrize {
8
8
  place_to: number;
9
9
  type: ActivityTypeLimited;
10
10
  points: number;
11
+ gems: number;
12
+ diamonds: number;
11
13
  }
@@ -14,6 +14,9 @@ const tournamentPrizeTypeToPrizeName = (type: ActivityTypeLimited) => {
14
14
  [ActivityTypeLimited.ResetPoints]: 'POINTS_RESET',
15
15
  [ActivityTypeLimited.MiniGameAttempt]: 'MINI_GAME_ATTEMPT',
16
16
  [ActivityTypeLimited.Bonus]: 'BONUS',
17
+ [ActivityTypeLimited.AddGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_ADD',
18
+ [ActivityTypeLimited.DeductGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_DEDUCT',
19
+ [ActivityTypeLimited.ResetGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_RESET',
17
20
  }[type];
18
21
  };
19
22