@smartico/public-api 0.0.254 → 0.0.255
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/SmarticoAPI.d.ts +6 -2
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +12 -4
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/JackpotEligibleGame.md +2 -0
- package/package.json +1 -1
- package/src/SmarticoAPI.ts +4 -4
- package/src/WSAPI/WSAPI.ts +3 -3
package/package.json
CHANGED
package/src/SmarticoAPI.ts
CHANGED
|
@@ -505,18 +505,18 @@ class SmarticoAPI {
|
|
|
505
505
|
return GetJackpotWinnersResponseTransform((await this.getJackpotWinners(user_ext_id, limit, offset, jp_template_id)).winners);
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
public async getJackpotEligibleGames(user_ext_id: string, jp_template_id: number): Promise<GetJackpotEligibleGamesResponse> {
|
|
508
|
+
public async getJackpotEligibleGames(user_ext_id: string, { jp_template_id } : { jp_template_id: number }): Promise<GetJackpotEligibleGamesResponse> {
|
|
509
509
|
const message = this.buildMessage<GetJackpotEligibleGamesRequest, GetJackpotEligibleGamesResponse>(
|
|
510
510
|
user_ext_id,
|
|
511
511
|
ClassId.JP_GET_ELIGIBLE_GAMES_REQUEST,
|
|
512
512
|
{ jp_template_id },
|
|
513
513
|
);
|
|
514
514
|
|
|
515
|
-
return await this.send<GetJackpotEligibleGamesResponse>(message, ClassId.JP_GET_ELIGIBLE_GAMES_RESPONSE)
|
|
515
|
+
return await this.send<GetJackpotEligibleGamesResponse>(message, ClassId.JP_GET_ELIGIBLE_GAMES_RESPONSE);;
|
|
516
516
|
}
|
|
517
517
|
|
|
518
|
-
public async getJackpotEligibleGamesT(user_ext_id: string, jp_template_id: number ): Promise<TGetJackpotEligibleGamesResponse> {
|
|
519
|
-
return GetJackpotEligibleGamesResponseTransform(
|
|
518
|
+
public async getJackpotEligibleGamesT(user_ext_id: string, { jp_template_id } : { jp_template_id: number }): Promise<TGetJackpotEligibleGamesResponse> {
|
|
519
|
+
return GetJackpotEligibleGamesResponseTransform(await this.getJackpotEligibleGames(user_ext_id, { jp_template_id }));
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
public async sawGetTemplates(
|
package/src/WSAPI/WSAPI.ts
CHANGED
|
@@ -1112,15 +1112,15 @@ export class WSAPI {
|
|
|
1112
1112
|
*
|
|
1113
1113
|
*/
|
|
1114
1114
|
|
|
1115
|
-
public async getJackpotEligibleGames({ jp_template_id, onUpdate }: { jp_template_id: number, onUpdate?: () => void }): Promise<TGetJackpotEligibleGamesResponse> {
|
|
1115
|
+
public async getJackpotEligibleGames({ jp_template_id, onUpdate } : { jp_template_id: number, onUpdate?: () => void }): Promise<TGetJackpotEligibleGamesResponse> {
|
|
1116
1116
|
if (onUpdate) {
|
|
1117
1117
|
this.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
|
|
1118
1118
|
}
|
|
1119
1119
|
|
|
1120
1120
|
return OCache.use(
|
|
1121
|
-
onUpdateContextKey.JackpotEligibleGames,
|
|
1121
|
+
onUpdateContextKey.JackpotEligibleGames + jp_template_id,
|
|
1122
1122
|
ECacheContext.WSAPI,
|
|
1123
|
-
() => this.api.getJackpotEligibleGamesT(null, jp_template_id),
|
|
1123
|
+
() => this.api.getJackpotEligibleGamesT(null, { jp_template_id }),
|
|
1124
1124
|
JACKPOT_ELIGIBLE_GAMES_CACHE_SEC,
|
|
1125
1125
|
);
|
|
1126
1126
|
}
|