@smartico/public-api 0.0.357 → 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.
- package/dist/WSAPI/WSAPI.d.ts +24 -19
- package/dist/index.js +23 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +23 -18
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +58 -3
- package/docs/api/classes/WSAPI.md +24 -22
- package/docs/api/enums/AchievementStatus.md +49 -0
- package/docs/api/enums/AchievementTaskType.md +13 -0
- package/docs/api/enums/AchievementType.md +13 -0
- package/docs/api/enums/ActivityTypeLimited.md +115 -0
- package/docs/api/enums/BadgesTimeLimitStates.md +49 -0
- package/docs/api/enums/InboxMessageType.md +55 -0
- package/docs/api/enums/InboxReadStatus.md +13 -0
- package/docs/api/enums/OpenLinksType.md +13 -0
- package/docs/api/enums/ScheduledMissionType.md +19 -0
- package/docs/api/enums/StoreItemPurchaseType.md +19 -0
- package/docs/api/enums/StoreItemType.md +37 -0
- package/docs/api/enums/StoreItemTypeName.md +43 -0
- package/docs/api/enums/TournamentInstanceStatus.md +43 -0
- package/docs/api/enums/TournamentRegistrationError.md +55 -0
- package/docs/api/enums/TournamentType.md +19 -0
- package/docs/api/interfaces/AchievementTaskPublicMeta.md +35 -0
- package/docs/api/interfaces/AffectsProgress.md +25 -0
- package/docs/api/interfaces/Bonus.md +2 -2
- package/docs/api/interfaces/BonusMetaMap-1.md +9 -0
- package/docs/api/interfaces/BonusMetaMap.md +0 -2
- package/docs/api/interfaces/BonusTemplateMetaMap-1.md +33 -0
- package/docs/api/interfaces/BonusTemplateMetaMap.md +0 -8
- package/docs/api/interfaces/GetCustomSectionsResponse.md +67 -0
- package/docs/api/interfaces/GetRelatedAchTourResponse.md +69 -0
- package/docs/api/interfaces/InboxMessageBody.md +2 -2
- package/docs/api/interfaces/StoreItem.md +2 -2
- package/docs/api/interfaces/StoreItemPublicMeta.md +127 -0
- package/docs/api/interfaces/TBonus.md +2 -2
- package/docs/api/interfaces/TMissionOrBadge.md +1 -1
- package/docs/api/interfaces/TTournamentRegistrationResult.md +1 -1
- package/docs/api/interfaces/Tournament.md +3 -3
- package/docs/api/interfaces/TournamentPrize.md +1 -1
- package/docs/api/interfaces/TournamentPublicMeta.md +115 -0
- package/docs/api/interfaces/UserAchievement.md +4 -4
- package/docs/api/interfaces/UserAchievementTask.md +3 -3
- package/package.json +1 -1
- package/src/SmarticoAPI.ts +1 -1
- package/src/WSAPI/WSAPI.ts +29 -23
- package/tsconfig.json +23 -1
package/dist/index.modern.mjs
CHANGED
|
@@ -2260,7 +2260,7 @@ class WSAPI {
|
|
|
2260
2260
|
* Pay attention that this method is synchronous and returns the user profile object immediately, not a promise.
|
|
2261
2261
|
* **Example**:
|
|
2262
2262
|
* ```
|
|
2263
|
-
* var p = _smartico.api.getUserProfile);
|
|
2263
|
+
* var p = _smartico.api.getUserProfile();
|
|
2264
2264
|
* console.log(p);
|
|
2265
2265
|
* ```
|
|
2266
2266
|
* **Visitor mode: not supported**
|
|
@@ -2304,7 +2304,7 @@ class WSAPI {
|
|
|
2304
2304
|
async checkSegmentListMatch(segment_ids) {
|
|
2305
2305
|
return await this.api.coreCheckSegments(this.userExtId, Array.isArray(segment_ids) ? segment_ids : [segment_ids]);
|
|
2306
2306
|
}
|
|
2307
|
-
/** Returns all the levels available the current user
|
|
2307
|
+
/** Returns all the levels available to the current user
|
|
2308
2308
|
* **Example**:
|
|
2309
2309
|
* ```
|
|
2310
2310
|
* _smartico.api.getLevels().then((result) => {
|
|
@@ -2365,7 +2365,7 @@ class WSAPI {
|
|
|
2365
2365
|
return OCache.use(onUpdateContextKey.Missions, ECacheContext.WSAPI, () => this.api.missionsGetItemsT(this.userExtId), CACHE_DATA_SEC);
|
|
2366
2366
|
}
|
|
2367
2367
|
/**
|
|
2368
|
-
* Returns all the badges available the current user
|
|
2368
|
+
* Returns all the badges available to the current user
|
|
2369
2369
|
*
|
|
2370
2370
|
* **Visitor mode: not supported**
|
|
2371
2371
|
*/
|
|
@@ -2374,7 +2374,7 @@ class WSAPI {
|
|
|
2374
2374
|
}
|
|
2375
2375
|
/**
|
|
2376
2376
|
* Returns all the bonuses for the current user
|
|
2377
|
-
* The returned
|
|
2377
|
+
* The returned bonuses are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
2378
2378
|
* Note that each time you call getBonuses with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
2379
2379
|
* The onUpdate callback will be called on bonus claimed and the updated bonuses will be passed to it.
|
|
2380
2380
|
*
|
|
@@ -2407,7 +2407,7 @@ class WSAPI {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
/**
|
|
2409
2409
|
* Returns the extra counters for the current user level.
|
|
2410
|
-
* These are counters that are configured for each Smartico client
|
|
2410
|
+
* These are counters that are configured for each Smartico client separately by request.
|
|
2411
2411
|
* For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
|
|
2412
2412
|
*
|
|
2413
2413
|
* **Example**:
|
|
@@ -2424,7 +2424,7 @@ class WSAPI {
|
|
|
2424
2424
|
}
|
|
2425
2425
|
/**
|
|
2426
2426
|
*
|
|
2427
|
-
* Returns all the store items available the current user
|
|
2427
|
+
* Returns all the store items available to the current user
|
|
2428
2428
|
* The returned store items are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
2429
2429
|
* Note that each time you call getStoreItems with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
2430
2430
|
* The onUpdate callback will be called on purchase of the store item.
|
|
@@ -2564,7 +2564,7 @@ class WSAPI {
|
|
|
2564
2564
|
/**
|
|
2565
2565
|
* Returns the list of mini-games configured for the current user (not filtered by spin availability or Widget visibility).
|
|
2566
2566
|
* 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.
|
|
2567
|
-
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or
|
|
2567
|
+
* 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.
|
|
2568
2568
|
*
|
|
2569
2569
|
* **Example**:
|
|
2570
2570
|
* ```
|
|
@@ -2614,7 +2614,7 @@ class WSAPI {
|
|
|
2614
2614
|
/**
|
|
2615
2615
|
* Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
2616
2616
|
* 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.
|
|
2617
|
-
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or
|
|
2617
|
+
* 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.
|
|
2618
2618
|
*
|
|
2619
2619
|
* **Example**:
|
|
2620
2620
|
* ```
|
|
@@ -2655,7 +2655,7 @@ class WSAPI {
|
|
|
2655
2655
|
/**
|
|
2656
2656
|
* Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes
|
|
2657
2657
|
* 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.
|
|
2658
|
-
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or
|
|
2658
|
+
* 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.
|
|
2659
2659
|
*
|
|
2660
2660
|
* **Example**:
|
|
2661
2661
|
* ```
|
|
@@ -2736,7 +2736,7 @@ class WSAPI {
|
|
|
2736
2736
|
return OCache.use(onUpdateContextKey.TournamentList, ECacheContext.WSAPI, () => this.api.tournamentsGetLobbyT(this.userExtId), CACHE_DATA_SEC);
|
|
2737
2737
|
}
|
|
2738
2738
|
/**
|
|
2739
|
-
* Returns
|
|
2739
|
+
* Returns detailed information for a specific tournament instance; the response includes tournament info and the leaderboard of players
|
|
2740
2740
|
*
|
|
2741
2741
|
* **Example**:
|
|
2742
2742
|
* ```
|
|
@@ -2802,7 +2802,7 @@ class WSAPI {
|
|
|
2802
2802
|
* An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
2803
2803
|
* An indicator "read_status" can be passed to get only messages marked as read or unread.
|
|
2804
2804
|
* You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
2805
|
-
* This
|
|
2805
|
+
* This function returns a list of messages without the body of each message.
|
|
2806
2806
|
* 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.
|
|
2807
2807
|
* All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
2808
2808
|
* 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.
|
|
@@ -2859,7 +2859,7 @@ class WSAPI {
|
|
|
2859
2859
|
};
|
|
2860
2860
|
}
|
|
2861
2861
|
/**
|
|
2862
|
-
* Requests to mark all inbox messages as
|
|
2862
|
+
* Requests to mark all inbox messages as read
|
|
2863
2863
|
*
|
|
2864
2864
|
* **Visitor mode: not supported**
|
|
2865
2865
|
*/
|
|
@@ -2949,7 +2949,7 @@ class WSAPI {
|
|
|
2949
2949
|
* ```
|
|
2950
2950
|
* _smartico.api.reportClickEvent({
|
|
2951
2951
|
* engagement_uid: 'abc123-def456',
|
|
2952
|
-
* activityType: 31 // Inbox
|
|
2952
|
+
* activityType: 31 // Inbox
|
|
2953
2953
|
* action: 'dp:gf_missions'
|
|
2954
2954
|
* });
|
|
2955
2955
|
* ```
|
|
@@ -3431,7 +3431,7 @@ class WSAPI {
|
|
|
3431
3431
|
OCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Pots);
|
|
3432
3432
|
OCache.clear(ECacheContext.WSAPI, onUpdateContextKey.JackpotWinners);
|
|
3433
3433
|
}
|
|
3434
|
-
/** Returns list of Jackpots that are active in the
|
|
3434
|
+
/** Returns list of Jackpots that are active in the system and matching to the filter definition.
|
|
3435
3435
|
* If filter is not provided, all active jackpots will be returned.
|
|
3436
3436
|
* Filter can be used to get jackpots related to specific game or specific jackpot template.
|
|
3437
3437
|
* 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
|
|
@@ -3526,7 +3526,9 @@ class WSAPI {
|
|
|
3526
3526
|
return result;
|
|
3527
3527
|
}
|
|
3528
3528
|
/**
|
|
3529
|
-
* Returns
|
|
3529
|
+
* Returns jackpot winners for the given `jp_template_id` (paginated on the server).
|
|
3530
|
+
* Default page size on the wire is 20; use `limit`, `offset`, and repeated calls to load more.
|
|
3531
|
+
* The full protocol response also includes `has_more`; this method returns only the `winners` array.
|
|
3530
3532
|
*
|
|
3531
3533
|
* **Example**:
|
|
3532
3534
|
* ```
|
|
@@ -3539,6 +3541,9 @@ class WSAPI {
|
|
|
3539
3541
|
*
|
|
3540
3542
|
* **Visitor mode: not supported**
|
|
3541
3543
|
*
|
|
3544
|
+
* @param params.jp_template_id - Jackpot template id (required; throws if missing)
|
|
3545
|
+
* @param params.limit - Page size (server default 20 when omitted)
|
|
3546
|
+
* @param params.offset - Offset into the winner list
|
|
3542
3547
|
*/
|
|
3543
3548
|
async getJackpotWinners({
|
|
3544
3549
|
limit,
|
|
@@ -3659,7 +3664,7 @@ class WSAPI {
|
|
|
3659
3664
|
* **Example**:
|
|
3660
3665
|
*
|
|
3661
3666
|
* ```javascript
|
|
3662
|
-
* _smartico.api.
|
|
3667
|
+
* _smartico.api.getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
|
|
3663
3668
|
* console.log(result);
|
|
3664
3669
|
* });
|
|
3665
3670
|
* ```
|
|
@@ -3667,7 +3672,7 @@ class WSAPI {
|
|
|
3667
3672
|
* **Example in the Visitor mode**:
|
|
3668
3673
|
*
|
|
3669
3674
|
* ```javascript
|
|
3670
|
-
* _smartico.vapi('EN').
|
|
3675
|
+
* _smartico.vapi('EN').getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
|
|
3671
3676
|
* console.log(result);
|
|
3672
3677
|
* });
|
|
3673
3678
|
* ```
|
|
@@ -3681,7 +3686,7 @@ class WSAPI {
|
|
|
3681
3686
|
return drawRunHistoryTransform(res);
|
|
3682
3687
|
}
|
|
3683
3688
|
/**
|
|
3684
|
-
* Returns
|
|
3689
|
+
* Returns `err_code` and `err_message` after the call; `err_code` 0 means the request succeeded.
|
|
3685
3690
|
*
|
|
3686
3691
|
*
|
|
3687
3692
|
* **Example**:
|