@smartico/public-api 0.0.356 → 0.0.358

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 (47) hide show
  1. package/README.md +33 -8
  2. package/dist/WSAPI/WSAPI.d.ts +50 -45
  3. package/dist/index.js +49 -44
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.modern.mjs +49 -44
  6. package/dist/index.modern.mjs.map +1 -1
  7. package/docs/api/README.md +58 -3
  8. package/docs/api/classes/WSAPI.md +43 -41
  9. package/docs/api/enums/AchievementStatus.md +49 -0
  10. package/docs/api/enums/AchievementTaskType.md +13 -0
  11. package/docs/api/enums/AchievementType.md +13 -0
  12. package/docs/api/enums/ActivityTypeLimited.md +115 -0
  13. package/docs/api/enums/BadgesTimeLimitStates.md +49 -0
  14. package/docs/api/enums/InboxMessageType.md +55 -0
  15. package/docs/api/enums/InboxReadStatus.md +13 -0
  16. package/docs/api/enums/OpenLinksType.md +13 -0
  17. package/docs/api/enums/ScheduledMissionType.md +19 -0
  18. package/docs/api/enums/StoreItemPurchaseType.md +19 -0
  19. package/docs/api/enums/StoreItemType.md +37 -0
  20. package/docs/api/enums/StoreItemTypeName.md +43 -0
  21. package/docs/api/enums/TournamentInstanceStatus.md +43 -0
  22. package/docs/api/enums/TournamentRegistrationError.md +55 -0
  23. package/docs/api/enums/TournamentType.md +19 -0
  24. package/docs/api/interfaces/AchievementTaskPublicMeta.md +35 -0
  25. package/docs/api/interfaces/AffectsProgress.md +25 -0
  26. package/docs/api/interfaces/Bonus.md +2 -2
  27. package/docs/api/interfaces/BonusMetaMap-1.md +9 -0
  28. package/docs/api/interfaces/BonusMetaMap.md +0 -2
  29. package/docs/api/interfaces/BonusTemplateMetaMap-1.md +33 -0
  30. package/docs/api/interfaces/BonusTemplateMetaMap.md +0 -8
  31. package/docs/api/interfaces/GetCustomSectionsResponse.md +67 -0
  32. package/docs/api/interfaces/GetRelatedAchTourResponse.md +69 -0
  33. package/docs/api/interfaces/InboxMessageBody.md +2 -2
  34. package/docs/api/interfaces/StoreItem.md +2 -2
  35. package/docs/api/interfaces/StoreItemPublicMeta.md +127 -0
  36. package/docs/api/interfaces/TBonus.md +2 -2
  37. package/docs/api/interfaces/TMissionOrBadge.md +1 -1
  38. package/docs/api/interfaces/TTournamentRegistrationResult.md +1 -1
  39. package/docs/api/interfaces/Tournament.md +3 -3
  40. package/docs/api/interfaces/TournamentPrize.md +1 -1
  41. package/docs/api/interfaces/TournamentPublicMeta.md +115 -0
  42. package/docs/api/interfaces/UserAchievement.md +4 -4
  43. package/docs/api/interfaces/UserAchievementTask.md +3 -3
  44. package/package.json +1 -1
  45. package/src/SmarticoAPI.ts +1 -1
  46. package/src/WSAPI/WSAPI.ts +55 -49
  47. package/tsconfig.json +23 -1
package/README.md CHANGED
@@ -122,19 +122,44 @@ npm install --save @smartico/public-api
122
122
 
123
123
  ### Usage
124
124
 
125
+ `WSAPI` provides a high-level interface on top of `SmarticoAPI`. Create a `SmarticoAPI` instance with a custom `messageSender`, then create `WSAPI` instances bound to specific users:
126
+
125
127
  ```typescript
126
- import { SmarticoAPI } from '@smartico/public-api';
128
+ import { SmarticoAPI, WSAPI } from '@smartico/public-api';
129
+
130
+ // publicApiUrl is resolved automatically by SmarticoAPI from your label key
131
+ const messageSender = async (message: any, publicApiUrl?: string): Promise<any> => {
132
+ const res = await fetch(publicApiUrl, {
133
+ method: 'POST',
134
+ headers: { 'Content-Type': 'application/json' },
135
+ body: JSON.stringify(message),
136
+ });
137
+ return res.ok ? res.json() : '';
138
+ };
139
+
140
+ const smarticoApi = new SmarticoAPI('your-label-api-key', 'your-brand-key', messageSender);
141
+
142
+ const userExtId = 'John1984';
143
+ const api = new WSAPI(smarticoApi, userExtId);
144
+
145
+ const missions = await api.getMissions();
146
+ missions.forEach(m => {
147
+ console.log(m.name, m.is_completed);
148
+ });
127
149
 
128
- const SAPI = new SmarticoAPI( 'your-label-api-key', 'your-brand-key', 'your-message-sender', { logger: console });
150
+ const optInResult = await api.requestMissionOptIn(missions[0].id);
151
+ console.log('Opt-in:', optInResult.err_code);
152
+ ```
129
153
 
130
- const userExtId = 'John1984'
131
-
132
- const response = await SAPI.miniGamesGetTemplates(userExtId);
154
+ For the full list of available methods, see the [WSAPI documentation](docs/api/classes/WSAPI.md).
133
155
 
134
- response.templates.forEach( t => {
135
- console.log(t.saw_template_ui_definition.name)
136
- }
156
+ You can also use `SmarticoAPI` directly for low-level protocol access:
137
157
 
158
+ ```typescript
159
+ const response = await smarticoApi.miniGamesGetTemplates(userExtId);
160
+ response.templates.forEach(t => {
161
+ console.log(t.saw_template_ui_definition.name);
162
+ });
138
163
  ```
139
164
 
140
165
  ## Backend usage (http-protocol)
@@ -21,7 +21,7 @@ export declare class WSAPI {
21
21
  * Pay attention that this method is synchronous and returns the user profile object immediately, not a promise.
22
22
  * **Example**:
23
23
  * ```
24
- * var p = _smartico.api.getUserProfile);
24
+ * var p = _smartico.api.getUserProfile();
25
25
  * console.log(p);
26
26
  * ```
27
27
  * **Visitor mode: not supported**
@@ -48,7 +48,7 @@ export declare class WSAPI {
48
48
  * **Visitor mode: not supported**
49
49
  */
50
50
  checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]>;
51
- /** Returns all the levels available the current user
51
+ /** Returns all the levels available to the current user
52
52
  * **Example**:
53
53
  * ```
54
54
  * _smartico.api.getLevels().then((result) => {
@@ -100,14 +100,14 @@ export declare class WSAPI {
100
100
  onUpdate?: (data: TMissionOrBadge[]) => void;
101
101
  }): Promise<TMissionOrBadge[]>;
102
102
  /**
103
- * Returns all the badges available the current user
103
+ * Returns all the badges available to the current user
104
104
  *
105
105
  * **Visitor mode: not supported**
106
106
  */
107
107
  getBadges(): Promise<TMissionOrBadge[]>;
108
108
  /**
109
109
  * Returns all the bonuses for the current user
110
- * The returned bonuss are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
110
+ * The returned bonuses are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
111
111
  * Note that each time you call getBonuses with a new onUpdate callback, the old one will be overwritten by the new one.
112
112
  * The onUpdate callback will be called on bonus claimed and the updated bonuses will be passed to it.
113
113
  *
@@ -127,7 +127,7 @@ export declare class WSAPI {
127
127
  claimBonus(bonus_id: number): Promise<TClaimBonusResult>;
128
128
  /**
129
129
  * Returns the extra counters for the current user level.
130
- * These are counters that are configured for each Smartico client separatly by request.
130
+ * These are counters that are configured for each Smartico client separately by request.
131
131
  * For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
132
132
  *
133
133
  * **Example**:
@@ -142,7 +142,7 @@ export declare class WSAPI {
142
142
  getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
143
143
  /**
144
144
  *
145
- * Returns all the store items available the current user
145
+ * Returns all the store items available to the current user
146
146
  * The returned store items are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
147
147
  * Note that each time you call getStoreItems with a new onUpdate callback, the old one will be overwritten by the new one.
148
148
  * The onUpdate callback will be called on purchase of the store item.
@@ -259,7 +259,7 @@ export declare class WSAPI {
259
259
  /**
260
260
  * Returns the list of mini-games configured for the current user (not filtered by spin availability or Widget visibility).
261
261
  * The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
262
- * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
262
+ * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
263
263
  *
264
264
  * **Example**:
265
265
  * ```
@@ -302,7 +302,7 @@ export declare class WSAPI {
302
302
  /**
303
303
  * Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
304
304
  * After playMiniGame is called, you can call getMiniGames to get the list of mini-games.The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call playMiniGame with a new onUpdate callback, the old one will be overwritten by the new one.
305
- * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
305
+ * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
306
306
  *
307
307
  * **Example**:
308
308
  * ```
@@ -329,7 +329,7 @@ export declare class WSAPI {
329
329
  /**
330
330
  * Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes
331
331
  * After playMiniGameBatch is called, you can call getMiniGames to get the list of mini-games. The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call playMiniGameBatch with a new onUpdate callback, the old one will be overwritten by the new one.
332
- * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
332
+ * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
333
333
  *
334
334
  * **Example**:
335
335
  * ```
@@ -340,7 +340,7 @@ export declare class WSAPI {
340
340
  * **Visitor mode: not supported**
341
341
  */
342
342
  playMiniGameBatch(template_id: number, spin_count: number, { onUpdate }?: {
343
- onUpdate?: (data: TMissionOrBadge[]) => void;
343
+ onUpdate?: (data: TMiniGameTemplate[]) => void;
344
344
  }): Promise<TMiniGamePlayBatchResult[]>;
345
345
  /**
346
346
  * Requests an opt-in for the specified mission_id. Returns the err_code.
@@ -376,7 +376,7 @@ export declare class WSAPI {
376
376
  onUpdate?: (data: TTournament[]) => void;
377
377
  }): Promise<TTournament[]>;
378
378
  /**
379
- * Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
379
+ * Returns detailed information for a specific tournament instance; the response includes tournament info and the leaderboard of players
380
380
  *
381
381
  * **Example**:
382
382
  * ```
@@ -431,7 +431,7 @@ export declare class WSAPI {
431
431
  * An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
432
432
  * An indicator "read_status" can be passed to get only messages marked as read or unread.
433
433
  * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
434
- * This functions return list of messages without the body of the message.
434
+ * This function returns a list of messages without the body of each message.
435
435
  * To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
436
436
  * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
437
437
  * The "onUpdate" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function.
@@ -470,7 +470,7 @@ export declare class WSAPI {
470
470
  */
471
471
  markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction>;
472
472
  /**
473
- * Requests to mark all inbox messages as rea
473
+ * Requests to mark all inbox messages as read
474
474
  *
475
475
  * **Visitor mode: not supported**
476
476
  */
@@ -529,7 +529,7 @@ export declare class WSAPI {
529
529
  * ```
530
530
  * _smartico.api.reportClickEvent({
531
531
  * engagement_uid: 'abc123-def456',
532
- * activityType: 31 // Inbox,
532
+ * activityType: 31 // Inbox
533
533
  * action: 'dp:gf_missions'
534
534
  * });
535
535
  * ```
@@ -604,7 +604,7 @@ export declare class WSAPI {
604
604
  *
605
605
  * **Example**:
606
606
  * ```
607
- * _smartico.api.getGamePickActiveRounds({
607
+ * _smartico.api.gamePickGetActiveRounds({
608
608
  * saw_template_id: 1083,
609
609
  * }).then((result) => {
610
610
  * console.log(result.data); // GamePickRound[]
@@ -616,7 +616,7 @@ export declare class WSAPI {
616
616
  *
617
617
  * **Visitor mode: not supported**
618
618
  */
619
- getGamePickActiveRounds(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickRound[]>>;
619
+ gamePickGetActiveRounds(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickRound[]>>;
620
620
  /**
621
621
  * Returns a single active round for the specified MatchX or Quiz game.
622
622
  * The round includes full event details with the current user's selections.
@@ -626,12 +626,12 @@ export declare class WSAPI {
626
626
  *
627
627
  * **Response** `GamesApiResponse<GamePickRound>`:
628
628
  * - `errCode` - 0 on success
629
- * - `data` - Single round object with the same structure as in `getGamePickActiveRounds`,
629
+ * - `data` - Single round object with the same structure as in `gamePickGetActiveRounds`,
630
630
  * including `events[]` with full event details, user selections, and resolution info
631
631
  *
632
632
  * **Example**:
633
633
  * ```
634
- * _smartico.api.getGamePickActiveRound({
634
+ * _smartico.api.gamePickGetActiveRound({
635
635
  * saw_template_id: 1083,
636
636
  * round_id: 31652,
637
637
  * }).then((result) => {
@@ -642,7 +642,7 @@ export declare class WSAPI {
642
642
  *
643
643
  * **Visitor mode: not supported**
644
644
  */
645
- getGamePickActiveRound(props: GamePickRoundRequestParams): Promise<GamesApiResponse<GamePickRound>>;
645
+ gamePickGetActiveRound(props: GamePickRoundRequestParams): Promise<GamesApiResponse<GamePickRound>>;
646
646
  /**
647
647
  * Returns the history of all rounds (including resolved ones) for the specified MatchX or Quiz game.
648
648
  * Each round contains full event details with results and the current user's predictions.
@@ -652,12 +652,12 @@ export declare class WSAPI {
652
652
  * **Response** `GamesApiResponse<GamePickRound[]>`:
653
653
  * - `errCode` - 0 on success
654
654
  * - `data` - Array of rounds ordered by `round_row_id` descending (newest first).
655
- * Each round has the same structure as in `getGamePickActiveRounds`, including resolved events
655
+ * Each round has the same structure as in `gamePickGetActiveRounds`, including resolved events
656
656
  * with `resolution_type_id` (0=None, 2=Lost, 3=PartialWin, 4=FullWin) and `resolution_score`
657
657
  *
658
658
  * **Example**:
659
659
  * ```
660
- * _smartico.api.getGamePickHistory({
660
+ * _smartico.api.gamePickGetHistory({
661
661
  * saw_template_id: 1083,
662
662
  * }).then((result) => {
663
663
  * result.data.forEach(round => {
@@ -668,7 +668,7 @@ export declare class WSAPI {
668
668
  *
669
669
  * **Visitor mode: not supported**
670
670
  */
671
- getGamePickHistory(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickRound[]>>;
671
+ gamePickGetHistory(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickRound[]>>;
672
672
  /**
673
673
  * Returns the leaderboard for a specific round within a MatchX or Quiz game.
674
674
  * Use `round_id = -1` (AllRoundsGameBoardID) to get the season/overall leaderboard across all rounds.
@@ -690,7 +690,7 @@ export declare class WSAPI {
690
690
  *
691
691
  * **Example**:
692
692
  * ```
693
- * _smartico.api.getGamePickBoard({
693
+ * _smartico.api.gamePickGetBoard({
694
694
  * saw_template_id: 1083,
695
695
  * round_id: 31652,
696
696
  * }).then((result) => {
@@ -701,7 +701,7 @@ export declare class WSAPI {
701
701
  *
702
702
  * **Visitor mode: not supported**
703
703
  */
704
- getGamePickBoard(props: GamePickRoundRequestParams): Promise<GamesApiResponse<GamePickRoundBoard>>;
704
+ gamePickGetBoard(props: GamePickRoundRequestParams): Promise<GamesApiResponse<GamePickRoundBoard>>;
705
705
  /**
706
706
  * Submits score predictions for a round in a MatchX game.
707
707
  * Sends the round object with user selections for all events at once.
@@ -710,7 +710,7 @@ export declare class WSAPI {
710
710
  * Predictions can be edited until each match starts (if `allow_edit_answers` is enabled on the round).
711
711
  *
712
712
  * @param props.saw_template_id - The ID of the MatchX game template
713
- * @param props.round - Round object containing `round_id` and `events[]`. Typically obtained from `getGamePickActiveRound`
713
+ * @param props.round - Round object containing `round_id` and `events[]`. Typically obtained from `gamePickGetActiveRound`
714
714
  * and modified with user predictions. Each event needs: `gp_event_id`, `team1_user_selection`, `team2_user_selection`
715
715
  *
716
716
  * **Response** `GamesApiResponse<GamePickRound>`:
@@ -720,7 +720,7 @@ export declare class WSAPI {
720
720
  *
721
721
  * **Example**:
722
722
  * ```
723
- * _smartico.api.getGamePickActiveRound({
723
+ * _smartico.api.gamePickGetActiveRound({
724
724
  * saw_template_id: 1190,
725
725
  * round_id: 38665,
726
726
  * }).then((roundData) => {
@@ -730,7 +730,7 @@ export declare class WSAPI {
730
730
  * team1_user_selection: 1,
731
731
  * team2_user_selection: 0,
732
732
  * }));
733
- * _smartico.api.submitGamePickSelection({
733
+ * _smartico.api.gamePickSubmitSelection({
734
734
  * saw_template_id: 1190,
735
735
  * round: round,
736
736
  * }).then((result) => {
@@ -741,7 +741,7 @@ export declare class WSAPI {
741
741
  *
742
742
  * **Visitor mode: not supported**
743
743
  */
744
- submitGamePickSelection(props: GamePickRequestParams & {
744
+ gamePickSubmitSelection(props: GamePickRequestParams & {
745
745
  round: Partial<GamePickRound>;
746
746
  }): Promise<GamesApiResponse<GamePickRound>>;
747
747
  /**
@@ -752,7 +752,7 @@ export declare class WSAPI {
752
752
  * Answers can be edited until each match starts (if `allow_edit_answers` is enabled on the round).
753
753
  *
754
754
  * @param props.saw_template_id - The ID of the Quiz game template
755
- * @param props.round - Round object containing `round_id` and `events[]`. Typically obtained from `getGamePickActiveRound`
755
+ * @param props.round - Round object containing `round_id` and `events[]`. Typically obtained from `gamePickGetActiveRound`
756
756
  * and modified with user answers. Each event needs: `gp_event_id`, `user_selection`
757
757
  *
758
758
  * **Response** `GamesApiResponse<GamePickRound>`:
@@ -762,7 +762,7 @@ export declare class WSAPI {
762
762
  *
763
763
  * **Example**:
764
764
  * ```
765
- * _smartico.api.getGamePickActiveRound({
765
+ * _smartico.api.gamePickGetActiveRound({
766
766
  * saw_template_id: 1183,
767
767
  * round_id: 37974,
768
768
  * }).then((roundData) => {
@@ -771,7 +771,7 @@ export declare class WSAPI {
771
771
  * gp_event_id: e.gp_event_id,
772
772
  * user_selection: 'x',
773
773
  * }));
774
- * _smartico.api.submitGamePickSelectionQuiz({
774
+ * _smartico.api.gamePickSubmitSelectionQuiz({
775
775
  * saw_template_id: 1183,
776
776
  * round: round,
777
777
  * }).then((result) => {
@@ -782,7 +782,7 @@ export declare class WSAPI {
782
782
  *
783
783
  * **Visitor mode: not supported**
784
784
  */
785
- submitGamePickSelectionQuiz(props: GamePickRequestParams & {
785
+ gamePickSubmitSelectionQuiz(props: GamePickRequestParams & {
786
786
  round: Partial<GamePickRound>;
787
787
  }): Promise<GamesApiResponse<GamePickRound>>;
788
788
  /**
@@ -807,7 +807,7 @@ export declare class WSAPI {
807
807
  *
808
808
  * **Example**:
809
809
  * ```
810
- * _smartico.api.getGamePickUserInfo({
810
+ * _smartico.api.gamePickGetUserInfo({
811
811
  * saw_template_id: 1083,
812
812
  * }).then((result) => {
813
813
  * console.log(result.data.public_username, result.data.ach_points_balance);
@@ -816,7 +816,7 @@ export declare class WSAPI {
816
816
  *
817
817
  * **Visitor mode: not supported**
818
818
  */
819
- getGamePickUserInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickUserInfo>>;
819
+ gamePickGetUserInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickUserInfo>>;
820
820
  /**
821
821
  * Returns the game configuration and the list of all rounds for the specified MatchX or Quiz game.
822
822
  * Includes the SAW template definition, label settings, and round metadata (without events).
@@ -840,7 +840,7 @@ export declare class WSAPI {
840
840
  *
841
841
  * **Example**:
842
842
  * ```
843
- * _smartico.api.getGamePickGameInfo({
843
+ * _smartico.api.gamePickGetGameInfo({
844
844
  * saw_template_id: 1189,
845
845
  * }).then((result) => {
846
846
  * console.log(result.data.sawTemplate.saw_template_ui_definition.name);
@@ -851,11 +851,11 @@ export declare class WSAPI {
851
851
  *
852
852
  * **Visitor mode: not supported**
853
853
  */
854
- getGamePickGameInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickGameInfo>>;
854
+ gamePickGetGameInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickGameInfo>>;
855
855
  /**
856
856
  * Returns round data with events and picks for a specific user (identified by their internal user ID).
857
857
  * Useful for viewing another user's predictions from the leaderboard.
858
- * The `int_user_id` can be obtained from the `getGamePickBoard` response (`users[].int_user_id`).
858
+ * The `int_user_id` can be obtained from the `gamePickGetBoard` response (`users[].int_user_id`).
859
859
  *
860
860
  * @param props.saw_template_id - The ID of the MatchX or Quiz game template
861
861
  * @param props.round_id - The round to get info for
@@ -864,13 +864,13 @@ export declare class WSAPI {
864
864
  * **Response** `GamesApiResponse<GamePickRound>`:
865
865
  * - `errCode` - 0 on success
866
866
  * - `data` - Round object with the target user's selections.
867
- * Same structure as `getGamePickActiveRound`, but `user_selection`/`team1_user_selection`/`team2_user_selection`
867
+ * Same structure as `gamePickGetActiveRound`, but `user_selection`/`team1_user_selection`/`team2_user_selection`
868
868
  * fields on events reflect the specified user's picks instead of the current user's.
869
869
  * Events also include `resolution_type_id` (0=None, 2=Lost, 3=PartialWin, 4=FullWin) showing how each prediction was scored
870
870
  *
871
871
  * **Example**:
872
872
  * ```
873
- * _smartico.api.getGamePickRoundInfoForUser({
873
+ * _smartico.api.gamePickGetRoundInfoForUser({
874
874
  * saw_template_id: 1083,
875
875
  * round_id: 31652,
876
876
  * int_user_id: 65653810,
@@ -883,7 +883,7 @@ export declare class WSAPI {
883
883
  *
884
884
  * **Visitor mode: not supported**
885
885
  */
886
- getGamePickRoundInfoForUser(props: GamePickRoundRequestParams & {
886
+ gamePickGetRoundInfoForUser(props: GamePickRoundRequestParams & {
887
887
  int_user_id: number;
888
888
  }): Promise<GamesApiResponse<GamePickRound>>;
889
889
  private updateOnSpin;
@@ -899,7 +899,7 @@ export declare class WSAPI {
899
899
  private notifyActivityLogUpdate;
900
900
  private updateEntity;
901
901
  private jackpotClearCache;
902
- /** Returns list of Jackpots that are active in the systen and matching to the filter definition.
902
+ /** Returns list of Jackpots that are active in the system and matching to the filter definition.
903
903
  * If filter is not provided, all active jackpots will be returned.
904
904
  * Filter can be used to get jackpots related to specific game or specific jackpot template.
905
905
  * You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users
@@ -957,7 +957,9 @@ export declare class WSAPI {
957
957
  jp_template_id: number;
958
958
  }): Promise<JackpotsOptoutResponse>;
959
959
  /**
960
- * Returns the winners of the jackpot with the specified jp_template_id.
960
+ * Returns jackpot winners for the given `jp_template_id` (paginated on the server).
961
+ * Default page size on the wire is 20; use `limit`, `offset`, and repeated calls to load more.
962
+ * The full protocol response also includes `has_more`; this method returns only the `winners` array.
961
963
  *
962
964
  * **Example**:
963
965
  * ```
@@ -970,6 +972,9 @@ export declare class WSAPI {
970
972
  *
971
973
  * **Visitor mode: not supported**
972
974
  *
975
+ * @param params.jp_template_id - Jackpot template id (required; throws if missing)
976
+ * @param params.limit - Page size (server default 20 when omitted)
977
+ * @param params.offset - Offset into the winner list
973
978
  */
974
979
  getJackpotWinners({ limit, offset, jp_template_id, }: {
975
980
  limit?: number;
@@ -1073,7 +1078,7 @@ export declare class WSAPI {
1073
1078
  * **Example**:
1074
1079
  *
1075
1080
  * ```javascript
1076
- * _smartico.api.getRaffleDrawRunHistory({raffle_id:156, draw_id: 432}).then((result) => {
1081
+ * _smartico.api.getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
1077
1082
  * console.log(result);
1078
1083
  * });
1079
1084
  * ```
@@ -1081,7 +1086,7 @@ export declare class WSAPI {
1081
1086
  * **Example in the Visitor mode**:
1082
1087
  *
1083
1088
  * ```javascript
1084
- * _smartico.vapi('EN').getRaffleDrawRunHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
1089
+ * _smartico.vapi('EN').getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
1085
1090
  * console.log(result);
1086
1091
  * });
1087
1092
  * ```
@@ -1092,7 +1097,7 @@ export declare class WSAPI {
1092
1097
  draw_id?: number;
1093
1098
  }): Promise<TRaffleDrawRun[]>;
1094
1099
  /**
1095
- * Returns error code, and error Message after calling the function, error message 0 - means that the request was successful
1100
+ * Returns `err_code` and `err_message` after the call; `err_code` 0 means the request succeeded.
1096
1101
  *
1097
1102
  *
1098
1103
  * **Example**: