react-memory-optimization 0.0.21 → 0.0.23
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 +6 -8
- package/dist/lib/socket/types.d.ts +7 -9
- package/dist/lib/store/betting/entities/BazarFrame/index.d.ts +2 -1
- package/dist/lib/store/betting/index.d.ts +2 -0
- package/dist/lib/store/betting/services/index.d.ts +1 -1
- package/dist/lib/store/casino/entities/providers/index.d.ts +1 -0
- package/dist/lib/store/user/index.d.ts +17 -17
- package/dist/lib/store/user/types.d.ts +7 -36
- package/dist/lib/store/user/types.js +0 -41
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ESocketCallbackStep, ISocketSettings, SocketInterface, TBettingSettings, TCasinoSettings } from './types';
|
|
2
2
|
import { ResponseAdapter } from '../service/responseAdapter';
|
|
3
3
|
import { SubscribeSportInfoBySportIdProps, SubscribeSportsProps } from '../store/betting/entities/sports/types';
|
|
4
|
-
import { SubscribeCountryInfoProps, SubscribeMinDepositInfoProps, SubscribeUserCurrencyInfoProps, SubscribeUserStateProps } from '../store/user/types';
|
|
5
4
|
import { ReadModuleKeys, ReadModuleType } from '../binary/types';
|
|
6
5
|
import { CashOutTicketProps, SubscribeComposeTransactionsProps } from './methodTypes';
|
|
7
6
|
import { SubscribeBettingEventsByTournamentIdProps, SubscribeBettingTopEventsProps, SubscribeEventDetailsMarketTabs, SubscribeEventDetailsMarketsByGroupIdProps, SubscribeEventShortInfoProps, SubscribeLineEntitiesProps, SubscribeOdd, SubscribeEventEntitiesProps } from '../store/betting/entities/events/types';
|
|
@@ -28,6 +27,7 @@ import { CashBonusChannelType } from 'store/operations/entities/cashBonuses/type
|
|
|
28
27
|
import { JackpotSettings } from 'store/casino/entities/jackpots/types';
|
|
29
28
|
import { CasinoHistoryGamesSubscriber } from 'store/operations/entities/casinoHistory/types';
|
|
30
29
|
import { BettingEntitySubscribers } from 'store/betting/types';
|
|
30
|
+
import { SubscribeUserKeys } from 'store/user/types';
|
|
31
31
|
export declare class Socket implements SocketInterface {
|
|
32
32
|
socketServices: SocketServices;
|
|
33
33
|
initialSettings: ISocketSettings;
|
|
@@ -68,13 +68,11 @@ export declare class Socket implements SocketInterface {
|
|
|
68
68
|
decode(stream: Uint8Array, step: number): void;
|
|
69
69
|
subscribeEntity(method: () => boolean): boolean;
|
|
70
70
|
logout(): void;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
subscribeUserState(props: SubscribeUserStateProps): boolean;
|
|
77
|
-
subscribeUserInfo(props: SubscribeUserStateProps): boolean;
|
|
71
|
+
subscribeUserEntity(props: BaseObservableSubscriber & SubscribeUserKeys): boolean;
|
|
72
|
+
subscribeBazarFrameUrl(props: BaseObservableSubscriber & {
|
|
73
|
+
gameId: number;
|
|
74
|
+
}): boolean;
|
|
75
|
+
unsubscribeBazarFrameUrl(uid: string): boolean;
|
|
78
76
|
subscribeStories(props: BaseObservableSubscriber): boolean;
|
|
79
77
|
unsubscribeUserEntity(uid: string): boolean;
|
|
80
78
|
subscribeBalanceInfo(props: BaseObservableSubscriber): boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SubscribeSportInfoBySportIdProps, SubscribeSportsProps } from '../store/betting/entities/sports/types';
|
|
2
2
|
import { SubscriberCategoriesProps, SubscriberCategoryProps } from '../store/betting/entities/categories/types';
|
|
3
|
-
import { SubscribeCountryInfoProps, SubscribeMinDepositInfoProps, SubscribeUserCurrencyInfoProps, SubscribeUserStateProps } from '../store/user/types';
|
|
4
3
|
import { CashOutTicketProps, SubscribeComposeTransactionsProps } from './methodTypes';
|
|
5
4
|
import { SubscribeBettingEventsByTournamentIdProps, SubscribeBettingTopEventsProps, SubscribeEventDetailsMarketTabs, SubscribeEventDetailsMarketsByGroupIdProps, SubscribeEventEntitiesProps, SubscribeEventShortInfoProps, SubscribeLineEntitiesProps, SubscribeOdd } from '../store/betting/entities/events/types';
|
|
6
5
|
import { SubscribeLiveScoreProps } from '../store/betting/entities/events/live/types';
|
|
@@ -26,6 +25,7 @@ import { JackpotSettings, JackpotSubscribes } from 'store/casino/entities/jackpo
|
|
|
26
25
|
import { CasinoHistoryGamesSubscriber } from 'store/operations/entities/casinoHistory/types';
|
|
27
26
|
import { SubscribeCasinoCategoriesInfoProps } from 'store/casino/entities/categories/types';
|
|
28
27
|
import { BettingEntitySubscribers } from 'store/betting/types';
|
|
28
|
+
import { SubscribeUserKeys } from 'store/user/types';
|
|
29
29
|
export declare enum ESocketCallbackStep {
|
|
30
30
|
Unknown = 0,
|
|
31
31
|
Init = 1,
|
|
@@ -136,13 +136,9 @@ export interface SocketInterface {
|
|
|
136
136
|
sendCommand: SendCommand;
|
|
137
137
|
subscribeEntity: (method: () => boolean) => boolean;
|
|
138
138
|
logout: () => void;
|
|
139
|
-
|
|
140
|
-
subscribeMinDepOdd: (props: SubscribeMinDepositInfoProps) => boolean;
|
|
141
|
-
subscribeUserCurrencyInfo: (props: SubscribeUserCurrencyInfoProps) => boolean;
|
|
142
|
-
subscribeUserState: (props: SubscribeUserStateProps) => boolean;
|
|
143
|
-
subscribeUserInfo: (props: SubscribeUserStateProps) => boolean;
|
|
144
|
-
subscribeStories: (props: BaseObservableSubscriber) => boolean;
|
|
139
|
+
subscribeUserEntity: (props: BaseObservableSubscriber & SubscribeUserKeys) => boolean;
|
|
145
140
|
unsubscribeUserEntity: (uid: string) => boolean;
|
|
141
|
+
subscribeStories: (props: BaseObservableSubscriber) => boolean;
|
|
146
142
|
subscribeBalanceInfo: (props: BaseObservableSubscriber) => boolean;
|
|
147
143
|
subscribeBonusBalanceCoins: (props: BaseObservableSubscriber) => boolean;
|
|
148
144
|
unsubscribeBalanceEntity: (uid: string) => boolean;
|
|
@@ -226,8 +222,10 @@ export interface SocketInterface {
|
|
|
226
222
|
subscribeBettingEntity: (props: BettingEntitySubscribers) => boolean;
|
|
227
223
|
subscribeOdd: (props: SubscribeOdd) => void;
|
|
228
224
|
unsubscribeOdd: (uid: string, isPrematch: boolean) => void;
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
subscribeBazarFrameUrl: (props: BaseObservableSubscriber & {
|
|
226
|
+
gameId: number;
|
|
227
|
+
}) => boolean;
|
|
228
|
+
unsubscribeBazarFrameUrl: (uid: string) => boolean;
|
|
231
229
|
subscribeBettingTopEvents: (props: SubscribeBettingTopEventsProps) => boolean;
|
|
232
230
|
unsubscribeBettingTopEvents: (uid: string) => boolean;
|
|
233
231
|
subscribeSports: (props: SubscribeSportsProps) => boolean;
|
|
@@ -10,9 +10,10 @@ export declare class BazarFrame extends ObservableEntity<undefined> {
|
|
|
10
10
|
set url(value: string);
|
|
11
11
|
get url(): string;
|
|
12
12
|
parseResponse(result: HandleRunGameResponse): void;
|
|
13
|
-
getAndSendUrl(): UpdateData | null;
|
|
13
|
+
getAndSendUrl(gameId: number): UpdateData | null;
|
|
14
14
|
sendUpdateEntity(d: BaseObservableSubscriber & {
|
|
15
15
|
[key: string]: unknown;
|
|
16
|
+
gameId: number;
|
|
16
17
|
}): UpdateData | null;
|
|
17
18
|
unsubscribe(uid: string): void;
|
|
18
19
|
}
|
|
@@ -12,6 +12,7 @@ import { ObservableEntity } from 'service/observableEntity';
|
|
|
12
12
|
import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
|
|
13
13
|
import { BettingResponseAdapter } from './adapter';
|
|
14
14
|
import { BazarFrame } from './entities/BazarFrame';
|
|
15
|
+
import { ResponseAdapterService } from 'service/responseAdapter/services';
|
|
15
16
|
export declare class Betting extends ObservableEntity<undefined> {
|
|
16
17
|
bettingResponseAdapter: BettingResponseAdapter;
|
|
17
18
|
bazarFrame: BazarFrame;
|
|
@@ -25,6 +26,7 @@ export declare class Betting extends ObservableEntity<undefined> {
|
|
|
25
26
|
tickets: BettingTickets;
|
|
26
27
|
_banUserCashOut: boolean;
|
|
27
28
|
bettingServices: BettingServices;
|
|
29
|
+
adapterService: ResponseAdapterService;
|
|
28
30
|
_isBettingAvailable: boolean;
|
|
29
31
|
_isSettingInstalled: boolean;
|
|
30
32
|
constructor(props: BettingProps);
|
|
@@ -312,5 +312,5 @@ export declare class BettingServices {
|
|
|
312
312
|
away: string;
|
|
313
313
|
}): string;
|
|
314
314
|
replaceOutcomeName(name: string, marketSpecValues: string[], lineSpecifierValues: string[], home?: string, away?: string): string;
|
|
315
|
-
getBazarUrl(): void;
|
|
315
|
+
getBazarUrl(gameId: number): void;
|
|
316
316
|
}
|
|
@@ -28,5 +28,6 @@ export declare class CasinoProviders extends ObservableEntity<undefined> {
|
|
|
28
28
|
private sendProvidersUpdates;
|
|
29
29
|
private sendProviderUpdates;
|
|
30
30
|
private sendProviderGameCount;
|
|
31
|
+
private handleSendAllProviders;
|
|
31
32
|
sendUpdateEntity(d: BaseObservableSubscriber | ObservableProvidersSetting | ObservableProviderInfoSetting | ObservableProviderGameCountSetting): UpdateData | null;
|
|
32
33
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from '../../service/observable';
|
|
2
|
-
import { CountryInfo, CountryInfoResponse, CurrencyInfo, HandleAuthResponseProps,
|
|
2
|
+
import { CountryInfo, CountryInfoResponse, CurrencyInfo, HandleAuthResponseProps, SubscribeUserKeys, UserInfo } from './types';
|
|
3
3
|
import { UserFavorites } from './entities/favorites';
|
|
4
4
|
import { UserServices } from './services';
|
|
5
5
|
import { Balance } from './entities/balance';
|
|
@@ -14,7 +14,9 @@ import { DailyActivities } from './entities/daily';
|
|
|
14
14
|
import { Avatar } from './entities/avatar';
|
|
15
15
|
import { PromoCode } from './entities/promoCode';
|
|
16
16
|
import { Stories } from './entities/stories';
|
|
17
|
-
|
|
17
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
18
|
+
import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
|
|
19
|
+
export declare class User extends ObservableEntity<undefined> {
|
|
18
20
|
userObservable: Observable;
|
|
19
21
|
services: UserServices;
|
|
20
22
|
parentService: ResponseAdapterService;
|
|
@@ -28,8 +30,8 @@ export declare class User {
|
|
|
28
30
|
avatars: Avatar;
|
|
29
31
|
promoCode: PromoCode;
|
|
30
32
|
storiesInstance: Stories;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
_availableCurrencies: CurrencyInfo[];
|
|
34
|
+
_minDepositOdd: number;
|
|
33
35
|
token: string | null;
|
|
34
36
|
countryInfo: CountryInfo | null;
|
|
35
37
|
clientId: number;
|
|
@@ -38,6 +40,10 @@ export declare class User {
|
|
|
38
40
|
_ratio: number;
|
|
39
41
|
userInfo: null | UserInfo;
|
|
40
42
|
constructor(sendCommand: SendCommand, callbackStatus: CallbackStatus, parentService: ResponseAdapterService);
|
|
43
|
+
set minDepositOdd(value: number);
|
|
44
|
+
get minDepositOdd(): number;
|
|
45
|
+
set availableCurrencies(availableCurrencies: CurrencyInfo[]);
|
|
46
|
+
get availableCurrencies(): CurrencyInfo[];
|
|
41
47
|
set isAuthorized(value: boolean);
|
|
42
48
|
get isAuthorized(): boolean;
|
|
43
49
|
set currencyInfo(value: CurrencyInfo | null);
|
|
@@ -47,17 +53,11 @@ export declare class User {
|
|
|
47
53
|
reset(): void;
|
|
48
54
|
setInitialState(result: HandleAuthResponseProps): void;
|
|
49
55
|
setCountryInfo(response: CountryInfoResponse): void;
|
|
50
|
-
|
|
51
|
-
private
|
|
52
|
-
private
|
|
53
|
-
private
|
|
54
|
-
private
|
|
55
|
-
private
|
|
56
|
-
|
|
57
|
-
subscribeCountryInfo(props: SubscribeCountryInfoProps): void;
|
|
58
|
-
subscribeMinDepOdd(props: SubscribeMinDepositInfoProps): void;
|
|
59
|
-
subscribeUserCurrencyInfo(props: SubscribeUserCurrencyInfoProps): void;
|
|
60
|
-
subscribeUserState(props: SubscribeUserStateProps): void;
|
|
61
|
-
subscribeUserInfo(props: SubscribeUserStateProps): void;
|
|
62
|
-
unsubscribeUserEntity(uid: string): void;
|
|
56
|
+
private handleCountryInfo;
|
|
57
|
+
private handleCurrencyInfo;
|
|
58
|
+
private handleUserStateInfo;
|
|
59
|
+
private handleUserInfo;
|
|
60
|
+
private handleMinDepositInfo;
|
|
61
|
+
private handleAvailableCurrenciesInfo;
|
|
62
|
+
sendUpdateEntity(d: BaseObservableSubscriber & SubscribeUserKeys): UpdateData | null;
|
|
63
63
|
}
|
|
@@ -59,46 +59,18 @@ export type CountryInfo = {
|
|
|
59
59
|
countryId: number;
|
|
60
60
|
currencyIds: number[];
|
|
61
61
|
};
|
|
62
|
-
export type
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
isCurrencyInfo: boolean;
|
|
70
|
-
};
|
|
71
|
-
type ObservableUserStateSetting = {
|
|
72
|
-
isUserState: boolean;
|
|
73
|
-
};
|
|
74
|
-
type ObservableUserInfoSetting = {
|
|
75
|
-
isUserInfo: boolean;
|
|
76
|
-
};
|
|
77
|
-
type ObservableUserMinDepSetting = {
|
|
78
|
-
isMinOdd: boolean;
|
|
62
|
+
export type SubscribeUserKeys = {
|
|
63
|
+
isCountryInfo?: boolean;
|
|
64
|
+
isMinDeposit?: boolean;
|
|
65
|
+
isCurrencyInfo?: boolean;
|
|
66
|
+
isUserState?: boolean;
|
|
67
|
+
isUserInfo?: boolean;
|
|
68
|
+
isAvailableCurrencies?: boolean;
|
|
79
69
|
};
|
|
80
70
|
export type AuthInfo = {
|
|
81
71
|
isAuth: true;
|
|
82
72
|
token: string;
|
|
83
73
|
} | null;
|
|
84
|
-
export type SubscribeCountryInfoProps = {
|
|
85
|
-
uid: string;
|
|
86
|
-
callback: (info: CountryInfo | null) => void;
|
|
87
|
-
};
|
|
88
|
-
export type SubscribeMinDepositInfoProps = {
|
|
89
|
-
uid: string;
|
|
90
|
-
callback: (info: {
|
|
91
|
-
minDep: number;
|
|
92
|
-
}) => void;
|
|
93
|
-
};
|
|
94
|
-
export type SubscribeUserCurrencyInfoProps = {
|
|
95
|
-
uid: string;
|
|
96
|
-
callback: (info: CurrencyInfo | null) => void;
|
|
97
|
-
};
|
|
98
|
-
export type SubscribeUserStateProps = {
|
|
99
|
-
uid: string;
|
|
100
|
-
callback: (info: AuthInfo) => void;
|
|
101
|
-
};
|
|
102
74
|
export type PaymentDictionaries = PaymentDictionary[];
|
|
103
75
|
export type PaymentDictionary = {
|
|
104
76
|
type_in: EPaymentSpecAction;
|
|
@@ -272,4 +244,3 @@ export type MPayMethods = PaymentChannelType.MPayParazula | PaymentChannelType.M
|
|
|
272
244
|
export type WellexPayMethods = PaymentChannelType.BKashFastWellexPay | PaymentChannelType.NagadFastWellexPay | PaymentChannelType.NagadWellexPay | PaymentChannelType.BkashWellexPay | PaymentChannelType.WellxpayUpay | PaymentChannelType.BKashFastWellexPayCopy | PaymentChannelType.NagadFastWellexPayCopy | PaymentChannelType.WellxpayRocket;
|
|
273
245
|
export type CashXMethods = PaymentChannelType.NagadCashX | PaymentChannelType.BkashCashX;
|
|
274
246
|
export type RublesMethods = PaymentChannelType.WithdrawRubSber | PaymentChannelType.WithdrawRubTinkof | PaymentChannelType.CreditCard | PaymentChannelType.CreditCardFast | PaymentChannelType.CreditCardAcquirning;
|
|
275
|
-
export {};
|
|
@@ -18,47 +18,6 @@ var EPaymentLaunch;
|
|
|
18
18
|
EPaymentLaunch[EPaymentLaunch["Redirect"] = 2] = "Redirect";
|
|
19
19
|
EPaymentLaunch[EPaymentLaunch["Qr"] = 3] = "Qr";
|
|
20
20
|
})(EPaymentLaunch || (exports.EPaymentLaunch = EPaymentLaunch = {}));
|
|
21
|
-
// export type DictionaryTypes = {
|
|
22
|
-
// currency_map_channels: { id_currency: number; id_channel: number }[];
|
|
23
|
-
// payment_systems_channels: TChannel[];
|
|
24
|
-
// payment_systems_limits: TLimit[];
|
|
25
|
-
// };
|
|
26
|
-
// export enum PaymentDirect {
|
|
27
|
-
// Deposit = 1,
|
|
28
|
-
// Withdraw,
|
|
29
|
-
// }
|
|
30
|
-
// export type TLimit = {
|
|
31
|
-
// amount_max: number;
|
|
32
|
-
// amount_min: number;
|
|
33
|
-
// direction: PaymentDirect;
|
|
34
|
-
// id_channel: number;
|
|
35
|
-
// id_currency: number;
|
|
36
|
-
// id_system: number;
|
|
37
|
-
// };
|
|
38
|
-
// export type TChannel = {
|
|
39
|
-
// channel_name: string;
|
|
40
|
-
// fast_pay: number;
|
|
41
|
-
// deps_required: number;
|
|
42
|
-
// has_deposit: number;
|
|
43
|
-
// has_withdraw: number;
|
|
44
|
-
// id_channel: number;
|
|
45
|
-
// id_system: number;
|
|
46
|
-
// is_active: number;
|
|
47
|
-
// is_crypto: number;
|
|
48
|
-
// };
|
|
49
|
-
// export type Payment = {
|
|
50
|
-
// channelName: string;
|
|
51
|
-
// isFast: boolean;
|
|
52
|
-
// id: number;
|
|
53
|
-
// order: number;
|
|
54
|
-
// limit: TLimit;
|
|
55
|
-
// isCrypto: boolean;
|
|
56
|
-
// };
|
|
57
|
-
// export type Withdraw = Payment;
|
|
58
|
-
// export type Payments = {
|
|
59
|
-
// deposit: Payment[];
|
|
60
|
-
// withdraw: Withdraw[];
|
|
61
|
-
// };
|
|
62
21
|
var PaymentChannelType;
|
|
63
22
|
(function (PaymentChannelType) {
|
|
64
23
|
// new Cripto
|