@smartico/public-api 0.0.174 → 0.0.175
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/Jackpots/JackpotType.d.ts +2 -1
- package/dist/Missions/GetRelatedAchTourRequest.d.ts +0 -1
- package/dist/SmarticoAPI.d.ts +1 -1
- package/dist/WSAPI/WSAPI.d.ts +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +6 -4
- package/dist/index.modern.mjs.map +1 -1
- package/docs/classes/WSAPI.md +2 -3
- package/docs/enums/JackpotType.md +6 -0
- package/docs/interfaces/JackpotDetails.md +1 -1
- package/docs/interfaces/TMiniGamePrize.md +18 -0
- package/docs/interfaces/TSawHistory.md +16 -20
- package/package.json +1 -1
- package/src/Jackpots/JackpotType.ts +1 -0
- package/src/Missions/GetRelatedAchTourRequest.ts +0 -1
- package/src/SmarticoAPI.ts +2 -2
- package/src/WSAPI/WSAPI.ts +3 -2
package/docs/classes/WSAPI.md
CHANGED
|
@@ -417,7 +417,7 @@ ___
|
|
|
417
417
|
|
|
418
418
|
### getMiniGamesHistory
|
|
419
419
|
|
|
420
|
-
▸ **getMiniGamesHistory**(`«destructured
|
|
420
|
+
▸ **getMiniGamesHistory**(`«destructured»`): `Promise`\<[`TSawHistory`](../interfaces/TSawHistory.md)[]\>
|
|
421
421
|
|
|
422
422
|
Returns the list of mini-games based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
423
423
|
The maximum number of items per request is limited to 20.
|
|
@@ -441,7 +441,7 @@ _smartico.api.getMiniGamesHistory().then((result) => {
|
|
|
441
441
|
| `«destructured»` | `Object` |
|
|
442
442
|
| › `limit?` | `number` |
|
|
443
443
|
| › `offset?` | `number` |
|
|
444
|
-
| ›
|
|
444
|
+
| › `saw_template_id?` | `number` |
|
|
445
445
|
| › `onUpdate?` | (`data`: [`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]) => `void` |
|
|
446
446
|
|
|
447
447
|
#### Returns
|
|
@@ -450,7 +450,6 @@ _smartico.api.getMiniGamesHistory().then((result) => {
|
|
|
450
450
|
|
|
451
451
|
___
|
|
452
452
|
|
|
453
|
-
|
|
454
453
|
### playMiniGame
|
|
455
454
|
|
|
456
455
|
▸ **playMiniGame**(`template_id`, `«destructured»?`): `Promise`\<[`TMiniGamePlayResult`](../interfaces/TMiniGamePlayResult.md)\>
|
|
@@ -99,3 +99,21 @@ ___
|
|
|
99
99
|
### wins\_count
|
|
100
100
|
|
|
101
101
|
• `Optional` **wins\_count**: `number`
|
|
102
|
+
|
|
103
|
+
___
|
|
104
|
+
|
|
105
|
+
### weekdays
|
|
106
|
+
|
|
107
|
+
• `Optional` **weekdays**: `number`[]
|
|
108
|
+
|
|
109
|
+
___
|
|
110
|
+
|
|
111
|
+
### active\_from\_ts
|
|
112
|
+
|
|
113
|
+
• `Optional` **active\_from\_ts**: `number`
|
|
114
|
+
|
|
115
|
+
___
|
|
116
|
+
|
|
117
|
+
### active\_till\_ts
|
|
118
|
+
|
|
119
|
+
• `Optional` **active\_till\_ts**: `number`
|
|
@@ -1,53 +1,49 @@
|
|
|
1
1
|
# Interface: TSawHistory
|
|
2
2
|
|
|
3
|
-
TSawHistory describes the information of the history of mini-games.
|
|
4
|
-
|
|
5
3
|
## Properties
|
|
6
4
|
|
|
7
5
|
### template
|
|
8
6
|
|
|
9
7
|
• **template**: `SAWTemplate`
|
|
10
8
|
|
|
11
|
-
The initial information about mini-game
|
|
9
|
+
The initial information about mini-game
|
|
12
10
|
|
|
13
11
|
___
|
|
14
12
|
|
|
15
|
-
###
|
|
13
|
+
### saw\_template\_id
|
|
16
14
|
|
|
17
|
-
• **
|
|
15
|
+
• **saw\_template\_id**: `number`
|
|
18
16
|
|
|
19
|
-
ID of the mini-game template
|
|
17
|
+
ID of the mini-game template
|
|
20
18
|
|
|
21
19
|
___
|
|
22
20
|
|
|
23
|
-
###
|
|
21
|
+
### saw\_prize\_id
|
|
24
22
|
|
|
25
|
-
• **
|
|
23
|
+
• **saw\_prize\_id**: `number`
|
|
26
24
|
|
|
27
|
-
The saw_prize_id that user won, details of the prize can be found in the mini-game definition
|
|
25
|
+
The saw_prize_id that user won, details of the prize can be found in the mini-game definition
|
|
28
26
|
|
|
29
27
|
___
|
|
30
28
|
|
|
31
|
-
###
|
|
29
|
+
### prize\_amount
|
|
32
30
|
|
|
33
|
-
• **
|
|
31
|
+
• **prize\_amount**: `number`
|
|
34
32
|
|
|
35
|
-
Amount of prizes in stock
|
|
33
|
+
Amount of prizes in stock
|
|
36
34
|
|
|
37
35
|
___
|
|
38
36
|
|
|
39
|
-
###
|
|
37
|
+
### client\_request\_id
|
|
40
38
|
|
|
41
|
-
• **
|
|
39
|
+
• **client\_request\_id**: `string`
|
|
42
40
|
|
|
43
|
-
Request ID that client is sending to show history
|
|
41
|
+
Request ID that client is sending to show history
|
|
44
42
|
|
|
45
43
|
___
|
|
46
44
|
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
• **is_claimed**: `boolean`
|
|
45
|
+
### is\_claimed
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
• **is\_claimed**: `boolean`
|
|
52
48
|
|
|
53
|
-
|
|
49
|
+
Flag indicating to show whether prize in the mini-game claimed or not
|
package/package.json
CHANGED
package/src/SmarticoAPI.ts
CHANGED
|
@@ -1093,7 +1093,7 @@ class SmarticoAPI {
|
|
|
1093
1093
|
return new WSAPI(this);
|
|
1094
1094
|
}
|
|
1095
1095
|
|
|
1096
|
-
public async getRelatedItemsForGame(user_ext_id: string, related_game_id: string,
|
|
1096
|
+
public async getRelatedItemsForGame(user_ext_id: string, related_game_id: string,): Promise<GetRelatedAchTourResponse> {
|
|
1097
1097
|
const message = this.buildMessage< GetRelatedAchTourRequest, GetRelatedAchTourResponse>(
|
|
1098
1098
|
user_ext_id,
|
|
1099
1099
|
ClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST,
|
|
@@ -1102,7 +1102,7 @@ class SmarticoAPI {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
);
|
|
1104
1104
|
|
|
1105
|
-
return await this.send<GetRelatedAchTourResponse>(message, ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE
|
|
1105
|
+
return await this.send<GetRelatedAchTourResponse>(message, ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE);
|
|
1106
1106
|
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
package/src/WSAPI/WSAPI.ts
CHANGED
|
@@ -93,6 +93,7 @@ export class WSAPI {
|
|
|
93
93
|
on(ClassId.IDENTIFY_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));
|
|
94
94
|
on(ClassId.JP_WIN_PUSH, (data: JackpotWinPush) => this.jackpotClearCache());
|
|
95
95
|
on(ClassId.JP_OPTOUT_RESPONSE, (data: JackpotsOptoutRequest) => this.jackpotClearCache());
|
|
96
|
+
on(ClassId.JP_OPTIN_RESPONSE, (data: JackpotsOptinResponse) => this.jackpotClearCache());
|
|
96
97
|
on(ClassId.CLAIM_BONUS_RESPONSE, () => this.updateBonuses());
|
|
97
98
|
on(ClassId.SAW_DO_SPIN_BATCH_RESPONSE, () => this.updateOnAddSpin());
|
|
98
99
|
}
|
|
@@ -1001,9 +1002,9 @@ export class WSAPI {
|
|
|
1001
1002
|
* });
|
|
1002
1003
|
* ```
|
|
1003
1004
|
*/
|
|
1004
|
-
public async getRelatedItemsForGame(related_game_id: string
|
|
1005
|
+
public async getRelatedItemsForGame(related_game_id: string): Promise<GetAchievementMapResponse> {
|
|
1005
1006
|
|
|
1006
|
-
const result = await this.api.getRelatedItemsForGame(null, related_game_id
|
|
1007
|
+
const result = await this.api.getRelatedItemsForGame(null, related_game_id);
|
|
1007
1008
|
return result;
|
|
1008
1009
|
|
|
1009
1010
|
}
|