@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,277 @@
|
|
|
1
|
+
# Class: WSAPIInbox
|
|
2
|
+
## Methods
|
|
3
|
+
|
|
4
|
+
### reportImpressionEvent()
|
|
5
|
+
|
|
6
|
+
> **reportImpressionEvent**(`params`): `void`
|
|
7
|
+
|
|
8
|
+
Reports an impression event for an engagement (when engagement content is displayed to the user).
|
|
9
|
+
Use this method to track when users view engagement content such as inbox messages, popups.
|
|
10
|
+
When using for Inbox cases, you need to use message guid as engagement_uid, and pass 31 as activityType.
|
|
11
|
+
|
|
12
|
+
**Example**:
|
|
13
|
+
```
|
|
14
|
+
_smartico.api.reportImpressionEvent({
|
|
15
|
+
engagement_uid: 'abc123-def456',
|
|
16
|
+
activityType: 31 // Inbox
|
|
17
|
+
});
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Visitor mode: not supported**
|
|
21
|
+
|
|
22
|
+
#### Parameters
|
|
23
|
+
|
|
24
|
+
##### params
|
|
25
|
+
|
|
26
|
+
Event parameters
|
|
27
|
+
|
|
28
|
+
###### engagement_uid
|
|
29
|
+
|
|
30
|
+
`string`
|
|
31
|
+
|
|
32
|
+
Unique identifier for the engagement
|
|
33
|
+
|
|
34
|
+
###### activityType
|
|
35
|
+
|
|
36
|
+
`number`
|
|
37
|
+
|
|
38
|
+
Type of engagement activity (Popup=30, Inbox=31)
|
|
39
|
+
|
|
40
|
+
#### Returns
|
|
41
|
+
|
|
42
|
+
`void`
|
|
43
|
+
|
|
44
|
+
***
|
|
45
|
+
|
|
46
|
+
### reportClickEvent()
|
|
47
|
+
|
|
48
|
+
> **reportClickEvent**(`params`): `void`
|
|
49
|
+
|
|
50
|
+
Reports a click/action event for an engagement (when user interacts with engagement content).
|
|
51
|
+
Use this method to track when users click on or interact with engagement content such as inbox messages, popups.
|
|
52
|
+
When using for Inbox cases, you need to use message guid as engagement_uid, and pass 31 as activityType, and pass the action/deeplink that was triggered by the user interaction as action.
|
|
53
|
+
|
|
54
|
+
**Example**:
|
|
55
|
+
```
|
|
56
|
+
_smartico.api.reportClickEvent({
|
|
57
|
+
engagement_uid: 'abc123-def456',
|
|
58
|
+
activityType: 31 // Inbox
|
|
59
|
+
action: 'dp:gf_missions'
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Visitor mode: not supported**
|
|
64
|
+
|
|
65
|
+
#### Parameters
|
|
66
|
+
|
|
67
|
+
##### params
|
|
68
|
+
|
|
69
|
+
Event parameters
|
|
70
|
+
|
|
71
|
+
###### engagement_uid
|
|
72
|
+
|
|
73
|
+
`string`
|
|
74
|
+
|
|
75
|
+
Unique identifier for the engagement
|
|
76
|
+
|
|
77
|
+
###### activityType
|
|
78
|
+
|
|
79
|
+
`number`
|
|
80
|
+
|
|
81
|
+
Type of engagement activity (Popup=30, Inbox=31)
|
|
82
|
+
|
|
83
|
+
###### action?
|
|
84
|
+
|
|
85
|
+
`string`
|
|
86
|
+
|
|
87
|
+
Optional action/deeplink that was triggered by the user interaction
|
|
88
|
+
|
|
89
|
+
#### Returns
|
|
90
|
+
|
|
91
|
+
`void`
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### getInboxMessages()
|
|
96
|
+
|
|
97
|
+
> **getInboxMessages**(`params?`): `Promise`\<[`TInboxMessage`](../interfaces/TInboxMessage.md)[]\>
|
|
98
|
+
|
|
99
|
+
Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
100
|
+
The maximum number of messages per request is limited to 20.
|
|
101
|
+
An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
102
|
+
An indicator "read_status" can be passed to get only messages marked as read or unread.
|
|
103
|
+
You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
104
|
+
This function returns a list of messages without the body of each message.
|
|
105
|
+
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.
|
|
106
|
+
All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
107
|
+
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.
|
|
108
|
+
|
|
109
|
+
**Visitor mode: not supported**
|
|
110
|
+
|
|
111
|
+
#### Parameters
|
|
112
|
+
|
|
113
|
+
##### params?
|
|
114
|
+
|
|
115
|
+
###### from?
|
|
116
|
+
|
|
117
|
+
`number`
|
|
118
|
+
|
|
119
|
+
###### to?
|
|
120
|
+
|
|
121
|
+
`number`
|
|
122
|
+
|
|
123
|
+
###### onlyFavorite?
|
|
124
|
+
|
|
125
|
+
`boolean`
|
|
126
|
+
|
|
127
|
+
###### categoryId?
|
|
128
|
+
|
|
129
|
+
[`InboxCategories`](../enumerations/InboxCategories.md)
|
|
130
|
+
|
|
131
|
+
###### read_status?
|
|
132
|
+
|
|
133
|
+
[`InboxReadStatus`](../enumerations/InboxReadStatus.md)
|
|
134
|
+
|
|
135
|
+
###### onUpdate?
|
|
136
|
+
|
|
137
|
+
(`data`) => `void`
|
|
138
|
+
|
|
139
|
+
#### Returns
|
|
140
|
+
|
|
141
|
+
`Promise`\<[`TInboxMessage`](../interfaces/TInboxMessage.md)[]\>
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### getInboxUnreadCount()
|
|
146
|
+
|
|
147
|
+
> **getInboxUnreadCount**(`params?`): `Promise`\<`number`\>
|
|
148
|
+
|
|
149
|
+
Returns inbox unread count.
|
|
150
|
+
|
|
151
|
+
**Visitor mode: not supported**
|
|
152
|
+
|
|
153
|
+
#### Parameters
|
|
154
|
+
|
|
155
|
+
##### params?
|
|
156
|
+
|
|
157
|
+
###### onUpdate?
|
|
158
|
+
|
|
159
|
+
(`unread_count`) => `void`
|
|
160
|
+
|
|
161
|
+
#### Returns
|
|
162
|
+
|
|
163
|
+
`Promise`\<`number`\>
|
|
164
|
+
|
|
165
|
+
***
|
|
166
|
+
|
|
167
|
+
### getInboxMessageBody()
|
|
168
|
+
|
|
169
|
+
> **getInboxMessageBody**(`messageGuid`): `Promise`\<[`TInboxMessageBody`](../interfaces/TInboxMessageBody.md)\>
|
|
170
|
+
|
|
171
|
+
Returns the message body of the specified message guid.
|
|
172
|
+
|
|
173
|
+
**Visitor mode: not supported**
|
|
174
|
+
|
|
175
|
+
#### Parameters
|
|
176
|
+
|
|
177
|
+
##### messageGuid
|
|
178
|
+
|
|
179
|
+
`string`
|
|
180
|
+
|
|
181
|
+
#### Returns
|
|
182
|
+
|
|
183
|
+
`Promise`\<[`TInboxMessageBody`](../interfaces/TInboxMessageBody.md)\>
|
|
184
|
+
|
|
185
|
+
***
|
|
186
|
+
|
|
187
|
+
### markInboxMessageAsRead()
|
|
188
|
+
|
|
189
|
+
> **markInboxMessageAsRead**(`messageGuid`): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
190
|
+
|
|
191
|
+
Requests to mark inbox message with specified guid as read
|
|
192
|
+
|
|
193
|
+
**Visitor mode: not supported**
|
|
194
|
+
|
|
195
|
+
#### Parameters
|
|
196
|
+
|
|
197
|
+
##### messageGuid
|
|
198
|
+
|
|
199
|
+
`string`
|
|
200
|
+
|
|
201
|
+
#### Returns
|
|
202
|
+
|
|
203
|
+
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
204
|
+
|
|
205
|
+
***
|
|
206
|
+
|
|
207
|
+
### markAllInboxMessagesAsRead()
|
|
208
|
+
|
|
209
|
+
> **markAllInboxMessagesAsRead**(): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
210
|
+
|
|
211
|
+
Requests to mark all inbox messages as read
|
|
212
|
+
|
|
213
|
+
**Visitor mode: not supported**
|
|
214
|
+
|
|
215
|
+
#### Returns
|
|
216
|
+
|
|
217
|
+
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
218
|
+
|
|
219
|
+
***
|
|
220
|
+
|
|
221
|
+
### markUnmarkInboxMessageAsFavorite()
|
|
222
|
+
|
|
223
|
+
> **markUnmarkInboxMessageAsFavorite**(`messageGuid`, `mark`): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
224
|
+
|
|
225
|
+
Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
|
|
226
|
+
|
|
227
|
+
**Visitor mode: not supported**
|
|
228
|
+
|
|
229
|
+
#### Parameters
|
|
230
|
+
|
|
231
|
+
##### messageGuid
|
|
232
|
+
|
|
233
|
+
`string`
|
|
234
|
+
|
|
235
|
+
##### mark
|
|
236
|
+
|
|
237
|
+
`boolean`
|
|
238
|
+
|
|
239
|
+
#### Returns
|
|
240
|
+
|
|
241
|
+
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
242
|
+
|
|
243
|
+
***
|
|
244
|
+
|
|
245
|
+
### deleteInboxMessage()
|
|
246
|
+
|
|
247
|
+
> **deleteInboxMessage**(`messageGuid`): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
248
|
+
|
|
249
|
+
Requests to delete inbox message
|
|
250
|
+
|
|
251
|
+
**Visitor mode: not supported**
|
|
252
|
+
|
|
253
|
+
#### Parameters
|
|
254
|
+
|
|
255
|
+
##### messageGuid
|
|
256
|
+
|
|
257
|
+
`string`
|
|
258
|
+
|
|
259
|
+
#### Returns
|
|
260
|
+
|
|
261
|
+
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
262
|
+
|
|
263
|
+
***
|
|
264
|
+
|
|
265
|
+
### deleteAllInboxMessages()
|
|
266
|
+
|
|
267
|
+
> **deleteAllInboxMessages**(): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
268
|
+
|
|
269
|
+
Requests to delete all inbox messages
|
|
270
|
+
|
|
271
|
+
**Visitor mode: not supported**
|
|
272
|
+
|
|
273
|
+
#### Returns
|
|
274
|
+
|
|
275
|
+
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
276
|
+
|
|
277
|
+
***
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Class: WSAPIJackpots
|
|
2
|
+
## Methods
|
|
3
|
+
|
|
4
|
+
### jackpotGet()
|
|
5
|
+
|
|
6
|
+
> **jackpotGet**(`filter?`): `Promise`\<[`JackpotDetails`](../interfaces/JackpotDetails.md)[]\>
|
|
7
|
+
|
|
8
|
+
Returns list of Jackpots that are active in the system and matching to the filter definition.
|
|
9
|
+
If filter is not provided, all active jackpots will be returned.
|
|
10
|
+
Filter can be used to get jackpots related to specific game or specific jackpot template.
|
|
11
|
+
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
|
|
12
|
+
|
|
13
|
+
**Example**:
|
|
14
|
+
```
|
|
15
|
+
_smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
16
|
+
console.log(result);
|
|
17
|
+
});
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Example in the Visitor mode**:
|
|
21
|
+
```
|
|
22
|
+
_smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
23
|
+
console.log(result);
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### Parameters
|
|
28
|
+
|
|
29
|
+
##### filter?
|
|
30
|
+
|
|
31
|
+
###### related_game_id?
|
|
32
|
+
|
|
33
|
+
`string`
|
|
34
|
+
|
|
35
|
+
###### jp_template_id?
|
|
36
|
+
|
|
37
|
+
`number`
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`Promise`\<[`JackpotDetails`](../interfaces/JackpotDetails.md)[]\>
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### jackpotOptIn()
|
|
46
|
+
|
|
47
|
+
> **jackpotOptIn**(`filter`): `Promise`\<[`JackpotsOptinResponse`](../interfaces/JackpotsOptinResponse.md)\>
|
|
48
|
+
|
|
49
|
+
Opt-in currently logged in user to the jackpot with the specified jp_template_id.
|
|
50
|
+
You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
|
|
51
|
+
|
|
52
|
+
**Example**:
|
|
53
|
+
```
|
|
54
|
+
_smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
|
|
55
|
+
console.log('Opted in to the jackpot');
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Visitor mode: not supported**
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
##### filter
|
|
64
|
+
|
|
65
|
+
###### jp_template_id
|
|
66
|
+
|
|
67
|
+
`number`
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`\<[`JackpotsOptinResponse`](../interfaces/JackpotsOptinResponse.md)\>
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### jackpotOptOut()
|
|
76
|
+
|
|
77
|
+
> **jackpotOptOut**(`filter`): `Promise`\<[`JackpotsOptoutResponse`](../interfaces/JackpotsOptoutResponse.md)\>
|
|
78
|
+
|
|
79
|
+
Opt-out currently logged in user from the jackpot with the specified jp_template_id.
|
|
80
|
+
You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
|
|
81
|
+
|
|
82
|
+
**Example**:
|
|
83
|
+
```
|
|
84
|
+
_smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
|
|
85
|
+
console.log('Opted out from the jackpot');
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Visitor mode: not supported**
|
|
90
|
+
|
|
91
|
+
#### Parameters
|
|
92
|
+
|
|
93
|
+
##### filter
|
|
94
|
+
|
|
95
|
+
###### jp_template_id
|
|
96
|
+
|
|
97
|
+
`number`
|
|
98
|
+
|
|
99
|
+
#### Returns
|
|
100
|
+
|
|
101
|
+
`Promise`\<[`JackpotsOptoutResponse`](../interfaces/JackpotsOptoutResponse.md)\>
|
|
102
|
+
|
|
103
|
+
***
|
|
104
|
+
|
|
105
|
+
### getJackpotWinners()
|
|
106
|
+
|
|
107
|
+
> **getJackpotWinners**(`params`): `Promise`\<[`JackpotWinnerHistory`](../interfaces/JackpotWinnerHistory.md)[]\>
|
|
108
|
+
|
|
109
|
+
Returns jackpot winners for the given `jp_template_id` (paginated on the server).
|
|
110
|
+
Default page size on the wire is 20; use `limit`, `offset`, and repeated calls to load more.
|
|
111
|
+
The full protocol response also includes `has_more`; this method returns only the `winners` array.
|
|
112
|
+
|
|
113
|
+
**Example**:
|
|
114
|
+
```
|
|
115
|
+
_smartico.api.getJackpotWinners({
|
|
116
|
+
jp_template_id: 123,
|
|
117
|
+
}).then((result) => {
|
|
118
|
+
console.log(result);
|
|
119
|
+
});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Visitor mode: not supported**
|
|
123
|
+
|
|
124
|
+
#### Parameters
|
|
125
|
+
|
|
126
|
+
##### params
|
|
127
|
+
|
|
128
|
+
Jackpot winners parameters
|
|
129
|
+
|
|
130
|
+
###### limit?
|
|
131
|
+
|
|
132
|
+
`number`
|
|
133
|
+
|
|
134
|
+
Page size (server default 20 when omitted)
|
|
135
|
+
|
|
136
|
+
###### offset?
|
|
137
|
+
|
|
138
|
+
`number`
|
|
139
|
+
|
|
140
|
+
Offset into the winner list
|
|
141
|
+
|
|
142
|
+
###### jp_template_id?
|
|
143
|
+
|
|
144
|
+
`number`
|
|
145
|
+
|
|
146
|
+
Jackpot template id (required; throws if missing)
|
|
147
|
+
|
|
148
|
+
#### Returns
|
|
149
|
+
|
|
150
|
+
`Promise`\<[`JackpotWinnerHistory`](../interfaces/JackpotWinnerHistory.md)[]\>
|
|
151
|
+
|
|
152
|
+
***
|
|
153
|
+
|
|
154
|
+
### getJackpotEligibleGames()
|
|
155
|
+
|
|
156
|
+
> **getJackpotEligibleGames**(`__namedParameters`): `Promise`\<[`TGetJackpotEligibleGamesResponse`](../interfaces/TGetJackpotEligibleGamesResponse.md)\>
|
|
157
|
+
|
|
158
|
+
Returns the eligible games for the jackpot with the specified jp_template_id.
|
|
159
|
+
|
|
160
|
+
**Example**:
|
|
161
|
+
```
|
|
162
|
+
_smartico.api.getJackpotEligibleGames({ jp_template_id: 123 }).then((result) => {
|
|
163
|
+
console.log(result);
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Visitor mode: not supported**
|
|
168
|
+
|
|
169
|
+
#### Parameters
|
|
170
|
+
|
|
171
|
+
##### \_\_namedParameters
|
|
172
|
+
|
|
173
|
+
###### jp_template_id
|
|
174
|
+
|
|
175
|
+
`number`
|
|
176
|
+
|
|
177
|
+
###### onUpdate?
|
|
178
|
+
|
|
179
|
+
() => `void`
|
|
180
|
+
|
|
181
|
+
#### Returns
|
|
182
|
+
|
|
183
|
+
`Promise`\<[`TGetJackpotEligibleGamesResponse`](../interfaces/TGetJackpotEligibleGamesResponse.md)\>
|
|
184
|
+
|
|
185
|
+
***
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Class: WSAPILeaderBoard
|
|
2
|
+
## Methods
|
|
3
|
+
|
|
4
|
+
### getLeaderBoard()
|
|
5
|
+
|
|
6
|
+
> **getLeaderBoard**(`periodType`, `getPreviousPeriod?`): `Promise`\<[`LeaderBoardDetailsT`](../interfaces/LeaderBoardDetailsT.md)\>
|
|
7
|
+
|
|
8
|
+
Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
|
|
9
|
+
For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
|
|
10
|
+
|
|
11
|
+
**Example**:
|
|
12
|
+
```
|
|
13
|
+
_smartico.api.getLeaderBoard(1).then((result) => {
|
|
14
|
+
console.log(result);
|
|
15
|
+
});
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Example in the Visitor mode**:
|
|
19
|
+
```
|
|
20
|
+
_smartico.vapi('EN').getLeaderBoard(1).then((result) => {
|
|
21
|
+
console.log(result);
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### Parameters
|
|
26
|
+
|
|
27
|
+
##### periodType
|
|
28
|
+
|
|
29
|
+
[`LeaderBoardPeriodType`](../enumerations/LeaderBoardPeriodType.md)
|
|
30
|
+
|
|
31
|
+
##### getPreviousPeriod?
|
|
32
|
+
|
|
33
|
+
`boolean`
|
|
34
|
+
|
|
35
|
+
#### Returns
|
|
36
|
+
|
|
37
|
+
`Promise`\<[`LeaderBoardDetailsT`](../interfaces/LeaderBoardDetailsT.md)\>
|
|
38
|
+
|
|
39
|
+
***
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Class: WSAPIMiniGames
|
|
2
|
+
## Methods
|
|
3
|
+
|
|
4
|
+
### getMiniGames()
|
|
5
|
+
|
|
6
|
+
> **getMiniGames**(`__namedParameters?`): `Promise`\<[`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]\>
|
|
7
|
+
|
|
8
|
+
Returns the list of mini-games configured for the current user (not filtered by spin availability or Widget visibility).
|
|
9
|
+
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.
|
|
10
|
+
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.
|
|
11
|
+
|
|
12
|
+
**Example**:
|
|
13
|
+
```
|
|
14
|
+
_smartico.api.getMiniGames().then((result) => {
|
|
15
|
+
console.log(result);
|
|
16
|
+
});
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Example in the Visitor mode**:
|
|
20
|
+
```
|
|
21
|
+
_smartico.vapi('EN').getMiniGames().then((result) => {
|
|
22
|
+
console.log(result);
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### Parameters
|
|
27
|
+
|
|
28
|
+
##### \_\_namedParameters?
|
|
29
|
+
|
|
30
|
+
###### onUpdate?
|
|
31
|
+
|
|
32
|
+
(`data`) => `void`
|
|
33
|
+
|
|
34
|
+
#### Returns
|
|
35
|
+
|
|
36
|
+
`Promise`\<[`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]\>
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### getMiniGamesHistory()
|
|
41
|
+
|
|
42
|
+
> **getMiniGamesHistory**(`__namedParameters`): `Promise`\<[`TSawHistory`](../interfaces/TSawHistory.md)[]\>
|
|
43
|
+
|
|
44
|
+
Returns the list of mini-games based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
45
|
+
The maximum number of items per request is limited to 20.
|
|
46
|
+
You can leave this params empty and by default it will return list of mini-games ranging from 0 to 20.
|
|
47
|
+
The returned list of mini-games history is cached for 30 seconds.
|
|
48
|
+
|
|
49
|
+
**Example**:
|
|
50
|
+
```
|
|
51
|
+
_smartico.api.getMiniGamesHistory().then((result) => {
|
|
52
|
+
console.log(result);
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Visitor mode: not supported**
|
|
57
|
+
|
|
58
|
+
#### Parameters
|
|
59
|
+
|
|
60
|
+
##### \_\_namedParameters
|
|
61
|
+
|
|
62
|
+
###### limit?
|
|
63
|
+
|
|
64
|
+
`number`
|
|
65
|
+
|
|
66
|
+
###### offset?
|
|
67
|
+
|
|
68
|
+
`number`
|
|
69
|
+
|
|
70
|
+
###### saw_template_id?
|
|
71
|
+
|
|
72
|
+
`number`
|
|
73
|
+
|
|
74
|
+
#### Returns
|
|
75
|
+
|
|
76
|
+
`Promise`\<[`TSawHistory`](../interfaces/TSawHistory.md)[]\>
|
|
77
|
+
|
|
78
|
+
***
|
|
79
|
+
|
|
80
|
+
### playMiniGame()
|
|
81
|
+
|
|
82
|
+
> **playMiniGame**(`template_id`, `__namedParameters?`): `Promise`\<[`TMiniGamePlayResult`](../interfaces/TMiniGamePlayResult.md)\>
|
|
83
|
+
|
|
84
|
+
Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
85
|
+
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.
|
|
86
|
+
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.
|
|
87
|
+
|
|
88
|
+
**Example**:
|
|
89
|
+
```
|
|
90
|
+
_smartico.api.playMiniGame(55).then((result) => {
|
|
91
|
+
console.log(result);
|
|
92
|
+
});
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Visitor mode: not supported**
|
|
96
|
+
|
|
97
|
+
#### Parameters
|
|
98
|
+
|
|
99
|
+
##### template\_id
|
|
100
|
+
|
|
101
|
+
`number`
|
|
102
|
+
|
|
103
|
+
##### \_\_namedParameters?
|
|
104
|
+
|
|
105
|
+
###### onUpdate?
|
|
106
|
+
|
|
107
|
+
(`data`) => `void`
|
|
108
|
+
|
|
109
|
+
#### Returns
|
|
110
|
+
|
|
111
|
+
`Promise`\<[`TMiniGamePlayResult`](../interfaces/TMiniGamePlayResult.md)\>
|
|
112
|
+
|
|
113
|
+
***
|
|
114
|
+
|
|
115
|
+
### miniGameWinAcknowledgeRequest()
|
|
116
|
+
|
|
117
|
+
> **miniGameWinAcknowledgeRequest**(`request_id`): `Promise`\<[`SAWDoAknowledgeResponse`](../interfaces/SAWDoAknowledgeResponse.md)\>
|
|
118
|
+
|
|
119
|
+
Sends the acknowledge request with specific client_request_id from minigame history in order to claim prize
|
|
120
|
+
**Example**:
|
|
121
|
+
```
|
|
122
|
+
_smartico.api.miniGameWinAcknowledgeRequest('2a189322-31bb-4119-b943-bx7868ff8dc3').then((result) => {
|
|
123
|
+
console.log(result);
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Parameters
|
|
128
|
+
|
|
129
|
+
##### request\_id
|
|
130
|
+
|
|
131
|
+
`string`
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
`Promise`\<[`SAWDoAknowledgeResponse`](../interfaces/SAWDoAknowledgeResponse.md)\>
|
|
136
|
+
|
|
137
|
+
***
|
|
138
|
+
|
|
139
|
+
### playMiniGameBatch()
|
|
140
|
+
|
|
141
|
+
> **playMiniGameBatch**(`template_id`, `spin_count`, `__namedParameters?`): `Promise`\<[`TMiniGamePlayBatchResult`](../interfaces/TMiniGamePlayBatchResult.md)[]\>
|
|
142
|
+
|
|
143
|
+
Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes
|
|
144
|
+
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.
|
|
145
|
+
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.
|
|
146
|
+
|
|
147
|
+
**Example**:
|
|
148
|
+
```
|
|
149
|
+
_smartico.api.playMiniGameBatch(55, 10).then((result) => {
|
|
150
|
+
console.log(result);
|
|
151
|
+
});
|
|
152
|
+
```
|
|
153
|
+
**Visitor mode: not supported**
|
|
154
|
+
|
|
155
|
+
#### Parameters
|
|
156
|
+
|
|
157
|
+
##### template\_id
|
|
158
|
+
|
|
159
|
+
`number`
|
|
160
|
+
|
|
161
|
+
##### spin\_count
|
|
162
|
+
|
|
163
|
+
`number`
|
|
164
|
+
|
|
165
|
+
##### \_\_namedParameters?
|
|
166
|
+
|
|
167
|
+
###### onUpdate?
|
|
168
|
+
|
|
169
|
+
(`data`) => `void`
|
|
170
|
+
|
|
171
|
+
#### Returns
|
|
172
|
+
|
|
173
|
+
`Promise`\<[`TMiniGamePlayBatchResult`](../interfaces/TMiniGamePlayBatchResult.md)[]\>
|
|
174
|
+
|
|
175
|
+
***
|