@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.
- package/.nvmrc +1 -1
- package/README.md +31 -2
- package/dist/Store/BuyStoreItemErrorCode.d.ts +9 -1
- package/dist/Tournaments/TournamentRegistrationError.d.ts +3 -1
- package/dist/WSAPI/WSAPI.d.ts +13 -1235
- package/dist/WSAPI/WSAPIAvatars.d.ts +78 -0
- package/dist/WSAPI/WSAPIBase.d.ts +71 -0
- package/dist/WSAPI/WSAPIBonuses.d.ts +26 -0
- package/dist/WSAPI/WSAPIClans.d.ts +388 -0
- package/dist/WSAPI/WSAPIGamePick.d.ts +308 -0
- package/dist/WSAPI/WSAPIGeneral.d.ts +30 -0
- package/dist/WSAPI/WSAPIInbox.d.ts +126 -0
- package/dist/WSAPI/WSAPIJackpots.d.ts +109 -0
- package/dist/WSAPI/WSAPILeaderBoard.d.ts +25 -0
- package/dist/WSAPI/WSAPIMiniGames.d.ts +94 -0
- package/dist/WSAPI/WSAPIMissions.d.ts +517 -0
- package/dist/WSAPI/WSAPIRaffles.d.ts +119 -0
- package/dist/WSAPI/WSAPIStore.d.ts +656 -0
- package/dist/WSAPI/WSAPITournaments.d.ts +501 -0
- package/dist/WSAPI/WSAPITypes.d.ts +145 -85
- package/dist/WSAPI/WSAPIUser.d.ts +383 -0
- package/dist/index.js +3818 -1528
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +3180 -981
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +56 -2
- package/docs/api/classes/WSAPIAvatars.md +116 -0
- package/docs/api/classes/WSAPIBonuses.md +50 -0
- package/docs/api/classes/WSAPIClans.md +66 -0
- package/docs/api/classes/WSAPIGamePick.md +181 -0
- package/docs/api/classes/WSAPIGeneral.md +63 -0
- package/docs/api/classes/WSAPIInbox.md +277 -0
- package/docs/api/classes/WSAPIJackpots.md +185 -0
- package/docs/api/classes/WSAPILeaderBoard.md +39 -0
- package/docs/api/classes/WSAPIMiniGames.md +175 -0
- package/docs/api/classes/WSAPIMissions.md +611 -0
- package/docs/api/classes/WSAPIRaffles.md +195 -0
- package/docs/api/classes/WSAPIStore.md +744 -0
- package/docs/api/classes/WSAPITournaments.md +104 -0
- package/docs/api/classes/WSAPIUser.md +200 -0
- package/docs/api/enumerations/AchievementClaimPeriodTypeId.md +13 -0
- package/docs/api/enumerations/BuyStoreItemErrorCode.md +32 -0
- package/docs/api/interfaces/ClanPrizePublicMeta.md +41 -0
- package/docs/api/interfaces/ClanPrizeStructureEntry.md +7 -1
- package/docs/api/interfaces/ClanPublicMeta.md +4 -0
- package/docs/api/interfaces/SAWTemplateUI.md +10 -0
- package/docs/api/interfaces/TAchCategory.md +19 -4
- package/docs/api/interfaces/TBuyStoreItemResult.md +26 -8
- package/docs/api/interfaces/TMissionClaimRewardResult.md +14 -3
- package/docs/api/interfaces/TMissionOptInResult.md +10 -3
- package/docs/api/interfaces/TMissionOrBadge.md +6 -2
- package/docs/api/interfaces/TStoreItem.md +21 -1
- package/docs/api/interfaces/TTournamentDetailed.md +8 -0
- package/docs/api/interfaces/UserAchievement.md +1 -1
- package/docs/ui/clans/UIGuide_getClanInfo.md +153 -0
- package/docs/ui/clans/UIGuide_getClans.md +172 -0
- package/docs/ui/clans/UIGuide_joinClan.md +196 -0
- package/docs/ui/missions/UIGuide_getAchCategories.md +17 -0
- package/docs/ui/missions/UIGuide_getBadges.md +237 -0
- package/docs/ui/missions/UIGuide_getMissions.md +268 -0
- package/docs/ui/missions/UIGuide_requestMissionClaimReward.md +21 -0
- package/docs/ui/missions/UIGuide_requestMissionOptIn.md +16 -0
- package/docs/ui/store/UIGuide_buyStoreItem.md +133 -0
- package/docs/ui/store/UIGuide_getStoreCategories.md +19 -0
- package/docs/ui/store/UIGuide_getStoreItems.md +264 -0
- package/docs/ui/store/UIGuide_getStorePurchasedItems.md +122 -0
- package/docs/ui/tournaments/UIGuide_getClanTournamentPlayers.md +140 -0
- package/docs/ui/tournaments/UIGuide_getTournamentInstanceInfo.md +265 -0
- package/docs/ui/tournaments/UIGuide_getTournamentsList.md +236 -0
- package/docs/ui/tournaments/UIGuide_registerInTournament.md +156 -0
- package/docs/ui/user/UIGuide_getLevels.md +162 -0
- package/docs/ui/user/UIGuide_getUserProfile.md +213 -0
- package/package.json +3 -3
- package/scripts/postdoc-cleanup.js +195 -0
- package/src/Missions/MissionsUtils.ts +5 -2
- package/src/Store/BuyStoreItemErrorCode.ts +8 -0
- package/src/Store/StoreItem.ts +1 -0
- package/src/Store/StoreItemPurchased.ts +1 -0
- package/src/Store/StoreItemType.ts +1 -1
- package/src/Tournaments/TournamentRegistrationError.ts +4 -0
- package/src/WSAPI/WSAPI.ts +27 -2007
- package/src/WSAPI/WSAPIAvatars.ts +127 -0
- package/src/WSAPI/WSAPIBase.ts +93 -0
- package/src/WSAPI/WSAPIBonuses.ts +54 -0
- package/src/WSAPI/WSAPIClans.ts +417 -0
- package/src/WSAPI/WSAPIGamePick.ts +382 -0
- package/src/WSAPI/WSAPIGeneral.ts +57 -0
- package/src/WSAPI/WSAPIInbox.ts +222 -0
- package/src/WSAPI/WSAPIJackpots.ts +212 -0
- package/src/WSAPI/WSAPILeaderBoard.ts +40 -0
- package/src/WSAPI/WSAPIMiniGames.ts +181 -0
- package/src/WSAPI/WSAPIMissions.ts +572 -0
- package/src/WSAPI/WSAPIRaffles.ts +175 -0
- package/src/WSAPI/WSAPIStore.ts +732 -0
- package/src/WSAPI/WSAPITournaments.ts +541 -0
- package/src/WSAPI/WSAPITypes.ts +145 -87
- package/src/WSAPI/WSAPIUser.ts +456 -0
- package/tsconfig.json +17 -1
- package/docs/api/classes/WSAPI.md +0 -1927
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { TRaffle, TRaffleDraw, TRaffleDrawRun, TransformedRaffleClaimPrizeResponse, TRaffleOptinResponse } from './WSAPITypes';
|
|
2
|
+
import { WSAPIJackpots } from './WSAPIJackpots';
|
|
3
|
+
/** @group Raffles */
|
|
4
|
+
export declare class WSAPIRaffles extends WSAPIJackpots {
|
|
5
|
+
protected updateRaffles(): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the list of Raffles available for user
|
|
8
|
+
* The returned list of Raffles is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getRaffles with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
9
|
+
* The onUpdate callback will be called on claiming prize. Updated Raffles will be passed to onUpdate callback.
|
|
10
|
+
*
|
|
11
|
+
* **Example**:
|
|
12
|
+
*
|
|
13
|
+
* ```
|
|
14
|
+
* _smartico.api.getRaffles().then((result) => {
|
|
15
|
+
* console.log(result);
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* **Example in the Visitor mode**:
|
|
20
|
+
*
|
|
21
|
+
* ```
|
|
22
|
+
* _smartico.vapi('EN').getRaffles().then((result) => {
|
|
23
|
+
* console.log(result);
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
getRaffles({ onUpdate }?: {
|
|
29
|
+
onUpdate?: (data: TRaffle[]) => void;
|
|
30
|
+
}): Promise<TRaffle[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns draw run for provided raffle_id and run_id.
|
|
33
|
+
* You can pass winners_from and winners_to parameters to get a specific range of winners. Default is 0-20.
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
* **Example**:
|
|
37
|
+
*
|
|
38
|
+
* ```javascript
|
|
39
|
+
* _smartico.api.getRaffleDrawRun({raffle_id: 156, run_id: 145}).then((result) => {
|
|
40
|
+
* console.log(result);
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* **Example in the Visitor mode**:
|
|
45
|
+
*
|
|
46
|
+
*
|
|
47
|
+
* ```javascript
|
|
48
|
+
* _smartico.vapi('EN').getRaffleDrawRun({ raffle_id: 156, run_id: 145 }).then((result) => {
|
|
49
|
+
* console.log(result);
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
getRaffleDrawRun(props: {
|
|
55
|
+
raffle_id: number;
|
|
56
|
+
run_id: number;
|
|
57
|
+
winners_from?: number;
|
|
58
|
+
winners_to?: number;
|
|
59
|
+
}): Promise<TRaffleDraw>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns history of draw runs for the provided raffle_id and draw_id, if the draw_id is not provided will return history of all the draws for the provided raffle_id
|
|
62
|
+
*
|
|
63
|
+
*
|
|
64
|
+
* **Example**:
|
|
65
|
+
*
|
|
66
|
+
* ```javascript
|
|
67
|
+
* _smartico.api.getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
|
|
68
|
+
* console.log(result);
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* **Example in the Visitor mode**:
|
|
73
|
+
*
|
|
74
|
+
* ```javascript
|
|
75
|
+
* _smartico.vapi('EN').getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
|
|
76
|
+
* console.log(result);
|
|
77
|
+
* });
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
getRaffleDrawRunsHistory(props: {
|
|
82
|
+
raffle_id: number;
|
|
83
|
+
draw_id?: number;
|
|
84
|
+
}): Promise<TRaffleDrawRun[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Returns `err_code` and `err_message` after the call; `err_code` 0 means the request succeeded.
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* **Example**:
|
|
90
|
+
*
|
|
91
|
+
* ```javascript
|
|
92
|
+
* _smartico.api.claimRafflePrize({won_id:251}).then((result) => {
|
|
93
|
+
* console.log(result);
|
|
94
|
+
* });
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* **Example in the Visitor mode**:
|
|
98
|
+
*
|
|
99
|
+
* ```javascript
|
|
100
|
+
* _smartico.vapi('EN').claimRafflePrize({ won_id: 251 }).then((result) => {
|
|
101
|
+
* console.log(result);
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
claimRafflePrize(props: {
|
|
107
|
+
won_id: number;
|
|
108
|
+
}): Promise<TransformedRaffleClaimPrizeResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* Requests an opt-in for the specified raffle. Returns the err_code.
|
|
111
|
+
*
|
|
112
|
+
* **Visitor mode: not supported**
|
|
113
|
+
*/
|
|
114
|
+
requestRaffleOptin(props: {
|
|
115
|
+
raffle_id: number;
|
|
116
|
+
draw_id: number;
|
|
117
|
+
raffle_run_id: number;
|
|
118
|
+
}): Promise<TRaffleOptinResponse>;
|
|
119
|
+
}
|