react-memory-optimization 0.0.67 → 0.0.69
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/bundle.js +1 -1
- package/dist/lib/socket/index.d.ts +2 -3
- package/dist/lib/socket/types/socket.d.ts +2 -3
- package/dist/lib/store/casino/entities/promotions/index.d.ts +3 -3
- package/dist/lib/store/casino/services/index.d.ts +2 -2
- package/dist/lib/store/user/entities/{avatar → avatars}/index.d.ts +13 -13
- package/dist/lib/store/user/entities/{avatar → avatars}/types.d.ts +14 -9
- package/dist/lib/store/user/entities/favorites/constants.js +1 -4
- package/dist/lib/store/user/entities/favorites/types.d.ts +3 -6
- package/dist/lib/store/user/index.d.ts +2 -2
- package/dist/lib/store/user/services/index.d.ts +3 -2
- package/package.json +1 -1
- package/dist/lib/store/user/entities/avatar/constants.d.ts +0 -2
- package/dist/lib/store/user/entities/avatar/constants.js +0 -75
- /package/dist/lib/store/user/entities/{avatar → avatars}/types.js +0 -0
|
@@ -20,7 +20,7 @@ import { SubscribeBuyTicketInfoProps } from 'store/lottery/types';
|
|
|
20
20
|
import { SubscribeLotteryAvailableForBuyingProps, SubscribeLotteryHistoryProps } from 'store/lottery/entities/history/types';
|
|
21
21
|
import { ExperimentalFeatures } from 'service/experimental';
|
|
22
22
|
import { BaseObservableSubscriber } from 'service/observable/type';
|
|
23
|
-
import { AvatarType, BuyAvatarProps } from 'store/user/entities/
|
|
23
|
+
import { AvatarType, BuyAvatarProps, SubscribeAvatars } from 'store/user/entities/avatars/types';
|
|
24
24
|
import { BuyHeroAvatar } from 'store/user/entities/hamster/types';
|
|
25
25
|
import { UpdateVipClubEntityKey } from 'store/operations/entities/vipClub/types';
|
|
26
26
|
import { CashBonusChannelType } from 'store/operations/entities/cashBonuses/types';
|
|
@@ -127,8 +127,7 @@ export declare class Socket implements SocketInterface {
|
|
|
127
127
|
handleSaveUserAvatar(info: AvatarType | null): boolean;
|
|
128
128
|
handleBuyAvatar(info: BuyAvatarProps): boolean;
|
|
129
129
|
handleBuyHero(info: BuyHeroAvatar): boolean;
|
|
130
|
-
|
|
131
|
-
subscribeAvatars(props: BaseObservableSubscriber): boolean;
|
|
130
|
+
subscribeAvatars(props: SubscribeAvatars): boolean;
|
|
132
131
|
unsubscribeAvatarEntity(uid: string): boolean;
|
|
133
132
|
subscribeLotteryFreeCash(props: SubscribeFreeCashTickets): boolean;
|
|
134
133
|
unsubscribeLotteryFreeCash(uid: string): boolean;
|
|
@@ -16,7 +16,7 @@ import { SubscribeBuyTicketInfoProps } from 'store/lottery/types';
|
|
|
16
16
|
import { SubscribeLotteryAvailableForBuyingProps, SubscribeLotteryHistoryProps } from 'store/lottery/entities/history/types';
|
|
17
17
|
import { BaseObservableSubscriber } from 'service/observable/type';
|
|
18
18
|
import { ExperimentalFeatures } from 'service/experimental';
|
|
19
|
-
import { AvatarType, BuyAvatarProps } from 'store/user/entities/
|
|
19
|
+
import { AvatarType, BuyAvatarProps, SubscribeAvatars } from 'store/user/entities/avatars/types';
|
|
20
20
|
import { BuyHeroAvatar } from 'store/user/entities/hamster/types';
|
|
21
21
|
import { UpdateVipClubEntityKey } from 'store/operations/entities/vipClub/types';
|
|
22
22
|
import { CashBonusChannelType } from 'store/operations/entities/cashBonuses/types';
|
|
@@ -189,8 +189,7 @@ export interface SocketInterface {
|
|
|
189
189
|
unsubscribeFavoriteEntity: (uid: string) => void;
|
|
190
190
|
handleSaveUserAvatar: (props: null | AvatarType) => void;
|
|
191
191
|
handleBuyAvatar: (props: BuyAvatarProps) => void;
|
|
192
|
-
|
|
193
|
-
subscribeAvatars: (props: BaseObservableSubscriber) => void;
|
|
192
|
+
subscribeAvatars: (props: SubscribeAvatars) => void;
|
|
194
193
|
unsubscribeAvatarEntity: (uid: string) => void;
|
|
195
194
|
getLootBoxResult: (bet: number) => void;
|
|
196
195
|
getLootBoxGameSettings: () => void;
|
|
@@ -5,11 +5,11 @@ import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
|
|
|
5
5
|
export declare class Promotions extends ObservableEntity<unknown> {
|
|
6
6
|
service: CasinoServices;
|
|
7
7
|
settings: CasinoPromotionSettings;
|
|
8
|
-
_activePromotion: PromotionEntity;
|
|
8
|
+
_activePromotion: PromotionEntity | null;
|
|
9
9
|
_promotionHistory: PromotionEntity[];
|
|
10
10
|
constructor(service: CasinoServices, settings: CasinoPromotionSettings);
|
|
11
|
-
set activePromotion(promo: PromotionEntity);
|
|
12
|
-
get activePromotion(): PromotionEntity;
|
|
11
|
+
set activePromotion(promo: null | PromotionEntity);
|
|
12
|
+
get activePromotion(): null | PromotionEntity;
|
|
13
13
|
set promotionHistory(promo: PromotionEntity[]);
|
|
14
14
|
get promotionHistory(): PromotionEntity[];
|
|
15
15
|
init(): Promise<void>;
|
|
@@ -67,6 +67,6 @@ export declare class CasinoServices {
|
|
|
67
67
|
configureCasinoData(): any;
|
|
68
68
|
decodeCasinoData(stream: Uint8Array): ResponseEncodeConfig;
|
|
69
69
|
getGamesSortFnByType(type: ESortType): (a: AdaptedGame, b: AdaptedGame) => number;
|
|
70
|
-
fetchingPromotions(path: string): Promise<
|
|
71
|
-
promotionAdapter(promotion: PromotionEntity): PromotionAdaptedEntity;
|
|
70
|
+
fetchingPromotions(path: string): Promise<null | PromotionEntity>;
|
|
71
|
+
promotionAdapter(promotion: PromotionEntity): PromotionAdaptedEntity | null;
|
|
72
72
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
|
|
2
2
|
import { ObservableEntity } from 'service/observableEntity';
|
|
3
3
|
import { UserServices } from 'store/user/services';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export declare class Avatar extends ObservableEntity<undefined> {
|
|
4
|
+
import { AvatarType, BuyAvatarProps, EAvatarRequestStatus } from './types';
|
|
5
|
+
export declare class Avatars extends ObservableEntity<undefined> {
|
|
7
6
|
service: UserServices;
|
|
8
|
-
_avatarInfo:
|
|
7
|
+
_avatarInfo: AvatarType | null;
|
|
9
8
|
_avatars: AvatarType[];
|
|
10
9
|
_requestStatus: EAvatarRequestStatus;
|
|
11
10
|
constructor(service: UserServices);
|
|
12
|
-
set avatarInfo(avatarInfo: null |
|
|
13
|
-
get avatarInfo(): null |
|
|
11
|
+
set avatarInfo(avatarInfo: null | AvatarType);
|
|
12
|
+
get avatarInfo(): null | AvatarType;
|
|
14
13
|
set requestStatus(status: EAvatarRequestStatus);
|
|
15
14
|
get requestStatus(): EAvatarRequestStatus;
|
|
16
|
-
set avatars(avatars:
|
|
17
|
-
get avatars():
|
|
18
|
-
revalidateAvatarsInfo(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
set avatars(avatars: AvatarType[]);
|
|
16
|
+
get avatars(): AvatarType[];
|
|
17
|
+
revalidateAvatarsInfo(avatar: AvatarType | null): void;
|
|
18
|
+
handleFavoriteSubscribes(data: {
|
|
19
|
+
isAvatar: boolean;
|
|
20
|
+
payload: AvatarType | null;
|
|
21
|
+
}): void;
|
|
23
22
|
handleBuyAvatar(info: BuyAvatarProps): void;
|
|
24
23
|
handleChangeUserAvatar(avatarInfo: AvatarType | null): void;
|
|
24
|
+
handleUserAvatar(): UpdateData | null;
|
|
25
25
|
sendUpdateEntity(info: BaseObservableSubscriber & {
|
|
26
26
|
isAvatar?: boolean;
|
|
27
27
|
isAvatars?: boolean;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
activeAvatar: number | null;
|
|
3
|
-
avatars: AvatarCollectionType[];
|
|
4
|
-
};
|
|
5
|
-
export type AvatarCollectionType = {
|
|
6
|
-
name: string;
|
|
7
|
-
avatars: AvatarType[];
|
|
8
|
-
};
|
|
1
|
+
import { BaseObservableSubscriber } from 'service/observable/type';
|
|
9
2
|
export declare enum EAvatarRequestStatus {
|
|
10
3
|
Unknown = 0,
|
|
11
4
|
Requesting = 1,
|
|
12
5
|
Success = 2,
|
|
13
6
|
Rejected = 3
|
|
14
7
|
}
|
|
15
|
-
export type AvatarType =
|
|
8
|
+
export type AvatarType = {
|
|
9
|
+
id: number;
|
|
10
|
+
path: string;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
16
13
|
export type BuyAvatarProps = {
|
|
17
14
|
price: number;
|
|
18
15
|
id: number;
|
|
@@ -29,3 +26,11 @@ export declare const enum EAvatarId {
|
|
|
29
26
|
SlothCarton = 8,
|
|
30
27
|
SlothRealistic = 9
|
|
31
28
|
}
|
|
29
|
+
export type SubscribeAvatarParams = {
|
|
30
|
+
isAvatar: true;
|
|
31
|
+
isAvatars?: never;
|
|
32
|
+
} | {
|
|
33
|
+
isAvatars: true;
|
|
34
|
+
isAvatar?: never;
|
|
35
|
+
};
|
|
36
|
+
export type SubscribeAvatars = BaseObservableSubscriber & SubscribeAvatarParams;
|
|
@@ -3,6 +3,7 @@ import { CasinoServices } from 'store/casino/services';
|
|
|
3
3
|
import { HamsterInfo } from '../hamster/types';
|
|
4
4
|
import { WheelResultInfo } from '../bonusWheel/types';
|
|
5
5
|
import { CasinoCategory } from 'store/casino/entities/categories/types';
|
|
6
|
+
import { AvatarType } from '../avatars/types';
|
|
6
7
|
export type ObservableSettings = {
|
|
7
8
|
[uid: string]: ObservableSettingIsFavoriteGame | ObservableSettingHasFavoriteGames | ObservableSettingFavoriteGames;
|
|
8
9
|
};
|
|
@@ -33,17 +34,13 @@ export type UserFavoritesEntities = {
|
|
|
33
34
|
'3'?: string;
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
|
-
|
|
37
|
+
avatar: AvatarType | null;
|
|
37
38
|
betting: FavoriteBetting;
|
|
38
39
|
hamster: HamsterInfo;
|
|
39
40
|
bonusCoins: number;
|
|
40
41
|
wheelInfo: null | WheelResultInfo;
|
|
41
42
|
clickId: string | null;
|
|
42
43
|
};
|
|
43
|
-
export type FavAvatarInfo = {
|
|
44
|
-
activeAvatar: number | null;
|
|
45
|
-
availableAvatars: number[];
|
|
46
|
-
};
|
|
47
44
|
type FavoriteBetting = {
|
|
48
45
|
events: FavoriteEvents;
|
|
49
46
|
sports: FavoriteSports;
|
|
@@ -69,7 +66,7 @@ type PrepareFavoriteEntitiesForWheelResultProps = {
|
|
|
69
66
|
};
|
|
70
67
|
type PrepareFavoriteEntitiesForAvatarProps = {
|
|
71
68
|
isUserAvatar: boolean;
|
|
72
|
-
userAvatar:
|
|
69
|
+
userAvatar: AvatarType | null;
|
|
73
70
|
};
|
|
74
71
|
type PrepareFavoriteEntitiesUserAddAvatarProps = {
|
|
75
72
|
isUserAddAvailableAvatar: boolean;
|
|
@@ -11,7 +11,7 @@ import { Hamster } from './entities/hamster';
|
|
|
11
11
|
import { LootBox } from './entities/lootBox';
|
|
12
12
|
import { BonusWheel } from './entities/bonusWheel';
|
|
13
13
|
import { DailyActivities } from './entities/daily';
|
|
14
|
-
import {
|
|
14
|
+
import { Avatars } from './entities/avatars';
|
|
15
15
|
import { PromoCode } from './entities/promoCode';
|
|
16
16
|
import { Stories } from './entities/stories';
|
|
17
17
|
import { ObservableEntity } from 'service/observableEntity';
|
|
@@ -27,7 +27,7 @@ export declare class User extends ObservableEntity<undefined> {
|
|
|
27
27
|
bonusWheel: BonusWheel;
|
|
28
28
|
lootBox: LootBox;
|
|
29
29
|
dailyActivities: DailyActivities;
|
|
30
|
-
avatars:
|
|
30
|
+
avatars: Avatars;
|
|
31
31
|
promoCode: PromoCode;
|
|
32
32
|
storiesInstance: Stories;
|
|
33
33
|
_availableCurrencies: CurrencyInfo[];
|
|
@@ -3,6 +3,7 @@ import { HamsterInfo } from '../entities/hamster/types';
|
|
|
3
3
|
import { EReferralPath } from '../entities/referral/types';
|
|
4
4
|
import { CallbackInfo, SendCommand } from './types';
|
|
5
5
|
import { Operation } from 'store/operations/types';
|
|
6
|
+
import { AvatarType } from '../entities/avatars/types';
|
|
6
7
|
export declare class UserServices {
|
|
7
8
|
parent: User;
|
|
8
9
|
callbackInfo: CallbackInfo;
|
|
@@ -21,10 +22,10 @@ export declare class UserServices {
|
|
|
21
22
|
getBonusBalance(): number;
|
|
22
23
|
revalidateDailyTasks(): void;
|
|
23
24
|
updateWheelResult(): void;
|
|
24
|
-
updateAvatarInfo(userAvatar:
|
|
25
|
+
updateAvatarInfo(userAvatar: AvatarType | null): void;
|
|
25
26
|
getHamsterBalance(): number;
|
|
26
27
|
unlockAvatar(id: number): void;
|
|
27
|
-
avatarRevalidateAvailable(
|
|
28
|
+
avatarRevalidateAvailable(avatar: AvatarType | null): void;
|
|
28
29
|
activatePromoCode(promocode: string): Promise<any>;
|
|
29
30
|
getMonthlyBonus(): Operation | null;
|
|
30
31
|
getUserRatio(): number;
|
package/package.json
CHANGED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AVATAR_COLLECTIONS = void 0;
|
|
4
|
-
exports.AVATAR_COLLECTIONS = [
|
|
5
|
-
{
|
|
6
|
-
name: 'joker',
|
|
7
|
-
avatars: [
|
|
8
|
-
{
|
|
9
|
-
price: 100000,
|
|
10
|
-
id: 0 /* EAvatarId.JokerTeens */,
|
|
11
|
-
isSpecial: false,
|
|
12
|
-
isBlocked: true,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
price: 100000,
|
|
16
|
-
id: 1 /* EAvatarId.JokerKids */,
|
|
17
|
-
isSpecial: false,
|
|
18
|
-
isBlocked: true,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
price: 100000,
|
|
22
|
-
id: 2 /* EAvatarId.JokerSenior */,
|
|
23
|
-
isSpecial: false,
|
|
24
|
-
isBlocked: true,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
price: 100000,
|
|
28
|
-
id: 3 /* EAvatarId.JokerRealistic */,
|
|
29
|
-
isSpecial: false,
|
|
30
|
-
isBlocked: true,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
price: 100000,
|
|
34
|
-
id: 4 /* EAvatarId.JokerFunny */,
|
|
35
|
-
isSpecial: false,
|
|
36
|
-
isBlocked: true,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
price: 100000,
|
|
40
|
-
id: 5 /* EAvatarId.JokerRealisticSerious */,
|
|
41
|
-
isSpecial: false,
|
|
42
|
-
isBlocked: true,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
price: 100000,
|
|
46
|
-
id: 6 /* EAvatarId.JokerRealisticPessimism */,
|
|
47
|
-
isSpecial: false,
|
|
48
|
-
isBlocked: true,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
price: 100000,
|
|
52
|
-
id: 7 /* EAvatarId.JokerCartonCrazy */,
|
|
53
|
-
isSpecial: false,
|
|
54
|
-
isBlocked: true,
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'sloth',
|
|
60
|
-
avatars: [
|
|
61
|
-
{
|
|
62
|
-
price: 100000,
|
|
63
|
-
id: 8 /* EAvatarId.SlothCarton */,
|
|
64
|
-
isSpecial: false,
|
|
65
|
-
isBlocked: true,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
price: 100000,
|
|
69
|
-
id: 9 /* EAvatarId.SlothRealistic */,
|
|
70
|
-
isSpecial: false,
|
|
71
|
-
isBlocked: true,
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
];
|
|
File without changes
|