@smartico/public-api 0.0.379 → 0.0.380

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 (99) hide show
  1. package/.nvmrc +1 -1
  2. package/README.md +31 -2
  3. package/dist/Store/BuyStoreItemErrorCode.d.ts +9 -1
  4. package/dist/Tournaments/TournamentRegistrationError.d.ts +3 -1
  5. package/dist/WSAPI/WSAPI.d.ts +13 -1235
  6. package/dist/WSAPI/WSAPIAvatars.d.ts +78 -0
  7. package/dist/WSAPI/WSAPIBase.d.ts +71 -0
  8. package/dist/WSAPI/WSAPIBonuses.d.ts +26 -0
  9. package/dist/WSAPI/WSAPIClans.d.ts +388 -0
  10. package/dist/WSAPI/WSAPIGamePick.d.ts +308 -0
  11. package/dist/WSAPI/WSAPIGeneral.d.ts +30 -0
  12. package/dist/WSAPI/WSAPIInbox.d.ts +126 -0
  13. package/dist/WSAPI/WSAPIJackpots.d.ts +109 -0
  14. package/dist/WSAPI/WSAPILeaderBoard.d.ts +25 -0
  15. package/dist/WSAPI/WSAPIMiniGames.d.ts +94 -0
  16. package/dist/WSAPI/WSAPIMissions.d.ts +517 -0
  17. package/dist/WSAPI/WSAPIRaffles.d.ts +119 -0
  18. package/dist/WSAPI/WSAPIStore.d.ts +656 -0
  19. package/dist/WSAPI/WSAPITournaments.d.ts +501 -0
  20. package/dist/WSAPI/WSAPITypes.d.ts +145 -85
  21. package/dist/WSAPI/WSAPIUser.d.ts +383 -0
  22. package/dist/index.js +3818 -1528
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.modern.mjs +3180 -981
  25. package/dist/index.modern.mjs.map +1 -1
  26. package/docs/api/README.md +56 -2
  27. package/docs/api/classes/WSAPIAvatars.md +116 -0
  28. package/docs/api/classes/WSAPIBonuses.md +50 -0
  29. package/docs/api/classes/WSAPIClans.md +66 -0
  30. package/docs/api/classes/WSAPIGamePick.md +181 -0
  31. package/docs/api/classes/WSAPIGeneral.md +63 -0
  32. package/docs/api/classes/WSAPIInbox.md +277 -0
  33. package/docs/api/classes/WSAPIJackpots.md +185 -0
  34. package/docs/api/classes/WSAPILeaderBoard.md +39 -0
  35. package/docs/api/classes/WSAPIMiniGames.md +175 -0
  36. package/docs/api/classes/WSAPIMissions.md +611 -0
  37. package/docs/api/classes/WSAPIRaffles.md +195 -0
  38. package/docs/api/classes/WSAPIStore.md +744 -0
  39. package/docs/api/classes/WSAPITournaments.md +104 -0
  40. package/docs/api/classes/WSAPIUser.md +200 -0
  41. package/docs/api/enumerations/AchievementClaimPeriodTypeId.md +13 -0
  42. package/docs/api/enumerations/BuyStoreItemErrorCode.md +32 -0
  43. package/docs/api/interfaces/ClanPrizePublicMeta.md +41 -0
  44. package/docs/api/interfaces/ClanPrizeStructureEntry.md +7 -1
  45. package/docs/api/interfaces/ClanPublicMeta.md +4 -0
  46. package/docs/api/interfaces/SAWTemplateUI.md +10 -0
  47. package/docs/api/interfaces/TAchCategory.md +19 -4
  48. package/docs/api/interfaces/TBuyStoreItemResult.md +26 -8
  49. package/docs/api/interfaces/TMissionClaimRewardResult.md +14 -3
  50. package/docs/api/interfaces/TMissionOptInResult.md +10 -3
  51. package/docs/api/interfaces/TMissionOrBadge.md +6 -2
  52. package/docs/api/interfaces/TStoreItem.md +21 -1
  53. package/docs/api/interfaces/TTournamentDetailed.md +8 -0
  54. package/docs/api/interfaces/UserAchievement.md +1 -1
  55. package/docs/ui/clans/UIGuide_getClanInfo.md +153 -0
  56. package/docs/ui/clans/UIGuide_getClans.md +172 -0
  57. package/docs/ui/clans/UIGuide_joinClan.md +196 -0
  58. package/docs/ui/missions/UIGuide_getAchCategories.md +17 -0
  59. package/docs/ui/missions/UIGuide_getBadges.md +237 -0
  60. package/docs/ui/missions/UIGuide_getMissions.md +268 -0
  61. package/docs/ui/missions/UIGuide_requestMissionClaimReward.md +21 -0
  62. package/docs/ui/missions/UIGuide_requestMissionOptIn.md +16 -0
  63. package/docs/ui/store/UIGuide_buyStoreItem.md +133 -0
  64. package/docs/ui/store/UIGuide_getStoreCategories.md +19 -0
  65. package/docs/ui/store/UIGuide_getStoreItems.md +264 -0
  66. package/docs/ui/store/UIGuide_getStorePurchasedItems.md +122 -0
  67. package/docs/ui/tournaments/UIGuide_getClanTournamentPlayers.md +140 -0
  68. package/docs/ui/tournaments/UIGuide_getTournamentInstanceInfo.md +265 -0
  69. package/docs/ui/tournaments/UIGuide_getTournamentsList.md +236 -0
  70. package/docs/ui/tournaments/UIGuide_registerInTournament.md +156 -0
  71. package/docs/ui/user/UIGuide_getLevels.md +162 -0
  72. package/docs/ui/user/UIGuide_getUserProfile.md +213 -0
  73. package/package.json +3 -3
  74. package/scripts/postdoc-cleanup.js +195 -0
  75. package/src/Missions/MissionsUtils.ts +5 -2
  76. package/src/Store/BuyStoreItemErrorCode.ts +8 -0
  77. package/src/Store/StoreItem.ts +1 -0
  78. package/src/Store/StoreItemPurchased.ts +1 -0
  79. package/src/Store/StoreItemType.ts +1 -1
  80. package/src/Tournaments/TournamentRegistrationError.ts +4 -0
  81. package/src/WSAPI/WSAPI.ts +27 -2007
  82. package/src/WSAPI/WSAPIAvatars.ts +127 -0
  83. package/src/WSAPI/WSAPIBase.ts +93 -0
  84. package/src/WSAPI/WSAPIBonuses.ts +54 -0
  85. package/src/WSAPI/WSAPIClans.ts +417 -0
  86. package/src/WSAPI/WSAPIGamePick.ts +382 -0
  87. package/src/WSAPI/WSAPIGeneral.ts +57 -0
  88. package/src/WSAPI/WSAPIInbox.ts +222 -0
  89. package/src/WSAPI/WSAPIJackpots.ts +212 -0
  90. package/src/WSAPI/WSAPILeaderBoard.ts +40 -0
  91. package/src/WSAPI/WSAPIMiniGames.ts +181 -0
  92. package/src/WSAPI/WSAPIMissions.ts +572 -0
  93. package/src/WSAPI/WSAPIRaffles.ts +175 -0
  94. package/src/WSAPI/WSAPIStore.ts +732 -0
  95. package/src/WSAPI/WSAPITournaments.ts +541 -0
  96. package/src/WSAPI/WSAPITypes.ts +145 -87
  97. package/src/WSAPI/WSAPIUser.ts +456 -0
  98. package/tsconfig.json +17 -1
  99. package/docs/api/classes/WSAPI.md +0 -1927
@@ -212,89 +212,78 @@ export interface TMiniGameTemplate {
212
212
  */
213
213
 
214
214
  export interface TUserProfile {
215
- /** The language of the user */
215
+ /** Language code stored server-side for the user (e.g. `"en"`, `"de"`). */
216
216
  core_user_language: string;
217
- /** The current points balance that user can use in the Store, Mini-games, Tournaments, etc.. */
217
+ /** Current spendable points balance — decremented by store purchases,
218
+ * tournament buy-ins, and clan entry fees. */
218
219
  ach_points_balance: number;
219
- /** The amount of points that user collected in total */
220
+ /** All-time cumulative points earned. Monotonic — NOT decremented by
221
+ * store purchases or clan/tournament fees. */
220
222
  ach_points_ever: number;
221
- /** The current gems balance */
223
+ /** Current gems balance (secondary currency). */
222
224
  ach_gems_balance: number;
223
- /** The current diamonds balance */
225
+ /** Current diamonds balance (tertiary currency). */
224
226
  ach_diamonds_balance: number;
225
- /**
226
- * The array of the public tags set on the user object.
227
- * They can be treated as server-based cookies.
228
- * You can set tags using following method _smartico.event('core_public_tags_update', { core_public_tags: ['A', 'B'] } );
229
- * And then you can check for the tags
230
- */
227
+ /** Server-stored public tags on the user (uppercase strings).
228
+ * Modify via `_smartico.updatePublicTags(operation, tags)`. */
231
229
  core_public_tags: string[];
232
- /** The ID of the current level of the user */
230
+ /** FK into the level ladder; resolve via `getCurrentLevel()` or `getLevels()`. */
233
231
  ach_level_current_id?: number;
234
- /** The indicator if user is marked as test user */
232
+ /** `true` when the user is flagged as a test account. */
235
233
  core_is_test_account?: boolean;
236
- /** The URL to the user avatar */
234
+ /** Resolved CDN URL for the user's avatar. */
237
235
  avatar_url?: string;
238
- /** The username of current user */
236
+ /** Display username (operator-defined alias). */
239
237
  public_username?: string;
240
- /** THe number of unread inbox messages */
238
+ /** Unread inbox messages count. Push-updated in real time. */
241
239
  core_inbox_unread_count?: number;
242
- /** The recommended deposit amount for the user */
240
+ /** AI-recommended deposit amount for this user. Undefined when no
241
+ * recommendation is currently available. */
243
242
  core_recommended_deposit_amount?: number;
244
- /** The recommended casino bet amount for the user */
243
+ /** AI-recommended casino bet amount for this user. Undefined when no
244
+ * recommendation is currently available. */
245
245
  core_recommended_casino_bet_amount?: number;
246
246
  }
247
247
 
248
248
  /**
249
- * TLevel describes the information of each level defined in the system
250
- * There is no order of the levels, but it can be calculated using required_points property
251
- * The current level of user can be taken from the user object using ach_level_current_id property
252
- * The progress to the next level can be calculated using ach_points_ever and required_points properties of next level
249
+ * TLevel describes one level in the label's level ladder.
250
+ * Returned by `_smartico.api.getLevels()` (already sorted by `required_points` ASC).
253
251
  */
254
252
  export interface TLevel {
255
- /** The ID of the Level */
253
+ /** Stable ID of the level. */
256
254
  id: number;
257
- /** The name of the Level, translated to the user language */
255
+ /** Display name of the level, pre-translated to the user's language. */
258
256
  name: string;
259
- /** The description of the Level, translated to the user language */
257
+ /** Display description of the level, pre-translated to the user's language. */
260
258
  description: string;
261
- /** The URL of the image of the Level, 256x256px */
259
+ /** URL of the level image (256x256 px source). */
262
260
  image: string;
263
- /** The amount of points required to reach the Level */
261
+ /** Total `ach_points_ever` required to reach this level. */
264
262
  required_points: number;
265
- /** Number of points that user should collect in order to see this level */
263
+ /** Visibility threshold — clients hide the level from the user until
264
+ * `ach_points_ever >= visibility_points`. `null` means always visible. */
266
265
  visibility_points: number;
267
- /**
268
- * The counter of 1st metric used to reach the Level.
269
- * Relevant in case of using advanced leveling logic
270
- * https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
271
- *
272
- */
266
+ /** Required value of the first level counter for sliding-window leveling.
267
+ * `null` on points-only labels. See `UserLevelExtraCountersT`. */
273
268
  required_level_counter_1: number;
274
- /**
275
- * The counter of 2nd metric used to reach the Level.
276
- * Relevant in case of using advanced leveling logic
277
- * https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
278
- *
279
- */
269
+ /** Required value of the second level counter for sliding-window leveling.
270
+ * `null` on points-only labels. */
280
271
  required_level_counter_2: number;
281
-
282
- /**
283
- * Custom data as string or JSON string that can be used in API to build custom UI
284
- * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
285
- * Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
286
- */
272
+ /** Operator-defined custom data. The SDK auto-parses JSON-looking
273
+ * strings, so at runtime this is `any` despite the `string` type. */
287
274
  custom_data: string;
288
- /** The ordinal position of the level */
275
+ /** 1-based position in the ladder (matches the order of the returned
276
+ * array, which is sorted by `required_points` ASC). */
289
277
  ordinal_position: number;
290
278
  }
291
279
 
292
280
  /**
293
- * TLevelCurrent describes the information of each level defined in the system along with ordinal position and progress of the current level
281
+ * TLevelCurrent extends `TLevel` with the user's progress toward the next level.
282
+ * Returned by `_smartico.api.getCurrentLevel()`.
294
283
  */
295
-
296
284
  export interface TLevelCurrent extends TLevel {
297
- /** The progress of the user towards next level in the percents to complete */
285
+ /** Progress to the next level as a 0–100 integer percentage. `100`
286
+ * at the highest level. */
298
287
  progress: number;
299
288
  }
300
289
 
@@ -326,7 +315,7 @@ export interface TTournament {
326
315
  segment_dont_match_message: string;
327
316
  /**
328
317
  * The ID of the custom section where the tournament is assigned
329
- * The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
318
+ * The list of custom sections can be retrieved using _smartico.api.getCustomSections() method
330
319
  */
331
320
  custom_section_id: number;
332
321
  /** The custom data of the tournament defined by operator. Can be a JSON object, string or number */
@@ -557,13 +546,17 @@ export interface TClan {
557
546
  member_count: number;
558
547
  /** Max number of members allowed in clan */
559
548
  capacity_limit: number;
560
- /** ShopPurchaseType: 0=Points, 1=Gems, 2=Diamonds, 3=Free */
549
+ /** Currency type for `entry_fee_amount`. `0` = points, `1` = gems,
550
+ * `2` = diamonds, `3` = free (no fee). */
561
551
  entry_fee_currency_type_id: number;
562
- /** Numeric value for entry fee */
552
+ /** Entry fee amount in the currency indicated by `entry_fee_currency_type_id`.
553
+ * `0` (or `entry_fee_currency_type_id === 3`) means the clan is free to join. */
563
554
  entry_fee_amount: number;
564
- /** F1 rank ASC, 1=best */
555
+ /** Global rank among all active clans in the label, by `rating_score` DESC.
556
+ * `1` = highest-rated. May skip positions when some clans are hidden by
557
+ * per-user visibility (e.g. user sees positions 1, 3, 7). */
565
558
  rating_position: number;
566
- /** Clan rating score */
559
+ /** Clan rating score (higher is better). */
567
560
  rating_score: number;
568
561
  }
569
562
 
@@ -575,7 +568,9 @@ export interface TClans {
575
568
  clans: TClan[];
576
569
  /** The clan ID the current user belongs to; null if clanless */
577
570
  user_clan_id: number | null;
578
- /** Cooldown-until date string; null if no cooldown */
571
+ /** Switch-cooldown expiry as ISO 8601 UTC string ("YYYY-MM-DDTHH:MM:SS"
572
+ * with no timezone suffix; interpret as UTC). `null` when no cooldown.
573
+ * User-level: while set, the user cannot join any clan. */
579
574
  cooldown_until: string | null;
580
575
  /** Epoch ms when the current user joined their clan; null if clanless */
581
576
  join_date: number | null;
@@ -583,35 +578,71 @@ export interface TClans {
583
578
 
584
579
  /**
585
580
  * TClanInfo describes the detailed info of a single clan including its members.
581
+ * Returned by `_smartico.api.getClanInfo(clanId)`.
586
582
  */
587
583
  export interface TClanInfo {
584
+ /** Clan ID. */
588
585
  clan_id: number;
586
+ /** Translated clan metadata (name, description, image URL). */
589
587
  public_meta: { name: string; description: string; image_url: string };
588
+ /** Current number of members in clan. */
590
589
  member_count: number;
590
+ /** Max number of members allowed in clan. */
591
591
  capacity_limit: number;
592
+ /** Currency type for `entry_fee_amount`. `0` = points, `1` = gems,
593
+ * `2` = diamonds, `3` = free. */
592
594
  entry_fee_currency_type_id: number;
595
+ /** Entry fee amount in the currency indicated by `entry_fee_currency_type_id`. */
593
596
  entry_fee_amount: number;
597
+ /** Global rank among all active clans in the label, by `rating_score` DESC.
598
+ * `1` = highest-rated. */
594
599
  rating_position: number;
600
+ /** Clan rating score (higher is better). */
595
601
  rating_score: number;
602
+ /** User-level switch-cooldown expiry as ISO 8601 UTC string
603
+ * ("YYYY-MM-DDTHH:MM:SS" with no timezone suffix). `null` when no
604
+ * cooldown. Same semantic as `TClans.cooldown_until` but always fresh
605
+ * (the list version may be up to 30 s stale). */
596
606
  cooldown_until: string | null;
607
+ /** Members of this clan, server-ordered by `contribution_score` DESC
608
+ * (i.e. `position` ASC). */
597
609
  members: {
610
+ /** Member's internal user ID. */
598
611
  user_id: number;
612
+ /** Member's display username. */
599
613
  public_username: string;
614
+ /** Avatar identifier; resolve via `avatar_url` below or rebuild
615
+ * from `avatar_id` + brand avatar domain. */
600
616
  avatar_id: string;
617
+ /** Numeric avatar ID (alternative identifier). */
601
618
  avatar_real_id: number;
619
+ /** Pre-resolved CDN URL for the avatar. */
602
620
  avatar_url?: string;
621
+ /** Member's rank within this clan; `1` = top contributor. */
603
622
  position: number;
623
+ /** Member's contribution to the clan rating score. */
604
624
  contribution_score: number;
625
+ /** `true` when this row is the current authenticated user. */
605
626
  is_me?: boolean;
627
+ /** External user identifier (operator-provided alias);
628
+ * preferred over `public_username` on some surfaces. */
606
629
  clean_ext_user_id?: string;
607
630
  }[];
608
631
  }
609
632
 
610
633
  /**
611
- * TClanJoinResult describes the result of a join clan request.
634
+ * TClanJoinResult describes the result of a join-clan request.
635
+ * Note: this type uses `errCode` / `errMsg` (camelCase) — different
636
+ * from most other SDK result types in this library which use
637
+ * `err_code` / `err_message` (snake_case).
612
638
  */
613
639
  export interface TClanJoinResult {
640
+ /** Error code. `0` = success. Typed values are members of
641
+ * {@link JoinClanErrorCode}. See `joinClan` TSDoc for the full
642
+ * table and per-code UI guidance. */
614
643
  errCode: number;
644
+ /** Optional server-side error message. Present only on non-zero
645
+ * `errCode`; may be empty even then. */
615
646
  errMsg: string;
616
647
  }
617
648
 
@@ -668,7 +699,9 @@ export interface TStoreItem {
668
699
  can_buy: boolean;
669
700
  /** The list of IDs of the categories where the store item is assigned, information about categories can be retrieved with getStoreCategories method */
670
701
  category_ids: number[];
671
- /** Number of items in the pool avaliable for the purchase.*/
702
+ /** Items remaining in the pool available for purchase. `null` = unlimited
703
+ * supply. Positive integer = remaining stock. `0` = sold out but still
704
+ * returned (operator may instead hide pool-empty items entirely). */
672
705
  pool?: number;
673
706
  /** The custom data of the store item defined by operator. Can be a JSON object, string or number */
674
707
  custom_data: any;
@@ -688,6 +721,8 @@ export interface TStoreItem {
688
721
  purchase_type: 'points' | 'gems' | 'diamonds';
689
722
  /** The date when the store item will be available till */
690
723
  active_till_date?: number;
724
+ /** Should countdown timer be shown when `active_till_date` is present */
725
+ show_timer?: boolean;
691
726
  /** The discounted price of the store item */
692
727
  discounted_price?: number;
693
728
  /** The ribbon of the discounted price. */
@@ -705,14 +740,24 @@ export interface TStoreItem {
705
740
  }
706
741
 
707
742
  /**
708
- * TAchCategory describes the badge category item. Each badge item can be assigned to 1 or more categories
743
+ * TAchCategory describes a mission/badge category. Categories are
744
+ * operator-defined groupings, configured per-label by the brand operator,
745
+ * shared across BOTH missions and badges — the same list is returned for
746
+ * both entity types. A mission or badge can belong to **zero or more**
747
+ * categories (many-to-many) via its `category_ids: number[]` field on
748
+ * `TMissionOrBadge`.
749
+ *
750
+ * Returned by `_smartico.api.getAchCategories()`. See that method's TSDoc
751
+ * for translation, refresh, and rendering details.
709
752
  */
710
753
  export interface TAchCategory {
711
- /**ID of the badge category */
754
+ /** Stable numeric ID of the category. Used as the key when joining to
755
+ * `TMissionOrBadge.category_ids: number[]`. */
712
756
  id: number;
713
- /**Name of the badge category */
757
+ /** Display name of the category, pre-translated server-side. Never null. */
714
758
  name: string;
715
- /**Order of the badge category among other categories. Default value is 1 */
759
+ /** Relative display position (lower = appears first). Default 1 when the
760
+ * operator did not configure an explicit order. */
716
761
  order: number;
717
762
  }
718
763
 
@@ -768,8 +813,8 @@ export interface TMissionOrBadge {
768
813
  /** The text of the CTA button, e.g. 'Make a deposit' */
769
814
  cta_text: string;
770
815
  /**
771
- * The ID of the custom section where the mission or badge is assigned
772
- * The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
816
+ * The ID of the custom section where the mission or badge is assigned.
817
+ * Resolve to section metadata via `_smartico.api.getCustomSections()`.
773
818
  */
774
819
  custom_section_id: number;
775
820
  /** The indicator if the mission or badge is visible only in the custom section and should be hidden from the main overview of missions/badges */
@@ -796,7 +841,8 @@ export interface TMissionOrBadge {
796
841
  /** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250x300px */
797
842
  ribbon?: TRibbon;
798
843
 
799
- /** ID of the completion fact from ach_completed or ach_completed_recurring tables */
844
+ /** Stable identifier of this specific mission completion. Undefined for
845
+ * badges and for missions that have not yet completed. */
800
846
  ach_completed_id?: number;
801
847
 
802
848
  /** Flag from achievement if the mission prize will be given only after user claims it */
@@ -901,46 +947,50 @@ export interface TMissionOrBadgeTask {
901
947
  }
902
948
 
903
949
  /**
904
- * TMissionOptInResult describes the response of call to _smartico.api.requestMissionOptIn(mission_id) method
950
+ * Response of `_smartico.api.requestMissionOptIn(mission_id)`.
951
+ *
952
+ * See `requestMissionOptIn` TSDoc for the full table of `err_code` values
953
+ * and recommended UI handling.
905
954
  */
906
955
  export interface TMissionOptInResult {
907
- /** Error code that represents outcome of the opt-in request. Successful opt-in in case err_code is 0 */
956
+ /** Error code. `0` = success. See `requestMissionOptIn` TSDoc for the full table. */
908
957
  err_code: number;
909
- /** Optional error message */
958
+ /** Optional error message; populated on non-zero `err_code`. */
910
959
  err_message: string;
911
960
  }
912
961
 
913
962
  /**
914
- * TMissionClaimRewardResult describes the response of call to _smartico.api.requestMissionClaimReward(mission_id, ach_completed_id) method
963
+ * Response of `_smartico.api.requestMissionClaimReward(mission_id, ach_completed_id)`.
964
+ *
965
+ * See `requestMissionClaimReward` TSDoc for the full table of `err_code`
966
+ * values, preconditions, side effects, and recommended UI handling.
915
967
  */
916
968
  export interface TMissionClaimRewardResult {
917
- /** Error code that represents outcome of the claim request. Successful claim reward in case err_code is 0 */
969
+ /** Error code. `0` = success (rewards credited). See `requestMissionClaimReward` TSDoc for the full table. */
918
970
  err_code: number;
919
- /** Optional error message */
971
+ /** Optional error message; populated on non-zero `err_code`. */
920
972
  err_message: string;
921
973
  }
922
974
 
923
975
  export interface TTournamentRegistrationResult {
924
- /** Error code that represents outcome of the tournament registration request. Successful registration in case err_code is 0 */
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. */
925
981
  err_code: TournamentRegistrationError;
926
- /** Optional error message */
982
+ /** Optional error message. Present only on non-zero `err_code`;
983
+ * may be empty even then. */
927
984
  err_message: string;
928
985
  }
929
986
 
930
987
  export interface TBuyStoreItemResult {
931
- /** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0
932
- *
933
- * Example for error handling:
934
- * ```javascript
935
- * SmarticoAPI.buyStoreItem(item_id).then(res => {
936
- * if (res.err_code !== 0) {
937
- * // YOUR LOGIC HERE, you can use res.err_message, but it's optional and not always present
938
- * }
939
- * });
940
- * ```
941
- */
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. */
942
991
  err_code: BuyStoreItemErrorCode;
943
- /** Optional error message */
992
+ /** Optional server-side error message. Present only on non-zero
993
+ * `err_code`; may be empty even then. */
944
994
  err_message: string;
945
995
  }
946
996
 
@@ -1033,10 +1083,18 @@ export interface LeaderBoardUserT {
1033
1083
  is_me: boolean;
1034
1084
  }
1035
1085
 
1086
+ /**
1087
+ * UserLevelExtraCountersT exposes the user's current values for the two
1088
+ * label-defined sliding-window level counters. Returned by
1089
+ * `_smartico.api.getUserLevelExtraCounters()`. Both fields are
1090
+ * `undefined` on points-only labels.
1091
+ */
1036
1092
  export interface UserLevelExtraCountersT {
1037
- /** The counter of 1st metric used to reach the level. */
1093
+ /** Current value of the user's first level counter. Operator-defined
1094
+ * semantics per label. `undefined` on points-only labels. */
1038
1095
  level_counter_1?: number;
1039
- /** The counter of 2nd metric used to reach the level. */
1096
+ /** Current value of the user's second level counter. Operator-defined
1097
+ * semantics per label. `undefined` on points-only labels. */
1040
1098
  level_counter_2?: number;
1041
1099
  }
1042
1100