@smartico/public-api 0.0.437 → 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.
@@ -496,6 +496,14 @@ const sawPrizeValue = p => {
496
496
  }
497
497
  return n > 0 ? n : p.prize_value;
498
498
  };
499
+ const GEMS_DIAMONDS_TYPES = ['gems', 'diamonds', 'gems-and-diamonds'];
500
+ /** Which currency a gems-and-diamonds prize gives (`_gems_diamonds_type`: 0 gems, 1 diamonds, 2 both). */
501
+ const sawGemsDiamondsType = p => {
502
+ var _GEMS_DIAMONDS_TYPES$;
503
+ if (p.prize_type_id !== SAWPrizeType.GEMS_AND_DIAMONDS) return undefined;
504
+ const d = p.prize_details_json;
505
+ 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';
506
+ };
499
507
  const SAWTemplatesTransform = items => {
500
508
  return items.map(r => {
501
509
  var _r$saw_skin_ui_defini;
@@ -550,6 +558,7 @@ const SAWTemplatesTransform = items => {
550
558
  name: p.saw_prize_ui_definition.name,
551
559
  prize_type: MiniGamePrizeTypeNamed(p.prize_type_id),
552
560
  prize_value: sawPrizeValue(p),
561
+ gems_diamonds_type: sawGemsDiamondsType(p),
553
562
  font_size: p.saw_prize_ui_definition.font_size,
554
563
  font_size_mobile: p.saw_prize_ui_definition.font_size_mobile,
555
564
  icon: p.saw_prize_ui_definition.icon,