react-memory-optimization 0.0.97 → 0.0.99

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.
Files changed (64) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/lib/binary/index.d.ts +2 -2
  3. package/dist/lib/service/api/index.d.ts +1 -1
  4. package/dist/lib/service/api/utils.js +2 -2
  5. package/dist/lib/service/observable/index.d.ts +1 -1
  6. package/dist/lib/service/responseAdapter/adapters.d.ts +1 -1
  7. package/dist/lib/service/responseAdapter/index.d.ts +2 -3
  8. package/dist/lib/service/responseAdapter/types.d.ts +2 -0
  9. package/dist/lib/socket/index.d.ts +10 -45
  10. package/dist/lib/socket/services.d.ts +1 -1
  11. package/dist/lib/socket/services.js +10 -8
  12. package/dist/lib/socket/types/socket.d.ts +5 -15
  13. package/dist/lib/store/betting/entities/events/index.d.ts +1 -1
  14. package/dist/lib/store/betting/entities/events/live/index.d.ts +2 -2
  15. package/dist/lib/store/betting/services/index.d.ts +6 -6
  16. package/dist/lib/store/casino/entities/casinoTournaments/index.d.ts +1 -10
  17. package/dist/lib/store/casino/entities/casinoTournaments/types.d.ts +2 -2
  18. package/dist/lib/store/casino/entities/categories/index.d.ts +3 -4
  19. package/dist/lib/store/casino/entities/categories/types.d.ts +6 -0
  20. package/dist/lib/store/casino/entities/games/types.d.ts +2 -2
  21. package/dist/lib/store/casino/entities/jackpots/types.d.ts +0 -3
  22. package/dist/lib/store/casino/entities/providers/types.d.ts +1 -1
  23. package/dist/lib/store/casino/index.d.ts +0 -2
  24. package/dist/lib/store/casino/services/index.d.ts +11 -24
  25. package/dist/lib/store/operations/entities/vipClub/index.d.ts +1 -1
  26. package/dist/lib/store/operations/index.d.ts +0 -1
  27. package/dist/lib/store/ui/home/entity/banners/index.d.ts +25 -0
  28. package/dist/lib/store/ui/home/entity/banners/service/index.d.ts +9 -0
  29. package/dist/lib/store/ui/home/entity/banners/types.d.ts +76 -0
  30. package/dist/lib/store/ui/home/entity/banners/types.js +10 -0
  31. package/dist/lib/store/ui/home/entity/service/index.d.ts +7 -0
  32. package/dist/lib/store/ui/home/index.d.ts +12 -0
  33. package/dist/lib/store/ui/index.d.ts +16 -0
  34. package/dist/lib/store/ui/service/index.d.ts +7 -0
  35. package/dist/lib/store/ui/types.d.ts +4 -0
  36. package/dist/lib/store/user/entities/avatars/index.d.ts +1 -4
  37. package/dist/lib/store/user/entities/daily/index.d.ts +3 -3
  38. package/dist/lib/store/user/entities/favorites/constants.js +0 -12
  39. package/dist/lib/store/user/entities/favorites/index.d.ts +1 -4
  40. package/dist/lib/store/user/entities/favorites/types.d.ts +1 -14
  41. package/dist/lib/store/user/entities/referral/index.d.ts +3 -3
  42. package/dist/lib/store/user/index.d.ts +0 -6
  43. package/dist/lib/store/user/services/index.d.ts +1 -8
  44. package/dist/lib/store/user/types.d.ts +5 -5
  45. package/dist/lib/store/user/utils.js +1 -1
  46. package/dist/lib/utils/betting.js +2 -0
  47. package/dist/lib/utils/shader.d.ts +1 -1
  48. package/dist/lib/utils/shader.js +1 -1
  49. package/package.json +1 -1
  50. package/dist/lib/store/user/entities/bonusWheel/constants.d.ts +0 -1
  51. package/dist/lib/store/user/entities/bonusWheel/constants.js +0 -7
  52. package/dist/lib/store/user/entities/bonusWheel/index.d.ts +0 -17
  53. package/dist/lib/store/user/entities/bonusWheel/types.d.ts +0 -7
  54. package/dist/lib/store/user/entities/hamster/constant.d.ts +0 -10
  55. package/dist/lib/store/user/entities/hamster/constant.js +0 -39
  56. package/dist/lib/store/user/entities/hamster/index.d.ts +0 -21
  57. package/dist/lib/store/user/entities/hamster/types.d.ts +0 -28
  58. package/dist/lib/store/user/entities/hamster/types.js +0 -2
  59. package/dist/lib/store/user/entities/lootBox/constants.d.ts +0 -8
  60. package/dist/lib/store/user/entities/lootBox/constants.js +0 -26
  61. package/dist/lib/store/user/entities/lootBox/index.d.ts +0 -39
  62. package/dist/lib/store/user/entities/lootBox/types.d.ts +0 -10
  63. package/dist/lib/store/user/entities/lootBox/types.js +0 -2
  64. /package/dist/lib/store/{user/entities/bonusWheel → ui}/types.js +0 -0
@@ -0,0 +1,9 @@
1
+ import { UIService } from 'store/ui/service';
2
+ import { HomeBanners } from '..';
3
+ export declare class HomeBannersService {
4
+ parent: HomeBanners;
5
+ mainService: UIService;
6
+ constructor(parent: HomeBanners, mainService: UIService);
7
+ fetchBanners(path: string): void;
8
+ adaptingBanners(): void;
9
+ }
@@ -0,0 +1,76 @@
1
+ export type BannerType = {
2
+ actionType: EBannerAction;
3
+ actionValue: keyof typeof EBannerAction;
4
+ countryDependencies: number[];
5
+ depositDependency: number;
6
+ exceptFor: number[];
7
+ id: number;
8
+ isAuthDependency: boolean;
9
+ name: string;
10
+ path: string;
11
+ order: number;
12
+ translations: BannerTranslates;
13
+ redirect: {
14
+ [lang: string]: string;
15
+ };
16
+ updateAt: string;
17
+ };
18
+ export type AdaptedBanner = BannerType & {
19
+ path: string;
20
+ text: string;
21
+ subTitle: string;
22
+ buttonText: string;
23
+ };
24
+ export type BannerTranslates = {
25
+ [lang: string]: {
26
+ title: string;
27
+ subTitle?: string;
28
+ buttonText: string;
29
+ };
30
+ };
31
+ export declare enum EBannerAction {
32
+ Unknown = 0,
33
+ PopUp = 1,
34
+ Navigate = 2,
35
+ ExternalNavigate = 3
36
+ }
37
+ export declare const enum EBannerTypes {
38
+ Betting = 0,
39
+ Welcome = 1,
40
+ Asian = 2,
41
+ Originals = 3,
42
+ Referral = 4,
43
+ TelegramBot = 5,
44
+ DownloadApp = 6,
45
+ BattlesBanner = 7,
46
+ Withdrawals = 8,
47
+ IPL = 9
48
+ }
49
+ export type ReturnBannersInfo = {
50
+ desktop: BannerSliderData;
51
+ mobile: BannerSliderData;
52
+ };
53
+ export type BannerSliderData = {
54
+ sliders: AdaptedBanner[];
55
+ isDragFree: boolean;
56
+ isProgress: boolean;
57
+ isInfinity: boolean;
58
+ };
59
+ export interface HomeBannersSettings {
60
+ path: string;
61
+ }
62
+ export type ResponseBannerInfo = {
63
+ banners: {
64
+ [countryId: string]: {
65
+ mobile: BannerType[];
66
+ desktop: BannerType[];
67
+ };
68
+ default: {
69
+ mobile: BannerType[];
70
+ desktop: BannerType[];
71
+ };
72
+ };
73
+ isDragFree: boolean;
74
+ isProgress: boolean;
75
+ isInfinity: boolean;
76
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EBannerAction = void 0;
4
+ var EBannerAction;
5
+ (function (EBannerAction) {
6
+ EBannerAction[EBannerAction["Unknown"] = 0] = "Unknown";
7
+ EBannerAction[EBannerAction["PopUp"] = 1] = "PopUp";
8
+ EBannerAction[EBannerAction["Navigate"] = 2] = "Navigate";
9
+ EBannerAction[EBannerAction["ExternalNavigate"] = 3] = "ExternalNavigate";
10
+ })(EBannerAction || (exports.EBannerAction = EBannerAction = {}));
@@ -0,0 +1,7 @@
1
+ import { UIService } from 'store/ui/service';
2
+ import { HomePage } from '../..';
3
+ export declare class HomePageService {
4
+ parent: HomePage;
5
+ mainService: UIService;
6
+ constructor(parent: HomePage, mainService: UIService);
7
+ }
@@ -0,0 +1,12 @@
1
+ import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
2
+ import { ObservableEntity } from 'service/observableEntity';
3
+ import { UIService } from '../service';
4
+ import { HomePageService } from './entity/service';
5
+ export declare class HomePage extends ObservableEntity<undefined> {
6
+ uiService: UIService;
7
+ service: HomePageService;
8
+ constructor(uiService: UIService);
9
+ sendUpdateEntity(d: BaseObservableSubscriber & {
10
+ [key: string]: unknown;
11
+ }): UpdateData | null;
12
+ }
@@ -0,0 +1,16 @@
1
+ import { ResponseAdapterService } from 'service/responseAdapter/services';
2
+ import { HomePage } from './home';
3
+ import { ObservableEntity } from 'service/observableEntity';
4
+ import { HomeBanners } from './home/entity/banners';
5
+ import { UIService } from './service';
6
+ import { UIEntitiesSettings } from './types';
7
+ export declare class UIEntities extends ObservableEntity<undefined> {
8
+ homePage: HomePage;
9
+ homeBanners: HomeBanners;
10
+ _settings: UIEntitiesSettings;
11
+ service: UIService;
12
+ constructor(uiSettings: UIEntitiesSettings, services: ResponseAdapterService);
13
+ updateCountryId(value: unknown): void;
14
+ set settings(settings: UIEntitiesSettings);
15
+ get settings(): UIEntitiesSettings;
16
+ }
@@ -0,0 +1,7 @@
1
+ import { ResponseAdapterService } from 'service/responseAdapter/services';
2
+ import { UIEntities } from '..';
3
+ export declare class UIService {
4
+ parent: UIEntities;
5
+ mainService: ResponseAdapterService;
6
+ constructor(parent: UIEntities, mainService: ResponseAdapterService);
7
+ }
@@ -0,0 +1,4 @@
1
+ import { HomeBannersSettings } from './home/entity/banners/types';
2
+ export interface UIEntitiesSettings {
3
+ homeBanners: HomeBannersSettings;
4
+ }
@@ -15,10 +15,7 @@ export declare class Avatars extends ObservableEntity<undefined> {
15
15
  set avatars(avatars: AvatarType[]);
16
16
  get avatars(): AvatarType[];
17
17
  revalidateAvatarsInfo(avatar: AvatarType | null): void;
18
- handleFavoriteSubscribes(data: {
19
- isAvatar: boolean;
20
- payload: AvatarType | null;
21
- }): void;
18
+ handleFavoriteSubscribes(value: unknown): void;
22
19
  handleBuyAvatar(info: BuyAvatarProps): void;
23
20
  handleChangeUserAvatar(avatarInfo: AvatarType | null): void;
24
21
  handleUserAvatar(): UpdateData | null;
@@ -3,13 +3,13 @@ import { ObservableEntity } from 'service/observableEntity';
3
3
  import { UserServices } from 'store/user/services';
4
4
  import { DailyInfoType } from './types';
5
5
  export declare class DailyActivities extends ObservableEntity<undefined> {
6
- _tasks: DailyInfoType[];
6
+ _tasks: DailyInfoType[] | null;
7
7
  _activeTask: null | DailyInfoType;
8
8
  services: UserServices;
9
9
  isError: boolean;
10
10
  constructor(services: UserServices);
11
- set tasks(info: DailyInfoType[]);
12
- get tasks(): DailyInfoType[];
11
+ set tasks(info: DailyInfoType[] | null);
12
+ get tasks(): DailyInfoType[] | null;
13
13
  set activeTask(id: string);
14
14
  get activeTask(): DailyInfoType | null;
15
15
  verificationDailyTasks(): void;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FAVORITE_BASE_INFO = void 0;
4
- const constant_1 = require("../hamster/constant");
5
4
  exports.FAVORITE_BASE_INFO = {
6
5
  casino: {
7
6
  providers: {},
@@ -13,17 +12,6 @@ exports.FAVORITE_BASE_INFO = {
13
12
  events: {},
14
13
  markets: {},
15
14
  },
16
- hamster: {
17
- lvl: 0 /* EHamsterLevel.Bronze */,
18
- energy: constant_1.HAMSTER_LEVELS[0 /* EHamsterLevel.Bronze */].dailyEnergyLimit,
19
- lastActionTime: new Date().getTime(),
20
- coins: 0,
21
- step: 1,
22
- hero: null,
23
- boost: 1,
24
- },
25
15
  avatar: null,
26
- wheelInfo: null,
27
16
  clickId: null,
28
- bonusCoins: 0,
29
17
  };
@@ -1,12 +1,9 @@
1
- import { Observable } from 'service/observable';
2
1
  import { UserServices } from 'store/user/services';
3
- import { UserFavoritesEntities, ObservableSettings, SubscribeFavoriteGameProps, PrepareFavoriteEntitiesForSavingProps, SubscribeFavoriteGamesProps } from './types';
2
+ import { UserFavoritesEntities, SubscribeFavoriteGameProps, PrepareFavoriteEntitiesForSavingProps, SubscribeFavoriteGamesProps } from './types';
4
3
  import { ObservableEntity } from 'service/observableEntity';
5
4
  import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
6
5
  export declare class UserFavorites extends ObservableEntity<undefined> {
7
- favoritesObservable: Observable;
8
6
  services: UserServices;
9
- observableSettings: ObservableSettings;
10
7
  _favorites: UserFavoritesEntities;
11
8
  constructor(services: UserServices);
12
9
  set favorites(favoriteInfo: UserFavoritesEntities);
@@ -1,7 +1,5 @@
1
1
  import { AdaptedGame } from 'store/casino/entities/games/types';
2
2
  import { CasinoServices } from 'store/casino/services';
3
- import { HamsterInfo } from '../hamster/types';
4
- import { WheelResultInfo } from '../bonusWheel/types';
5
3
  import { CasinoCategory } from 'store/casino/entities/categories/types';
6
4
  import { AvatarType } from '../avatars/types';
7
5
  export type ObservableSettings = {
@@ -36,9 +34,6 @@ export type UserFavoritesEntities = {
36
34
  };
37
35
  avatar: AvatarType | null;
38
36
  betting: FavoriteBetting;
39
- hamster: HamsterInfo;
40
- bonusCoins: number;
41
- wheelInfo: null | WheelResultInfo;
42
37
  clickId: string | null;
43
38
  };
44
39
  type FavoriteBetting = {
@@ -59,11 +54,7 @@ type FavoriteEvents = {
59
54
  type FavoriteSports = {
60
55
  [sportId: number]: boolean;
61
56
  };
62
- export type PrepareFavoriteEntitiesForSavingProps = PrepareFavoriteEntitiesForGameSavingProps | PrepareFavoriteEntitiesForSearchSavingProps | PrepareFavoriteEntitiesForProviderSavingProps | PrepareFavoriteEntitiesForClickIdSavingProps | PrepareFavoriteEntitiesForHamsterSavingProps | PrepareFavoriteEntitiesForBonusCoinsProps | PrepareFavoriteEntitiesForWheelResultProps | PrepareFavoriteEntitiesForAvatarProps | PrepareFavoriteEntitiesUserAddAvatarProps | PrepareFavoriteEntitiesForBettingSavingProps;
63
- type PrepareFavoriteEntitiesForWheelResultProps = {
64
- isWheel: boolean;
65
- wheelResult: WheelResultInfo;
66
- };
57
+ export type PrepareFavoriteEntitiesForSavingProps = PrepareFavoriteEntitiesForGameSavingProps | PrepareFavoriteEntitiesForSearchSavingProps | PrepareFavoriteEntitiesForProviderSavingProps | PrepareFavoriteEntitiesForClickIdSavingProps | PrepareFavoriteEntitiesForBonusCoinsProps | PrepareFavoriteEntitiesForAvatarProps | PrepareFavoriteEntitiesUserAddAvatarProps | PrepareFavoriteEntitiesForBettingSavingProps;
67
58
  type PrepareFavoriteEntitiesForAvatarProps = {
68
59
  isUserAvatar: boolean;
69
60
  userAvatar: AvatarType | null;
@@ -96,10 +87,6 @@ export type PrepareFavoriteEntitiesForBettingSavingProps = {
96
87
  isBetting: boolean;
97
88
  data: any;
98
89
  };
99
- export type PrepareFavoriteEntitiesForHamsterSavingProps = {
100
- isHamster: boolean;
101
- hamster: HamsterInfo;
102
- };
103
90
  export type SubscribeFavoriteGameProps = {
104
91
  uid: string;
105
92
  isMobile: boolean;
@@ -13,9 +13,9 @@ export declare class ReferralSystem extends ObservableEntity<undefined> {
13
13
  set isRequestedReferrals(v: boolean);
14
14
  get isRequestedReferrals(): boolean;
15
15
  set referralClients(info: ReferralClient[]);
16
- get referralClients(): ReferralClient[];
17
- set availableBalance(info: ReferralBalance);
18
- get availableBalance(): ReferralBalance;
16
+ get referralClients(): ReferralClient[] | null;
17
+ set availableBalance(info: ReferralBalance | null);
18
+ get availableBalance(): ReferralBalance | null;
19
19
  set isRequestedBalance(info: boolean);
20
20
  get isRequestedBalance(): boolean;
21
21
  revalidate(): void;
@@ -7,9 +7,6 @@ import { SendCommand } from './services/types';
7
7
  import { ReferralSystem } from './entities/referral';
8
8
  import { ResponseAdapterService } from 'service/responseAdapter/services';
9
9
  import { CallbackStatus } from 'socket/types/socket';
10
- import { Hamster } from './entities/hamster';
11
- import { LootBox } from './entities/lootBox';
12
- import { BonusWheel } from './entities/bonusWheel';
13
10
  import { DailyActivities } from './entities/daily';
14
11
  import { Avatars } from './entities/avatars';
15
12
  import { PromoCode } from './entities/promoCode';
@@ -23,9 +20,6 @@ export declare class User extends ObservableEntity<undefined> {
23
20
  favoritesInstance: UserFavorites;
24
21
  userBalance: Balance;
25
22
  referralSystem: ReferralSystem;
26
- hamster: Hamster;
27
- bonusWheel: BonusWheel;
28
- lootBox: LootBox;
29
23
  dailyActivities: DailyActivities;
30
24
  avatars: Avatars;
31
25
  promoCode: PromoCode;
@@ -1,5 +1,4 @@
1
1
  import { User } from '..';
2
- import { HamsterInfo } from '../entities/hamster/types';
3
2
  import { EReferralPath } from '../entities/referral/types';
4
3
  import { CallbackInfo, SendCommand } from './types';
5
4
  import { Operation } from 'store/operations/types';
@@ -10,20 +9,14 @@ export declare class UserServices {
10
9
  sendCommand: SendCommand;
11
10
  constructor(parent: User, callbackStatus: CallbackInfo, sendCommand: SendCommand);
12
11
  isAuthUser(): boolean;
13
- getUserToken(): string;
12
+ getUserToken(): string | null;
14
13
  fetchStories(): Promise<void>;
15
14
  referralRequest(path: EReferralPath, method: 'GET' | 'POST', body?: {
16
15
  amount: number;
17
16
  }): Promise<any>;
18
- updateHamsterFavorite(hamster: HamsterInfo): void;
19
- calculateEnergyChangePerSecond(dailyEnergyLimit: number, energy: number, lastActionTime: number): number;
20
- updateBonusCoins(bonusCoins: number): void;
21
- saveBonusCoins(coins: number): void;
22
17
  getBonusBalance(): number;
23
18
  revalidateDailyTasks(): void;
24
- updateWheelResult(): void;
25
19
  updateAvatarInfo(userAvatar: AvatarType | null): void;
26
- getHamsterBalance(): number;
27
20
  unlockAvatar(id: number): void;
28
21
  avatarRevalidateAvailable(avatar: AvatarType | null): void;
29
22
  activatePromoCode(promocode: string): Promise<any>;
@@ -7,9 +7,9 @@ export type CurrencyInfo = {
7
7
  };
8
8
  export type UserInfo = {
9
9
  token: string;
10
- clientId: number;
10
+ clientId: number | null;
11
11
  country: string;
12
- currencyId: number;
12
+ currencyId: number | null;
13
13
  currencyCode: string;
14
14
  ratioUSD: number;
15
15
  email: string;
@@ -24,11 +24,11 @@ export type HandleAuthResponseProps = {
24
24
  accessToken: string;
25
25
  address: string;
26
26
  birthDay: number;
27
- clientId: number | null;
27
+ clientId: number;
28
28
  country: string;
29
- countryId: number | null;
29
+ countryId: number;
30
30
  currencyName: string;
31
- currencyId: number | null;
31
+ currencyId: number;
32
32
  ratioUSD: number;
33
33
  email: string;
34
34
  login: string;
@@ -5,7 +5,7 @@ const getAdaptedUserInfo = (result) => {
5
5
  var _a, _b;
6
6
  return ({
7
7
  token: result.accessToken,
8
- clientId: result.clientId,
8
+ clientId: result.clientId || 0,
9
9
  country: result.country,
10
10
  currencyId: result.currencyId,
11
11
  currencyCode: ((_a = result.currencyInfo) === null || _a === void 0 ? void 0 : _a.shortView) || ((_b = result.currencyInfo) === null || _b === void 0 ? void 0 : _b.code) || 'n-f',
@@ -54,6 +54,8 @@ const getEventKeyTypeLine = (lineTypeRadar, id) => {
54
54
  return '23' + id;
55
55
  case 22:
56
56
  return '14' + id;
57
+ default:
58
+ return '';
57
59
  }
58
60
  };
59
61
  exports.getEventKeyTypeLine = getEventKeyTypeLine;
@@ -12,7 +12,7 @@ export declare const getCurrencyInfoByIdOrName: ({ id, name, }: GetCurrencyInfoB
12
12
  code: string;
13
13
  name: string;
14
14
  shortView: string;
15
- };
15
+ } | undefined;
16
16
  export declare const getDayOfMonth: (month: number, isFirstDay: boolean) => number;
17
17
  export declare const getPromotionInfo: (currentId: number, battleIds: number[]) => {
18
18
  status: EPromotionStatus;
@@ -19,7 +19,7 @@ const getRandomMultipleOfFive = (min, max) => {
19
19
  return Math.floor(Math.random() * (max - min + 1)) * 5 + min * 5;
20
20
  };
21
21
  exports.getRandomMultipleOfFive = getRandomMultipleOfFive;
22
- const getCurrencyInfoByIdOrName = ({ id, name, }) => constants_1.CURRENCIES.find((c) => c.id === id || c.code.toLocaleLowerCase() === name.toLocaleLowerCase());
22
+ const getCurrencyInfoByIdOrName = ({ id, name, }) => constants_1.CURRENCIES.find((c) => c.id === id || c.code.toLocaleLowerCase() === (name === null || name === void 0 ? void 0 : name.toLocaleLowerCase()));
23
23
  exports.getCurrencyInfoByIdOrName = getCurrencyInfoByIdOrName;
24
24
  const getDayOfMonth = (month, isFirstDay) => {
25
25
  const firstDayOfMonth = new Date(new Date().getFullYear(), month, Number(isFirstDay));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-memory-optimization",
3
- "version": "0.0.97",
3
+ "version": "0.0.99",
4
4
  "description": "react memory optimization library",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -1 +0,0 @@
1
- export declare const WHEEL_CONTENT: number[];
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WHEEL_CONTENT = void 0;
4
- exports.WHEEL_CONTENT = [
5
- 1000, 2000, 3000, 500, 100, 6000, 7000, 80, 0, 10000, 1500, 1900, 100000, 300,
6
- 1500, 0,
7
- ];
@@ -1,17 +0,0 @@
1
- import { UserServices } from 'store/user/services';
2
- import { WheelResultInfo } from './types';
3
- import { ObservableEntity } from 'service/observableEntity';
4
- export declare class BonusWheel extends ObservableEntity<undefined> {
5
- service: UserServices;
6
- wheelItems: number[];
7
- _wheelInfo: WheelResultInfo | null;
8
- constructor(service: UserServices);
9
- favoriteUpdates(info: null | WheelResultInfo): void;
10
- set wheelInfo(info: WheelResultInfo);
11
- get wheelInfo(): WheelResultInfo;
12
- getWheelItems(): number[];
13
- getWheelResult(): {
14
- value: number;
15
- result: number;
16
- };
17
- }
@@ -1,7 +0,0 @@
1
- export type WheelResultInfo = {
2
- lastSpinTime: null | number;
3
- result: {
4
- value: number | null;
5
- result: number;
6
- };
7
- };
@@ -1,10 +0,0 @@
1
- import { EHamsterLevel, HamsterLevel } from './types';
2
- export declare const STEP: {
3
- 0: number;
4
- 1: number;
5
- 2: number;
6
- 3: number;
7
- };
8
- export declare const HAMSTER_LEVELS: {
9
- [key in EHamsterLevel]: HamsterLevel;
10
- };
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HAMSTER_LEVELS = exports.STEP = void 0;
4
- exports.STEP = {
5
- [0 /* EHamsterLevel.Bronze */]: 1,
6
- [1 /* EHamsterLevel.Silver */]: 5,
7
- [2 /* EHamsterLevel.Gold */]: 500,
8
- [3 /* EHamsterLevel.Master */]: 1000,
9
- };
10
- exports.HAMSTER_LEVELS = {
11
- [0 /* EHamsterLevel.Bronze */]: {
12
- level: 0 /* EHamsterLevel.Bronze */,
13
- levelName: 'Bronze',
14
- minCoins: 0,
15
- maxCoins: 799,
16
- dailyEnergyLimit: 1000,
17
- },
18
- [1 /* EHamsterLevel.Silver */]: {
19
- level: 1 /* EHamsterLevel.Silver */,
20
- levelName: 'Silver',
21
- minCoins: 800,
22
- maxCoins: 9999,
23
- dailyEnergyLimit: 5500,
24
- },
25
- [2 /* EHamsterLevel.Gold */]: {
26
- level: 2 /* EHamsterLevel.Gold */,
27
- levelName: 'Gold',
28
- minCoins: 10000,
29
- maxCoins: 99999,
30
- dailyEnergyLimit: 50000,
31
- },
32
- [3 /* EHamsterLevel.Master */]: {
33
- level: 3 /* EHamsterLevel.Master */,
34
- levelName: 'Master',
35
- minCoins: 1000000,
36
- maxCoins: Infinity,
37
- dailyEnergyLimit: 500000,
38
- },
39
- };
@@ -1,21 +0,0 @@
1
- import { ObservableEntity } from 'service/observableEntity';
2
- import { UserServices } from 'store/user/services';
3
- import { BuyHeroAvatar, EHamsterLevel, HamsterInfo } from './types';
4
- import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
5
- export declare class Hamster extends ObservableEntity<undefined> {
6
- services: UserServices;
7
- _hamsterInfo: HamsterInfo | null;
8
- currentLevel: EHamsterLevel;
9
- nextLevel: EHamsterLevel;
10
- constructor(services: UserServices);
11
- set hamsterInfo(info: HamsterInfo);
12
- get hamsterInfo(): HamsterInfo;
13
- changeCoins(sellCoins: number, receiveCoins: number): void;
14
- findAndSetCurrentLvl(coins: number): void;
15
- handleBuyHero(info: BuyHeroAvatar): void;
16
- private getDailyEnergyLimit;
17
- boostEnergy(): void;
18
- sendUpdateEntity(d: BaseObservableSubscriber & {
19
- [key: string]: unknown;
20
- }): UpdateData;
21
- }
@@ -1,28 +0,0 @@
1
- export type HamsterInfo = {
2
- lvl: EHamsterLevel;
3
- energy: number;
4
- lastActionTime: number;
5
- coins: number;
6
- step: number;
7
- hero: null | number;
8
- boost: number;
9
- };
10
- export declare const enum EHamsterLevel {
11
- Bronze = 0,
12
- Silver = 1,
13
- Gold = 2,
14
- Master = 3
15
- }
16
- export type HamsterLevel = {
17
- level: EHamsterLevel;
18
- levelName: keyof typeof EHamsterLevel;
19
- minCoins: number;
20
- maxCoins: number;
21
- dailyEnergyLimit: number;
22
- };
23
- export type BuyHeroAvatar = {
24
- boost: number;
25
- id: number;
26
- path: string;
27
- price: number;
28
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- export declare const GAME_SETTINGS: {
2
- bets: {
3
- bet: number;
4
- maxWin: number;
5
- minWin: number;
6
- chance: number;
7
- }[];
8
- };
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GAME_SETTINGS = void 0;
4
- const PRESET_BETS = [
5
- {
6
- bet: 100,
7
- maxWin: 1.3,
8
- minWin: 0.9,
9
- chance: 0.2,
10
- },
11
- {
12
- bet: 1000,
13
- maxWin: 1.5,
14
- minWin: 0.8,
15
- chance: 0.15,
16
- },
17
- {
18
- bet: 10000,
19
- maxWin: 1.3,
20
- minWin: 0.9,
21
- chance: 0.1,
22
- },
23
- ];
24
- exports.GAME_SETTINGS = {
25
- bets: PRESET_BETS,
26
- };
@@ -1,39 +0,0 @@
1
- import { ObservableEntity } from 'service/observableEntity';
2
- import { UserServices } from 'store/user/services';
3
- import { LootBoxGameSettings } from './types';
4
- import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
5
- export declare class LootBox extends ObservableEntity<undefined> {
6
- service: UserServices;
7
- gameSettings: LootBoxGameSettings;
8
- constructor(service: UserServices);
9
- spin(amount: number): {
10
- isError: boolean;
11
- prize: number;
12
- isWin: boolean;
13
- description: string;
14
- isRealMoney?: undefined;
15
- } | {
16
- isWin: boolean;
17
- prize: number;
18
- description: string;
19
- isRealMoney: boolean;
20
- isError?: undefined;
21
- } | {
22
- isWin: boolean;
23
- prize: number;
24
- isRealMoney: boolean;
25
- isError?: undefined;
26
- description?: undefined;
27
- } | {
28
- prize: number;
29
- isWin: boolean;
30
- isError?: undefined;
31
- description?: undefined;
32
- isRealMoney?: undefined;
33
- };
34
- private getGameResult;
35
- sendUpdateEntity(info: BaseObservableSubscriber & {
36
- bet?: number;
37
- gameSettings?: boolean;
38
- }): UpdateData | null;
39
- }
@@ -1,10 +0,0 @@
1
- export type LootBoxBet = {
2
- bet: number;
3
- maxWin: number;
4
- minWin: number;
5
- chance: number;
6
- };
7
- export type LootBoxGameSettings = {
8
- bets: LootBoxBet[];
9
- key: string;
10
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });