@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
@@ -0,0 +1,195 @@
1
+ # Class: WSAPIRaffles
2
+ ## Methods
3
+
4
+ ### getRaffles()
5
+
6
+ > **getRaffles**(`__namedParameters?`): `Promise`\<[`TRaffle`](../interfaces/TRaffle.md)[]\>
7
+
8
+ Returns the list of Raffles available for user
9
+ 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.
10
+ The onUpdate callback will be called on claiming prize. Updated Raffles will be passed to onUpdate callback.
11
+
12
+ **Example**:
13
+
14
+ ```
15
+ _smartico.api.getRaffles().then((result) => {
16
+ console.log(result);
17
+ });
18
+ ```
19
+
20
+ **Example in the Visitor mode**:
21
+
22
+ ```
23
+ _smartico.vapi('EN').getRaffles().then((result) => {
24
+ console.log(result);
25
+ });
26
+ ```
27
+
28
+ #### Parameters
29
+
30
+ ##### \_\_namedParameters?
31
+
32
+ ###### onUpdate?
33
+
34
+ (`data`) => `void`
35
+
36
+ #### Returns
37
+
38
+ `Promise`\<[`TRaffle`](../interfaces/TRaffle.md)[]\>
39
+
40
+ ***
41
+
42
+ ### getRaffleDrawRun()
43
+
44
+ > **getRaffleDrawRun**(`props`): `Promise`\<[`TRaffleDraw`](../interfaces/TRaffleDraw.md)\>
45
+
46
+ Returns draw run for provided raffle_id and run_id.
47
+ You can pass winners_from and winners_to parameters to get a specific range of winners. Default is 0-20.
48
+
49
+ **Example**:
50
+
51
+ ```javascript
52
+ _smartico.api.getRaffleDrawRun({raffle_id: 156, run_id: 145}).then((result) => {
53
+ console.log(result);
54
+ });
55
+ ```
56
+
57
+ **Example in the Visitor mode**:
58
+
59
+ ```javascript
60
+ _smartico.vapi('EN').getRaffleDrawRun({ raffle_id: 156, run_id: 145 }).then((result) => {
61
+ console.log(result);
62
+ });
63
+ ```
64
+
65
+ #### Parameters
66
+
67
+ ##### props
68
+
69
+ ###### raffle_id
70
+
71
+ `number`
72
+
73
+ ###### run_id
74
+
75
+ `number`
76
+
77
+ ###### winners_from?
78
+
79
+ `number`
80
+
81
+ ###### winners_to?
82
+
83
+ `number`
84
+
85
+ #### Returns
86
+
87
+ `Promise`\<[`TRaffleDraw`](../interfaces/TRaffleDraw.md)\>
88
+
89
+ ***
90
+
91
+ ### getRaffleDrawRunsHistory()
92
+
93
+ > **getRaffleDrawRunsHistory**(`props`): `Promise`\<[`TRaffleDrawRun`](../interfaces/TRaffleDrawRun.md)[]\>
94
+
95
+ 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
96
+
97
+ **Example**:
98
+
99
+ ```javascript
100
+ _smartico.api.getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
101
+ console.log(result);
102
+ });
103
+ ```
104
+
105
+ **Example in the Visitor mode**:
106
+
107
+ ```javascript
108
+ _smartico.vapi('EN').getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
109
+ console.log(result);
110
+ });
111
+ ```
112
+
113
+ #### Parameters
114
+
115
+ ##### props
116
+
117
+ ###### raffle_id
118
+
119
+ `number`
120
+
121
+ ###### draw_id?
122
+
123
+ `number`
124
+
125
+ #### Returns
126
+
127
+ `Promise`\<[`TRaffleDrawRun`](../interfaces/TRaffleDrawRun.md)[]\>
128
+
129
+ ***
130
+
131
+ ### claimRafflePrize()
132
+
133
+ > **claimRafflePrize**(`props`): `Promise`\<[`TransformedRaffleClaimPrizeResponse`](../interfaces/TransformedRaffleClaimPrizeResponse.md)\>
134
+
135
+ Returns `err_code` and `err_message` after the call; `err_code` 0 means the request succeeded.
136
+
137
+ **Example**:
138
+
139
+ ```javascript
140
+ _smartico.api.claimRafflePrize({won_id:251}).then((result) => {
141
+ console.log(result);
142
+ });
143
+ ```
144
+
145
+ **Example in the Visitor mode**:
146
+
147
+ ```javascript
148
+ _smartico.vapi('EN').claimRafflePrize({ won_id: 251 }).then((result) => {
149
+ console.log(result);
150
+ });
151
+ ```
152
+
153
+ #### Parameters
154
+
155
+ ##### props
156
+
157
+ ###### won_id
158
+
159
+ `number`
160
+
161
+ #### Returns
162
+
163
+ `Promise`\<[`TransformedRaffleClaimPrizeResponse`](../interfaces/TransformedRaffleClaimPrizeResponse.md)\>
164
+
165
+ ***
166
+
167
+ ### requestRaffleOptin()
168
+
169
+ > **requestRaffleOptin**(`props`): `Promise`\<[`TRaffleOptinResponse`](../interfaces/TRaffleOptinResponse.md)\>
170
+
171
+ Requests an opt-in for the specified raffle. Returns the err_code.
172
+
173
+ **Visitor mode: not supported**
174
+
175
+ #### Parameters
176
+
177
+ ##### props
178
+
179
+ ###### raffle_id
180
+
181
+ `number`
182
+
183
+ ###### draw_id
184
+
185
+ `number`
186
+
187
+ ###### raffle_run_id
188
+
189
+ `number`
190
+
191
+ #### Returns
192
+
193
+ `Promise`\<[`TRaffleOptinResponse`](../interfaces/TRaffleOptinResponse.md)\>
194
+
195
+ ***