@smartico/public-api 0.0.436 → 0.0.438

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.
@@ -73,7 +73,8 @@ declare enum PushClientPlatform {
73
73
  CHROME_MOBILE = 8,
74
74
  FIREFOX_MOBILE = 9,
75
75
  SAFARI_MOBILE = 10,
76
- OPERA_MOBILE = 11
76
+ OPERA_MOBILE = 11,
77
+ NATIVE_HARMONY = 12
77
78
  }
78
79
  declare enum ClientActivityRequestId {
79
80
  MINI_WIDGET_SHOWN = 1,
@@ -30,6 +30,8 @@ export interface TMiniGamePrize {
30
30
  * For example for prize '100 points' the prize_value will be 100, for '100 free spins' 100, for '50 Diamonds' 50.
31
31
  */
32
32
  prize_value?: number;
33
+ /** For 'gems-and-diamonds' prizes — which currency the prize gives: 'gems', 'diamonds', or 'gems-and-diamonds' (both; `prize_value` is then their sum). Absent for other types */
34
+ gems_diamonds_type?: 'gems' | 'diamonds' | 'gems-and-diamonds';
33
35
  /** Custom font size in px for rendering the prize name on the game surface (e.g. a wheel sector), desktop */
34
36
  font_size?: number;
35
37
  /** Custom font size in px for the prize name, mobile; falls back to `font_size` when absent */
package/dist/index.js CHANGED
@@ -499,6 +499,14 @@ var sawPrizeValue = function sawPrizeValue(p) {
499
499
  }
500
500
  return n > 0 ? n : p.prize_value;
501
501
  };
502
+ var GEMS_DIAMONDS_TYPES = ['gems', 'diamonds', 'gems-and-diamonds'];
503
+ /** Which currency a gems-and-diamonds prize gives (`_gems_diamonds_type`: 0 gems, 1 diamonds, 2 both). */
504
+ var sawGemsDiamondsType = function sawGemsDiamondsType(p) {
505
+ var _GEMS_DIAMONDS_TYPES$;
506
+ if (p.prize_type_id !== exports.SAWPrizeType.GEMS_AND_DIAMONDS) return undefined;
507
+ var d = p.prize_details_json;
508
+ return (_GEMS_DIAMONDS_TYPES$ = GEMS_DIAMONDS_TYPES[d == null ? void 0 : d._gems_diamonds_type]) != null ? _GEMS_DIAMONDS_TYPES$ : d != null && d.gems && d != null && d.diamonds ? 'gems-and-diamonds' : d != null && d.diamonds ? 'diamonds' : 'gems';
509
+ };
502
510
  var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
503
511
  return items.map(function (r) {
504
512
  var _r$saw_skin_ui_defini;
@@ -553,6 +561,7 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
553
561
  name: p.saw_prize_ui_definition.name,
554
562
  prize_type: MiniGamePrizeTypeNamed(p.prize_type_id),
555
563
  prize_value: sawPrizeValue(p),
564
+ gems_diamonds_type: sawGemsDiamondsType(p),
556
565
  font_size: p.saw_prize_ui_definition.font_size,
557
566
  font_size_mobile: p.saw_prize_ui_definition.font_size_mobile,
558
567
  icon: p.saw_prize_ui_definition.icon,