@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
@@ -380,7 +380,7 @@ export class WSAPITournaments extends WSAPIStore {
380
380
  *
381
381
  * For clan tournaments (`is_clan_based === true`), the user must
382
382
  * already belong to a clan before calling. If they don't, prompt them
383
- * to pick a clan first via {@link joinClan}, then call
383
+ * to pick a clan first via `joinClan`, then call
384
384
  * `registerInTournament` after the clan-join resolves. See "Error
385
385
  * codes" `1010` below for the server-side safety net.
386
386
  *
@@ -389,8 +389,8 @@ export class WSAPITournaments extends WSAPIStore {
389
389
  * tournament lobby refresh fires.
390
390
  * - `1010` — `TOURNAMENT_USER_CANNOT_JOIN_WITHOUT_CLAN`: clan-based
391
391
  * tournament and the user has no clan. Surface the clan-pick flow
392
- * (e.g. open a clan-pick modal driven by {@link getClans} +
393
- * {@link joinClan}), then retry registration.
392
+ * (e.g. open a clan-pick modal driven by `getClans` +
393
+ * `joinClan`), then retry registration.
394
394
  * - `30001` — `TOURNAMENT_INSTANCE_NOT_FOUND`: instance ID is invalid
395
395
  * or the tournament was deleted. Refresh the lobby via
396
396
  * `getTournamentsList()` and hide the entry from the UI.
@@ -88,30 +88,43 @@ export interface TMiniGamePrize {
88
88
  }
89
89
 
90
90
  /**
91
- * TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
91
+ * TMiniGamePlayResult describes the response of
92
+ * `_smartico.api.playMiniGame(template_id)`.
92
93
  */
93
94
  export interface TMiniGamePlayResult {
94
- /** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
95
+ /** Error code. `0` = success ({@link SAWSpinErrorCode.SAW_OK}).
96
+ * See `playMiniGame` TSDoc for the full table. */
95
97
  err_code: SAWSpinErrorCode;
96
- /** Optional error message */
98
+ /** Optional server-side error message. Present only on non-zero
99
+ * `err_code`; may be empty even then. */
97
100
  err_message: string;
98
- /** The prize_id that user won, details of the prize can be found in the mini-game definition */
101
+ /** ID of the won prize. Look up in `template.prizes` to interpret
102
+ * (including `prize_type === 'no-prize'` for a configured loss
103
+ * slot). Always populated, even when `err_code !== 0`. */
99
104
  prize_id: number;
100
105
  }
101
106
 
102
107
  /**
103
- * TMiniGamePlayBatchResult describes the response of call to _smartico.api.playMiniGameBatch(template_id, spin_count) method
108
+ * TMiniGamePlayBatchResult describes one entry in the array returned
109
+ * by `_smartico.api.playMiniGameBatch(template_id, spin_count)`.
110
+ *
111
+ * Note: this type uses `errCode` / `errMessage` (camelCase) —
112
+ * different from `TMiniGamePlayResult` which uses `err_code` /
113
+ * `err_message` (snake_case).
104
114
  */
105
115
  export interface TMiniGamePlayBatchResult {
106
- /** The saw_prize_id that user won, details of the prize can be found in the mini-game definition */
116
+ /** ID of the won prize for this spin. Look up in `template.prizes`. */
107
117
  saw_prize_id: number;
108
- /** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
118
+ /** Error code. `0` = success. See `playMiniGameBatch` TSDoc for the
119
+ * full table. */
109
120
  errCode: SAWSpinErrorCode;
110
- /** Optional error message */
121
+ /** Optional server-side error message. */
111
122
  errMessage?: string;
112
- /** Jackpot amount what user won */
123
+ /** Jackpot amount the user won, populated when the prize type is
124
+ * `'jackpot'`. */
113
125
  jackpot_amount?: number;
114
- /** Period in miliseconds from last spin */
126
+ /** Epoch ms of the user's first spin in the current cooldown
127
+ * period; populated when `errCode === SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED`. */
115
128
  first_spin_in_period?: number,
116
129
  }
117
130
 
@@ -972,114 +985,157 @@ export interface TMissionClaimRewardResult {
972
985
  err_message: string;
973
986
  }
974
987
 
988
+ /**
989
+ * Result of `_smartico.api.registerInTournament(tournament_id)`.
990
+ */
975
991
  export interface TTournamentRegistrationResult {
976
- /** Error code. `0` = success (registration persisted, buy-in
977
- * deducted). Typed values are members of {@link TournamentRegistrationError};
978
- * numeric codes `300010` (insufficient gems) and `300011` (insufficient
979
- * diamonds) may also be returned and are NOT currently in the enum.
980
- * See `registerInTournament` TSDoc for the full table. */
992
+ /** Error code. `0` = success. See `registerInTournament` TSDoc for the full table. */
981
993
  err_code: TournamentRegistrationError;
982
- /** Optional error message. Present only on non-zero `err_code`;
983
- * may be empty even then. */
994
+ /** Optional error message; populated on non-zero `err_code`. */
984
995
  err_message: string;
985
996
  }
986
997
 
998
+ /**
999
+ * Result of `_smartico.api.buyStoreItem(store_item_id)`.
1000
+ */
987
1001
  export interface TBuyStoreItemResult {
988
- /** Error code. `0` = success (funds debited and reward delivered).
989
- * Typed values are the named codes in {@link BuyStoreItemErrorCode}.
990
- * See `buyStoreItem` TSDoc for the full table and per-code UI guidance. */
1002
+ /** Error code. `0` = success. See `buyStoreItem` TSDoc for the full table. */
991
1003
  err_code: BuyStoreItemErrorCode;
992
- /** Optional server-side error message. Present only on non-zero
993
- * `err_code`; may be empty even then. */
1004
+ /** Optional error message; populated on non-zero `err_code`. */
994
1005
  err_message: string;
995
1006
  }
996
1007
 
1008
+ /**
1009
+ * Result of `getTranslations(lang_code)`.
1010
+ */
997
1011
  export interface TGetTranslations {
1012
+ /** Flat dictionary of operator-defined translation key → translated string. */
998
1013
  translations: { [key: string]: string };
999
1014
  }
1000
1015
 
1016
+ /**
1017
+ * TInboxMessage is the lightweight envelope returned by
1018
+ * `_smartico.api.getInboxMessages()`. Fetch the rich body (title,
1019
+ * preview, icon, html_body, buttons) separately via
1020
+ * `_smartico.api.getInboxMessageBody(message_guid)`.
1021
+ */
1001
1022
  export interface TInboxMessage {
1002
- /** Uniq identifier of the message. It is needed to request the message body, mark the message as read/deleted/favorite. */
1023
+ /** Unique identifier of the message. Pass to `getInboxMessageBody`
1024
+ * and the mark / favorite / delete mutations. */
1003
1025
  message_guid: string;
1004
- /** Date when the message was sent */
1026
+ /** Date when the message was sent (server timestamp). */
1005
1027
  sent_date: string;
1006
- /** Indicator if a message is read */
1028
+ /** `true` when the message has been marked read. */
1007
1029
  read: boolean;
1008
- /** Indicator if a message is added to favorites */
1030
+ /** `true` when the message has been starred (favorited). */
1009
1031
  favorite: boolean;
1010
- /** Category id per inbox message, can be part of System inboxes, Personal inboxes or General inbox messages */
1032
+ /** Operator-assigned category ({@link InboxCategories}). */
1011
1033
  category_id?: InboxCategories;
1012
- /** The epoch timestamp, with milliseconds, when the message is going to be expired */
1034
+ /** Expiry timestamp as Unix-ms epoch. Server filters out expired
1035
+ * messages from list responses — consumers rarely see this set
1036
+ * unless the expiry is upcoming. */
1013
1037
  expire_on_dt?: number;
1014
1038
  }
1015
1039
 
1040
+ /**
1041
+ * TInboxMessageBody is the rich body of one inbox message.
1042
+ * Returned by `_smartico.api.getInboxMessageBody(message_guid)`.
1043
+ * Fetched from a CDN (not over WebSocket).
1044
+ */
1016
1045
  export interface TInboxMessageBody {
1017
- /** Message title */
1046
+ /** Display title. */
1018
1047
  title: string;
1019
- /** Short preview body of the message */
1048
+ /** Short preview text (typically rendered alongside the title in list items). */
1020
1049
  preview_body: string;
1021
- /** Message icon, 128x128px */
1050
+ /** Message icon URL (128×128 px recommended). */
1022
1051
  icon: string;
1023
- /** The action that should be performed when user clicks on the message.
1024
- * Can be URL or deep link, e.g. 'dp:deposit'. The most safe to execute CTA is to pass it to _smartico.dp(cta_action);
1025
- * The 'dp' function will handle the CTA and will execute it in the most safe way.
1026
- * If the message has a rich html body - the action will always be 'dp:inbox' which will open the inbox widget when triggered.
1027
- */
1052
+ /** Click-action — either a deep-link (e.g. `'dp:deposit'`) or a
1053
+ * plain URL. The literal `'dp:inbox'` indicates the message has a
1054
+ * rich `html_body`; for any other value `html_body` and `buttons`
1055
+ * are absent. Pass to `_smartico.dp(action)` for safe execution. */
1028
1056
  action: string;
1029
- /** Rich HTML body of the message. */
1057
+ /** Rich HTML body. Populated only when `action === 'dp:inbox'`. */
1030
1058
  html_body?: string;
1031
- /** Optional additional buttons to show in the message, available only if message has rich HTML body. Max count - 2. */
1059
+ /** Up to 2 additional action buttons. Populated only when
1060
+ * `action === 'dp:inbox'`. */
1032
1061
  buttons?: {
1033
- /** The action that should be performed when user clicks on the button. The logic is the same as for message actions */
1062
+ /** Button click-action (deep-link or URL). */
1034
1063
  action: string;
1035
- /** Button text */
1064
+ /** Button label. */
1036
1065
  text: string;
1037
1066
  }[];
1038
- /** The custom data of the inbox message defined by operator. Can be a JSON object, string or number */
1067
+ /** Operator-defined custom data. The SDK auto-parses JSON-looking
1068
+ * strings, so at runtime this is `any` despite the `string` type. */
1039
1069
  custom_data?: string;
1040
1070
  }
1041
1071
 
1072
+ /**
1073
+ * InboxMarkMessageAction is the response of the five inbox mutation
1074
+ * methods (`markInboxMessageAsRead`, `markAllInboxMessagesAsRead`,
1075
+ * `markUnmarkInboxMessageAsFavorite`, `deleteInboxMessage`,
1076
+ * `deleteAllInboxMessages`).
1077
+ */
1042
1078
  export interface InboxMarkMessageAction {
1043
- /** An error code representing the result of marking a message as deleted, favorite or read. Successful marking action if err_code is 0 */
1079
+ /** Error code. `0` = success. See the calling method's TSDoc for
1080
+ * the full error semantics (server returns generic codes; the
1081
+ * five inbox mutations share the same shape). */
1044
1082
  err_code: number;
1045
- /** Optional error message */
1083
+ /** Optional server-side error message. Present only on non-zero
1084
+ * `err_code`; may be empty even then. */
1046
1085
  err_message: string;
1047
1086
  }
1048
1087
 
1088
+ /**
1089
+ * LeaderBoardDetailsT describes one period's leaderboard.
1090
+ * Returned by `_smartico.api.getLeaderBoard(periodType, getPreviousPeriod?)`.
1091
+ * May be `undefined` at runtime when no board is configured for the requested period.
1092
+ */
1049
1093
  export interface LeaderBoardDetailsT {
1050
- /** ID of the leaderboard */
1094
+ /** Stable ID of the leaderboard. */
1051
1095
  board_id: number;
1052
- /** Name of the leaderboard */
1096
+ /** Operator-defined display name. */
1053
1097
  name: string;
1054
- /** Description of the leaderboard */
1098
+ /** Operator-defined description (HTML allowed). */
1055
1099
  description: string;
1056
- /** Rules of the leaderboard */
1100
+ /** Operator-defined rules / terms (HTML allowed). */
1057
1101
  rules: string;
1058
- /** Leaderboard period type ID */
1102
+ /** Period type this board is bound to ({@link LeaderBoardPeriodType}). */
1059
1103
  period_type_id: LeaderBoardPeriodType;
1060
- /** Leaderboard points rewards */
1104
+ /** Per-place prize table; the array length is the number of paid places. */
1061
1105
  rewards: LeaderBoardsRewardsT[];
1062
- /** Leaderboard users */
1106
+ /** Top-20 ranked entries (server-capped), sorted by `position` ASC. */
1063
1107
  users: LeaderBoardUserT[];
1064
- /** Info about current user in leaderboard */
1108
+ /** Current user's own entry. `undefined` for visitor sessions.
1109
+ * For authenticated users, `position === -1` means the user is
1110
+ * unranked / outside the ranked window. */
1065
1111
  me?: LeaderBoardUserT;
1066
1112
  }
1067
1113
 
1114
+ /**
1115
+ * LeaderBoardsRewardsT describes one place's prize on a leaderboard.
1116
+ * Leaderboard prizes are always gamification points (never gems / diamonds / items).
1117
+ */
1068
1118
  export interface LeaderBoardsRewardsT {
1119
+ /** Place number (1-based). */
1069
1120
  place: number;
1121
+ /** Gamification points awarded to the user occupying this place at period finalization. */
1070
1122
  points: number;
1071
1123
  }
1072
1124
 
1125
+ /**
1126
+ * LeaderBoardUserT describes one participant row on a leaderboard.
1127
+ */
1073
1128
  export interface LeaderBoardUserT {
1074
- /** The username of the participant */
1129
+ /** Display username (operator-defined alias). */
1075
1130
  public_username: string;
1076
- /** The URL to the avatar of the participant */
1131
+ /** Resolved CDN URL for the participant's avatar. */
1077
1132
  avatar_url: string;
1078
- /** The position of the participant in the leaderboard */
1133
+ /** Rank in the leaderboard (DENSE_RANK over all participants).
1134
+ * `-1` on the `me` entry signals "unranked / outside the window". */
1079
1135
  position: number;
1080
- /** The points of the participant in the leaderboard */
1136
+ /** Participant's points for this period. */
1081
1137
  points: number;
1082
- /** The indicator if the participant is current user */
1138
+ /** `true` when this row is the current authenticated user. */
1083
1139
  is_me: boolean;
1084
1140
  }
1085
1141
 
@@ -1098,109 +1154,151 @@ export interface UserLevelExtraCountersT {
1098
1154
  level_counter_2?: number;
1099
1155
  }
1100
1156
 
1157
+ /**
1158
+ * TSegmentCheckResult describes one segment-membership outcome.
1159
+ * Returned by `_smartico.api.checkSegmentListMatch()` (and used
1160
+ * internally by `checkSegmentMatch()`).
1161
+ */
1101
1162
  export interface TSegmentCheckResult {
1163
+ /** The segment ID this result refers to (label-scoped). */
1102
1164
  segment_id: number;
1165
+ /** `true` if the user currently matches this segment. `false` also
1166
+ * covers the case where the segment doesn't exist for the label —
1167
+ * the two are not distinguishable. */
1103
1168
  is_matching: boolean;
1104
1169
  }
1105
1170
 
1171
+ /**
1172
+ * One operator-configured navigation entry. Returned by `getCustomSections()`.
1173
+ * `section_type_id` is the dispatch key — it determines which page component the
1174
+ * consumer mounts when the user opens this section.
1175
+ */
1106
1176
  export interface TUICustomSection {
1107
- /** The ID of the custom section */
1177
+ /** Stable numeric ID of the section. */
1108
1178
  id: number;
1109
- /** The body of the custom section */
1179
+ /** Raw HTML body for `HTML_PAGE` sections; Liquid template body for `LEVELS` (Liquid) sections. */
1110
1180
  body?: string;
1111
- /** The image of the custom section, 64x64px */
1181
+ /** CDN URL of the section's nav icon, 64x64 px square. */
1112
1182
  menu_img?: string;
1113
- /** The name of the custom section */
1183
+ /** Display name shown next to the nav icon. Pre-translated server-side. */
1114
1184
  menu_name?: string;
1115
- /** Custom images for custom section */
1185
+ /** JSON-serialized list of skin image overrides for themed sections (e.g. `MISSION_CUSTOM_LAYOUT`). */
1116
1186
  custom_skin_images?: string;
1117
- /** The particular type of custom section, can be Missions, Tournaments, Lootbox and etc */
1187
+ /** Dispatch key — see {@link AchCustomSectionType}. */
1118
1188
  section_type_id?: AchCustomSectionType;
1119
- /** Theme of the custom section */
1189
+ /** Themed-layout name for `MISSION_CUSTOM_LAYOUT` sections; see {@link AchCustomLayoutTheme}. */
1120
1190
  theme?: AchCustomLayoutTheme;
1121
- /** Custom css for the custom section */
1191
+ /** Custom CSS for themed layouts. */
1122
1192
  generic_custom_css?: string;
1123
- /** Tabs that can be shown in custom section, e.g Overview, No Overview, All tabs */
1193
+ /** Which tabs to render for `MISSIONS_CATEGORY` sections; see {@link AchMissionsTabsOptions}. */
1124
1194
  mission_tabs_options?: AchMissionsTabsOptions;
1125
- /** Filter that allow to show missions by criteria */
1195
+ /** Mission-filter rule for the Overview tab; see {@link AchOverviewMissionsFilter}. */
1126
1196
  overview_missions_filter?: AchOverviewMissionsFilter;
1127
- /** Quantity of missions to be shown in overview */
1197
+ /** Maximum number of missions shown in the Overview tab. */
1128
1198
  overview_missions_count?: number;
1129
- /** URL or DP to be used for custom section */
1199
+ /** Click target for `REDIRECT_LINK` sections — either a Smartico DP string (`dp:…`) or an external URL. */
1130
1200
  url_or_dp?: string;
1131
- /** Data to be used for Liquid templates */
1201
+ /** Data-context selectors for Liquid templates; see {@link LiquidEntityData}. */
1132
1202
  liquid_entity_data?: LiquidEntityData[];
1133
- /** Tournament ID to be used for Liquid templates */
1203
+ /** Tournament ID for a single-tournament Liquid template (`LiquidEntityData.Tournament`). */
1134
1204
  ach_tournament_id?: number;
1135
- /** Indicates if the data should be shown as raw data (for Liquid templates) */
1205
+ /** Operator debug flag — when `true`, Liquid renders raw context data instead of the templated HTML. */
1136
1206
  show_raw_data?: boolean;
1137
- /** Liquid template id to be used for Liquid templates */
1207
+ /** Liquid template ID resolved server-side; the rendered body is delivered in `body`. */
1138
1208
  liquid_template?: number;
1139
- /** List of IDs of the categories where the badge item is assigned, information about categories can be retrieved with getAchCategories method */
1209
+ /** Category IDs the section filters badges by — correlate with `getAchCategories()`. */
1140
1210
  ach_category_ids?: number[];
1141
- /** List of IDs of the categories where the store item is assigned, information about categories can be retrieved with getShopCategories method */
1211
+ /** Category IDs the section filters store items by — correlate with `getStoreCategories()`. */
1142
1212
  shop_category_ids?: number[];
1143
- /** ID of the raffle to be used for Liquid templates */
1213
+ /** Raffle ID for `RAFFLE` sections (and `LiquidEntityData.SingleRaffle` Liquid templates). */
1144
1214
  raffle_id?: number;
1145
1215
  }
1146
1216
 
1217
+ /**
1218
+ * TBonus describes one bonus awarded to the user.
1219
+ * Returned by `_smartico.api.getBonuses()`.
1220
+ */
1147
1221
  export interface TBonus {
1148
- /** ID of the bonus */
1222
+ /** Stable ID of the bonus. */
1149
1223
  bonus_id: number;
1150
- /** Can the bonus be redeemed (if bonus is redeemable the user needs to claim it) */
1224
+ /** `true` when the bonus is in a player-claim-required state.
1225
+ * Gate the Claim button on this; see `claimBonus` TSDoc. */
1151
1226
  is_redeemable?: boolean;
1152
- /** Date of creation */
1227
+ /** Bonus creation timestamp as ISO 8601 UTC string
1228
+ * ("YYYY-MM-DDTHH:MM:SS", no timezone suffix). */
1153
1229
  create_date?: string;
1154
- /** Date of redemption */
1230
+ /** Bonus redemption timestamp as ISO 8601 UTC string. Absent until
1231
+ * the bonus reaches `BonusStatus.REDEEMED`. */
1155
1232
  redeem_date?: string;
1156
- /** ID of template used */
1233
+ /** ID of the bonus template used to issue this bonus. */
1157
1234
  label_bonus_template_id?: number;
1158
- /** ID of the bonus status */
1235
+ /** Lifecycle status; see {@link BonusStatus}. */
1159
1236
  bonus_status_id?: BonusStatus;
1160
- /** Additional information about the bonus(edscription, image,name, acknowledge) */
1237
+ /** Template-level display metadata (operator-configured, identical
1238
+ * across all bonuses from the same template). */
1161
1239
  label_bonus_template_meta_map?: BonusTemplateMetaMap;
1162
- /** Additional information presented to the player when the bonus is redeemed */
1240
+ /** Instance-level display metadata (per-issuance; carries the
1241
+ * dynamic amount computed at award time). */
1163
1242
  bonus_meta_map?: BonusMetaMap;
1164
1243
  }
1165
1244
 
1245
+ /**
1246
+ * BonusStatus describes the lifecycle stage of a bonus on `TBonus.bonus_status_id`.
1247
+ * Operator widget configuration typically filters out internal statuses
1248
+ * (`New`, `COUPON_ISSUE_FAILED`, `EXPIRED`); consumers usually see
1249
+ * `COUPON_ISSUED`, `REDEEMED`, and `REDEEM_FAILED`.
1250
+ */
1166
1251
  export enum BonusStatus {
1167
- /** The bonus is newly created (shouldn't be shown to the client) */
1252
+ /** Newly created, not yet processed (internal). */
1168
1253
  New = 1,
1169
- /** The bonus is issued and available for redemption but has not been redeemed yet */
1254
+ /** Issued and awaiting player claim. */
1170
1255
  COUPON_ISSUED = 2,
1171
- /** The bonus has been successfully redeemed */
1256
+ /** Successfully redeemed. */
1172
1257
  REDEEMED = 3,
1173
- /** The bonus is still valid, but a previous redemption attempt failed */
1258
+ /** Previous redemption attempt failed; still valid and re-claimable. */
1174
1259
  REDEEM_FAILED = 4,
1175
- /** Failed to issue the bonus (shouldn't be shown to the client) */
1260
+ /** Coupon issuance failed (internal). */
1176
1261
  COUPON_ISSUE_FAILED = 5,
1177
- /** The bonus was issued but has expired and can no longer be redeemed (shouldn't be shown to the client) */
1262
+ /** Issued but expired before redemption (internal). */
1178
1263
  EXPIRED = 6,
1179
1264
  }
1265
+ /**
1266
+ * Template-level bonus display metadata (operator-configured at the
1267
+ * bonus template; identical for every bonus issued from the same template).
1268
+ */
1180
1269
  export interface BonusTemplateMetaMap {
1181
- /** Description of the bonus template*/
1270
+ /** Operator-set description / display text. May include HTML. */
1182
1271
  description: string;
1183
- /** Acknowledge message setup in the bonus template*/
1272
+ /** Operator-set additional message shown to the player at claim
1273
+ * time (e.g. wagering terms). May include deep-links. */
1184
1274
  acknowledge: string;
1185
- /** Image URL of the bonus template, 1:1 aspect ratio */
1275
+ /** Bonus icon URL (1:1 aspect ratio recommended). */
1186
1276
  image_url: string;
1187
- /** Redirect URL of the bonus template*/
1277
+ /** Optional redirect — external HTTP URL (opens in new tab) or
1278
+ * internal deep-link (handled by the SDK's deep-link router). */
1188
1279
  redirect_url?: string;
1189
1280
  }
1281
+ /**
1282
+ * Instance-level bonus display metadata (set per-issuance, may carry
1283
+ * a dynamically-computed amount).
1284
+ */
1190
1285
  export interface BonusMetaMap {
1191
- /** Label and description of the bonus sent to the player*/
1286
+ /** Display-ready amount string (e.g. "€50", "100 free spins"). */
1192
1287
  uiAmount?: string;
1193
1288
  }
1194
1289
 
1195
1290
  /**
1196
- * TClaimBonusResult describes the response of call to _smartico.api.claimBonus(bonus_id) method
1291
+ * TClaimBonusResult describes the response of `_smartico.api.claimBonus(bonus_id)`.
1292
+ */
1293
+ /**
1294
+ * Result of `_smartico.api.claimBonus(bonus_id)`.
1197
1295
  */
1198
1296
  export interface TClaimBonusResult {
1199
- /** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
1200
- err_code: SAWSpinErrorCode;
1201
- /** Optional error message */
1297
+ /** Error code. `0` = success. See `claimBonus` TSDoc for the full table. */
1298
+ err_code: number;
1299
+ /** Optional error message; populated on non-zero `err_code`. */
1202
1300
  err_message: string;
1203
- /** If the bonus was claimed successfully, then success is true */
1301
+ /** Unreliable on the wire — prefer `err_code === 0` as the success check. */
1204
1302
  success?: boolean;
1205
1303
  }
1206
1304
 
@@ -1576,10 +1674,23 @@ export interface TRaffleDrawRun {
1576
1674
 
1577
1675
  }
1578
1676
 
1677
+ /**
1678
+ * TransformedRaffleClaimPrizeResponse describes the response of
1679
+ * `_smartico.api.claimRafflePrize({won_id})`.
1680
+ *
1681
+ * Note: this type uses `errorCode` / `errorMessage` (camelCase
1682
+ * full-word) — different from most other SDK wrapper-result types in
1683
+ * this library which use `err_code` / `err_message` (snake_case).
1684
+ */
1685
+ /**
1686
+ * Result of `_smartico.api.claimRafflePrize({raffle_id, draw_id, raffle_run_id})`.
1687
+ * Uses camelCase `errorCode` / `errorMessage` — distinct from most other SDK
1688
+ * result wrappers which use snake_case `err_code` / `err_message`.
1689
+ */
1579
1690
  export interface TransformedRaffleClaimPrizeResponse {
1580
- /** Error code, 0 means no error */
1691
+ /** Error code. `0` = success. See `claimRafflePrize` TSDoc for the full table. */
1581
1692
  errorCode: number
1582
- /** Error message, will be exposed only if ErrorCode is not 0 */
1693
+ /** Optional error message; populated on non-zero `errorCode`. */
1583
1694
  errorMessage?: string
1584
1695
  }
1585
1696
  /**
@@ -1606,10 +1717,13 @@ export interface TActivityLog {
1606
1717
  }
1607
1718
 
1608
1719
 
1720
+ /**
1721
+ * Result of `_smartico.api.requestRaffleOptin({raffle_id, draw_id, raffle_run_id})`.
1722
+ */
1609
1723
  export interface TRaffleOptinResponse {
1610
- /** Error code that represents outcome of the opt-in attempt. Opt-in succeed in case err_code is 0 */
1724
+ /** Error code. `0` = success. See `requestRaffleOptin` TSDoc for the full table. */
1611
1725
  err_code: number;
1612
- /** Optional error message */
1726
+ /** Optional error message; populated on non-zero `err_code`. */
1613
1727
  err_message?: string;
1614
1728
  }
1615
1729
 
@@ -2082,75 +2196,72 @@ export interface GamePickRoundRequestParams extends GamePickRequestParams {
2082
2196
  }
2083
2197
 
2084
2198
  /**
2085
- * TAvatarDefinition describes a single avatar available in the avatar catalog.
2199
+ * One avatar in the user's catalog. Returned by `getAvatarsList()`.
2086
2200
  * Fields from the raw `public_meta` object are flattened to the top level.
2087
2201
  */
2088
2202
  export interface TAvatarDefinition {
2089
- /** Unique identifier of the avatar */
2203
+ /** Stable numeric identifier of the avatar. Primary key passed to `setAvatar()`. */
2090
2204
  avatar_real_id: number;
2091
- /** Whether this avatar is the default one */
2205
+ /** True when this is the system default avatar for the label. */
2092
2206
  is_default: boolean;
2093
- /** If true, avatar is hidden until user achieves/unlocks it */
2207
+ /** When true and `is_given === false`, the avatar should be hidden from the user (surprise unlock). */
2094
2208
  hide_until_achieved: boolean;
2095
- /** Display priority — lower value means higher position in the grid */
2209
+ /** Display position; lower = earlier in the grid. */
2096
2210
  priority: number;
2097
- /** Optional description of the avatar (from public_meta) */
2211
+ /** Optional description shown alongside the avatar in detail views. */
2098
2212
  description?: string;
2099
- /** Raw image path/URL of the avatar as returned by the server (from public_meta) */
2213
+ /** Raw image path as returned by the server (relative or absolute). */
2100
2214
  url: string;
2101
- /** Full CDN URL of the avatar image, built from avatar_domain + url */
2215
+ /** Absolute CDN URL of the avatar image; built from the configured avatar domain + `url`. */
2102
2216
  avatar_url: string;
2103
- /**
2104
- * Source type of the avatar.
2105
- * 0 = free (always available to all users), other values = earned/purchased
2106
- */
2217
+ /** Source type. `0` = free / always available; non-zero = earned or purchased. */
2107
2218
  avatar_source_type_id: number;
2108
- /** ISO date string from which the avatar becomes available */
2219
+ /** ISO date string from which the avatar becomes available; undefined when no start window. */
2109
2220
  active_from_date?: string;
2110
- /** ISO date string until which the avatar is available */
2221
+ /** ISO date string until which the avatar is available; undefined when no end window. */
2111
2222
  active_till_date?: string;
2112
- /** Whether the avatar has been granted/given to the current user */
2223
+ /** True when the user owns / has unlocked this avatar. */
2113
2224
  is_given: boolean;
2114
- /** Whether this avatar is currently in use by the user */
2225
+ /** True when this avatar is the user's currently active profile avatar. */
2115
2226
  is_in_use?: boolean;
2116
2227
  }
2117
2228
 
2118
2229
  /**
2119
- * TAvatarCustomized describes an AI-customized version of a base avatar
2230
+ * One AI-generated variant of a base avatar. Returned by `getAvatarsCustomized()`.
2120
2231
  */
2121
2232
  export interface TAvatarCustomized {
2122
- /** The avatar_real_id of the base avatar this customization was generated from */
2233
+ /** `avatar_real_id` of the base avatar this variant was generated from. */
2123
2234
  avatar_real_id: number;
2124
- /** Full CDN URL of the AI-generated customized avatar image */
2235
+ /** Absolute CDN URL of the AI-generated image. Can be passed as `avatar_url` to `setAvatar()`. */
2125
2236
  url: string;
2126
- /** ISO date string when the customization was created */
2237
+ /** ISO date string of when the variant was generated. */
2127
2238
  dt_created: string;
2128
2239
  }
2129
2240
 
2130
2241
  /**
2131
- * TAvatarPrompt describes an AI style prompt available for avatar customization.
2242
+ * One AI style prompt for avatar customization. Returned by `getAvatarPrompts()`.
2132
2243
  * Fields from the raw `public_meta` object are flattened to the top level.
2133
2244
  */
2134
2245
  export interface TAvatarPrompt {
2135
- /** Unique identifier of the AI customization prompt */
2246
+ /** Stable numeric identifier of the prompt. */
2136
2247
  prompt_id: number;
2137
- /** Display name of the prompt style, e.g. "Cartoon", "Watercolor" (from public_meta) */
2248
+ /** Display name of the style, e.g. "Cartoon", "Watercolor". */
2138
2249
  name: string;
2139
- /** Full CDN URL of the prompt style icon image (from public_meta) */
2250
+ /** Absolute CDN URL of the prompt's preview icon. */
2140
2251
  icon_url: string;
2141
- /** Currency type used to pay for this customization (0=points, 1=gems, 2=diamonds) */
2252
+ /** Currency used to pay for the customization. `0` = points, `1` = gems, `2` = diamonds. */
2142
2253
  cost_currency_type_id: number;
2143
- /** Cost amount in the given currency */
2254
+ /** Cost amount in the currency named by `cost_currency_type_id`. */
2144
2255
  cost_value: number;
2145
2256
  }
2146
2257
 
2147
2258
  /**
2148
- * TSetAvatarResult describes the response of call to _smartico.api.setAvatar() method
2259
+ * Result of `_smartico.api.setAvatar()`.
2149
2260
  */
2150
2261
  export interface TSetAvatarResult {
2151
- /** Error code that represents outcome of the set avatar request. Successful if err_code is 0 */
2262
+ /** Error code. `0` = success. See `setAvatar` TSDoc for the full table. */
2152
2263
  err_code: number;
2153
- /** Optional error message */
2264
+ /** Optional error message; populated on non-zero `err_code`. */
2154
2265
  err_message?: string;
2155
2266
  }
2156
2267