@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
@@ -353,7 +353,7 @@ export declare class WSAPITournaments extends WSAPIStore {
353
353
  *
354
354
  * For clan tournaments (`is_clan_based === true`), the user must
355
355
  * already belong to a clan before calling. If they don't, prompt them
356
- * to pick a clan first via {@link joinClan}, then call
356
+ * to pick a clan first via `joinClan`, then call
357
357
  * `registerInTournament` after the clan-join resolves. See "Error
358
358
  * codes" `1010` below for the server-side safety net.
359
359
  *
@@ -362,8 +362,8 @@ export declare class WSAPITournaments extends WSAPIStore {
362
362
  * tournament lobby refresh fires.
363
363
  * - `1010` — `TOURNAMENT_USER_CANNOT_JOIN_WITHOUT_CLAN`: clan-based
364
364
  * tournament and the user has no clan. Surface the clan-pick flow
365
- * (e.g. open a clan-pick modal driven by {@link getClans} +
366
- * {@link joinClan}), then retry registration.
365
+ * (e.g. open a clan-pick modal driven by `getClans` +
366
+ * `joinClan`), then retry registration.
367
367
  * - `30001` — `TOURNAMENT_INSTANCE_NOT_FOUND`: instance ID is invalid
368
368
  * or the tournament was deleted. Refresh the lobby via
369
369
  * `getTournamentsList()` and hide the entry from the UI.
@@ -84,29 +84,42 @@ export interface TMiniGamePrize {
84
84
  max_give_period_type_id?: AttemptPeriodType;
85
85
  }
86
86
  /**
87
- * TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
87
+ * TMiniGamePlayResult describes the response of
88
+ * `_smartico.api.playMiniGame(template_id)`.
88
89
  */
89
90
  export interface TMiniGamePlayResult {
90
- /** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
91
+ /** Error code. `0` = success ({@link SAWSpinErrorCode.SAW_OK}).
92
+ * See `playMiniGame` TSDoc for the full table. */
91
93
  err_code: SAWSpinErrorCode;
92
- /** Optional error message */
94
+ /** Optional server-side error message. Present only on non-zero
95
+ * `err_code`; may be empty even then. */
93
96
  err_message: string;
94
- /** The prize_id that user won, details of the prize can be found in the mini-game definition */
97
+ /** ID of the won prize. Look up in `template.prizes` to interpret
98
+ * (including `prize_type === 'no-prize'` for a configured loss
99
+ * slot). Always populated, even when `err_code !== 0`. */
95
100
  prize_id: number;
96
101
  }
97
102
  /**
98
- * TMiniGamePlayBatchResult describes the response of call to _smartico.api.playMiniGameBatch(template_id, spin_count) method
103
+ * TMiniGamePlayBatchResult describes one entry in the array returned
104
+ * by `_smartico.api.playMiniGameBatch(template_id, spin_count)`.
105
+ *
106
+ * Note: this type uses `errCode` / `errMessage` (camelCase) —
107
+ * different from `TMiniGamePlayResult` which uses `err_code` /
108
+ * `err_message` (snake_case).
99
109
  */
100
110
  export interface TMiniGamePlayBatchResult {
101
- /** The saw_prize_id that user won, details of the prize can be found in the mini-game definition */
111
+ /** ID of the won prize for this spin. Look up in `template.prizes`. */
102
112
  saw_prize_id: number;
103
- /** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
113
+ /** Error code. `0` = success. See `playMiniGameBatch` TSDoc for the
114
+ * full table. */
104
115
  errCode: SAWSpinErrorCode;
105
- /** Optional error message */
116
+ /** Optional server-side error message. */
106
117
  errMessage?: string;
107
- /** Jackpot amount what user won */
118
+ /** Jackpot amount the user won, populated when the prize type is
119
+ * `'jackpot'`. */
108
120
  jackpot_amount?: number;
109
- /** Period in miliseconds from last spin */
121
+ /** Epoch ms of the user's first spin in the current cooldown
122
+ * period; populated when `errCode === SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED`. */
110
123
  first_spin_in_period?: number;
111
124
  }
112
125
  /**
@@ -915,108 +928,151 @@ export interface TMissionClaimRewardResult {
915
928
  /** Optional error message; populated on non-zero `err_code`. */
916
929
  err_message: string;
917
930
  }
931
+ /**
932
+ * Result of `_smartico.api.registerInTournament(tournament_id)`.
933
+ */
918
934
  export interface TTournamentRegistrationResult {
919
- /** Error code. `0` = success (registration persisted, buy-in
920
- * deducted). Typed values are members of {@link TournamentRegistrationError};
921
- * numeric codes `300010` (insufficient gems) and `300011` (insufficient
922
- * diamonds) may also be returned and are NOT currently in the enum.
923
- * See `registerInTournament` TSDoc for the full table. */
935
+ /** Error code. `0` = success. See `registerInTournament` TSDoc for the full table. */
924
936
  err_code: TournamentRegistrationError;
925
- /** Optional error message. Present only on non-zero `err_code`;
926
- * may be empty even then. */
937
+ /** Optional error message; populated on non-zero `err_code`. */
927
938
  err_message: string;
928
939
  }
940
+ /**
941
+ * Result of `_smartico.api.buyStoreItem(store_item_id)`.
942
+ */
929
943
  export interface TBuyStoreItemResult {
930
- /** Error code. `0` = success (funds debited and reward delivered).
931
- * Typed values are the named codes in {@link BuyStoreItemErrorCode}.
932
- * See `buyStoreItem` TSDoc for the full table and per-code UI guidance. */
944
+ /** Error code. `0` = success. See `buyStoreItem` TSDoc for the full table. */
933
945
  err_code: BuyStoreItemErrorCode;
934
- /** Optional server-side error message. Present only on non-zero
935
- * `err_code`; may be empty even then. */
946
+ /** Optional error message; populated on non-zero `err_code`. */
936
947
  err_message: string;
937
948
  }
949
+ /**
950
+ * Result of `getTranslations(lang_code)`.
951
+ */
938
952
  export interface TGetTranslations {
953
+ /** Flat dictionary of operator-defined translation key → translated string. */
939
954
  translations: {
940
955
  [key: string]: string;
941
956
  };
942
957
  }
958
+ /**
959
+ * TInboxMessage is the lightweight envelope returned by
960
+ * `_smartico.api.getInboxMessages()`. Fetch the rich body (title,
961
+ * preview, icon, html_body, buttons) separately via
962
+ * `_smartico.api.getInboxMessageBody(message_guid)`.
963
+ */
943
964
  export interface TInboxMessage {
944
- /** Uniq identifier of the message. It is needed to request the message body, mark the message as read/deleted/favorite. */
965
+ /** Unique identifier of the message. Pass to `getInboxMessageBody`
966
+ * and the mark / favorite / delete mutations. */
945
967
  message_guid: string;
946
- /** Date when the message was sent */
968
+ /** Date when the message was sent (server timestamp). */
947
969
  sent_date: string;
948
- /** Indicator if a message is read */
970
+ /** `true` when the message has been marked read. */
949
971
  read: boolean;
950
- /** Indicator if a message is added to favorites */
972
+ /** `true` when the message has been starred (favorited). */
951
973
  favorite: boolean;
952
- /** Category id per inbox message, can be part of System inboxes, Personal inboxes or General inbox messages */
974
+ /** Operator-assigned category ({@link InboxCategories}). */
953
975
  category_id?: InboxCategories;
954
- /** The epoch timestamp, with milliseconds, when the message is going to be expired */
976
+ /** Expiry timestamp as Unix-ms epoch. Server filters out expired
977
+ * messages from list responses — consumers rarely see this set
978
+ * unless the expiry is upcoming. */
955
979
  expire_on_dt?: number;
956
980
  }
981
+ /**
982
+ * TInboxMessageBody is the rich body of one inbox message.
983
+ * Returned by `_smartico.api.getInboxMessageBody(message_guid)`.
984
+ * Fetched from a CDN (not over WebSocket).
985
+ */
957
986
  export interface TInboxMessageBody {
958
- /** Message title */
987
+ /** Display title. */
959
988
  title: string;
960
- /** Short preview body of the message */
989
+ /** Short preview text (typically rendered alongside the title in list items). */
961
990
  preview_body: string;
962
- /** Message icon, 128x128px */
991
+ /** Message icon URL (128×128 px recommended). */
963
992
  icon: string;
964
- /** The action that should be performed when user clicks on the message.
965
- * 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);
966
- * The 'dp' function will handle the CTA and will execute it in the most safe way.
967
- * If the message has a rich html body - the action will always be 'dp:inbox' which will open the inbox widget when triggered.
968
- */
993
+ /** Click-action — either a deep-link (e.g. `'dp:deposit'`) or a
994
+ * plain URL. The literal `'dp:inbox'` indicates the message has a
995
+ * rich `html_body`; for any other value `html_body` and `buttons`
996
+ * are absent. Pass to `_smartico.dp(action)` for safe execution. */
969
997
  action: string;
970
- /** Rich HTML body of the message. */
998
+ /** Rich HTML body. Populated only when `action === 'dp:inbox'`. */
971
999
  html_body?: string;
972
- /** Optional additional buttons to show in the message, available only if message has rich HTML body. Max count - 2. */
1000
+ /** Up to 2 additional action buttons. Populated only when
1001
+ * `action === 'dp:inbox'`. */
973
1002
  buttons?: {
974
- /** The action that should be performed when user clicks on the button. The logic is the same as for message actions */
1003
+ /** Button click-action (deep-link or URL). */
975
1004
  action: string;
976
- /** Button text */
1005
+ /** Button label. */
977
1006
  text: string;
978
1007
  }[];
979
- /** The custom data of the inbox message defined by operator. Can be a JSON object, string or number */
1008
+ /** Operator-defined custom data. The SDK auto-parses JSON-looking
1009
+ * strings, so at runtime this is `any` despite the `string` type. */
980
1010
  custom_data?: string;
981
1011
  }
1012
+ /**
1013
+ * InboxMarkMessageAction is the response of the five inbox mutation
1014
+ * methods (`markInboxMessageAsRead`, `markAllInboxMessagesAsRead`,
1015
+ * `markUnmarkInboxMessageAsFavorite`, `deleteInboxMessage`,
1016
+ * `deleteAllInboxMessages`).
1017
+ */
982
1018
  export interface InboxMarkMessageAction {
983
- /** An error code representing the result of marking a message as deleted, favorite or read. Successful marking action if err_code is 0 */
1019
+ /** Error code. `0` = success. See the calling method's TSDoc for
1020
+ * the full error semantics (server returns generic codes; the
1021
+ * five inbox mutations share the same shape). */
984
1022
  err_code: number;
985
- /** Optional error message */
1023
+ /** Optional server-side error message. Present only on non-zero
1024
+ * `err_code`; may be empty even then. */
986
1025
  err_message: string;
987
1026
  }
1027
+ /**
1028
+ * LeaderBoardDetailsT describes one period's leaderboard.
1029
+ * Returned by `_smartico.api.getLeaderBoard(periodType, getPreviousPeriod?)`.
1030
+ * May be `undefined` at runtime when no board is configured for the requested period.
1031
+ */
988
1032
  export interface LeaderBoardDetailsT {
989
- /** ID of the leaderboard */
1033
+ /** Stable ID of the leaderboard. */
990
1034
  board_id: number;
991
- /** Name of the leaderboard */
1035
+ /** Operator-defined display name. */
992
1036
  name: string;
993
- /** Description of the leaderboard */
1037
+ /** Operator-defined description (HTML allowed). */
994
1038
  description: string;
995
- /** Rules of the leaderboard */
1039
+ /** Operator-defined rules / terms (HTML allowed). */
996
1040
  rules: string;
997
- /** Leaderboard period type ID */
1041
+ /** Period type this board is bound to ({@link LeaderBoardPeriodType}). */
998
1042
  period_type_id: LeaderBoardPeriodType;
999
- /** Leaderboard points rewards */
1043
+ /** Per-place prize table; the array length is the number of paid places. */
1000
1044
  rewards: LeaderBoardsRewardsT[];
1001
- /** Leaderboard users */
1045
+ /** Top-20 ranked entries (server-capped), sorted by `position` ASC. */
1002
1046
  users: LeaderBoardUserT[];
1003
- /** Info about current user in leaderboard */
1047
+ /** Current user's own entry. `undefined` for visitor sessions.
1048
+ * For authenticated users, `position === -1` means the user is
1049
+ * unranked / outside the ranked window. */
1004
1050
  me?: LeaderBoardUserT;
1005
1051
  }
1052
+ /**
1053
+ * LeaderBoardsRewardsT describes one place's prize on a leaderboard.
1054
+ * Leaderboard prizes are always gamification points (never gems / diamonds / items).
1055
+ */
1006
1056
  export interface LeaderBoardsRewardsT {
1057
+ /** Place number (1-based). */
1007
1058
  place: number;
1059
+ /** Gamification points awarded to the user occupying this place at period finalization. */
1008
1060
  points: number;
1009
1061
  }
1062
+ /**
1063
+ * LeaderBoardUserT describes one participant row on a leaderboard.
1064
+ */
1010
1065
  export interface LeaderBoardUserT {
1011
- /** The username of the participant */
1066
+ /** Display username (operator-defined alias). */
1012
1067
  public_username: string;
1013
- /** The URL to the avatar of the participant */
1068
+ /** Resolved CDN URL for the participant's avatar. */
1014
1069
  avatar_url: string;
1015
- /** The position of the participant in the leaderboard */
1070
+ /** Rank in the leaderboard (DENSE_RANK over all participants).
1071
+ * `-1` on the `me` entry signals "unranked / outside the window". */
1016
1072
  position: number;
1017
- /** The points of the participant in the leaderboard */
1073
+ /** Participant's points for this period. */
1018
1074
  points: number;
1019
- /** The indicator if the participant is current user */
1075
+ /** `true` when this row is the current authenticated user. */
1020
1076
  is_me: boolean;
1021
1077
  }
1022
1078
  /**
@@ -1033,105 +1089,147 @@ export interface UserLevelExtraCountersT {
1033
1089
  * semantics per label. `undefined` on points-only labels. */
1034
1090
  level_counter_2?: number;
1035
1091
  }
1092
+ /**
1093
+ * TSegmentCheckResult describes one segment-membership outcome.
1094
+ * Returned by `_smartico.api.checkSegmentListMatch()` (and used
1095
+ * internally by `checkSegmentMatch()`).
1096
+ */
1036
1097
  export interface TSegmentCheckResult {
1098
+ /** The segment ID this result refers to (label-scoped). */
1037
1099
  segment_id: number;
1100
+ /** `true` if the user currently matches this segment. `false` also
1101
+ * covers the case where the segment doesn't exist for the label —
1102
+ * the two are not distinguishable. */
1038
1103
  is_matching: boolean;
1039
1104
  }
1105
+ /**
1106
+ * One operator-configured navigation entry. Returned by `getCustomSections()`.
1107
+ * `section_type_id` is the dispatch key — it determines which page component the
1108
+ * consumer mounts when the user opens this section.
1109
+ */
1040
1110
  export interface TUICustomSection {
1041
- /** The ID of the custom section */
1111
+ /** Stable numeric ID of the section. */
1042
1112
  id: number;
1043
- /** The body of the custom section */
1113
+ /** Raw HTML body for `HTML_PAGE` sections; Liquid template body for `LEVELS` (Liquid) sections. */
1044
1114
  body?: string;
1045
- /** The image of the custom section, 64x64px */
1115
+ /** CDN URL of the section's nav icon, 64x64 px square. */
1046
1116
  menu_img?: string;
1047
- /** The name of the custom section */
1117
+ /** Display name shown next to the nav icon. Pre-translated server-side. */
1048
1118
  menu_name?: string;
1049
- /** Custom images for custom section */
1119
+ /** JSON-serialized list of skin image overrides for themed sections (e.g. `MISSION_CUSTOM_LAYOUT`). */
1050
1120
  custom_skin_images?: string;
1051
- /** The particular type of custom section, can be Missions, Tournaments, Lootbox and etc */
1121
+ /** Dispatch key — see {@link AchCustomSectionType}. */
1052
1122
  section_type_id?: AchCustomSectionType;
1053
- /** Theme of the custom section */
1123
+ /** Themed-layout name for `MISSION_CUSTOM_LAYOUT` sections; see {@link AchCustomLayoutTheme}. */
1054
1124
  theme?: AchCustomLayoutTheme;
1055
- /** Custom css for the custom section */
1125
+ /** Custom CSS for themed layouts. */
1056
1126
  generic_custom_css?: string;
1057
- /** Tabs that can be shown in custom section, e.g Overview, No Overview, All tabs */
1127
+ /** Which tabs to render for `MISSIONS_CATEGORY` sections; see {@link AchMissionsTabsOptions}. */
1058
1128
  mission_tabs_options?: AchMissionsTabsOptions;
1059
- /** Filter that allow to show missions by criteria */
1129
+ /** Mission-filter rule for the Overview tab; see {@link AchOverviewMissionsFilter}. */
1060
1130
  overview_missions_filter?: AchOverviewMissionsFilter;
1061
- /** Quantity of missions to be shown in overview */
1131
+ /** Maximum number of missions shown in the Overview tab. */
1062
1132
  overview_missions_count?: number;
1063
- /** URL or DP to be used for custom section */
1133
+ /** Click target for `REDIRECT_LINK` sections — either a Smartico DP string (`dp:…`) or an external URL. */
1064
1134
  url_or_dp?: string;
1065
- /** Data to be used for Liquid templates */
1135
+ /** Data-context selectors for Liquid templates; see {@link LiquidEntityData}. */
1066
1136
  liquid_entity_data?: LiquidEntityData[];
1067
- /** Tournament ID to be used for Liquid templates */
1137
+ /** Tournament ID for a single-tournament Liquid template (`LiquidEntityData.Tournament`). */
1068
1138
  ach_tournament_id?: number;
1069
- /** Indicates if the data should be shown as raw data (for Liquid templates) */
1139
+ /** Operator debug flag — when `true`, Liquid renders raw context data instead of the templated HTML. */
1070
1140
  show_raw_data?: boolean;
1071
- /** Liquid template id to be used for Liquid templates */
1141
+ /** Liquid template ID resolved server-side; the rendered body is delivered in `body`. */
1072
1142
  liquid_template?: number;
1073
- /** List of IDs of the categories where the badge item is assigned, information about categories can be retrieved with getAchCategories method */
1143
+ /** Category IDs the section filters badges by — correlate with `getAchCategories()`. */
1074
1144
  ach_category_ids?: number[];
1075
- /** List of IDs of the categories where the store item is assigned, information about categories can be retrieved with getShopCategories method */
1145
+ /** Category IDs the section filters store items by — correlate with `getStoreCategories()`. */
1076
1146
  shop_category_ids?: number[];
1077
- /** ID of the raffle to be used for Liquid templates */
1147
+ /** Raffle ID for `RAFFLE` sections (and `LiquidEntityData.SingleRaffle` Liquid templates). */
1078
1148
  raffle_id?: number;
1079
1149
  }
1150
+ /**
1151
+ * TBonus describes one bonus awarded to the user.
1152
+ * Returned by `_smartico.api.getBonuses()`.
1153
+ */
1080
1154
  export interface TBonus {
1081
- /** ID of the bonus */
1155
+ /** Stable ID of the bonus. */
1082
1156
  bonus_id: number;
1083
- /** Can the bonus be redeemed (if bonus is redeemable the user needs to claim it) */
1157
+ /** `true` when the bonus is in a player-claim-required state.
1158
+ * Gate the Claim button on this; see `claimBonus` TSDoc. */
1084
1159
  is_redeemable?: boolean;
1085
- /** Date of creation */
1160
+ /** Bonus creation timestamp as ISO 8601 UTC string
1161
+ * ("YYYY-MM-DDTHH:MM:SS", no timezone suffix). */
1086
1162
  create_date?: string;
1087
- /** Date of redemption */
1163
+ /** Bonus redemption timestamp as ISO 8601 UTC string. Absent until
1164
+ * the bonus reaches `BonusStatus.REDEEMED`. */
1088
1165
  redeem_date?: string;
1089
- /** ID of template used */
1166
+ /** ID of the bonus template used to issue this bonus. */
1090
1167
  label_bonus_template_id?: number;
1091
- /** ID of the bonus status */
1168
+ /** Lifecycle status; see {@link BonusStatus}. */
1092
1169
  bonus_status_id?: BonusStatus;
1093
- /** Additional information about the bonus(edscription, image,name, acknowledge) */
1170
+ /** Template-level display metadata (operator-configured, identical
1171
+ * across all bonuses from the same template). */
1094
1172
  label_bonus_template_meta_map?: BonusTemplateMetaMap;
1095
- /** Additional information presented to the player when the bonus is redeemed */
1173
+ /** Instance-level display metadata (per-issuance; carries the
1174
+ * dynamic amount computed at award time). */
1096
1175
  bonus_meta_map?: BonusMetaMap;
1097
1176
  }
1177
+ /**
1178
+ * BonusStatus describes the lifecycle stage of a bonus on `TBonus.bonus_status_id`.
1179
+ * Operator widget configuration typically filters out internal statuses
1180
+ * (`New`, `COUPON_ISSUE_FAILED`, `EXPIRED`); consumers usually see
1181
+ * `COUPON_ISSUED`, `REDEEMED`, and `REDEEM_FAILED`.
1182
+ */
1098
1183
  export declare enum BonusStatus {
1099
- /** The bonus is newly created (shouldn't be shown to the client) */
1184
+ /** Newly created, not yet processed (internal). */
1100
1185
  New = 1,
1101
- /** The bonus is issued and available for redemption but has not been redeemed yet */
1186
+ /** Issued and awaiting player claim. */
1102
1187
  COUPON_ISSUED = 2,
1103
- /** The bonus has been successfully redeemed */
1188
+ /** Successfully redeemed. */
1104
1189
  REDEEMED = 3,
1105
- /** The bonus is still valid, but a previous redemption attempt failed */
1190
+ /** Previous redemption attempt failed; still valid and re-claimable. */
1106
1191
  REDEEM_FAILED = 4,
1107
- /** Failed to issue the bonus (shouldn't be shown to the client) */
1192
+ /** Coupon issuance failed (internal). */
1108
1193
  COUPON_ISSUE_FAILED = 5,
1109
- /** The bonus was issued but has expired and can no longer be redeemed (shouldn't be shown to the client) */
1194
+ /** Issued but expired before redemption (internal). */
1110
1195
  EXPIRED = 6
1111
1196
  }
1197
+ /**
1198
+ * Template-level bonus display metadata (operator-configured at the
1199
+ * bonus template; identical for every bonus issued from the same template).
1200
+ */
1112
1201
  export interface BonusTemplateMetaMap {
1113
- /** Description of the bonus template*/
1202
+ /** Operator-set description / display text. May include HTML. */
1114
1203
  description: string;
1115
- /** Acknowledge message setup in the bonus template*/
1204
+ /** Operator-set additional message shown to the player at claim
1205
+ * time (e.g. wagering terms). May include deep-links. */
1116
1206
  acknowledge: string;
1117
- /** Image URL of the bonus template, 1:1 aspect ratio */
1207
+ /** Bonus icon URL (1:1 aspect ratio recommended). */
1118
1208
  image_url: string;
1119
- /** Redirect URL of the bonus template*/
1209
+ /** Optional redirect — external HTTP URL (opens in new tab) or
1210
+ * internal deep-link (handled by the SDK's deep-link router). */
1120
1211
  redirect_url?: string;
1121
1212
  }
1213
+ /**
1214
+ * Instance-level bonus display metadata (set per-issuance, may carry
1215
+ * a dynamically-computed amount).
1216
+ */
1122
1217
  export interface BonusMetaMap {
1123
- /** Label and description of the bonus sent to the player*/
1218
+ /** Display-ready amount string (e.g. "€50", "100 free spins"). */
1124
1219
  uiAmount?: string;
1125
1220
  }
1126
1221
  /**
1127
- * TClaimBonusResult describes the response of call to _smartico.api.claimBonus(bonus_id) method
1222
+ * TClaimBonusResult describes the response of `_smartico.api.claimBonus(bonus_id)`.
1223
+ */
1224
+ /**
1225
+ * Result of `_smartico.api.claimBonus(bonus_id)`.
1128
1226
  */
1129
1227
  export interface TClaimBonusResult {
1130
- /** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
1131
- err_code: SAWSpinErrorCode;
1132
- /** Optional error message */
1228
+ /** Error code. `0` = success. See `claimBonus` TSDoc for the full table. */
1229
+ err_code: number;
1230
+ /** Optional error message; populated on non-zero `err_code`. */
1133
1231
  err_message: string;
1134
- /** If the bonus was claimed successfully, then success is true */
1232
+ /** Unreliable on the wire — prefer `err_code === 0` as the success check. */
1135
1233
  success?: boolean;
1136
1234
  }
1137
1235
  export interface TSawHistory {
@@ -1475,10 +1573,23 @@ export interface TRaffleDrawRun {
1475
1573
  */
1476
1574
  has_unclaimed_prize: boolean;
1477
1575
  }
1576
+ /**
1577
+ * TransformedRaffleClaimPrizeResponse describes the response of
1578
+ * `_smartico.api.claimRafflePrize({won_id})`.
1579
+ *
1580
+ * Note: this type uses `errorCode` / `errorMessage` (camelCase
1581
+ * full-word) — different from most other SDK wrapper-result types in
1582
+ * this library which use `err_code` / `err_message` (snake_case).
1583
+ */
1584
+ /**
1585
+ * Result of `_smartico.api.claimRafflePrize({raffle_id, draw_id, raffle_run_id})`.
1586
+ * Uses camelCase `errorCode` / `errorMessage` — distinct from most other SDK
1587
+ * result wrappers which use snake_case `err_code` / `err_message`.
1588
+ */
1478
1589
  export interface TransformedRaffleClaimPrizeResponse {
1479
- /** Error code, 0 means no error */
1590
+ /** Error code. `0` = success. See `claimRafflePrize` TSDoc for the full table. */
1480
1591
  errorCode: number;
1481
- /** Error message, will be exposed only if ErrorCode is not 0 */
1592
+ /** Optional error message; populated on non-zero `errorCode`. */
1482
1593
  errorMessage?: string;
1483
1594
  }
1484
1595
  /**
@@ -1503,10 +1614,13 @@ export interface TActivityLog {
1503
1614
  /** Source type ID indicating what triggered this change */
1504
1615
  source_type_id: PointChangeSourceType;
1505
1616
  }
1617
+ /**
1618
+ * Result of `_smartico.api.requestRaffleOptin({raffle_id, draw_id, raffle_run_id})`.
1619
+ */
1506
1620
  export interface TRaffleOptinResponse {
1507
- /** Error code that represents outcome of the opt-in attempt. Opt-in succeed in case err_code is 0 */
1621
+ /** Error code. `0` = success. See `requestRaffleOptin` TSDoc for the full table. */
1508
1622
  err_code: number;
1509
- /** Optional error message */
1623
+ /** Optional error message; populated on non-zero `err_code`. */
1510
1624
  err_message?: string;
1511
1625
  }
1512
1626
  /**
@@ -1968,72 +2082,69 @@ export interface GamePickRoundRequestParams extends GamePickRequestParams {
1968
2082
  round_id: number;
1969
2083
  }
1970
2084
  /**
1971
- * TAvatarDefinition describes a single avatar available in the avatar catalog.
2085
+ * One avatar in the user's catalog. Returned by `getAvatarsList()`.
1972
2086
  * Fields from the raw `public_meta` object are flattened to the top level.
1973
2087
  */
1974
2088
  export interface TAvatarDefinition {
1975
- /** Unique identifier of the avatar */
2089
+ /** Stable numeric identifier of the avatar. Primary key passed to `setAvatar()`. */
1976
2090
  avatar_real_id: number;
1977
- /** Whether this avatar is the default one */
2091
+ /** True when this is the system default avatar for the label. */
1978
2092
  is_default: boolean;
1979
- /** If true, avatar is hidden until user achieves/unlocks it */
2093
+ /** When true and `is_given === false`, the avatar should be hidden from the user (surprise unlock). */
1980
2094
  hide_until_achieved: boolean;
1981
- /** Display priority — lower value means higher position in the grid */
2095
+ /** Display position; lower = earlier in the grid. */
1982
2096
  priority: number;
1983
- /** Optional description of the avatar (from public_meta) */
2097
+ /** Optional description shown alongside the avatar in detail views. */
1984
2098
  description?: string;
1985
- /** Raw image path/URL of the avatar as returned by the server (from public_meta) */
2099
+ /** Raw image path as returned by the server (relative or absolute). */
1986
2100
  url: string;
1987
- /** Full CDN URL of the avatar image, built from avatar_domain + url */
2101
+ /** Absolute CDN URL of the avatar image; built from the configured avatar domain + `url`. */
1988
2102
  avatar_url: string;
1989
- /**
1990
- * Source type of the avatar.
1991
- * 0 = free (always available to all users), other values = earned/purchased
1992
- */
2103
+ /** Source type. `0` = free / always available; non-zero = earned or purchased. */
1993
2104
  avatar_source_type_id: number;
1994
- /** ISO date string from which the avatar becomes available */
2105
+ /** ISO date string from which the avatar becomes available; undefined when no start window. */
1995
2106
  active_from_date?: string;
1996
- /** ISO date string until which the avatar is available */
2107
+ /** ISO date string until which the avatar is available; undefined when no end window. */
1997
2108
  active_till_date?: string;
1998
- /** Whether the avatar has been granted/given to the current user */
2109
+ /** True when the user owns / has unlocked this avatar. */
1999
2110
  is_given: boolean;
2000
- /** Whether this avatar is currently in use by the user */
2111
+ /** True when this avatar is the user's currently active profile avatar. */
2001
2112
  is_in_use?: boolean;
2002
2113
  }
2003
2114
  /**
2004
- * TAvatarCustomized describes an AI-customized version of a base avatar
2115
+ * One AI-generated variant of a base avatar. Returned by `getAvatarsCustomized()`.
2005
2116
  */
2006
2117
  export interface TAvatarCustomized {
2007
- /** The avatar_real_id of the base avatar this customization was generated from */
2118
+ /** `avatar_real_id` of the base avatar this variant was generated from. */
2008
2119
  avatar_real_id: number;
2009
- /** Full CDN URL of the AI-generated customized avatar image */
2120
+ /** Absolute CDN URL of the AI-generated image. Can be passed as `avatar_url` to `setAvatar()`. */
2010
2121
  url: string;
2011
- /** ISO date string when the customization was created */
2122
+ /** ISO date string of when the variant was generated. */
2012
2123
  dt_created: string;
2013
2124
  }
2014
2125
  /**
2015
- * TAvatarPrompt describes an AI style prompt available for avatar customization.
2126
+ * One AI style prompt for avatar customization. Returned by `getAvatarPrompts()`.
2016
2127
  * Fields from the raw `public_meta` object are flattened to the top level.
2017
2128
  */
2018
2129
  export interface TAvatarPrompt {
2019
- /** Unique identifier of the AI customization prompt */
2130
+ /** Stable numeric identifier of the prompt. */
2020
2131
  prompt_id: number;
2021
- /** Display name of the prompt style, e.g. "Cartoon", "Watercolor" (from public_meta) */
2132
+ /** Display name of the style, e.g. "Cartoon", "Watercolor". */
2022
2133
  name: string;
2023
- /** Full CDN URL of the prompt style icon image (from public_meta) */
2134
+ /** Absolute CDN URL of the prompt's preview icon. */
2024
2135
  icon_url: string;
2025
- /** Currency type used to pay for this customization (0=points, 1=gems, 2=diamonds) */
2136
+ /** Currency used to pay for the customization. `0` = points, `1` = gems, `2` = diamonds. */
2026
2137
  cost_currency_type_id: number;
2027
- /** Cost amount in the given currency */
2138
+ /** Cost amount in the currency named by `cost_currency_type_id`. */
2028
2139
  cost_value: number;
2029
2140
  }
2030
2141
  /**
2031
- * TSetAvatarResult describes the response of call to _smartico.api.setAvatar() method
2142
+ * Result of `_smartico.api.setAvatar()`.
2032
2143
  */
2033
2144
  export interface TSetAvatarResult {
2034
- /** Error code that represents outcome of the set avatar request. Successful if err_code is 0 */
2145
+ /** Error code. `0` = success. See `setAvatar` TSDoc for the full table. */
2035
2146
  err_code: number;
2036
- /** Optional error message */
2147
+ /** Optional error message; populated on non-zero `err_code`. */
2037
2148
  err_message?: string;
2038
2149
  }
2039
2150
  export { SAWAcknowledgeTypeName, PrizeModifiers, SAWTemplateUI, InboxCategories, AchCustomSectionType, SAWAskForUsername, SAWGameLayout, PointChangeSourceType, UserBalanceType, SAWGPMarketType, QuizAnswersValueType };