@smartico/public-api 0.0.380 → 0.0.381

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.
Files changed (174) hide show
  1. package/CLAUDE.md +103 -0
  2. package/README.md +32 -10
  3. package/dist/Base/ClassId.d.ts +2 -0
  4. package/dist/Jackpots/JackpotDetails.d.ts +14 -15
  5. package/dist/Jackpots/JackpotPot.d.ts +10 -6
  6. package/dist/Raffle/GetRaffleWonPrizesRequest.d.ts +9 -0
  7. package/dist/Raffle/GetRaffleWonPrizesResponse.d.ts +52 -0
  8. package/dist/Raffle/index.d.ts +2 -0
  9. package/dist/SmarticoAPI.d.ts +6 -1
  10. package/dist/SmarticoLib/index.d.ts +5 -1
  11. package/dist/WSAPI/WSAPIAvatars.d.ts +267 -49
  12. package/dist/WSAPI/WSAPIBonuses.d.ts +224 -10
  13. package/dist/WSAPI/WSAPIGamePick.d.ts +538 -253
  14. package/dist/WSAPI/WSAPIGeneral.d.ts +156 -14
  15. package/dist/WSAPI/WSAPIInbox.d.ts +547 -58
  16. package/dist/WSAPI/WSAPIJackpots.d.ts +292 -57
  17. package/dist/WSAPI/WSAPILeaderBoard.d.ts +127 -13
  18. package/dist/WSAPI/WSAPIMiniGames.d.ts +465 -49
  19. package/dist/WSAPI/WSAPIRaffles.d.ts +576 -52
  20. package/dist/WSAPI/WSAPITournaments.d.ts +3 -3
  21. package/dist/WSAPI/WSAPITypes.d.ts +243 -132
  22. package/dist/WSAPI/WSAPIUser.d.ts +193 -43
  23. package/dist/index.js +3409 -615
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.modern.mjs +3391 -608
  26. package/dist/index.modern.mjs.map +1 -1
  27. package/docs/Callbacks.md +162 -0
  28. package/docs/SmarticoObject.md +445 -0
  29. package/docs/Transforms.md +99 -0
  30. package/docs/api/README.md +26 -0
  31. package/docs/api/classes/WSAPIAvatars.md +282 -54
  32. package/docs/api/classes/WSAPIBonuses.md +233 -12
  33. package/docs/api/classes/WSAPIClans.md +380 -10
  34. package/docs/api/classes/WSAPIGamePick.md +555 -26
  35. package/docs/api/classes/WSAPIGeneral.md +165 -16
  36. package/docs/api/classes/WSAPIInbox.md +588 -64
  37. package/docs/api/classes/WSAPIJackpots.md +320 -66
  38. package/docs/api/classes/WSAPILeaderBoard.md +133 -15
  39. package/docs/api/classes/WSAPIMiniGames.md +501 -64
  40. package/docs/api/classes/WSAPIMissions.md +58 -79
  41. package/docs/api/classes/WSAPIRaffles.md +647 -69
  42. package/docs/api/classes/WSAPIStore.md +83 -108
  43. package/docs/api/classes/WSAPITournaments.md +495 -28
  44. package/docs/api/classes/WSAPIUser.md +520 -83
  45. package/docs/api/documents/Callbacks.md +162 -0
  46. package/docs/api/documents/SmarticoObject.md +445 -0
  47. package/docs/api/documents/Transforms.md +99 -0
  48. package/docs/api/enumerations/BonusStatus-1.md +11 -6
  49. package/docs/api/enumerations/JoinClanErrorCode.md +81 -0
  50. package/docs/api/enumerations/TournamentRegistrationError.md +12 -0
  51. package/docs/api/functions/clanTournamentPlayersTransform.md +13 -0
  52. package/docs/api/interfaces/AvatarCustomized.md +25 -0
  53. package/docs/api/interfaces/AvatarDefinition.md +94 -0
  54. package/docs/api/interfaces/AvatarPrompt.md +45 -0
  55. package/docs/api/interfaces/BonusMetaMap-1.md +4 -1
  56. package/docs/api/interfaces/BonusTemplateMetaMap-1.md +9 -4
  57. package/docs/api/interfaces/Clan.md +4 -0
  58. package/docs/api/interfaces/ClanInfo.md +109 -0
  59. package/docs/api/interfaces/ClanMember.md +53 -0
  60. package/docs/api/interfaces/ClanTournamentPlayerRaw.md +67 -0
  61. package/docs/api/interfaces/GemsDiamondsLog.md +43 -0
  62. package/docs/api/interfaces/GetClanInfoResponse.md +61 -0
  63. package/docs/api/interfaces/GetClanTournamentPlayersResponse.md +81 -0
  64. package/docs/api/interfaces/GetRaffleWonPrizesRequest.md +59 -0
  65. package/docs/api/interfaces/GetRaffleWonPrizesResponse.md +95 -0
  66. package/docs/api/interfaces/InboxMarkMessageAction.md +10 -2
  67. package/docs/api/interfaces/JackpotDetails.md +14 -15
  68. package/docs/api/interfaces/JackpotPot.md +9 -6
  69. package/docs/api/interfaces/LeaderBoardDetailsT.md +14 -8
  70. package/docs/api/interfaces/LeaderBoardUserT.md +8 -5
  71. package/docs/api/interfaces/LeaderBoardsRewardsT.md +7 -0
  72. package/docs/api/interfaces/PointsLog.md +43 -0
  73. package/docs/api/interfaces/RaffleWonPrize.md +59 -0
  74. package/docs/api/interfaces/RaffleWonPrizePublicMeta.md +27 -0
  75. package/docs/api/interfaces/RaffleWonPrizeUser.md +43 -0
  76. package/docs/api/interfaces/TAchCategory.md +2 -7
  77. package/docs/api/interfaces/TAvatarCustomized.md +4 -4
  78. package/docs/api/interfaces/TAvatarDefinition.md +13 -14
  79. package/docs/api/interfaces/TAvatarPrompt.md +6 -6
  80. package/docs/api/interfaces/TBonus.md +16 -8
  81. package/docs/api/interfaces/TBuyStoreItemResult.md +4 -29
  82. package/docs/api/interfaces/TClaimBonusResult.md +5 -5
  83. package/docs/api/interfaces/TClan.md +8 -4
  84. package/docs/api/interfaces/TClanInfo.md +47 -0
  85. package/docs/api/interfaces/TClanJoinResult.md +11 -1
  86. package/docs/api/interfaces/TClanTournamentPlayer.md +55 -0
  87. package/docs/api/interfaces/TClanTournamentPlayersResult.md +27 -0
  88. package/docs/api/interfaces/TClans.md +3 -1
  89. package/docs/api/interfaces/TGetTranslations.md +4 -0
  90. package/docs/api/interfaces/TInboxMessage.md +14 -6
  91. package/docs/api/interfaces/TInboxMessageBody.md +18 -12
  92. package/docs/api/interfaces/TLevel.md +17 -20
  93. package/docs/api/interfaces/TLevelCurrent.md +19 -18
  94. package/docs/api/interfaces/TMiniGamePlayBatchResult.md +14 -6
  95. package/docs/api/interfaces/TMiniGamePlayResult.md +9 -4
  96. package/docs/api/interfaces/TMissionClaimRewardResult.md +1 -9
  97. package/docs/api/interfaces/TMissionOptInResult.md +1 -5
  98. package/docs/api/interfaces/TMissionOrBadge.md +4 -7
  99. package/docs/api/interfaces/TRaffleOptinResponse.md +4 -2
  100. package/docs/api/interfaces/TSegmentCheckResult.md +10 -0
  101. package/docs/api/interfaces/TSetAvatarResult.md +3 -3
  102. package/docs/api/interfaces/TStoreItem.md +3 -13
  103. package/docs/api/interfaces/TTournament.md +1 -1
  104. package/docs/api/interfaces/TTournamentDetailed.md +1 -1
  105. package/docs/api/interfaces/TTournamentRegistrationResult.md +4 -2
  106. package/docs/api/interfaces/TUICustomSection.md +23 -19
  107. package/docs/api/interfaces/TUserProfile.md +18 -16
  108. package/docs/api/interfaces/TransformedRaffleClaimPrizeResponse.md +6 -2
  109. package/docs/api/interfaces/UserLevelExtraCountersT.md +9 -2
  110. package/docs/api/type-aliases/ActivityLogEntry.md +3 -0
  111. package/docs/native/ADDING_METHODS.md +7 -2
  112. package/docs/native/PROTOCOL.md +337 -0
  113. package/docs/ui/avatars/UIGuide_getAvatarPrompts.md +100 -0
  114. package/docs/ui/avatars/UIGuide_getAvatarsCustomized.md +90 -0
  115. package/docs/ui/avatars/UIGuide_getAvatarsList.md +105 -0
  116. package/docs/ui/avatars/UIGuide_setAvatar.md +118 -0
  117. package/docs/ui/bonuses/UIGuide_claimBonus.md +144 -0
  118. package/docs/ui/bonuses/UIGuide_getBonuses.md +176 -0
  119. package/docs/ui/gamepick/UIGuide_gamePickGetActiveRound.md +99 -0
  120. package/docs/ui/gamepick/UIGuide_gamePickGetActiveRounds.md +76 -0
  121. package/docs/ui/gamepick/UIGuide_gamePickGetBoard.md +81 -0
  122. package/docs/ui/gamepick/UIGuide_gamePickGetGameInfo.md +78 -0
  123. package/docs/ui/gamepick/UIGuide_gamePickGetHistory.md +55 -0
  124. package/docs/ui/gamepick/UIGuide_gamePickGetRoundInfoForUser.md +71 -0
  125. package/docs/ui/gamepick/UIGuide_gamePickGetUserInfo.md +64 -0
  126. package/docs/ui/gamepick/UIGuide_gamePickSubmitSelection.md +103 -0
  127. package/docs/ui/gamepick/UIGuide_gamePickSubmitSelectionQuiz.md +67 -0
  128. package/docs/ui/general/UIGuide_getCustomSections.md +137 -0
  129. package/docs/ui/general/UIGuide_getRelatedItemsForGame.md +140 -0
  130. package/docs/ui/inbox/UIGuide_deleteInboxMessage.md +135 -0
  131. package/docs/ui/inbox/UIGuide_getInboxMessageBody.md +133 -0
  132. package/docs/ui/inbox/UIGuide_getInboxMessages.md +186 -0
  133. package/docs/ui/inbox/UIGuide_markInboxMessageAsRead.md +122 -0
  134. package/docs/ui/inbox/UIGuide_markUnmarkInboxMessageAsFavorite.md +84 -0
  135. package/docs/ui/jackpots/UIGuide_getJackpotEligibleGames.md +73 -0
  136. package/docs/ui/jackpots/UIGuide_getJackpotWinners.md +83 -0
  137. package/docs/ui/jackpots/UIGuide_jackpotGet.md +138 -0
  138. package/docs/ui/jackpots/UIGuide_jackpotOptIn.md +85 -0
  139. package/docs/ui/jackpots/UIGuide_jackpotOptOut.md +65 -0
  140. package/docs/ui/leaderboard/UIGuide_getLeaderBoard.md +166 -0
  141. package/docs/ui/minigames/UIGuide_getMiniGames.md +153 -0
  142. package/docs/ui/minigames/UIGuide_getMiniGamesHistory.md +90 -0
  143. package/docs/ui/minigames/UIGuide_playMiniGame.md +150 -0
  144. package/docs/ui/minigames/UIGuide_playMiniGameBatch.md +128 -0
  145. package/docs/ui/raffles/UIGuide_claimRafflePrize.md +99 -0
  146. package/docs/ui/raffles/UIGuide_getRaffleDrawRun.md +117 -0
  147. package/docs/ui/raffles/UIGuide_getRaffleDrawRunsHistory.md +92 -0
  148. package/docs/ui/raffles/UIGuide_getRaffleWonPrizes.md +120 -0
  149. package/docs/ui/raffles/UIGuide_getRaffles.md +175 -0
  150. package/docs/ui/raffles/UIGuide_requestRaffleOptin.md +114 -0
  151. package/docs/ui/user/UIGuide_getActivityLog.md +130 -0
  152. package/docs/ui/user/UIGuide_getLevels.md +47 -42
  153. package/package.json +1 -1
  154. package/src/Base/ClassId.ts +2 -0
  155. package/src/Jackpots/JackpotDetails.ts +14 -15
  156. package/src/Jackpots/JackpotPot.ts +10 -6
  157. package/src/Raffle/GetRaffleWonPrizesRequest.ts +12 -0
  158. package/src/Raffle/GetRaffleWonPrizesResponse.ts +56 -0
  159. package/src/Raffle/index.ts +3 -1
  160. package/src/SmarticoAPI.ts +14 -1
  161. package/src/SmarticoLib/index.ts +4 -0
  162. package/src/WSAPI/WSAPIAvatars.ts +267 -49
  163. package/src/WSAPI/WSAPIBonuses.ts +224 -10
  164. package/src/WSAPI/WSAPIGamePick.ts +538 -253
  165. package/src/WSAPI/WSAPIGeneral.ts +156 -14
  166. package/src/WSAPI/WSAPIInbox.ts +545 -56
  167. package/src/WSAPI/WSAPIJackpots.ts +297 -61
  168. package/src/WSAPI/WSAPILeaderBoard.ts +127 -13
  169. package/src/WSAPI/WSAPIMiniGames.ts +465 -49
  170. package/src/WSAPI/WSAPIRaffles.ts +592 -64
  171. package/src/WSAPI/WSAPITournaments.ts +3 -3
  172. package/src/WSAPI/WSAPITypes.ts +243 -132
  173. package/src/WSAPI/WSAPIUser.ts +193 -43
  174. package/tsconfig.json +9 -1
@@ -52,90 +52,70 @@ affordability state of the Buy button — the SDK does not pre-compute
52
52
  affordability into `can_buy`.
53
53
 
54
54
  **Subscription model (`onUpdate`)**
55
- The callback registered via `onUpdate` is invoked with the FULL refreshed
56
- catalog — never a diff/patch — after any `buyStoreItem(...)` call
57
- resolves on this connection (regardless of `err_code`). It is the ONLY
58
- trigger for the store catalog. Side effects covered:
59
- - Pool decrement on the item the user just bought.
60
- - `purchased_today` / `purchased_this_week` / `purchased_this_month`
61
- flag flips (these appear only in the purchase-history list, but the
62
- underlying `can_buy` field on the main catalog re-evaluates against
63
- the operator's "max bought" rules after every purchase).
64
- - `can_buy === false` after a per-period purchase cap is hit.
65
-
55
+ The callback receives the FULL refreshed catalog (never a diff/patch).
66
56
  Each subsequent call to `getStoreItems({ onUpdate })` REPLACES the prior
67
- callback — there is only one active subscriber at a time. Pass
57
+ callback — only one active subscriber at a time. Pass
68
58
  `onUpdate: undefined` (or omit it) to keep the prior callback in place;
69
59
  the callback is never auto-cleared.
70
60
 
71
- **What does NOT trigger an `onUpdate`** (consumer-relevant)
61
+ **Update triggers**
62
+
63
+ Fires after: any `buyStoreItem(...)` call resolves on this connection
64
+ (success OR failure). This is the ONLY trigger. The refreshed array
65
+ reflects pool decrement on the just-bought item, per-period purchase
66
+ cap re-evaluation on `can_buy`, and any `purchased_today` /
67
+ `purchased_this_week` / `purchased_this_month` flips visible via
68
+ [getStorePurchasedItems](#getstorepurchaseditems).
69
+
70
+ Does NOT fire for:
72
71
  - Operator-side BO catalog edits (price, ribbons, pool seed, segment
73
- conditions, new/removed items) do NOT push to connected clients —
74
- those changes surface only on the next cache miss.
75
- - Pool depletion caused by OTHER users' concurrent purchases does NOT
76
- push. The current user's view of `pool` may be stale until they
77
- trigger a refresh themselves.
78
- - User balance changes (points/gems/diamonds going up from gameplay)
79
- do NOT refresh the catalog. The catalog is independent of balance;
80
- the consumer must drive button affordability from a separately
81
- tracked balance source (e.g. the user's gamification profile,
82
- updated independently of this catalog).
83
- - Items going past their `active_till_date` while the page is open do
84
- NOT push — the item will simply disappear on the next refresh.
72
+ conditions, new/removed items) — surface only on the next cache miss.
73
+ - Concurrent purchases by OTHER users — the current user's view of
74
+ `pool` may be stale until they themselves refresh.
75
+ - User balance changes from gameplay — the catalog is independent of
76
+ balance; the consumer drives Buy-button affordability from a
77
+ separately-tracked balance source.
78
+ - Items going past their `active_till_date` while the page is open —
79
+ the item simply disappears on the next refresh.
85
80
 
86
81
  **Server-side filtering** (what's already excluded before the SDK sees it)
87
- - Items outside the `[active_from_date, active_till_date]` window — past
88
- the till-date, items are ALWAYS filtered out server-side.
89
- - Items the user fails visibility-segment / visibility-condition checks for.
90
- - Items with `shop_pool_hide_when_empty = true` whose pool has reached 0
91
- (operator-configured per item). Items without that flag are still
92
- returned with `pool === 0` so a "Sold out" state can be rendered.
82
+ - Items outside the `[active_from_date, active_till_date]` window —
83
+ past the till-date, items are ALWAYS filtered out server-side.
84
+ - Items the user fails visibility-segment / visibility-condition
85
+ checks for.
86
+ - Items configured to hide-when-empty whose pool has reached 0
87
+ (per-item operator flag). Items without that flag are still returned
88
+ with `pool === 0` so a "Sold out" state can be rendered.
93
89
  - Items where the per-period bought-count cap is reached (and the
94
90
  operator chose to hide rather than just disable).
95
91
 
96
- **Field semantics** (non-obvious fields on `TStoreItem`)
97
- - `price` is typed as `number` on the SDK surface; internally the server
98
- stores it as a string and the SDK converts. Always coerce defensively
99
- if you arithmetic against it.
100
- - `purchase_type` is per-item and may differ across items in the same
101
- catalog: `'points'`, `'gems'`, or `'diamonds'`. There is no
102
- label-level currency — operators can mix currencies freely.
103
- - `can_buy` reflects segment conditions, per-period purchase caps, and
104
- item-active-window — but NOT the user's current balance. Consumers
105
- must check affordability separately by comparing `price` to the
106
- live balance for `purchase_type`.
107
- - `pool` is `null` for unlimited items, a positive integer for limited
108
- stock, and `0` for sold-out items that the operator kept visible. It
109
- is NOT live: only the buyer's own pool-decrementing purchase updates
110
- it client-side.
111
- - `active_till_date` is a unix-ms timestamp; items past this point are
112
- filtered server-side, so consumers should NOT need to render an
113
- "Expired" state for catalog items (only for purchase-history rows).
114
- A live countdown ("flash sale ends in HH:MM:SS") is rendered only
115
- when the operator has enabled the per-item `show_timer` flag.
116
- - `discounted_price` + `discount_price_ribbon` are the discount-display
117
- pair: render `price` with a strikethrough and `discounted_price` as
118
- the active price. `discount_price_ribbon` is either a percentage
119
- preset (`'10'`, `'15'`, `'20'`, `'25'`, `'50'`) styled by the
120
- consumer's CSS, or the literal `'custom'` — in which case
121
- `custom_ribbon_image` (250×300 px URL) is the artwork.
122
- - `ribbon` (general item ribbon) accepts the presets `'sale'`, `'hot'`,
123
- `'new'`, `'vip'` (built-in styling) or a custom-image URL (250×300 px).
124
- - `category_ids` maps to `TStoreCategory.id` from
125
- [getStoreCategories](#getstorecategories) — an item can appear in multiple categories;
126
- render it as multiple cards or once per active-tab as the consumer's
127
- navigation prefers.
128
- - `only_in_custom_section: true` means the item should be HIDDEN from
129
- the main store view and shown only inside the operator-defined
130
- custom section (`custom_section_id`). The catalog still includes it —
131
- filter client-side for general views.
132
- - `type` distinguishes the post-purchase server effect (see "Side
133
- effects" below). UI rendering of the CATALOG card is identical across
134
- types — there is no built-in card variation per type.
135
- - `purchase_ts`, `purchase_points_amount`, `purchased_today`,
136
- `purchased_this_week`, `purchased_this_month` are populated only on
137
- rows returned from [getStorePurchasedItems](#getstorepurchaseditems) (purchase history),
138
- NOT on rows from `getStoreItems`.
92
+ **Reading state from the returned item**
93
+ The catalog row carries everything a Buy button needs except the user's
94
+ balance: `can_buy` already reflects segment / visibility / per-period
95
+ cap checks, but the SDK does NOT pre-compute balance affordability —
96
+ compare `discounted_price ?? price` against the user's balance for
97
+ `purchase_type` (`ach_points_balance` / `ach_gems_balance` /
98
+ `ach_diamonds_balance` from [getUserProfile](WSAPIUser.md#getuserprofile)). `purchase_type` is
99
+ per-item (`'points'` / `'gems'` / `'diamonds'`); operators can mix
100
+ currencies within a single catalog. For sold-out display, `pool === 0`
101
+ means the operator chose to keep the item visible — render an "Out of
102
+ stock" overlay. When `discounted_price` is set, render `price` with a
103
+ strikethrough and `discounted_price` as the active price; the
104
+ accompanying `discount_price_ribbon` is either a percentage preset
105
+ (`'10'`, `'15'`, `'20'`, `'25'`, `'50'`) or the literal `'custom'`
106
+ (in which case `custom_ribbon_image` is the artwork at 250×300 px).
107
+ A live countdown for time-limited items is rendered only when the
108
+ operator has enabled the per-item `show_timer` flag.
109
+
110
+ **Cross-references**
111
+ `category_ids` joins to `TStoreCategory.id` from
112
+ [getStoreCategories](#getstorecategories) (many-to-many — an item can belong to
113
+ multiple categories). Items with `only_in_custom_section: true` are
114
+ returned in the catalog but intended for their custom-section view
115
+ only — filter them client-side for the main store view. The
116
+ history-only fields (`purchase_ts`, `purchase_points_amount`, the
117
+ `purchased_*` booleans) are populated only by
118
+ [getStorePurchasedItems](#getstorepurchaseditems), not by this method.
139
119
 
140
120
  **Idempotency**: yes. `getStoreItems` is a pure read. Calling it
141
121
  repeatedly within the 30-second cache window resolves from the cache
@@ -622,40 +602,35 @@ Promise resolving to an array of `TStoreItem` history entries
622
602
  - History rows render identically across types — there is no deep-link to
623
603
  the bonus wallet or re-claim affordance on the row itself.
624
604
 
625
- **History-only fields on `TStoreItem`**
626
- The following fields are populated **only** for entries returned by this
627
- method (NOT by [getStoreItems](#getstoreitems)):
628
- - `purchase_ts` — Unix milliseconds, server-recorded UTC moment of
629
- purchase. Format on the consumer side in the **user's browser local
630
- timezone** (the default Smartico UI uses
631
- `new Date(purchase_ts).toLocaleString(undefined, { dateStyle: 'short', timeStyle: 'medium' })`).
632
- No relative labels ("Today" / "Yesterday") are produced by the SDK —
633
- render those client-side if desired.
634
- - `purchase_points_amount` — the amount the user actually paid at the
635
- time of purchase, in the currency given by `purchase_type`. Historical
636
- discounts are preserved here; the item's current `price` may differ.
637
- - `purchase_type` — `'points' | 'gems' | 'diamonds'`. The currency
638
- actually charged. Render the matching balance icon next to
639
- `purchase_points_amount`.
640
- - `purchased_today` / `purchased_this_week` / `purchased_this_month` —
641
- convenience booleans computed by the SDK at transform time using the
642
- **consumer's local clock**, not server-stamped. Useful for client-side
643
- bucketing (e.g. "Today" / "This Week" group headers).
644
-
645
- **Catalog fields that ARE present but commonly ignored on a history row**
646
- - `ribbon`, `discounted_price`, `discount_price_ribbon`,
647
- `custom_ribbon_image`, `active_till_date` — reflect the current
648
- catalog state of the item, not its state at purchase time. The
649
- default Smartico UI hides them on history rows to avoid mis-implying that
650
- the historical purchase carried that current promotional banner.
651
- - `description`, `hint_text` (T&C), `related_games` — descriptive
652
- marketing fields; typically suppressed on a compact history row.
653
- - `can_buy`, `pool` — reflect **current** purchasability of the same
654
- item, useful only if you render a "Buy Again" affordance on the history
655
- row (see UI guidance below).
656
- - `custom_data` — present, but unlike `getStoreItems` the history
657
- transform does NOT auto-parse JSON strings. If you store JSON there,
658
- call `JSON.parse()` yourself.
605
+ **Per-row data**
606
+ Each row uses the `TStoreItem` shape but populates four history-only
607
+ fields not present on `getStoreItems` output. `purchase_ts` is the
608
+ Unix-ms timestamp of the purchase — format with
609
+ `new Date(purchase_ts).toLocaleString()` in the user's local timezone;
610
+ no relative labels ("Today" / "Yesterday") are produced by the SDK.
611
+ `purchase_points_amount` is the amount actually paid at the time of
612
+ purchase — a snapshot of the historical price, which may differ from
613
+ the item's current `price`. `purchase_type` is the currency actually
614
+ charged (`'points' | 'gems' | 'diamonds'`); render the matching
615
+ balance icon next to the amount. The convenience booleans
616
+ `purchased_today` / `purchased_this_week` / `purchased_this_month` are
617
+ computed client-side from the consumer's local clock — useful for
618
+ grouping rows under "Today" / "This Week" headers.
619
+
620
+ **Catalog fields on a history row**
621
+ The promotional fields (`ribbon`, `discounted_price`,
622
+ `discount_price_ribbon`, `custom_ribbon_image`, `active_till_date`)
623
+ reflect the CURRENT catalog state of the item, NOT its state at
624
+ purchase time — the default Smartico UI hides them on history rows to
625
+ avoid implying that the historical purchase carried the current
626
+ promotional banner. Descriptive marketing fields (`description`,
627
+ `hint_text`, `related_games`) are typically suppressed on a compact
628
+ history row. The current-purchasability fields `can_buy` and `pool`
629
+ reflect now, not then — useful only if you render a "Buy Again"
630
+ affordance on the row. One implementation gotcha: unlike
631
+ `getStoreItems`, this method's transform does NOT auto-parse JSON
632
+ strings in `custom_data` — call `JSON.parse()` yourself if you store
633
+ JSON there.
659
634
 
660
635
  **Cache & refresh**
661
636
  - The SDK caches each `(limit, offset)` page separately for 30 seconds.