@smartico/public-api 0.0.358 → 0.0.359
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/package.json
CHANGED
|
@@ -5,6 +5,9 @@ import { UserAchievement } from "./UserAchievement";
|
|
|
5
5
|
import { UserAchievementTask } from "./UserAchievementTask";
|
|
6
6
|
import { BadgesTimeLimitStates } from "./BadgesTimeLimitStates";
|
|
7
7
|
|
|
8
|
+
type UserStateParamsKeys = 'core_fav_game_top3' | 'core_fav_game_type_top3' | 'core_fav_game_provider_top3' | 'core_recommended_deposit_amount' | 'core_recommended_casino_bet_amount' | 'casino_last_bet_amount' | 'casino_last_bet_amount_real' | 'casino_last_bet_amount_bonus' | 'acc_last_deposit_amount';
|
|
9
|
+
const USER_STATE_PARAMS_KEYS_GAMES: UserStateParamsKeys[] = ['core_fav_game_top3', 'core_fav_game_type_top3', 'core_fav_game_provider_top3'];
|
|
10
|
+
const USER_STATE_PARAMS_KEYS_BET_AMOUNT: UserStateParamsKeys[] = ['core_recommended_deposit_amount', 'core_recommended_casino_bet_amount', 'casino_last_bet_amount', 'casino_last_bet_amount_real', 'casino_last_bet_amount_bonus', 'acc_last_deposit_amount'];
|
|
8
11
|
export class MissionUtils {
|
|
9
12
|
|
|
10
13
|
public static getAvailabilityStatus = (mission: UserAchievement) => {
|
|
@@ -188,10 +191,10 @@ export class MissionUtils {
|
|
|
188
191
|
let suggestedGames: string = '';
|
|
189
192
|
let suggestedValue: string = '';
|
|
190
193
|
|
|
191
|
-
userStateParamsKeys.forEach((k:
|
|
194
|
+
userStateParamsKeys.forEach((k: UserStateParamsKeys) => {
|
|
192
195
|
const operator = userStateOperator[k]?.op;
|
|
193
196
|
|
|
194
|
-
if (k
|
|
197
|
+
if (USER_STATE_PARAMS_KEYS_GAMES.includes(k)) {
|
|
195
198
|
if (operatorsMulti.includes(operator)) {
|
|
196
199
|
const value = userStateParams[k]?.filter(v => Boolean(v));
|
|
197
200
|
if (value && value.length > 0) {
|
|
@@ -218,7 +221,7 @@ export class MissionUtils {
|
|
|
218
221
|
}
|
|
219
222
|
}
|
|
220
223
|
|
|
221
|
-
if (k
|
|
224
|
+
if (USER_STATE_PARAMS_KEYS_BET_AMOUNT.includes(k)) {
|
|
222
225
|
suggestedValue = userStateParams[k];
|
|
223
226
|
|
|
224
227
|
if (suggestedValue) {
|