@smartico/public-api 0.0.379 → 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 (219) hide show
  1. package/.nvmrc +1 -1
  2. package/CLAUDE.md +103 -0
  3. package/README.md +53 -2
  4. package/dist/Base/ClassId.d.ts +2 -0
  5. package/dist/Jackpots/JackpotDetails.d.ts +14 -15
  6. package/dist/Jackpots/JackpotPot.d.ts +10 -6
  7. package/dist/Raffle/GetRaffleWonPrizesRequest.d.ts +9 -0
  8. package/dist/Raffle/GetRaffleWonPrizesResponse.d.ts +52 -0
  9. package/dist/Raffle/index.d.ts +2 -0
  10. package/dist/SmarticoAPI.d.ts +6 -1
  11. package/dist/SmarticoLib/index.d.ts +5 -1
  12. package/dist/Store/BuyStoreItemErrorCode.d.ts +9 -1
  13. package/dist/Tournaments/TournamentRegistrationError.d.ts +3 -1
  14. package/dist/WSAPI/WSAPI.d.ts +13 -1235
  15. package/dist/WSAPI/WSAPIAvatars.d.ts +296 -0
  16. package/dist/WSAPI/WSAPIBase.d.ts +71 -0
  17. package/dist/WSAPI/WSAPIBonuses.d.ts +240 -0
  18. package/dist/WSAPI/WSAPIClans.d.ts +388 -0
  19. package/dist/WSAPI/WSAPIGamePick.d.ts +593 -0
  20. package/dist/WSAPI/WSAPIGeneral.d.ts +172 -0
  21. package/dist/WSAPI/WSAPIInbox.d.ts +615 -0
  22. package/dist/WSAPI/WSAPIJackpots.d.ts +344 -0
  23. package/dist/WSAPI/WSAPILeaderBoard.d.ts +139 -0
  24. package/dist/WSAPI/WSAPIMiniGames.d.ts +510 -0
  25. package/dist/WSAPI/WSAPIMissions.d.ts +517 -0
  26. package/dist/WSAPI/WSAPIRaffles.d.ts +643 -0
  27. package/dist/WSAPI/WSAPIStore.d.ts +656 -0
  28. package/dist/WSAPI/WSAPITournaments.d.ts +501 -0
  29. package/dist/WSAPI/WSAPITypes.d.ts +376 -205
  30. package/dist/WSAPI/WSAPIUser.d.ts +533 -0
  31. package/dist/index.js +6745 -1661
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.modern.mjs +6324 -1342
  34. package/dist/index.modern.mjs.map +1 -1
  35. package/docs/Callbacks.md +162 -0
  36. package/docs/SmarticoObject.md +445 -0
  37. package/docs/Transforms.md +99 -0
  38. package/docs/api/README.md +82 -2
  39. package/docs/api/classes/WSAPIAvatars.md +344 -0
  40. package/docs/api/classes/WSAPIBonuses.md +271 -0
  41. package/docs/api/classes/WSAPIClans.md +436 -0
  42. package/docs/api/classes/WSAPIGamePick.md +710 -0
  43. package/docs/api/classes/WSAPIGeneral.md +212 -0
  44. package/docs/api/classes/WSAPIInbox.md +801 -0
  45. package/docs/api/classes/WSAPIJackpots.md +439 -0
  46. package/docs/api/classes/WSAPILeaderBoard.md +157 -0
  47. package/docs/api/classes/WSAPIMiniGames.md +612 -0
  48. package/docs/api/classes/WSAPIMissions.md +590 -0
  49. package/docs/api/classes/WSAPIRaffles.md +773 -0
  50. package/docs/api/classes/WSAPIStore.md +719 -0
  51. package/docs/api/classes/WSAPITournaments.md +571 -0
  52. package/docs/api/classes/WSAPIUser.md +637 -0
  53. package/docs/api/documents/Callbacks.md +162 -0
  54. package/docs/api/documents/SmarticoObject.md +445 -0
  55. package/docs/api/documents/Transforms.md +99 -0
  56. package/docs/api/enumerations/AchievementClaimPeriodTypeId.md +13 -0
  57. package/docs/api/enumerations/BonusStatus-1.md +11 -6
  58. package/docs/api/enumerations/BuyStoreItemErrorCode.md +32 -0
  59. package/docs/api/enumerations/JoinClanErrorCode.md +81 -0
  60. package/docs/api/enumerations/TournamentRegistrationError.md +12 -0
  61. package/docs/api/functions/clanTournamentPlayersTransform.md +13 -0
  62. package/docs/api/interfaces/AvatarCustomized.md +25 -0
  63. package/docs/api/interfaces/AvatarDefinition.md +94 -0
  64. package/docs/api/interfaces/AvatarPrompt.md +45 -0
  65. package/docs/api/interfaces/BonusMetaMap-1.md +4 -1
  66. package/docs/api/interfaces/BonusTemplateMetaMap-1.md +9 -4
  67. package/docs/api/interfaces/Clan.md +4 -0
  68. package/docs/api/interfaces/ClanInfo.md +109 -0
  69. package/docs/api/interfaces/ClanMember.md +53 -0
  70. package/docs/api/interfaces/ClanPrizePublicMeta.md +41 -0
  71. package/docs/api/interfaces/ClanPrizeStructureEntry.md +7 -1
  72. package/docs/api/interfaces/ClanPublicMeta.md +4 -0
  73. package/docs/api/interfaces/ClanTournamentPlayerRaw.md +67 -0
  74. package/docs/api/interfaces/GemsDiamondsLog.md +43 -0
  75. package/docs/api/interfaces/GetClanInfoResponse.md +61 -0
  76. package/docs/api/interfaces/GetClanTournamentPlayersResponse.md +81 -0
  77. package/docs/api/interfaces/GetRaffleWonPrizesRequest.md +59 -0
  78. package/docs/api/interfaces/GetRaffleWonPrizesResponse.md +95 -0
  79. package/docs/api/interfaces/InboxMarkMessageAction.md +10 -2
  80. package/docs/api/interfaces/JackpotDetails.md +14 -15
  81. package/docs/api/interfaces/JackpotPot.md +9 -6
  82. package/docs/api/interfaces/LeaderBoardDetailsT.md +14 -8
  83. package/docs/api/interfaces/LeaderBoardUserT.md +8 -5
  84. package/docs/api/interfaces/LeaderBoardsRewardsT.md +7 -0
  85. package/docs/api/interfaces/PointsLog.md +43 -0
  86. package/docs/api/interfaces/RaffleWonPrize.md +59 -0
  87. package/docs/api/interfaces/RaffleWonPrizePublicMeta.md +27 -0
  88. package/docs/api/interfaces/RaffleWonPrizeUser.md +43 -0
  89. package/docs/api/interfaces/SAWTemplateUI.md +10 -0
  90. package/docs/api/interfaces/TAchCategory.md +14 -4
  91. package/docs/api/interfaces/TAvatarCustomized.md +4 -4
  92. package/docs/api/interfaces/TAvatarDefinition.md +13 -14
  93. package/docs/api/interfaces/TAvatarPrompt.md +6 -6
  94. package/docs/api/interfaces/TBonus.md +16 -8
  95. package/docs/api/interfaces/TBuyStoreItemResult.md +4 -11
  96. package/docs/api/interfaces/TClaimBonusResult.md +5 -5
  97. package/docs/api/interfaces/TClan.md +8 -4
  98. package/docs/api/interfaces/TClanInfo.md +47 -0
  99. package/docs/api/interfaces/TClanJoinResult.md +11 -1
  100. package/docs/api/interfaces/TClanTournamentPlayer.md +55 -0
  101. package/docs/api/interfaces/TClanTournamentPlayersResult.md +27 -0
  102. package/docs/api/interfaces/TClans.md +3 -1
  103. package/docs/api/interfaces/TGetTranslations.md +4 -0
  104. package/docs/api/interfaces/TInboxMessage.md +14 -6
  105. package/docs/api/interfaces/TInboxMessageBody.md +18 -12
  106. package/docs/api/interfaces/TLevel.md +17 -20
  107. package/docs/api/interfaces/TLevelCurrent.md +19 -18
  108. package/docs/api/interfaces/TMiniGamePlayBatchResult.md +14 -6
  109. package/docs/api/interfaces/TMiniGamePlayResult.md +9 -4
  110. package/docs/api/interfaces/TMissionClaimRewardResult.md +6 -3
  111. package/docs/api/interfaces/TMissionOptInResult.md +6 -3
  112. package/docs/api/interfaces/TMissionOrBadge.md +5 -4
  113. package/docs/api/interfaces/TRaffleOptinResponse.md +4 -2
  114. package/docs/api/interfaces/TSegmentCheckResult.md +10 -0
  115. package/docs/api/interfaces/TSetAvatarResult.md +3 -3
  116. package/docs/api/interfaces/TStoreItem.md +11 -1
  117. package/docs/api/interfaces/TTournament.md +1 -1
  118. package/docs/api/interfaces/TTournamentDetailed.md +9 -1
  119. package/docs/api/interfaces/TTournamentRegistrationResult.md +4 -2
  120. package/docs/api/interfaces/TUICustomSection.md +23 -19
  121. package/docs/api/interfaces/TUserProfile.md +18 -16
  122. package/docs/api/interfaces/TransformedRaffleClaimPrizeResponse.md +6 -2
  123. package/docs/api/interfaces/UserAchievement.md +1 -1
  124. package/docs/api/interfaces/UserLevelExtraCountersT.md +9 -2
  125. package/docs/api/type-aliases/ActivityLogEntry.md +3 -0
  126. package/docs/native/ADDING_METHODS.md +7 -2
  127. package/docs/native/PROTOCOL.md +337 -0
  128. package/docs/ui/avatars/UIGuide_getAvatarPrompts.md +100 -0
  129. package/docs/ui/avatars/UIGuide_getAvatarsCustomized.md +90 -0
  130. package/docs/ui/avatars/UIGuide_getAvatarsList.md +105 -0
  131. package/docs/ui/avatars/UIGuide_setAvatar.md +118 -0
  132. package/docs/ui/bonuses/UIGuide_claimBonus.md +144 -0
  133. package/docs/ui/bonuses/UIGuide_getBonuses.md +176 -0
  134. package/docs/ui/clans/UIGuide_getClanInfo.md +153 -0
  135. package/docs/ui/clans/UIGuide_getClans.md +172 -0
  136. package/docs/ui/clans/UIGuide_joinClan.md +196 -0
  137. package/docs/ui/gamepick/UIGuide_gamePickGetActiveRound.md +99 -0
  138. package/docs/ui/gamepick/UIGuide_gamePickGetActiveRounds.md +76 -0
  139. package/docs/ui/gamepick/UIGuide_gamePickGetBoard.md +81 -0
  140. package/docs/ui/gamepick/UIGuide_gamePickGetGameInfo.md +78 -0
  141. package/docs/ui/gamepick/UIGuide_gamePickGetHistory.md +55 -0
  142. package/docs/ui/gamepick/UIGuide_gamePickGetRoundInfoForUser.md +71 -0
  143. package/docs/ui/gamepick/UIGuide_gamePickGetUserInfo.md +64 -0
  144. package/docs/ui/gamepick/UIGuide_gamePickSubmitSelection.md +103 -0
  145. package/docs/ui/gamepick/UIGuide_gamePickSubmitSelectionQuiz.md +67 -0
  146. package/docs/ui/general/UIGuide_getCustomSections.md +137 -0
  147. package/docs/ui/general/UIGuide_getRelatedItemsForGame.md +140 -0
  148. package/docs/ui/inbox/UIGuide_deleteInboxMessage.md +135 -0
  149. package/docs/ui/inbox/UIGuide_getInboxMessageBody.md +133 -0
  150. package/docs/ui/inbox/UIGuide_getInboxMessages.md +186 -0
  151. package/docs/ui/inbox/UIGuide_markInboxMessageAsRead.md +122 -0
  152. package/docs/ui/inbox/UIGuide_markUnmarkInboxMessageAsFavorite.md +84 -0
  153. package/docs/ui/jackpots/UIGuide_getJackpotEligibleGames.md +73 -0
  154. package/docs/ui/jackpots/UIGuide_getJackpotWinners.md +83 -0
  155. package/docs/ui/jackpots/UIGuide_jackpotGet.md +138 -0
  156. package/docs/ui/jackpots/UIGuide_jackpotOptIn.md +85 -0
  157. package/docs/ui/jackpots/UIGuide_jackpotOptOut.md +65 -0
  158. package/docs/ui/leaderboard/UIGuide_getLeaderBoard.md +166 -0
  159. package/docs/ui/minigames/UIGuide_getMiniGames.md +153 -0
  160. package/docs/ui/minigames/UIGuide_getMiniGamesHistory.md +90 -0
  161. package/docs/ui/minigames/UIGuide_playMiniGame.md +150 -0
  162. package/docs/ui/minigames/UIGuide_playMiniGameBatch.md +128 -0
  163. package/docs/ui/missions/UIGuide_getAchCategories.md +17 -0
  164. package/docs/ui/missions/UIGuide_getBadges.md +237 -0
  165. package/docs/ui/missions/UIGuide_getMissions.md +268 -0
  166. package/docs/ui/missions/UIGuide_requestMissionClaimReward.md +21 -0
  167. package/docs/ui/missions/UIGuide_requestMissionOptIn.md +16 -0
  168. package/docs/ui/raffles/UIGuide_claimRafflePrize.md +99 -0
  169. package/docs/ui/raffles/UIGuide_getRaffleDrawRun.md +117 -0
  170. package/docs/ui/raffles/UIGuide_getRaffleDrawRunsHistory.md +92 -0
  171. package/docs/ui/raffles/UIGuide_getRaffleWonPrizes.md +120 -0
  172. package/docs/ui/raffles/UIGuide_getRaffles.md +175 -0
  173. package/docs/ui/raffles/UIGuide_requestRaffleOptin.md +114 -0
  174. package/docs/ui/store/UIGuide_buyStoreItem.md +133 -0
  175. package/docs/ui/store/UIGuide_getStoreCategories.md +19 -0
  176. package/docs/ui/store/UIGuide_getStoreItems.md +264 -0
  177. package/docs/ui/store/UIGuide_getStorePurchasedItems.md +122 -0
  178. package/docs/ui/tournaments/UIGuide_getClanTournamentPlayers.md +140 -0
  179. package/docs/ui/tournaments/UIGuide_getTournamentInstanceInfo.md +265 -0
  180. package/docs/ui/tournaments/UIGuide_getTournamentsList.md +236 -0
  181. package/docs/ui/tournaments/UIGuide_registerInTournament.md +156 -0
  182. package/docs/ui/user/UIGuide_getActivityLog.md +130 -0
  183. package/docs/ui/user/UIGuide_getLevels.md +167 -0
  184. package/docs/ui/user/UIGuide_getUserProfile.md +213 -0
  185. package/package.json +3 -3
  186. package/scripts/postdoc-cleanup.js +195 -0
  187. package/src/Base/ClassId.ts +2 -0
  188. package/src/Jackpots/JackpotDetails.ts +14 -15
  189. package/src/Jackpots/JackpotPot.ts +10 -6
  190. package/src/Missions/MissionsUtils.ts +5 -2
  191. package/src/Raffle/GetRaffleWonPrizesRequest.ts +12 -0
  192. package/src/Raffle/GetRaffleWonPrizesResponse.ts +56 -0
  193. package/src/Raffle/index.ts +3 -1
  194. package/src/SmarticoAPI.ts +14 -1
  195. package/src/SmarticoLib/index.ts +4 -0
  196. package/src/Store/BuyStoreItemErrorCode.ts +8 -0
  197. package/src/Store/StoreItem.ts +1 -0
  198. package/src/Store/StoreItemPurchased.ts +1 -0
  199. package/src/Store/StoreItemType.ts +1 -1
  200. package/src/Tournaments/TournamentRegistrationError.ts +4 -0
  201. package/src/WSAPI/WSAPI.ts +27 -2007
  202. package/src/WSAPI/WSAPIAvatars.ts +345 -0
  203. package/src/WSAPI/WSAPIBase.ts +93 -0
  204. package/src/WSAPI/WSAPIBonuses.ts +268 -0
  205. package/src/WSAPI/WSAPIClans.ts +417 -0
  206. package/src/WSAPI/WSAPIGamePick.ts +667 -0
  207. package/src/WSAPI/WSAPIGeneral.ts +199 -0
  208. package/src/WSAPI/WSAPIInbox.ts +711 -0
  209. package/src/WSAPI/WSAPIJackpots.ts +448 -0
  210. package/src/WSAPI/WSAPILeaderBoard.ts +154 -0
  211. package/src/WSAPI/WSAPIMiniGames.ts +597 -0
  212. package/src/WSAPI/WSAPIMissions.ts +572 -0
  213. package/src/WSAPI/WSAPIRaffles.ts +703 -0
  214. package/src/WSAPI/WSAPIStore.ts +732 -0
  215. package/src/WSAPI/WSAPITournaments.ts +541 -0
  216. package/src/WSAPI/WSAPITypes.ts +376 -207
  217. package/src/WSAPI/WSAPIUser.ts +606 -0
  218. package/tsconfig.json +26 -2
  219. package/docs/api/classes/WSAPI.md +0 -1927
@@ -0,0 +1,606 @@
1
+ import { CoreUtils } from '../Core';
2
+ import { ECacheContext, OCache } from '../OCache';
3
+ import {
4
+ TActivityLog,
5
+ TLevel,
6
+ TLevelCurrent,
7
+ TSegmentCheckResult,
8
+ TUserProfile,
9
+ UserLevelExtraCountersT,
10
+ } from './WSAPITypes';
11
+ import {
12
+ CACHE_DATA_SEC,
13
+ onUpdateContextKey,
14
+ } from './WSAPIBase';
15
+ import { WSAPIBase } from './WSAPIBase';
16
+
17
+ /** @group User */
18
+ export class WSAPIUser extends WSAPIBase {
19
+ /**
20
+ * Returns the current user's public profile — the source of truth for
21
+ * balances (points / gems / diamonds), the current level ID, the
22
+ * display username + avatar, language, public tags, and the inbox
23
+ * unread count. **This method is synchronous** (returns `TUserProfile`,
24
+ * not a Promise): the SDK keeps a local snapshot of the user's public
25
+ * properties that is initialised at identify time and kept live by a
26
+ * server-driven update channel — every call returns the latest cached
27
+ * values without a network round-trip.
28
+ *
29
+ * Subscribe to changes by registering a callback on `_smartico.on('props_change', ...)`
30
+ * — the callback fires with the full snapshot at identify and with
31
+ * partial-key updates on every subsequent server push (typically
32
+ * under 1 second after the underlying state change).
33
+ *
34
+ * @remarks
35
+ * **Preconditions**
36
+ * The tracker must be initialised — calling this before the identify
37
+ * round-trip completes throws (`"Tracker is not initialized, cannot
38
+ * getUserProfile"`). Safe ways to wait for readiness:
39
+ * - register `_smartico.on('identify', (errCode, props) => ...)` —
40
+ * fires once after a successful identify with the full props
41
+ * - register `_smartico.on('props_change', () => ...)` — fires first
42
+ * at identify with the full snapshot, then on every push update
43
+ *
44
+ * **What's kept live (push-updated)**
45
+ * Balance fields (`ach_points_balance`, `ach_gems_balance`,
46
+ * `ach_diamonds_balance`, `ach_points_ever`), `ach_level_current_id`,
47
+ * `core_public_tags`, `core_inbox_unread_count`, `core_user_language`,
48
+ * `avatar_url`, `public_username`, and the AI-driven recommended-amount
49
+ * fields all flow over the SDK's user-properties update channel as
50
+ * partial updates — the snapshot is patched in place when any of them
51
+ * change server-side. Re-call `getUserProfile()` (or watch
52
+ * `props_change`) to observe new values.
53
+ *
54
+ * **Reading state from the returned profile**
55
+ * Balances (`ach_points_balance`, `ach_gems_balance`,
56
+ * `ach_diamonds_balance`) are the canonical source for affordability
57
+ * checks across the SDK — compare against `entry_fee_amount` (clans),
58
+ * `registration_cost_points` / `_gems` / `_diamonds` (tournaments), and
59
+ * `price` / `discounted_price` + `purchase_type` (store items).
60
+ * `ach_points_ever` is monotonic — store purchases deduct from
61
+ * `ach_points_balance` but NEVER from `ach_points_ever`, so it remains
62
+ * useful for level-progress math (`required_points` on the next
63
+ * {@link getLevels} entry minus `ach_points_ever`). `ach_level_current_id`
64
+ * is the FK into the level ladder — resolve metadata via
65
+ * {@link getCurrentLevel} (richer, includes progress %) or
66
+ * {@link getLevels} (full ladder lookup table).
67
+ *
68
+ * **Inbox unread count** — `core_inbox_unread_count` on this profile
69
+ * is push-updated in real time (under 1 second). For an inbox badge,
70
+ * prefer this field over `getInboxUnreadCount` (which is cached
71
+ * for 30 s) — same value, fresher signal.
72
+ *
73
+ * **Language**: `core_user_language` reflects the server's stored
74
+ * language. If the consumer just called `_smartico.changeLanguage(...)`,
75
+ * the field may briefly lag the local intent until the server push
76
+ * arrives. Use `_smartico.getPublicProps()` for the
77
+ * client-fallback-applied version if instant accuracy matters.
78
+ *
79
+ * **Idempotency / Side effects**: trivially safe — no network call,
80
+ * no state mutation.
81
+ *
82
+ * **UI guidance**: see [UI Guide — `getUserProfile`](../../docs/ui/user/UIGuide_getUserProfile.md).
83
+ *
84
+ * **Visitor mode**: not supported — throws. Visitor sessions do not
85
+ * have a public-profile snapshot.
86
+ *
87
+ * @returns The current cached `TUserProfile` snapshot. A shallow copy —
88
+ * mutating it does not affect the SDK's internal state.
89
+ * @throws `Error("Tracker is not initialized, cannot getUserProfile")`
90
+ * if called before identify completes or from a visitor session.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * // Wait for identify before calling.
95
+ * window._smartico.on('identify', (errCode) => {
96
+ * if (errCode !== 0) return;
97
+ * const profile = window._smartico.api.getUserProfile();
98
+ * console.log('[smartico] initial profile loaded — render the user widget:', profile);
99
+ * });
100
+ *
101
+ * // Stay in sync with live updates.
102
+ * window._smartico.on('props_change', (changed) => {
103
+ * // `changed` is the partial keys for this push (full snapshot at identify).
104
+ * const profile = window._smartico.api.getUserProfile();
105
+ * console.log('[smartico] profile updated — re-render any widgets bound to:', Object.keys(changed),
106
+ * '— balances now:', profile.ach_points_balance, profile.ach_gems_balance, profile.ach_diamonds_balance);
107
+ *
108
+ * // React to specific fields.
109
+ * if ('ach_level_current_id' in changed) {
110
+ * console.log('[smartico] level changed — call getCurrentLevel() for richer detail, animate the level badge');
111
+ * }
112
+ * if ('core_inbox_unread_count' in changed) {
113
+ * console.log('[smartico] inbox unread count changed — update the badge to:', profile.core_inbox_unread_count);
114
+ * }
115
+ * });
116
+ *
117
+ * // Affordability gating example — used inside a clan / tournament / store CTA handler.
118
+ * const profile = window._smartico.api.getUserProfile();
119
+ * const item = await window._smartico.api.getStoreItems().then(items => items[0]);
120
+ * const price = item.discounted_price ?? item.price;
121
+ * const balance = {
122
+ * points: profile.ach_points_balance,
123
+ * gems: profile.ach_gems_balance,
124
+ * diamonds: profile.ach_diamonds_balance,
125
+ * }[item.purchase_type];
126
+ * if (balance < price) {
127
+ * console.log('[smartico] insufficient', item.purchase_type, '— disable Buy and show deficit', price - balance);
128
+ * }
129
+ * ```
130
+ */
131
+ public getUserProfile(): TUserProfile {
132
+ if (this.api.tracker) {
133
+ const o: TUserProfile = Object.assign({}, this.api.tracker.userPublicProps);
134
+ o.avatar_url = CoreUtils.avatarUrl(this.api.tracker.userPublicProps.avatar_id, this.api.avatarDomain);
135
+ return o;
136
+ } else {
137
+ throw new Error('Tracker is not initialized, cannot getUserProfile');
138
+ }
139
+ }
140
+
141
+ /**
142
+ * Checks whether the current user matches a single segment, returning
143
+ * `true` / `false` directly. Use this as a decision primitive to gate
144
+ * UI surfaces (e.g. show a "VIP lounge" tab only when the user is in
145
+ * the VIP segment), or to drive segment-specific CTA copy.
146
+ *
147
+ * Every call is a server round-trip — there is no SDK-side cache. For
148
+ * checking multiple segments in one round-trip, use
149
+ * {@link checkSegmentListMatch} instead.
150
+ *
151
+ * @remarks
152
+ * **Refresh model**
153
+ * - **No client cache.** Every call sends a request; the SDK does not
154
+ * memoize results.
155
+ * - **No push event** notifies the consumer when segment membership
156
+ * flips (the user crosses a qualification threshold, or the
157
+ * operator changes the segment definition). Membership changes
158
+ * become visible only on the next `checkSegmentMatch` call.
159
+ * - **Behavioral segments (configured against BigQuery) have batch
160
+ * lag** — even if the user's activity has changed (deposit, wager,
161
+ * etc.), the segment-membership result may not reflect that change
162
+ * until the next batch evaluation run (typically up to several
163
+ * hours).
164
+ *
165
+ * **Rate limit** (important)
166
+ * The server caps `checkSegment*` calls at **10 requests per
167
+ * 60-second window**, with a minimum gap of **~5 seconds between
168
+ * consecutive calls**. Avoid calling on every render — cache the
169
+ * result client-side for the session, or until you have a reason to
170
+ * believe the user's state changed (e.g. after a deposit completes,
171
+ * a level changes via {@link getUserProfile}'s `props_change`, or a
172
+ * specific custom event fires).
173
+ *
174
+ * **`is_matching: false` is ambiguous on the server** — both "the
175
+ * segment doesn't exist for this label" and "the user doesn't
176
+ * qualify" return `false` with no distinguishing signal. Pass IDs
177
+ * you've verified are valid for your label.
178
+ *
179
+ * **Idempotency**: safe. Read-only. No side effects (no analytics
180
+ * events, no DB writes).
181
+ *
182
+ * **Visitor mode**: not supported.
183
+ *
184
+ * @param segment_id The segment ID. Segment IDs are label-scoped;
185
+ * the same numeric ID can refer to different
186
+ * segments under different labels. Use the IDs
187
+ * configured for your label.
188
+ * @returns `true` if the user currently matches the
189
+ * segment, `false` otherwise. `false` also covers
190
+ * the "segment doesn't exist for this label"
191
+ * case — these are not distinguishable.
192
+ *
193
+ * @example
194
+ * ```ts
195
+ * const isVip = await window._smartico.api.checkSegmentMatch(vipSegmentId);
196
+ * if (isVip) {
197
+ * console.log('[smartico] user is in VIP segment — render the VIP-only widget surface');
198
+ * } else {
199
+ * console.log('[smartico] user not in VIP segment (or segment id misconfigured) — hide the VIP surface');
200
+ * }
201
+ *
202
+ * // Cache the result for the session; re-check after material user-state changes.
203
+ * window._smartico.on('props_change', async (changed) => {
204
+ * if ('ach_points_ever' in changed || 'ach_level_current_id' in changed) {
205
+ * const fresh = await window._smartico.api.checkSegmentMatch(vipSegmentId);
206
+ * console.log('[smartico] user state changed — VIP membership now:', fresh);
207
+ * }
208
+ * });
209
+ * ```
210
+ */
211
+ public async checkSegmentMatch(segment_id: number): Promise<boolean> {
212
+ const r = await this.api.coreCheckSegments(this.userExtId, [segment_id]);
213
+ if (r && r.find((s) => s.segment_id === segment_id && s.is_matching)) {
214
+ return true;
215
+ } else {
216
+ return false;
217
+ }
218
+ }
219
+
220
+ /**
221
+ * Checks the current user's membership in multiple segments in a
222
+ * single server round-trip — returns a `TSegmentCheckResult[]` with
223
+ * one entry per *unique* segment ID. Use this instead of looping
224
+ * {@link checkSegmentMatch} when you need to evaluate several
225
+ * segments at once (e.g. multi-segment composite gating, A/B-style
226
+ * cohort detection).
227
+ *
228
+ * @remarks
229
+ * **Response order is NOT guaranteed**
230
+ * The server returns results in an unspecified order — different
231
+ * from the input array. Always correlate by the `segment_id` field on
232
+ * each `TSegmentCheckResult` rather than by array position. The
233
+ * returned array length may also be smaller than the input array
234
+ * (duplicate IDs are silently de-duplicated server-side).
235
+ *
236
+ * **Single round-trip**
237
+ * The entire `segment_ids` array is sent in one request. Two segments
238
+ * cost the same as one in terms of network latency and rate-limit
239
+ * consumption (one call = one rate-limit slot, regardless of how many
240
+ * segments).
241
+ *
242
+ * **Shared semantics with `checkSegmentMatch`**
243
+ * Both methods wrap the same underlying server endpoint and share
244
+ * the same caching, refresh, rate-limit, and ambiguity behavior. See
245
+ * {@link checkSegmentMatch} for: no client cache · no push event for
246
+ * membership changes · behavioral segments have batch lag · rate
247
+ * limit (10 requests / 60 s, ~5 s minimum gap between calls) ·
248
+ * `is_matching: false` doesn't distinguish "not in segment" from
249
+ * "segment doesn't exist for this label".
250
+ *
251
+ * **Idempotency**: safe. Read-only. No side effects.
252
+ *
253
+ * **Visitor mode**: not supported.
254
+ *
255
+ * @param segment_ids Array of segment IDs to check. Duplicates are
256
+ * silently de-duplicated server-side. Segment IDs
257
+ * are label-scoped — use the IDs configured for
258
+ * your label.
259
+ * @returns Array of `{ segment_id, is_matching }` results.
260
+ * Order is NOT guaranteed; correlate by
261
+ * `segment_id`. Length may be less than the input
262
+ * when duplicate IDs were sent.
263
+ *
264
+ * @example
265
+ * ```ts
266
+ * const segmentIds = [vipSegmentId, newPlayerSegmentId, freeRollSegmentId];
267
+ * const results = await window._smartico.api.checkSegmentListMatch(segmentIds);
268
+ *
269
+ * // Always correlate by segment_id — the response order is unspecified.
270
+ * const byId = new Map(results.map(r => [r.segment_id, r.is_matching]));
271
+ *
272
+ * if (byId.get(vipSegmentId)) {
273
+ * console.log('[smartico] user is in VIP segment — render VIP surface');
274
+ * }
275
+ * if (byId.get(newPlayerSegmentId) && byId.get(freeRollSegmentId)) {
276
+ * console.log('[smartico] new player AND eligible for free roll — show the welcome promo');
277
+ * }
278
+ *
279
+ * // Cache the result map for the session; refresh on material state changes.
280
+ * ```
281
+ */
282
+ public async checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]> {
283
+ return await this.api.coreCheckSegments(this.userExtId, Array.isArray(segment_ids) ? segment_ids : [segment_ids]);
284
+ }
285
+
286
+ /**
287
+ * Returns the full level ladder configured for the current label —
288
+ * one `TLevel` per active level, server-sorted by `required_points`
289
+ * ASC (lowest first; `ordinal_position` is a 1-based index into the
290
+ * returned array). Use this to render a level map / progression
291
+ * screen, or as a lookup table to resolve `ach_level_current_id` from
292
+ * {@link getUserProfile} into a richer level object.
293
+ *
294
+ * @remarks
295
+ * **Server-side filtering**
296
+ * The server returns ALL active levels for the label. There is NO
297
+ * per-user filtering on visibility, level-status, or anything else —
298
+ * the response is identical across users of the same label. Apply
299
+ * `visibility_points` filtering client-side if you want to hide
300
+ * not-yet-reached levels (compare against
301
+ * `getUserProfile().ach_points_ever` and exclude levels where
302
+ * `visibility_points > ach_points_ever`).
303
+ *
304
+ * **Sort order**
305
+ * The returned array is already sorted by `required_points` ASC, and
306
+ * `ordinal_position` is a 1-based index into that same sort order —
307
+ * client-side re-sorting is not required for the default rendering.
308
+ * If your label uses sliding-window leveling logic
309
+ * (see {@link getUserLevelExtraCounters}) and you want to sort by
310
+ * a multi-criteria key (`required_points`, then
311
+ * `required_level_counter_1`, then `required_level_counter_2`), do
312
+ * that client-side.
313
+ *
314
+ * **Cache TTL**: the SDK caches the response for 30 seconds. Cache
315
+ * is fully cleared on login / logout. Operator-driven level edits
316
+ * surface on the next cache miss.
317
+ *
318
+ * **Idempotency / Side effects**: safe. Read-only metadata. Calls
319
+ * within the cache window de-duplicate to the same cached array.
320
+ *
321
+ * **UI guidance**: see [UI Guide — `getLevels`](../../docs/ui/user/UIGuide_getLevels.md).
322
+ *
323
+ * **Visitor mode**: supported. Use `_smartico.vapi(lang).getLevels()`
324
+ * to fetch the ladder for anonymous viewers; the level configuration
325
+ * is label-scoped static data so the response is meaningful even
326
+ * without an authenticated user. Per-user fields (the implicit
327
+ * "current level" via {@link getCurrentLevel}, or the user's progress)
328
+ * are not available in visitor mode.
329
+ *
330
+ * @returns Promise resolving to the ordered `TLevel[]` ladder. Empty
331
+ * if no levels are configured for the label.
332
+ *
333
+ * @example
334
+ * ```ts
335
+ * const [levels, profile] = await Promise.all([
336
+ * window._smartico.api.getLevels(),
337
+ * Promise.resolve(window._smartico.api.getUserProfile()),
338
+ * ]);
339
+ *
340
+ * // Resolve the user's current level by ID.
341
+ * const current = levels.find(l => l.id === profile.ach_level_current_id);
342
+ * console.log('[smartico] render header badge — current level:', current?.name,
343
+ * '(position', current?.ordinal_position, 'of', levels.length, ')');
344
+ *
345
+ * // Filter to levels the user has unlocked enough to see.
346
+ * const visible = levels.filter(l =>
347
+ * l.visibility_points == null || l.visibility_points <= profile.ach_points_ever
348
+ * );
349
+ * console.log('[smartico] render the level map with', visible.length, 'visible tiles');
350
+ *
351
+ * // Visitor-mode equivalent: returns the same ladder; no per-user state.
352
+ * // const visitorLevels = await window._smartico.vapi('EN').getLevels();
353
+ * ```
354
+ */
355
+ public async getLevels(): Promise<TLevel[]> {
356
+ return OCache.use(onUpdateContextKey.Levels, ECacheContext.WSAPI, () => this.api.levelsGetT(this.userExtId), CACHE_DATA_SEC);
357
+ }
358
+
359
+ /**
360
+ * Returns the user's current level — every `TLevel` field plus a
361
+ * computed `progress` percentage toward the next level. Use this to
362
+ * power a level badge with a progress bar.
363
+ *
364
+ * @remarks
365
+ * **How `progress` is computed**
366
+ * The SDK derives `progress` as the *delta-from-current-level-floor*:
367
+ * `(ach_points_ever − current.required_points) / (next.required_points
368
+ * − current.required_points) × 100`, clamped to `[0, 100]`. At the
369
+ * highest level (no next level), `progress` is `100`. Reading the
370
+ * source values directly from {@link getUserProfile}'s
371
+ * `ach_points_ever` and {@link getLevels} would also work, but
372
+ * `progress` saves the math.
373
+ *
374
+ * **Cache TTL**: the SDK caches the response for 30 seconds. There is
375
+ * no push event that refreshes this cache; a server-side level change
376
+ * (visible immediately on {@link getUserProfile}'s `ach_level_current_id`
377
+ * via the user-properties update channel) becomes visible on this
378
+ * method only after the cache TTL expires, or after
379
+ * `_smartico.api.clearCaches()` is called.
380
+ *
381
+ * **Leveling logic**
382
+ * The semantics of how a user advances depends on the label's
383
+ * leveling logic (configured per brand): points-only (the default),
384
+ * sliding-window with extra counters (uses
385
+ * {@link getUserLevelExtraCounters}), or fully-manual operator
386
+ * assignment. The `progress` percentage on this method assumes the
387
+ * points-only model — it's not meaningful for manual-only labels
388
+ * where level changes are operator-driven rather than points-driven.
389
+ *
390
+ * **Idempotency**: safe. Read-only. Repeated calls within the cache
391
+ * window return a deep-cloned cached value without a network
392
+ * round-trip.
393
+ *
394
+ * **Side effects**: none — pure read.
395
+ *
396
+ * **Visitor mode**: not supported.
397
+ *
398
+ * @returns Promise resolving to `TLevelCurrent` — the current level
399
+ * plus `progress: number` (0–100).
400
+ *
401
+ * @example
402
+ * ```ts
403
+ * const level = await window._smartico.api.getCurrentLevel();
404
+ * console.log('[smartico] render level badge — name:', level.name,
405
+ * 'progress:', Math.round(level.progress), '%');
406
+ *
407
+ * // Detect level-up via getUserProfile's push channel.
408
+ * window._smartico.on('props_change', async (changed) => {
409
+ * if ('ach_level_current_id' in changed) {
410
+ * await window._smartico.api.clearCaches(); // bust the 30 s cache
411
+ * const fresh = await window._smartico.api.getCurrentLevel();
412
+ * console.log('[smartico] user levelled up — animate badge to new level:', fresh.name);
413
+ * }
414
+ * });
415
+ * ```
416
+ */
417
+ public async getCurrentLevel(): Promise<TLevelCurrent> {
418
+ return OCache.use(onUpdateContextKey.CurrentLevel, ECacheContext.WSAPI, () => this.api.getLevelCurrent(this.userExtId), CACHE_DATA_SEC);
419
+ }
420
+
421
+ /**
422
+ * Returns the user's current values for the two label-defined "extra
423
+ * counters" used by sliding-window leveling logic. Operators
424
+ * configure what each counter means per label (e.g. `level_counter_1`
425
+ * = total deposits in the last 30 days, `level_counter_2` = total
426
+ * wagering in the last 30 days). Compare against
427
+ * `required_level_counter_1` / `_2` on the next level from
428
+ * {@link getLevels} to know how close the user is to advancing.
429
+ *
430
+ * @remarks
431
+ * **When this matters**
432
+ * Only labels configured for sliding-window leveling populate the
433
+ * counter fields. On the default points-only leveling model, both
434
+ * `level_counter_1` and `level_counter_2` are `undefined`. Detect
435
+ * a points-only label by either counter being `undefined`.
436
+ *
437
+ * **Counter semantics — operator-defined**
438
+ * The SDK exposes raw numeric values; the meaning of each counter
439
+ * (deposit amount, wager amount, lifetime spend, etc.) is fully
440
+ * operator-defined per label. Resolve labels for display via
441
+ * `getTranslations` — the operator's display strings are
442
+ * stored under the translation keys `levelsCounter1Name` and
443
+ * `levelsCounter2Name`.
444
+ *
445
+ * **Refresh cadence**
446
+ * Sliding-window counters are recomputed by a server-side job that
447
+ * runs roughly every 60 seconds against the operator's BigQuery
448
+ * dataset; level transitions driven by counter changes have a
449
+ * latency of up to several minutes after the underlying activity
450
+ * (e.g. a deposit). The SDK caches the response for 30 seconds; no
451
+ * push event refreshes this cache. After a level change visible on
452
+ * {@link getUserProfile}'s `ach_level_current_id`, call
453
+ * `_smartico.api.clearCaches()` to force a fresh fetch.
454
+ *
455
+ * **Idempotency**: safe. Read-only. Repeated calls within the cache
456
+ * window return a deep-cloned cached value without a network
457
+ * round-trip.
458
+ *
459
+ * **Side effects**: none — pure read.
460
+ *
461
+ * **Visitor mode**: not supported.
462
+ *
463
+ * @returns Promise resolving to `UserLevelExtraCountersT`. Both
464
+ * fields are `undefined` on labels not using sliding-window
465
+ * leveling.
466
+ *
467
+ * @example
468
+ * ```ts
469
+ * const [counters, levels, profile] = await Promise.all([
470
+ * window._smartico.api.getUserLevelExtraCounters(),
471
+ * window._smartico.api.getLevels(),
472
+ * Promise.resolve(window._smartico.api.getUserProfile()),
473
+ * ]);
474
+ *
475
+ * // Quick detection: undefined means this label doesn't use sliding-window leveling.
476
+ * if (counters.level_counter_1 === undefined) {
477
+ * console.log('[smartico] points-only label — skip counter UI; show points progress only');
478
+ * return;
479
+ * }
480
+ *
481
+ * // Find the next level and render a 3-bar progress block.
482
+ * const currentIdx = levels.findIndex(l => l.id === profile.ach_level_current_id);
483
+ * const next = levels[currentIdx + 1];
484
+ * if (next) {
485
+ * console.log('[smartico] render points bar:', profile.ach_points_ever, '/', next.required_points);
486
+ * if (next.required_level_counter_1) {
487
+ * console.log('[smartico] render counter 1 bar:', counters.level_counter_1, '/', next.required_level_counter_1);
488
+ * }
489
+ * if (next.required_level_counter_2) {
490
+ * console.log('[smartico] render counter 2 bar:', counters.level_counter_2, '/', next.required_level_counter_2);
491
+ * }
492
+ * }
493
+ * ```
494
+ */
495
+ public async getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT> {
496
+ return OCache.use(
497
+ onUpdateContextKey.LevelExtraCounters,
498
+ ECacheContext.WSAPI,
499
+ () => this.api.getUserGamificationInfoT(this.userExtId),
500
+ CACHE_DATA_SEC,
501
+ );
502
+ }
503
+
504
+ /**
505
+ * Returns the user's unified balance-change history — every points, gems, and
506
+ * diamonds transaction within the requested time window, ordered newest-first.
507
+ * Use to power an "Activity" / "History" tab showing wins, claims, purchases,
508
+ * level-up rewards, and operator adjustments.
509
+ *
510
+ * The returned shape is the same regardless of currency type — `type` (see
511
+ * {@link UserBalanceType}) distinguishes points / gems / diamonds and
512
+ * `source_type_id` (see {@link PointChangeSourceType}) names the originating
513
+ * event.
514
+ *
515
+ * @remarks
516
+ * **Preconditions**
517
+ * - User must be authenticated. Visitor mode is not guarded at the SDK level
518
+ * but is not meaningful — activity is per-user.
519
+ *
520
+ * **Pagination — `from` / `to` are offset + ceiling, not timestamps**
521
+ * The SDK derives `offset = from`, `limit = min(to - from, 50)` — the server
522
+ * hard-caps a single response at 50 entries. For infinite scroll, advance
523
+ * `from` by 50 between calls. Both `startTimeSeconds` and `endTimeSeconds`
524
+ * are epoch seconds bounding the window the server scans.
525
+ *
526
+ * **Subscription model (`onUpdate`)**
527
+ * The callback fires when the user's `ach_points_balance`,
528
+ * `ach_gems_balance`, or `ach_diamonds_balance` changes (i.e. whenever a
529
+ * wallet event lands). The pushed payload is a FIXED re-fetch of the
530
+ * **last 10 minutes / first 50 entries** — it does NOT honor the original
531
+ * call's `startTimeSeconds` / `endTimeSeconds` / `from` / `to`. Consumers
532
+ * maintaining a long historical view must re-call `getActivityLog` with
533
+ * their own params after receiving an `onUpdate` notification.
534
+ *
535
+ * **Refresh**
536
+ * - The SDK caches results for 30 seconds.
537
+ * - Push triggers fire only on balance changes; transactions that don't
538
+ * alter a balance (theoretical zero-amount entries) won't refresh.
539
+ *
540
+ * **Visitor mode**: not meaningful (no per-user history available).
541
+ *
542
+ * **UI guidance**: see [UI Guide — `getActivityLog`](../../docs/ui/user/UIGuide_getActivityLog.md).
543
+ *
544
+ * @returns Array of {@link TActivityLog} ordered newest-first.
545
+ *
546
+ * @example
547
+ * ```ts
548
+ * const now = Math.floor(Date.now() / 1000);
549
+ * const start = now - 86400 * 30; // 30 days
550
+ *
551
+ * const log = await window._smartico.api.getActivityLog({
552
+ * startTimeSeconds: start,
553
+ * endTimeSeconds: now,
554
+ * from: 0,
555
+ * to: 50,
556
+ * onUpdate: (refreshed) => {
557
+ * console.log('[smartico] wallet changed — refreshed payload is last 10 min / 50 entries:', refreshed.length, 'rows');
558
+ * // If the consumer is showing a full 30-day view, re-call getActivityLog with the original params here.
559
+ * },
560
+ * });
561
+ *
562
+ * for (const row of log) {
563
+ * const sign = row.amount >= 0 ? '+' : '';
564
+ * console.log('[smartico] activity row — render with', row.type === 0 ? 'points' : row.type === 1 ? 'gems' : 'diamonds', 'icon, color by sign:', sign + row.amount, 'balance after:', row.balance, 'source:', row.source_type_id);
565
+ * }
566
+ * ```
567
+ */
568
+ public async getActivityLog({
569
+ startTimeSeconds,
570
+ endTimeSeconds,
571
+ from,
572
+ to,
573
+ onUpdate,
574
+ }: {
575
+ /** Window start in epoch seconds. */
576
+ startTimeSeconds: number;
577
+ /** Window end in epoch seconds. */
578
+ endTimeSeconds: number;
579
+ /** Pagination offset (0-based). */
580
+ from: number;
581
+ /** Pagination ceiling (exclusive); server caps `to - from` at 50. */
582
+ to: number;
583
+ /** Optional push callback; payload is a fixed 10-min / 50-entry refresh on every wallet change (see Subscription model). */
584
+ onUpdate?: (data: TActivityLog[]) => void;
585
+ }): Promise<TActivityLog[]> {
586
+
587
+ if (onUpdate) {
588
+ this.onUpdateCallback.set(onUpdateContextKey.ActivityLog, onUpdate);
589
+ }
590
+
591
+ return await OCache.use(
592
+ onUpdateContextKey.ActivityLog,
593
+ ECacheContext.WSAPI,
594
+ () => this.api.getActivityLogT(this.userExtId, startTimeSeconds, endTimeSeconds, from, to),
595
+ CACHE_DATA_SEC,
596
+ );
597
+ }
598
+
599
+ protected async notifyActivityLogUpdate() {
600
+ const startSeconds = Date.now() / 1000 - 600;
601
+ const endSeconds = Date.now() / 1000;
602
+ const payload = await this.api.getActivityLogT(this.userExtId, startSeconds, endSeconds, 0, 50);
603
+
604
+ this.updateEntity(onUpdateContextKey.ActivityLog, payload);
605
+ }
606
+ }
package/tsconfig.json CHANGED
@@ -14,7 +14,21 @@
14
14
  "typedocOptions": {
15
15
  "name": "Smartico API documentation",
16
16
  "entryPoints": [
17
- "src/WSAPI/WSAPI.ts",
17
+ "src/WSAPI/WSAPIBase.ts",
18
+ "src/WSAPI/WSAPIUser.ts",
19
+ "src/WSAPI/WSAPIGeneral.ts",
20
+ "src/WSAPI/WSAPIMissions.ts",
21
+ "src/WSAPI/WSAPIBonuses.ts",
22
+ "src/WSAPI/WSAPIStore.ts",
23
+ "src/WSAPI/WSAPITournaments.ts",
24
+ "src/WSAPI/WSAPIClans.ts",
25
+ "src/WSAPI/WSAPIJackpots.ts",
26
+ "src/WSAPI/WSAPIRaffles.ts",
27
+ "src/WSAPI/WSAPIMiniGames.ts",
28
+ "src/WSAPI/WSAPIAvatars.ts",
29
+ "src/WSAPI/WSAPIGamePick.ts",
30
+ "src/WSAPI/WSAPILeaderBoard.ts",
31
+ "src/WSAPI/WSAPIInbox.ts",
18
32
  "src/WSAPI/WSAPITypes.ts",
19
33
  "src/Tournaments/TournamentRegistrationStatus.ts",
20
34
  "src/Tournaments/TournamentRegistrationType.ts",
@@ -46,9 +60,11 @@
46
60
  "src/Leaderboard/LeaderBoardPeriodType.ts",
47
61
  "src/Base/AchRelatedGame.ts",
48
62
  "src/Core/ActivityTypeLimited.ts",
63
+ "src/ActivityLog/ActivityLogEntry.ts",
49
64
  "src/Jackpots/index.ts",
50
65
  "src/Raffle/index.ts",
51
66
  "src/Missions/AchievementAvailabilityStatus.ts",
67
+ "src/Missions/AchievementClaimTypeId.ts",
52
68
  "src/Missions/AchievementType.ts",
53
69
  "src/Missions/AchievementStatus.ts",
54
70
  "src/Missions/ScheduledMissionType.ts",
@@ -68,13 +84,21 @@
68
84
  "src/Inbox/InboxMessageType.ts",
69
85
  "src/Inbox/OpenLinksType.ts",
70
86
  "src/Inbox/InboxReadStatus.ts",
71
- "src/Clans/Clan.ts"
87
+ "src/Clans/Clan.ts",
88
+ "src/Clans/GetClanInfoResponse.ts",
89
+ "src/Clans/JoinClanErrorCode.ts",
90
+ "src/Tournaments/GetClanTournamentPlayersResponse.ts",
91
+ "src/Avatars/AvatarDefinition.ts",
92
+ "src/Avatars/AvatarCustomized.ts",
93
+ "src/Avatars/AvatarPrompt.ts"
72
94
  ],
73
95
  "out": "docs/api",
96
+ "projectDocuments": ["docs/SmarticoObject.md", "docs/Callbacks.md", "docs/Transforms.md"],
74
97
  "plugin": ["typedoc-plugin-markdown", "typedoc-plugin-merge-modules"],
75
98
  "entryFileName": "README.md",
76
99
  "disableSources": true,
77
100
  "excludePrivate": true,
101
+ "excludeProtected": true,
78
102
  "readme": "none",
79
103
  "cleanOutputDir": true,
80
104
  "hideBreadcrumbs": true,