@smartico/public-api 0.0.140 → 0.0.142
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/OCache.d.ts +1 -0
- package/dist/Quiz/MarketsInfo.d.ts +8 -0
- package/dist/Quiz/MarketsType.d.ts +3 -1
- package/dist/SmarticoAPI.d.ts +13 -13
- package/dist/WSAPI/WSAPI.d.ts +249 -48
- package/dist/index.js +381 -129
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +314 -106
- package/dist/index.modern.mjs.map +1 -1
- package/docs/classes/WSAPI.md +205 -27
- package/package.json +1 -1
- package/src/Level/GetLevelMapResponse.ts +1 -1
- package/src/OCache.ts +5 -0
- package/src/Quiz/MarketsInfo.ts +17 -16
- package/src/Quiz/MarketsType.ts +4 -1
- package/src/SmarticoAPI.ts +30 -32
- package/src/WSAPI/WSAPI.ts +270 -63
package/docs/classes/WSAPI.md
CHANGED
|
@@ -7,12 +7,14 @@
|
|
|
7
7
|
▸ **getUserProfile**(): [`TUserProfile`](../interfaces/TUserProfile.md)
|
|
8
8
|
|
|
9
9
|
Returns information about current user
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
**Example**:
|
|
11
12
|
```
|
|
12
13
|
_smartico.api.getUserProfile().then((result) => {
|
|
13
14
|
console.log(result);
|
|
14
15
|
});
|
|
15
16
|
```
|
|
17
|
+
**Visitor mode: not supported**
|
|
16
18
|
|
|
17
19
|
#### Returns
|
|
18
20
|
|
|
@@ -25,13 +27,15 @@ ___
|
|
|
25
27
|
▸ **checkSegmentMatch**(`segment_id`): `Promise`<`boolean`\>
|
|
26
28
|
|
|
27
29
|
Check if user belongs to specific segments
|
|
28
|
-
Example
|
|
30
|
+
**Example**:
|
|
29
31
|
```
|
|
30
32
|
_smartico.api.checkSegmentMatch(1).then((result) => {
|
|
31
33
|
console.log(result);
|
|
32
34
|
});
|
|
33
35
|
```
|
|
34
36
|
|
|
37
|
+
**Visitor mode: not supported**
|
|
38
|
+
|
|
35
39
|
#### Parameters
|
|
36
40
|
|
|
37
41
|
| Name | Type |
|
|
@@ -49,12 +53,13 @@ ___
|
|
|
49
53
|
▸ **checkSegmentListMatch**(`segment_ids`): `Promise`<[`TSegmentCheckResult`](../interfaces/TSegmentCheckResult.md)[]\>
|
|
50
54
|
|
|
51
55
|
Check if user belongs to specific list of segments
|
|
52
|
-
Example
|
|
56
|
+
**Example**:
|
|
53
57
|
```
|
|
54
58
|
_smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
|
|
55
59
|
console.log(result);
|
|
56
60
|
});
|
|
57
61
|
```
|
|
62
|
+
**Visitor mode: not supported**
|
|
58
63
|
|
|
59
64
|
#### Parameters
|
|
60
65
|
|
|
@@ -73,10 +78,17 @@ ___
|
|
|
73
78
|
▸ **getLevels**(): `Promise`<[`TLevel`](../interfaces/TLevel.md)[]\>
|
|
74
79
|
|
|
75
80
|
Returns all the levels available the current user
|
|
76
|
-
Example
|
|
81
|
+
**Example**:
|
|
77
82
|
```
|
|
78
83
|
_smartico.api.getLevels().then((result) => {
|
|
79
|
-
|
|
84
|
+
console.log(result);
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Example in the Visitor mode**:
|
|
89
|
+
```
|
|
90
|
+
_smartico.vapi('EN').getLevels().then((result) => {
|
|
91
|
+
console.log(result);
|
|
80
92
|
});
|
|
81
93
|
```
|
|
82
94
|
|
|
@@ -88,26 +100,33 @@ ___
|
|
|
88
100
|
|
|
89
101
|
### getMissions
|
|
90
102
|
|
|
91
|
-
▸ **getMissions**(
|
|
103
|
+
▸ **getMissions**(`«destructured»?`): `Promise`<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
92
104
|
|
|
93
105
|
Returns all the missions available the current user.
|
|
94
106
|
The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
95
107
|
Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
96
108
|
The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
|
|
97
|
-
|
|
109
|
+
|
|
110
|
+
**Example**:
|
|
98
111
|
```
|
|
99
112
|
_smartico.api.getMissions().then((result) => {
|
|
100
|
-
|
|
113
|
+
console.log(result);
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Example in the Visitor mode**:
|
|
118
|
+
```
|
|
119
|
+
_smartico.vapi('EN').getMissions().then((result) => {
|
|
120
|
+
console.log(result);
|
|
101
121
|
});
|
|
102
122
|
```
|
|
103
|
-
/**
|
|
104
123
|
|
|
105
124
|
#### Parameters
|
|
106
125
|
|
|
107
126
|
| Name | Type |
|
|
108
127
|
| :------ | :------ |
|
|
109
|
-
|
|
|
110
|
-
| `
|
|
128
|
+
| `«destructured»` | `Object` |
|
|
129
|
+
| › `onUpdate?` | (`data`: [`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]) => `void` |
|
|
111
130
|
|
|
112
131
|
#### Returns
|
|
113
132
|
|
|
@@ -121,6 +140,8 @@ ___
|
|
|
121
140
|
|
|
122
141
|
Returns all the badges available the current user
|
|
123
142
|
|
|
143
|
+
**Visitor mode: not supported**
|
|
144
|
+
|
|
124
145
|
#### Returns
|
|
125
146
|
|
|
126
147
|
`Promise`<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
@@ -134,13 +155,16 @@ ___
|
|
|
134
155
|
Returns the extra counters for the current user level.
|
|
135
156
|
These are counters that are configured for each Smartico client separatly by request.
|
|
136
157
|
For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
|
|
137
|
-
|
|
158
|
+
|
|
159
|
+
**Example**:
|
|
138
160
|
```
|
|
139
161
|
_smartico.api.getUserLevelExtraCounters().then((result) => {
|
|
140
162
|
console.log(result);
|
|
141
163
|
});
|
|
142
164
|
```
|
|
143
165
|
|
|
166
|
+
**Visitor mode: not supported**
|
|
167
|
+
|
|
144
168
|
#### Returns
|
|
145
169
|
|
|
146
170
|
`Promise`<[`UserLevelExtraCountersT`](../interfaces/UserLevelExtraCountersT.md)\>
|
|
@@ -152,11 +176,19 @@ ___
|
|
|
152
176
|
▸ **getStoreItems**(): `Promise`<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
153
177
|
|
|
154
178
|
Returns all the store items available the current user
|
|
155
|
-
|
|
179
|
+
|
|
180
|
+
**Example**:
|
|
156
181
|
```
|
|
157
182
|
_smartico.api.getStoreItems().then((result) => {
|
|
158
183
|
console.log(result);
|
|
159
184
|
});
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Example in the Visitor mode**:
|
|
188
|
+
```
|
|
189
|
+
_smartico.vapi('EN').getStoreItems().then((result) => {
|
|
190
|
+
console.log(result);
|
|
191
|
+
});
|
|
160
192
|
|
|
161
193
|
#### Returns
|
|
162
194
|
|
|
@@ -169,11 +201,14 @@ ___
|
|
|
169
201
|
▸ **buyStoreItem**(`item_id`): `Promise`<[`TBuyStoreItemResult`](../interfaces/TBuyStoreItemResult.md)\>
|
|
170
202
|
|
|
171
203
|
Buy the specific shop item by item_id. Returns the err_code in case of success or error.
|
|
172
|
-
Example
|
|
204
|
+
**Example**:
|
|
173
205
|
```
|
|
174
206
|
_smartico.api.buyStoreItem(1).then((result) => {
|
|
175
207
|
console.log(result);
|
|
176
208
|
});
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Visitor mode: not supported**
|
|
177
212
|
|
|
178
213
|
#### Parameters
|
|
179
214
|
|
|
@@ -193,6 +228,19 @@ ___
|
|
|
193
228
|
|
|
194
229
|
Returns store categories
|
|
195
230
|
|
|
231
|
+
**Example**:
|
|
232
|
+
```
|
|
233
|
+
_smartico.api.getStoreCategories().then((result) => {
|
|
234
|
+
console.log(result);
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Example in the Visitor mode**:
|
|
239
|
+
```
|
|
240
|
+
_smartico.vapi('EN').getStoreCategories().then((result) => {
|
|
241
|
+
console.log(result);
|
|
242
|
+
});
|
|
243
|
+
|
|
196
244
|
#### Returns
|
|
197
245
|
|
|
198
246
|
`Promise`<[`TStoreCategory`](../interfaces/TStoreCategory.md)[]\>
|
|
@@ -206,13 +254,16 @@ ___
|
|
|
206
254
|
Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
207
255
|
The maximum number of items per request is limited to 20.
|
|
208
256
|
You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
|
|
209
|
-
|
|
257
|
+
|
|
258
|
+
**Example**:
|
|
210
259
|
```
|
|
211
260
|
_smartico.api.getStorePurchasedItems().then((result) => {
|
|
212
261
|
console.log(result);
|
|
213
262
|
});
|
|
214
263
|
```
|
|
215
264
|
|
|
265
|
+
**Visitor mode: not supported**
|
|
266
|
+
|
|
216
267
|
#### Parameters
|
|
217
268
|
|
|
218
269
|
| Name | Type |
|
|
@@ -234,6 +285,20 @@ ___
|
|
|
234
285
|
|
|
235
286
|
Returns missions & badges categories
|
|
236
287
|
|
|
288
|
+
**Example**:
|
|
289
|
+
```
|
|
290
|
+
_smartico.api.getAchCategories().then((result) => {
|
|
291
|
+
console.log(result);
|
|
292
|
+
});
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Example in the Visitor mode**:
|
|
296
|
+
```
|
|
297
|
+
_smartico.vapi('EN').getAchCategories().then((result) => {
|
|
298
|
+
console.log(result);
|
|
299
|
+
});
|
|
300
|
+
```
|
|
301
|
+
|
|
237
302
|
#### Returns
|
|
238
303
|
|
|
239
304
|
`Promise`<[`TAchCategory`](../interfaces/TAchCategory.md)[]\>
|
|
@@ -242,17 +307,32 @@ ___
|
|
|
242
307
|
|
|
243
308
|
### getMiniGames
|
|
244
309
|
|
|
245
|
-
▸ **getMiniGames**(
|
|
310
|
+
▸ **getMiniGames**(`«destructured»?`): `Promise`<[`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]\>
|
|
246
311
|
|
|
247
|
-
|
|
248
|
-
|
|
312
|
+
Returns the list of mini-games available for user
|
|
313
|
+
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.
|
|
314
|
+
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.
|
|
315
|
+
|
|
316
|
+
**Example**:
|
|
317
|
+
```
|
|
318
|
+
_smartico.api.getMiniGames().then((result) => {
|
|
319
|
+
console.log(result);
|
|
320
|
+
});
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
**Example in the Visitor mode**:
|
|
324
|
+
```
|
|
325
|
+
_smartico.vapi('EN').getMiniGames().then((result) => {
|
|
326
|
+
console.log(result);
|
|
327
|
+
});
|
|
328
|
+
```
|
|
249
329
|
|
|
250
330
|
#### Parameters
|
|
251
331
|
|
|
252
332
|
| Name | Type |
|
|
253
333
|
| :------ | :------ |
|
|
254
|
-
|
|
|
255
|
-
| `
|
|
334
|
+
| `«destructured»` | `Object` |
|
|
335
|
+
| › `onUpdate?` | (`data`: [`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]) => `void` |
|
|
256
336
|
|
|
257
337
|
#### Returns
|
|
258
338
|
|
|
@@ -266,6 +346,8 @@ ___
|
|
|
266
346
|
|
|
267
347
|
Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
268
348
|
|
|
349
|
+
**Visitor mode: not supported**
|
|
350
|
+
|
|
269
351
|
#### Parameters
|
|
270
352
|
|
|
271
353
|
| Name | Type |
|
|
@@ -284,6 +366,8 @@ ___
|
|
|
284
366
|
|
|
285
367
|
Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
286
368
|
|
|
369
|
+
**Visitor mode: not supported**
|
|
370
|
+
|
|
287
371
|
#### Parameters
|
|
288
372
|
|
|
289
373
|
| Name | Type |
|
|
@@ -302,6 +386,8 @@ ___
|
|
|
302
386
|
|
|
303
387
|
Request for claim reward for the specified mission id. Returns the err_code.
|
|
304
388
|
|
|
389
|
+
**Visitor mode: not supported**
|
|
390
|
+
|
|
305
391
|
#### Parameters
|
|
306
392
|
|
|
307
393
|
| Name | Type |
|
|
@@ -317,14 +403,32 @@ ___
|
|
|
317
403
|
|
|
318
404
|
### getTournamentsList
|
|
319
405
|
|
|
320
|
-
▸ **getTournamentsList**(
|
|
406
|
+
▸ **getTournamentsList**(`«destructured»?`): `Promise`<[`TTournament`](../interfaces/TTournament.md)[]\>
|
|
407
|
+
|
|
408
|
+
Returns all the active instances of tournaments
|
|
409
|
+
The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
410
|
+
The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
|
|
411
|
+
|
|
412
|
+
**Example**:
|
|
413
|
+
```
|
|
414
|
+
_smartico.api.getTournamentsList().then((result) => {
|
|
415
|
+
console.log(result);
|
|
416
|
+
});
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
**Example in the Visitor mode**:
|
|
420
|
+
```
|
|
421
|
+
_smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
422
|
+
console.log(result);
|
|
423
|
+
});
|
|
424
|
+
```
|
|
321
425
|
|
|
322
426
|
#### Parameters
|
|
323
427
|
|
|
324
428
|
| Name | Type |
|
|
325
429
|
| :------ | :------ |
|
|
326
|
-
|
|
|
327
|
-
| `
|
|
430
|
+
| `«destructured»` | `Object` |
|
|
431
|
+
| › `onUpdate?` | (`data`: [`TTournament`](../interfaces/TTournament.md)[]) => `void` |
|
|
328
432
|
|
|
329
433
|
#### Returns
|
|
330
434
|
|
|
@@ -338,6 +442,28 @@ ___
|
|
|
338
442
|
|
|
339
443
|
Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
|
|
340
444
|
|
|
445
|
+
**Example**:
|
|
446
|
+
```
|
|
447
|
+
_smartico.api.getTournamentsList().then((result) => {
|
|
448
|
+
if (result.length > 0) {
|
|
449
|
+
_smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
450
|
+
console.log(result);
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Example in the Visitor mode**:
|
|
457
|
+
```
|
|
458
|
+
_smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
459
|
+
if (result.length > 0) {
|
|
460
|
+
_smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
461
|
+
console.log(result);
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
```
|
|
466
|
+
|
|
341
467
|
#### Parameters
|
|
342
468
|
|
|
343
469
|
| Name | Type |
|
|
@@ -356,6 +482,8 @@ ___
|
|
|
356
482
|
|
|
357
483
|
Requests registration for the specified tournament instance. Returns the err_code.
|
|
358
484
|
|
|
485
|
+
**Visitor mode: not supported**
|
|
486
|
+
|
|
359
487
|
#### Parameters
|
|
360
488
|
|
|
361
489
|
| Name | Type |
|
|
@@ -375,6 +503,20 @@ ___
|
|
|
375
503
|
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.
|
|
376
504
|
For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
|
|
377
505
|
|
|
506
|
+
**Example**:
|
|
507
|
+
```
|
|
508
|
+
_smartico.api.getLeaderBoard(1).then((result) => {
|
|
509
|
+
console.log(result);
|
|
510
|
+
});
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**Example in the Visitor mode**:
|
|
514
|
+
```
|
|
515
|
+
_smartico.vapi('EN').getLeaderBoard(1).then((result) => {
|
|
516
|
+
console.log(result);
|
|
517
|
+
});
|
|
518
|
+
```
|
|
519
|
+
|
|
378
520
|
#### Parameters
|
|
379
521
|
|
|
380
522
|
| Name | Type |
|
|
@@ -392,6 +534,16 @@ ___
|
|
|
392
534
|
|
|
393
535
|
▸ **getInboxMessages**(`params?`): `Promise`<[`TInboxMessage`](../interfaces/TInboxMessage.md)[]\>
|
|
394
536
|
|
|
537
|
+
Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
538
|
+
The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
539
|
+
You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
540
|
+
This functions return list of messages without the body of the message.
|
|
541
|
+
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.
|
|
542
|
+
All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
543
|
+
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.
|
|
544
|
+
|
|
545
|
+
**Visitor mode: not supported**
|
|
546
|
+
|
|
395
547
|
#### Parameters
|
|
396
548
|
|
|
397
549
|
| Name | Type |
|
|
@@ -414,6 +566,8 @@ ___
|
|
|
414
566
|
|
|
415
567
|
Returns the message body of the specified message guid.
|
|
416
568
|
|
|
569
|
+
**Visitor mode: not supported**
|
|
570
|
+
|
|
417
571
|
#### Parameters
|
|
418
572
|
|
|
419
573
|
| Name | Type |
|
|
@@ -432,6 +586,8 @@ ___
|
|
|
432
586
|
|
|
433
587
|
Requests to mark inbox message with specified guid as read
|
|
434
588
|
|
|
589
|
+
**Visitor mode: not supported**
|
|
590
|
+
|
|
435
591
|
#### Parameters
|
|
436
592
|
|
|
437
593
|
| Name | Type |
|
|
@@ -448,7 +604,9 @@ ___
|
|
|
448
604
|
|
|
449
605
|
▸ **markAllInboxMessagesAsRead**(): `Promise`<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
450
606
|
|
|
451
|
-
Requests to mark all inbox messages as
|
|
607
|
+
Requests to mark all inbox messages as rea
|
|
608
|
+
|
|
609
|
+
**Visitor mode: not supported**
|
|
452
610
|
|
|
453
611
|
#### Returns
|
|
454
612
|
|
|
@@ -462,6 +620,8 @@ ___
|
|
|
462
620
|
|
|
463
621
|
Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
|
|
464
622
|
|
|
623
|
+
**Visitor mode: not supported**
|
|
624
|
+
|
|
465
625
|
#### Parameters
|
|
466
626
|
|
|
467
627
|
| Name | Type |
|
|
@@ -481,6 +641,8 @@ ___
|
|
|
481
641
|
|
|
482
642
|
Requests to delete inbox message
|
|
483
643
|
|
|
644
|
+
**Visitor mode: not supported**
|
|
645
|
+
|
|
484
646
|
#### Parameters
|
|
485
647
|
|
|
486
648
|
| Name | Type |
|
|
@@ -499,6 +661,8 @@ ___
|
|
|
499
661
|
|
|
500
662
|
Requests to delete all inbox messages
|
|
501
663
|
|
|
664
|
+
**Visitor mode: not supported**
|
|
665
|
+
|
|
502
666
|
#### Returns
|
|
503
667
|
|
|
504
668
|
`Promise`<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
@@ -531,13 +695,21 @@ Returns list of Jackpots that are active in the systen and matching to the filte
|
|
|
531
695
|
If filter is not provided, all active jackpots will be returned.
|
|
532
696
|
Filter can be used to get jackpots related to specific game or specific jackpot template.
|
|
533
697
|
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
|
|
534
|
-
|
|
698
|
+
|
|
699
|
+
**Example**:
|
|
535
700
|
```
|
|
536
701
|
_smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
537
702
|
console.log(result);
|
|
538
703
|
});
|
|
539
704
|
```
|
|
540
705
|
|
|
706
|
+
**Example in the Visitor mode**:
|
|
707
|
+
```
|
|
708
|
+
_smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
709
|
+
console.log(result);
|
|
710
|
+
});
|
|
711
|
+
```
|
|
712
|
+
|
|
541
713
|
#### Parameters
|
|
542
714
|
|
|
543
715
|
| Name | Type |
|
|
@@ -558,13 +730,16 @@ ___
|
|
|
558
730
|
|
|
559
731
|
Opt-in currently logged in user to the jackpot with the specified jp_template_id.
|
|
560
732
|
You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
|
|
561
|
-
|
|
733
|
+
|
|
734
|
+
**Example**:
|
|
562
735
|
```
|
|
563
736
|
_smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
|
|
564
737
|
console.log('Opted in to the jackpot');
|
|
565
738
|
});
|
|
566
739
|
```
|
|
567
740
|
|
|
741
|
+
**Visitor mode: not supported**
|
|
742
|
+
|
|
568
743
|
#### Parameters
|
|
569
744
|
|
|
570
745
|
| Name | Type |
|
|
@@ -584,13 +759,16 @@ ___
|
|
|
584
759
|
|
|
585
760
|
Opt-out currently logged in user from the jackpot with the specified jp_template_id.
|
|
586
761
|
You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
|
|
587
|
-
|
|
762
|
+
|
|
763
|
+
**Example**:
|
|
588
764
|
```
|
|
589
765
|
_smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
|
|
590
766
|
console.log('Opted out from the jackpot');
|
|
591
767
|
});
|
|
592
768
|
```
|
|
593
769
|
|
|
770
|
+
**Visitor mode: not supported**
|
|
771
|
+
|
|
594
772
|
#### Parameters
|
|
595
773
|
|
|
596
774
|
| Name | Type |
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export const GetLevelMapResponseTransform = (levels: GetLevelMapResponse): TLeve
|
|
|
17
17
|
description: l.level_public_meta.description,
|
|
18
18
|
image: l.level_public_meta.image_url,
|
|
19
19
|
required_points: l.required_points,
|
|
20
|
-
visibility_points: parseInt(l.level_public_meta.visibility_points as any),
|
|
20
|
+
visibility_points: l.level_public_meta.visibility_points ? parseInt(l.level_public_meta.visibility_points as any) : null,
|
|
21
21
|
required_level_counter_1: l.required_level_counter_1,
|
|
22
22
|
required_level_counter_2: l.required_level_counter_2,
|
|
23
23
|
custom_data: IntUtils.JsonOrText(l.level_public_meta?.custom_data),
|
package/src/OCache.ts
CHANGED
package/src/Quiz/MarketsInfo.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { MarketsValueType } from "./MarketsAnswersType";
|
|
2
2
|
import { QuizMarketType } from "./MarketsType";
|
|
3
3
|
|
|
4
|
-
const quizAnswerHomeTeamReplacementText = '{quiz_home_team}';
|
|
5
|
-
const quizAnswerAwayTeamReplacementText = '{quiz_away_team}';
|
|
6
|
-
const
|
|
7
|
-
const quizYesReplacementText = '{yes}';
|
|
8
|
-
const quizNoReplacementText = '{no}';
|
|
9
|
-
const quizOddReplacementText = '{odd}';
|
|
10
|
-
const quizEvenReplacementText = '{even}';
|
|
4
|
+
export const quizAnswerHomeTeamReplacementText = '{quiz_home_team}';
|
|
5
|
+
export const quizAnswerAwayTeamReplacementText = '{quiz_away_team}';
|
|
6
|
+
export const quizDrawReplacementText = '{quiz_draw}';
|
|
7
|
+
export const quizYesReplacementText = '{yes}';
|
|
8
|
+
export const quizNoReplacementText = '{no}';
|
|
9
|
+
export const quizOddReplacementText = '{odd}';
|
|
10
|
+
export const quizEvenReplacementText = '{even}';
|
|
11
|
+
export const quizOrReplacementText = '{or}';
|
|
11
12
|
|
|
12
13
|
const yesNoAnswers = [
|
|
13
14
|
{ text: quizYesReplacementText, value: MarketsValueType.Yes },
|
|
@@ -21,7 +22,7 @@ const homeAwayAnswers = [
|
|
|
21
22
|
|
|
22
23
|
const homeAwayDrawAnswers = [
|
|
23
24
|
...homeAwayAnswers,
|
|
24
|
-
{ text:
|
|
25
|
+
{ text: quizDrawReplacementText, value: MarketsValueType.Draw },
|
|
25
26
|
]
|
|
26
27
|
|
|
27
28
|
export const marketsInfo = [
|
|
@@ -43,13 +44,13 @@ export const marketsInfo = [
|
|
|
43
44
|
question: { text: 'Who will lead the first half and who will win the match ?', trKey: 'quizQuestion__HalftimeFulltime' },
|
|
44
45
|
answers: [
|
|
45
46
|
{ text: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`, value: MarketsValueType.HomeTeamHomeTeam },
|
|
46
|
-
{ text: `${quizAnswerHomeTeamReplacementText} / ${
|
|
47
|
+
{ text: `${quizAnswerHomeTeamReplacementText} / ${quizDrawReplacementText}`, value: MarketsValueType.HomeTeamDraw },
|
|
47
48
|
{ text: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`, value: MarketsValueType.HomeTeamAwayTeam },
|
|
48
|
-
{ text: `${
|
|
49
|
-
{ text: `${
|
|
50
|
-
{ text: `${
|
|
49
|
+
{ text: `${quizDrawReplacementText} / ${quizAnswerHomeTeamReplacementText}`, value: MarketsValueType.DrawHomeTeam },
|
|
50
|
+
{ text: `${quizDrawReplacementText} / ${quizDrawReplacementText}`, value: MarketsValueType.DrawDraw },
|
|
51
|
+
{ text: `${quizDrawReplacementText} / ${quizAnswerAwayTeamReplacementText}`, value: MarketsValueType.DrawAwayTeam },
|
|
51
52
|
{ text: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`, value: MarketsValueType.AwayTeamHomeTeam },
|
|
52
|
-
{ text: `${quizAnswerAwayTeamReplacementText} / ${
|
|
53
|
+
{ text: `${quizAnswerAwayTeamReplacementText} / ${quizDrawReplacementText}`, value: MarketsValueType.AwayTeamDraw },
|
|
53
54
|
{ text: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`, value: MarketsValueType.AwayTeamAwayTeam }
|
|
54
55
|
]
|
|
55
56
|
},
|
|
@@ -70,9 +71,9 @@ export const marketsInfo = [
|
|
|
70
71
|
name: 'Double Chance',
|
|
71
72
|
question: { text: 'Who will win the match? Choose a combination: ?', trKey: 'quizQuestion_doubleChance' },
|
|
72
73
|
answers: [
|
|
73
|
-
{ text: `${
|
|
74
|
-
{ text: `${quizAnswerHomeTeamReplacementText}
|
|
75
|
-
{ text: `${
|
|
74
|
+
{ text: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerHomeTeamReplacementText}`, value: MarketsValueType.HomeTeamDraw },
|
|
75
|
+
{ text: `${quizAnswerHomeTeamReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`, value: MarketsValueType.HomeTeamAwayTeam },
|
|
76
|
+
{ text: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`, value: MarketsValueType.AwayTeamDraw }
|
|
76
77
|
]
|
|
77
78
|
},
|
|
78
79
|
{
|