react-memory-optimization 0.0.65 → 0.0.66

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.
@@ -1,5 +1,5 @@
1
1
  import { MoneyResponse } from '../moneyResponse';
2
- import { SendCommand, UseFulUrls } from '../../socket/types/socket';
2
+ import { SendCommand } from '../../socket/types/socket';
3
3
  import { Casino } from '../../store/casino';
4
4
  import { CasinoTournaments } from '../../store/casino/entities/casinoTournaments';
5
5
  import { UserOperations } from '../../store/operations';
@@ -13,7 +13,6 @@ import { AdaptedCasinoTournamentProps } from 'store/casino/entities/casinoTourna
13
13
  export declare class ResponseAdapter {
14
14
  callbackStatus: (s: string, result: any) => void;
15
15
  sendCommand: SendCommand;
16
- usefulUrls: UseFulUrls;
17
16
  services: ResponseAdapterService;
18
17
  parentService: SocketServices;
19
18
  casino: Casino;
@@ -5,8 +5,9 @@ import { LotteryResponseHistoryTicket, LotteryTicket } from 'store/lottery/types
5
5
  import { ResponseHistoryTicket } from 'store/lottery/entities/history/types';
6
6
  import { BettingSettings } from 'store/betting/types';
7
7
  import { CasinoHistoryBet } from 'store/operations/entities/casinoHistory/types';
8
- import { SendCommand, TBettingSettings, TCasinoSettings, UseFulUrls } from 'socket/types/socket';
8
+ import { SendCommand, TBettingSettings, TCasinoSettings } from 'socket/types/socket';
9
9
  import { SocketServices } from 'socket/services';
10
+ import { UserInfoSettings } from 'store/user/types';
10
11
  export declare enum EKYCStatus {
11
12
  NotVerified = 0,
12
13
  NeedKYC = 1,
@@ -170,7 +171,7 @@ export type ResponseAdapterInstanceProps = {
170
171
  language: string;
171
172
  sendCommand: SendCommand;
172
173
  parentService: SocketServices;
173
- usefulUrls: UseFulUrls;
174
+ userInfoSettings: UserInfoSettings;
174
175
  };
175
176
  export type HandleRunGameResponse = {
176
177
  errorCode: number;
@@ -128,8 +128,8 @@ export declare class Socket implements SocketInterface {
128
128
  handleBuyAvatar(info: BuyAvatarProps): boolean;
129
129
  handleBuyHero(info: BuyHeroAvatar): boolean;
130
130
  subscribeUserAvatar(props: BaseObservableSubscriber): boolean;
131
- subscribeUserAvatars(props: BaseObservableSubscriber): boolean;
132
- unsubscribeAvatar(uid: string): boolean;
131
+ subscribeAvatars(props: BaseObservableSubscriber): boolean;
132
+ unsubscribeAvatarEntity(uid: string): boolean;
133
133
  subscribeLotteryFreeCash(props: SubscribeFreeCashTickets): boolean;
134
134
  unsubscribeLotteryFreeCash(uid: string): boolean;
135
135
  subscribeLotteryInstantCash(props: SubscribeInstantTickets): boolean;
@@ -25,7 +25,7 @@ import { JackpotSettings, JackpotSubscribes } from 'store/casino/entities/jackpo
25
25
  import { CasinoHistoryGamesSubscriber } from 'store/operations/entities/casinoHistory/types';
26
26
  import { SubscribeCasinoCategoriesInfoProps } from 'store/casino/entities/categories/types';
27
27
  import { BettingEntitySubscribers } from 'store/betting/types';
28
- import { SubscribeUserKeys } from 'store/user/types';
28
+ import { SubscribeUserKeys, UserInfoSettings } from 'store/user/types';
29
29
  import { ResponseAdapter } from 'service/responseAdapter';
30
30
  import { CasinoPromotionSettings, PromotionSubscribeProps } from 'store/casino/entities/promotions/types';
31
31
  export declare enum ESocketCallbackStep {
@@ -44,7 +44,7 @@ export interface ISocketSettings {
44
44
  language: string;
45
45
  casinoSettings: TCasinoSettings;
46
46
  bettingSettings: TBettingSettings;
47
- usefulUrls: UseFulUrls;
47
+ userInfo: UserInfoSettings;
48
48
  appType: number;
49
49
  isDevMode?: boolean;
50
50
  socketCallback: (step: ESocketCallbackStep) => void;
@@ -52,9 +52,6 @@ export interface ISocketSettings {
52
52
  referralBaseUrl: string;
53
53
  token: string;
54
54
  }
55
- export type UseFulUrls = {
56
- stories: string | null;
57
- } | null;
58
55
  export type TCasinoSettings = {
59
56
  casinoCategoryUrls: [string, string];
60
57
  isVertical: boolean;
@@ -192,8 +189,8 @@ export interface SocketInterface {
192
189
  handleSaveUserAvatar: (props: null | AvatarType) => void;
193
190
  handleBuyAvatar: (props: BuyAvatarProps) => void;
194
191
  subscribeUserAvatar: (props: BaseObservableSubscriber) => void;
195
- subscribeUserAvatars: (props: BaseObservableSubscriber) => void;
196
- unsubscribeAvatar: (uid: string) => void;
192
+ subscribeAvatars: (props: BaseObservableSubscriber) => void;
193
+ unsubscribeAvatarEntity: (uid: string) => void;
197
194
  getLootBoxResult: (bet: number) => void;
198
195
  getLootBoxGameSettings: () => void;
199
196
  getWheelItems: () => number[];
@@ -14,5 +14,6 @@ export declare enum ENotifications {
14
14
  PromoCodeError = 12,
15
15
  PromoCodeSuccess = 13,
16
16
  LootBoxTakeMonthly = 14,
17
- AccrualHistoryError = 15
17
+ AccrualHistoryError = 15,
18
+ SendCodeResponse = 16
18
19
  }
@@ -19,4 +19,5 @@ var ENotifications;
19
19
  ENotifications[ENotifications["PromoCodeSuccess"] = 13] = "PromoCodeSuccess";
20
20
  ENotifications[ENotifications["LootBoxTakeMonthly"] = 14] = "LootBoxTakeMonthly";
21
21
  ENotifications[ENotifications["AccrualHistoryError"] = 15] = "AccrualHistoryError";
22
+ ENotifications[ENotifications["SendCodeResponse"] = 16] = "SendCodeResponse";
22
23
  })(ENotifications || (exports.ENotifications = ENotifications = {}));
@@ -1,26 +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 { AvatarInfo, AvatarType, BuyAvatarProps } from './types';
4
+ import { AvatarInfo, AvatarType, BuyAvatarProps, EAvatarRequestStatus } from './types';
5
5
  import { FavAvatarInfo } from '../favorites/types';
6
6
  export declare class Avatar extends ObservableEntity<undefined> {
7
7
  service: UserServices;
8
8
  _avatarInfo: AvatarInfo | null;
9
+ _avatars: AvatarType[];
10
+ _requestStatus: EAvatarRequestStatus;
9
11
  constructor(service: UserServices);
12
+ set avatarInfo(avatarInfo: null | AvatarInfo);
13
+ get avatarInfo(): null | AvatarInfo;
14
+ set requestStatus(status: EAvatarRequestStatus);
15
+ get requestStatus(): EAvatarRequestStatus;
16
+ set avatars(avatars: any[]);
17
+ get avatars(): any[];
10
18
  revalidateAvatarsInfo(availableIds: number[]): {
11
- avatars: {
12
- isBlocked: boolean;
13
- id: number;
14
- price: number;
15
- isSpecial: boolean;
16
- }[];
19
+ avatars: any[];
17
20
  name: string;
18
21
  }[];
19
22
  handleSaveAvatarInfo(avatar: null | FavAvatarInfo): void;
20
23
  handleBuyAvatar(info: BuyAvatarProps): void;
21
24
  handleChangeUserAvatar(avatarInfo: AvatarType | null): void;
22
- set avatarInfo(avatarInfo: null | AvatarInfo);
23
- get avatarInfo(): null | AvatarInfo;
24
25
  sendUpdateEntity(info: BaseObservableSubscriber & {
25
26
  isAvatar?: boolean;
26
27
  isAvatars?: boolean;
@@ -2,16 +2,17 @@ export type AvatarInfo = {
2
2
  activeAvatar: number | null;
3
3
  avatars: AvatarCollectionType[];
4
4
  };
5
- export type AvatarType = {
6
- id: number;
7
- price: number;
8
- isBlocked: boolean;
9
- isSpecial: boolean;
10
- };
11
5
  export type AvatarCollectionType = {
12
6
  name: string;
13
7
  avatars: AvatarType[];
14
8
  };
9
+ export declare enum EAvatarRequestStatus {
10
+ Unknown = 0,
11
+ Requesting = 1,
12
+ Success = 2,
13
+ Rejected = 3
14
+ }
15
+ export type AvatarType = any;
15
16
  export type BuyAvatarProps = {
16
17
  price: number;
17
18
  id: number;
@@ -1,2 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EAvatarRequestStatus = void 0;
4
+ var EAvatarRequestStatus;
5
+ (function (EAvatarRequestStatus) {
6
+ EAvatarRequestStatus[EAvatarRequestStatus["Unknown"] = 0] = "Unknown";
7
+ EAvatarRequestStatus[EAvatarRequestStatus["Requesting"] = 1] = "Requesting";
8
+ EAvatarRequestStatus[EAvatarRequestStatus["Success"] = 2] = "Success";
9
+ EAvatarRequestStatus[EAvatarRequestStatus["Rejected"] = 3] = "Rejected";
10
+ })(EAvatarRequestStatus || (exports.EAvatarRequestStatus = EAvatarRequestStatus = {}));
@@ -1,5 +1,5 @@
1
1
  import { Observable } from '../../service/observable';
2
- import { CountryInfo, CountryInfoResponse, CurrencyInfo, HandleAuthResponseProps, SubscribeUserKeys, UserInfo } from './types';
2
+ import { CountryInfo, CountryInfoResponse, CurrencyInfo, HandleAuthResponseProps, SubscribeUserKeys, UserInfo, UserInfoSettings } from './types';
3
3
  import { UserFavorites } from './entities/favorites';
4
4
  import { UserServices } from './services';
5
5
  import { Balance } from './entities/balance';
@@ -39,7 +39,8 @@ export declare class User extends ObservableEntity<undefined> {
39
39
  _currencyInfo: CurrencyInfo | null;
40
40
  _ratio: number;
41
41
  userInfo: null | UserInfo;
42
- constructor(sendCommand: SendCommand, callbackStatus: CallbackStatus, parentService: ResponseAdapterService);
42
+ userInfoSettings: UserInfoSettings;
43
+ constructor(sendCommand: SendCommand, callbackStatus: CallbackStatus, parentService: ResponseAdapterService, userInfoSettings: UserInfoSettings);
43
44
  set minDepositOdd(value: number);
44
45
  get minDepositOdd(): number;
45
46
  set availableCurrencies(availableCurrencies: CurrencyInfo[]);
@@ -29,4 +29,5 @@ export declare class UserServices {
29
29
  getMonthlyBonus(): Operation | null;
30
30
  getUserRatio(): number;
31
31
  applyMonthlyBonus(operationId: number): void;
32
+ fetchingAvatars(): Promise<void>;
32
33
  }
@@ -59,6 +59,10 @@ export type CountryInfo = {
59
59
  countryId: number;
60
60
  currencyIds: number[];
61
61
  };
62
+ export type UserInfoSettings = {
63
+ avatars: string;
64
+ stories: string;
65
+ };
62
66
  export type SubscribeUserKeys = {
63
67
  isCountryInfo?: boolean;
64
68
  isMinDeposit?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-memory-optimization",
3
- "version": "0.0.65",
3
+ "version": "0.0.66",
4
4
  "description": "react memory optimization library",
5
5
  "sideEffects": false,
6
6
  "files": [