react-memory-optimization 0.0.17 → 0.0.19
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/service/responseAdapter/index.d.ts +4 -4
- package/dist/lib/service/responseAdapter/types.d.ts +11 -0
- package/dist/lib/socket/index.d.ts +4 -11
- package/dist/lib/socket/types.d.ts +8 -11
- package/dist/lib/store/betting/adapter/constants.d.ts +1 -0
- package/dist/lib/store/betting/adapter/constants.js +4 -0
- package/dist/lib/store/betting/adapter/index.d.ts +15 -0
- package/dist/lib/store/betting/adapter/types.d.ts +23 -0
- package/dist/lib/store/betting/adapter/types.js +2 -0
- package/dist/lib/store/betting/entities/betslip/index.d.ts +2 -1
- package/dist/lib/store/betting/entities/categories/index.d.ts +2 -1
- package/dist/lib/store/betting/entities/events/index.d.ts +2 -1
- package/dist/lib/store/betting/entities/markets/index.d.ts +2 -1
- package/dist/lib/store/betting/entities/sports/index.d.ts +2 -1
- package/dist/lib/store/betting/entities/tickets/index.d.ts +2 -1
- package/dist/lib/store/betting/entities/tournaments/index.d.ts +6 -14
- package/dist/lib/store/betting/entities/tournaments/types.d.ts +2 -14
- package/dist/lib/store/betting/index.d.ts +13 -19
- package/dist/lib/store/betting/services/index.d.ts +44 -40
- package/dist/lib/store/betting/types.d.ts +19 -27
- package/dist/lib/store/user/entities/stories/index.d.ts +18 -0
- package/dist/lib/store/user/entities/stories/types.d.ts +10 -0
- package/dist/lib/store/user/entities/stories/types.js +2 -0
- package/dist/lib/store/user/index.d.ts +2 -0
- package/dist/lib/store/user/services/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { MoneyResponse } from '../moneyResponse';
|
|
2
|
-
import { SendCommand,
|
|
2
|
+
import { SendCommand, UseFulUrls } from '../../socket/types';
|
|
3
3
|
import { Casino } from '../../store/casino';
|
|
4
4
|
import { CasinoTournaments } from '../../store/casino/entities/casinoTournaments';
|
|
5
5
|
import { UserOperations } from '../../store/operations';
|
|
6
6
|
import { User } from '../../store/user';
|
|
7
7
|
import { Betting } from '../../store/betting';
|
|
8
8
|
import { Lottery } from 'store/lottery';
|
|
9
|
-
import { HandleBackOfficeResponse } from './types';
|
|
9
|
+
import { HandleBackOfficeResponse, ResponseAdapterInstanceProps } from './types';
|
|
10
10
|
import { ResponseAdapterService } from './services';
|
|
11
11
|
import { SocketServices } from 'socket/services';
|
|
12
12
|
import { AdaptedCasinoTournamentProps } from 'store/casino/entities/casinoTournaments/types';
|
|
13
13
|
export declare class ResponseAdapter {
|
|
14
14
|
callbackStatus: (s: string, result: any) => void;
|
|
15
15
|
sendCommand: SendCommand;
|
|
16
|
+
usefulUrls: UseFulUrls;
|
|
16
17
|
services: ResponseAdapterService;
|
|
17
18
|
parentService: SocketServices;
|
|
18
19
|
casino: Casino;
|
|
@@ -22,10 +23,9 @@ export declare class ResponseAdapter {
|
|
|
22
23
|
user: User;
|
|
23
24
|
betting: Betting;
|
|
24
25
|
lottery: Lottery;
|
|
25
|
-
constructor(
|
|
26
|
+
constructor(props: ResponseAdapterInstanceProps);
|
|
26
27
|
resultEffect(key: string, result?: any): void;
|
|
27
28
|
private handleBonusPackAvailable;
|
|
28
|
-
private handleBetSlipResponse;
|
|
29
29
|
private handleBetHistory;
|
|
30
30
|
private handleLotteryTicketsResponse;
|
|
31
31
|
private handleHistoryTickets;
|
|
@@ -5,6 +5,8 @@ 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';
|
|
9
|
+
import { SocketServices } from 'socket/services';
|
|
8
10
|
export declare enum EKYCStatus {
|
|
9
11
|
NotVerified = 0,
|
|
10
12
|
NeedKYC = 1,
|
|
@@ -161,4 +163,13 @@ export type BackOfficeSettings = {
|
|
|
161
163
|
topEvents: ITopEvent[];
|
|
162
164
|
settings: BettingSettings;
|
|
163
165
|
};
|
|
166
|
+
export type ResponseAdapterInstanceProps = {
|
|
167
|
+
callbackStatus: (s: string, result: any) => void;
|
|
168
|
+
casinoSettings: TCasinoSettings;
|
|
169
|
+
bettingSettings: TBettingSettings;
|
|
170
|
+
language: string;
|
|
171
|
+
sendCommand: SendCommand;
|
|
172
|
+
parentService: SocketServices;
|
|
173
|
+
usefulUrls: UseFulUrls;
|
|
174
|
+
};
|
|
164
175
|
export {};
|
|
@@ -4,8 +4,6 @@ import { SubscribeSportInfoBySportIdProps, SubscribeSportsProps } from '../store
|
|
|
4
4
|
import { SubscribeCountryInfoProps, SubscribeMinDepositInfoProps, SubscribeUserCurrencyInfoProps, SubscribeUserStateProps } from '../store/user/types';
|
|
5
5
|
import { ReadModuleKeys, ReadModuleType } from '../binary/types';
|
|
6
6
|
import { CashOutTicketProps, SubscribeComposeTransactionsProps } from './methodTypes';
|
|
7
|
-
import { SubscribeBettingStatusProps } from '../store/betting/types';
|
|
8
|
-
import { SubscribeBettingTopTournamentsProps, SubscribeBettingTournamentsByCategoryIdOrSportIdProps, SubscribeBettingTournamentsByIdProps } from '../store/betting/entities/tournaments/types';
|
|
9
7
|
import { SubscribeBettingEventsByTournamentIdProps, SubscribeBettingTopEventsProps, SubscribeEventDetailsMarketTabs, SubscribeEventDetailsMarketsByGroupIdProps, SubscribeEventShortInfoProps, SubscribeLineEntitiesProps, SubscribeOdd, SubscribeEventEntitiesProps } from '../store/betting/entities/events/types';
|
|
10
8
|
import { SubscriberCategoriesProps, SubscriberCategoryProps } from '../store/betting/entities/categories/types';
|
|
11
9
|
import { SubscribeLiveScoreProps } from 'store/betting/entities/events/live/types';
|
|
@@ -29,6 +27,7 @@ import { UpdateVipClubEntityKey } from 'store/operations/entities/vipClub/types'
|
|
|
29
27
|
import { CashBonusChannelType } from 'store/operations/entities/cashBonuses/types';
|
|
30
28
|
import { JackpotSettings } from 'store/casino/entities/jackpots/types';
|
|
31
29
|
import { CasinoHistoryGamesSubscriber } from 'store/operations/entities/casinoHistory/types';
|
|
30
|
+
import { BettingEntitySubscribers } from 'store/betting/types';
|
|
32
31
|
export declare class Socket implements SocketInterface {
|
|
33
32
|
socketServices: SocketServices;
|
|
34
33
|
initialSettings: ISocketSettings;
|
|
@@ -74,6 +73,7 @@ export declare class Socket implements SocketInterface {
|
|
|
74
73
|
subscribeUserCurrencyInfo(props: SubscribeUserCurrencyInfoProps): boolean;
|
|
75
74
|
subscribeUserState(props: SubscribeUserStateProps): boolean;
|
|
76
75
|
subscribeUserInfo(props: SubscribeUserStateProps): boolean;
|
|
76
|
+
subscribeStories(props: BaseObservableSubscriber): boolean;
|
|
77
77
|
unsubscribeUserEntity(uid: string): boolean;
|
|
78
78
|
subscribeBalanceInfo(props: BaseObservableSubscriber): boolean;
|
|
79
79
|
subscribeBonusBalanceCoins(props: BaseObservableSubscriber): boolean;
|
|
@@ -134,16 +134,9 @@ export declare class Socket implements SocketInterface {
|
|
|
134
134
|
subscribeLotteryHistory(props: SubscribeLotteryHistoryProps): boolean;
|
|
135
135
|
subscribeLotteryAvailableForBuying(props: SubscribeLotteryAvailableForBuyingProps): boolean;
|
|
136
136
|
unsubscribeLotteriesHistoryEntities(uid: string): boolean;
|
|
137
|
-
subscribeBettingStatus(
|
|
137
|
+
subscribeBettingStatus(props: BaseObservableSubscriber): boolean;
|
|
138
138
|
unsubscribeBettingStatus(uid: string): boolean;
|
|
139
|
-
|
|
140
|
-
unsubscribeBettingSettingsStatus(uid: string): boolean;
|
|
141
|
-
subscribeBettingTopTournaments(data: SubscribeBettingTopTournamentsProps): boolean;
|
|
142
|
-
unsubscribeBettingTopTournaments(uid: string): boolean;
|
|
143
|
-
subscribeBettingTournamentsByCategoryIdOrSportId(props: SubscribeBettingTournamentsByCategoryIdOrSportIdProps): boolean;
|
|
144
|
-
unsubscribeBettingTournamentsByCategoryIdOrSportId(uid: string): boolean;
|
|
145
|
-
subscribeBettingTournamentById(props: SubscribeBettingTournamentsByIdProps): boolean;
|
|
146
|
-
unsubscribeBettingTournamentById(uid: string): boolean;
|
|
139
|
+
subscribeBettingEntity(data: BettingEntitySubscribers): boolean;
|
|
147
140
|
subscribeBettingTopEvents(data: SubscribeBettingTopEventsProps): boolean;
|
|
148
141
|
unsubscribeBettingTopEvents(uid: string): boolean;
|
|
149
142
|
subscribeSports(props: SubscribeSportsProps): boolean;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { SubscribeSportInfoBySportIdProps, SubscribeSportsProps } from '../store/betting/entities/sports/types';
|
|
2
2
|
import { SubscriberCategoriesProps, SubscriberCategoryProps } from '../store/betting/entities/categories/types';
|
|
3
|
-
import { SubscribeBettingTopTournamentsProps, SubscribeBettingTournamentsByCategoryIdOrSportIdProps, SubscribeBettingTournamentsByIdProps } from '../store/betting/entities/tournaments/types';
|
|
4
3
|
import { SubscribeCountryInfoProps, SubscribeMinDepositInfoProps, SubscribeUserCurrencyInfoProps, SubscribeUserStateProps } from '../store/user/types';
|
|
5
4
|
import { CashOutTicketProps, SubscribeComposeTransactionsProps } from './methodTypes';
|
|
6
|
-
import { SubscribeBettingStatusProps } from '../store/betting/types';
|
|
7
5
|
import { SubscribeBettingEventsByTournamentIdProps, SubscribeBettingTopEventsProps, SubscribeEventDetailsMarketTabs, SubscribeEventDetailsMarketsByGroupIdProps, SubscribeEventEntitiesProps, SubscribeEventShortInfoProps, SubscribeLineEntitiesProps, SubscribeOdd } from '../store/betting/entities/events/types';
|
|
8
6
|
import { SubscribeLiveScoreProps } from '../store/betting/entities/events/live/types';
|
|
9
7
|
import { AddBetProps, RemoveBetProps, SetBetSlipStakeProps, SubscribeBetSlipBaseProps, SubscribeBetSlipMaxToWinProps, SubscribeBettingBetSlipCounterProps, SubscribeSelectedOdd, SubscribeSpecialBetOdd } from '../store/betting/entities/betslip/types';
|
|
@@ -27,6 +25,7 @@ import { TournamentSettings, TournamentSubscribeProps } from 'store/casino/entit
|
|
|
27
25
|
import { JackpotSettings, JackpotSubscribes } from 'store/casino/entities/jackpots/types';
|
|
28
26
|
import { CasinoHistoryGamesSubscriber } from 'store/operations/entities/casinoHistory/types';
|
|
29
27
|
import { SubscribeCasinoCategoriesInfoProps } from 'store/casino/entities/categories/types';
|
|
28
|
+
import { BettingEntitySubscribers } from 'store/betting/types';
|
|
30
29
|
export declare enum ESocketCallbackStep {
|
|
31
30
|
Unknown = 0,
|
|
32
31
|
Init = 1,
|
|
@@ -43,6 +42,7 @@ export interface ISocketSettings {
|
|
|
43
42
|
language: string;
|
|
44
43
|
casinoSettings: TCasinoSettings;
|
|
45
44
|
bettingSettings: TBettingSettings;
|
|
45
|
+
usefulUrls: UseFulUrls;
|
|
46
46
|
appType: number;
|
|
47
47
|
isDevMode?: boolean;
|
|
48
48
|
socketCallback: (step: ESocketCallbackStep) => void;
|
|
@@ -50,6 +50,9 @@ export interface ISocketSettings {
|
|
|
50
50
|
referralBaseUrl: string;
|
|
51
51
|
token: string;
|
|
52
52
|
}
|
|
53
|
+
export type UseFulUrls = {
|
|
54
|
+
stories: string | null;
|
|
55
|
+
} | null;
|
|
53
56
|
export type TCasinoSettings = {
|
|
54
57
|
casinoCategoryUrls: [string, string];
|
|
55
58
|
isVertical: boolean;
|
|
@@ -138,6 +141,7 @@ export interface SocketInterface {
|
|
|
138
141
|
subscribeUserCurrencyInfo: (props: SubscribeUserCurrencyInfoProps) => boolean;
|
|
139
142
|
subscribeUserState: (props: SubscribeUserStateProps) => boolean;
|
|
140
143
|
subscribeUserInfo: (props: SubscribeUserStateProps) => boolean;
|
|
144
|
+
subscribeStories: (props: BaseObservableSubscriber) => boolean;
|
|
141
145
|
unsubscribeUserEntity: (uid: string) => boolean;
|
|
142
146
|
subscribeBalanceInfo: (props: BaseObservableSubscriber) => boolean;
|
|
143
147
|
subscribeBonusBalanceCoins: (props: BaseObservableSubscriber) => boolean;
|
|
@@ -217,18 +221,11 @@ export interface SocketInterface {
|
|
|
217
221
|
subscribeLotteryHistory: (props: SubscribeLotteryHistoryProps) => boolean;
|
|
218
222
|
subscribeLotteryAvailableForBuying: (props: SubscribeLotteryAvailableForBuyingProps) => boolean;
|
|
219
223
|
unsubscribeLotteriesHistoryEntities: (uid: string) => boolean;
|
|
220
|
-
subscribeBettingStatus: (props:
|
|
224
|
+
subscribeBettingStatus: (props: BaseObservableSubscriber) => boolean;
|
|
221
225
|
unsubscribeBettingStatus: (uid: string) => boolean;
|
|
222
|
-
|
|
223
|
-
unsubscribeBettingSettingsStatus: (uid: string) => boolean;
|
|
226
|
+
subscribeBettingEntity: (props: BettingEntitySubscribers) => boolean;
|
|
224
227
|
subscribeOdd: (props: SubscribeOdd) => void;
|
|
225
228
|
unsubscribeOdd: (uid: string, isPrematch: boolean) => void;
|
|
226
|
-
subscribeBettingTopTournaments: (props: SubscribeBettingTopTournamentsProps) => boolean;
|
|
227
|
-
unsubscribeBettingTopTournaments: (uid: string) => boolean;
|
|
228
|
-
subscribeBettingTournamentsByCategoryIdOrSportId: (props: SubscribeBettingTournamentsByCategoryIdOrSportIdProps) => boolean;
|
|
229
|
-
unsubscribeBettingTournamentsByCategoryIdOrSportId: (uid: string) => boolean;
|
|
230
|
-
subscribeBettingTournamentById: (props: SubscribeBettingTournamentsByIdProps) => void;
|
|
231
|
-
unsubscribeBettingTournamentById: (uid: string) => void;
|
|
232
229
|
subscribeBettingTopEvents: (props: SubscribeBettingTopEventsProps) => boolean;
|
|
233
230
|
unsubscribeBettingTopEvents: (uid: string) => boolean;
|
|
234
231
|
subscribeSports: (props: SubscribeSportsProps) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BETTING_STEPS: string[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Betting } from '..';
|
|
2
|
+
import { EntitiesProps, HandleEventUpdatesProps } from './types';
|
|
3
|
+
import { BackOfficeSettings, DecodeBetSlipResponse, HandleBackOfficeResponse } from 'service/responseAdapter/types';
|
|
4
|
+
export declare class BettingResponseAdapter {
|
|
5
|
+
parent: Betting;
|
|
6
|
+
constructor(betting: Betting);
|
|
7
|
+
updateBackOfficeSettings(result: BackOfficeSettings): void;
|
|
8
|
+
updateEntities(result: EntitiesProps): void;
|
|
9
|
+
handleEventUpdates(result: HandleEventUpdatesProps): void;
|
|
10
|
+
handleBetSlipResponse({ betslip }: {
|
|
11
|
+
betslip: DecodeBetSlipResponse;
|
|
12
|
+
}): void;
|
|
13
|
+
handleBackOfficeSettings(result: HandleBackOfficeResponse): void;
|
|
14
|
+
handleBettingUpdates(step: string, result?: any): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BackOfficeSettings } from 'service/responseAdapter/types';
|
|
2
|
+
import { TCategories } from '../entities/categories/types';
|
|
3
|
+
import { ComboMarketsInfo, TMarkets } from '../entities/markets/types';
|
|
4
|
+
import { TSports } from '../entities/sports/types';
|
|
5
|
+
import { TTournaments } from '../entities/tournaments/types';
|
|
6
|
+
import { ERequestIds } from 'binary/types';
|
|
7
|
+
import { LiveEvent } from '../entities/events/live/types';
|
|
8
|
+
import { PrematchEvent } from '../entities/events/prematch/types';
|
|
9
|
+
export type EntitiesProps = {
|
|
10
|
+
tournaments: TTournaments;
|
|
11
|
+
sports: TSports;
|
|
12
|
+
categories: TCategories;
|
|
13
|
+
markets: TMarkets;
|
|
14
|
+
marketList: ComboMarketsInfo;
|
|
15
|
+
backOfficeSettings: BackOfficeSettings;
|
|
16
|
+
};
|
|
17
|
+
export type HandleEventUpdatesProps = {
|
|
18
|
+
events: EventsProps;
|
|
19
|
+
requestId: ERequestIds.Unknown | ERequestIds.ExtraLines;
|
|
20
|
+
};
|
|
21
|
+
export type EventsProps = {
|
|
22
|
+
[key: string]: PrematchEvent | LiveEvent;
|
|
23
|
+
};
|
|
@@ -2,7 +2,8 @@ import { BettingServices } from '../../services';
|
|
|
2
2
|
import { Observable } from '../../../../service/observable';
|
|
3
3
|
import { Bets, CreateBetUidProps, SubscribeBettingBetSlipCounterProps, BetSlipObservableSettings, AddBetProps, RemoveBetProps, SubscribeSelectedOdd, SetBetSlipStakeProps, SubscribeBetSlipBaseProps, SetMaxLimitProps, SubscribeBetSlipMaxToWinProps, EPlaceBetStatus, BetSlipResponse, EBetState, ExpressBet, SystemBet, SubscribeSpecialBetOdd } from './types';
|
|
4
4
|
import { UpdateEvents } from '../events/types';
|
|
5
|
-
|
|
5
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
6
|
+
export declare class BetSlip extends ObservableEntity<undefined> {
|
|
6
7
|
services: BettingServices;
|
|
7
8
|
observableSettings: BetSlipObservableSettings;
|
|
8
9
|
betSlipObservable: Observable;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BettingServices } from '../../services';
|
|
2
2
|
import { Observable } from '../../../../service/observable';
|
|
3
3
|
import { CategorySports, ObservableSettingsType, SubscriberCategoriesProps, SubscriberCategoryProps, TCategories } from './types';
|
|
4
|
-
|
|
4
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
5
|
+
export declare class Categories extends ObservableEntity<undefined> {
|
|
5
6
|
categories: TCategories;
|
|
6
7
|
sportCategories: CategorySports;
|
|
7
8
|
services: BettingServices;
|
|
@@ -6,7 +6,8 @@ import { PrematchEvents } from './prematch';
|
|
|
6
6
|
import { TopEvents } from './top';
|
|
7
7
|
import { TopEventInfo } from './top/types';
|
|
8
8
|
import { SettingEventsObservable, SubscribeBettingEventsByTournamentIdProps, SubscribeBettingTopEventsProps, SubscribeEventDetailsMarketTabs, SubscribeEventDetailsMarketsByGroupIdProps, SubscribeEventShortInfoProps, SubscribeLineEntitiesProps, SubscribeOdd, UpdateEvents } from './types';
|
|
9
|
-
|
|
9
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
10
|
+
export declare class Events extends ObservableEntity<undefined> {
|
|
10
11
|
topEventObservable: Observable;
|
|
11
12
|
eventsObservable: Observable;
|
|
12
13
|
services: BettingServices;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'service/observable';
|
|
2
2
|
import { ComboMarketsInfo, ObservableSettings, RospisInfo, SubscribeFilterMarketNamesProps, SubscribeFilterMarketsProps, TMarkets } from './types';
|
|
3
|
-
|
|
3
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
4
|
+
export declare class BettingMarkets extends ObservableEntity<undefined> {
|
|
4
5
|
observableMarkets: Observable;
|
|
5
6
|
observableSettings: ObservableSettings;
|
|
6
7
|
markets: TMarkets;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BettingServices } from '../../services';
|
|
2
2
|
import { Observable } from '../../../../service/observable';
|
|
3
3
|
import { ObservableSettings, SubscribeSportInfoBySportIdProps, SubscribeSportsProps, TSports } from './types';
|
|
4
|
-
|
|
4
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
5
|
+
export declare class Sports extends ObservableEntity<undefined> {
|
|
5
6
|
sportsObservable: Observable;
|
|
6
7
|
observableSettings: ObservableSettings;
|
|
7
8
|
sports: TSports;
|
|
@@ -2,7 +2,8 @@ import { BettingServices } from 'store/betting/services';
|
|
|
2
2
|
import { ObservableSettings, SetInitialInGameTickets, SubscribeHistoryTicketsInfoProps, SubscribeTicketInfoProps, SubscribeTicketsProps, Ticket, Tickets } from './types';
|
|
3
3
|
import { Observable } from 'service/observable';
|
|
4
4
|
import { HandleTicketResultProps } from 'service/responseAdapter/types';
|
|
5
|
-
|
|
5
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
6
|
+
export declare class BettingTickets extends ObservableEntity<undefined> {
|
|
6
7
|
services: BettingServices;
|
|
7
8
|
observableTickets: Observable;
|
|
8
9
|
observableSettings: ObservableSettings;
|
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
import { BettingServices } from '../../services';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { CategoryTournament, ObservableSettingType, TTournaments, Tournament } from './types';
|
|
3
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
4
|
+
import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
|
|
5
|
+
export declare class Tournaments extends ObservableEntity<undefined> {
|
|
5
6
|
services: BettingServices;
|
|
6
|
-
topTournamentsObservable: Observable;
|
|
7
|
-
tournamentsObservable: Observable;
|
|
8
7
|
tournaments: TTournaments;
|
|
9
8
|
tournamentByCategoryId: CategoryTournament;
|
|
10
9
|
isInitTournaments: boolean;
|
|
11
10
|
topTournaments: {
|
|
12
11
|
[tournamentId: number]: Tournament;
|
|
13
12
|
};
|
|
14
|
-
settingTournamentObservable: ObservableSettingsType;
|
|
15
13
|
constructor(services: BettingServices);
|
|
16
14
|
updateTournaments(tournaments: TTournaments): void;
|
|
17
|
-
updateTopTournaments(): void;
|
|
18
15
|
setTournaments(tournaments: TTournaments): void;
|
|
19
16
|
private sendTournamentIdUpdate;
|
|
20
17
|
private sendTournamentsBySportId;
|
|
21
18
|
private sendTournamentsByCategoryIdUpdates;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
unsubscribeTopTournaments(uid: string): void;
|
|
25
|
-
subscribeBettingTournamentsByCategoryIdOrSportId(props: SubscribeBettingTournamentsByCategoryIdOrSportIdProps): void;
|
|
26
|
-
unsubscribeBettingTournamentsByCategoryIdOrSportId(uid: string): void;
|
|
27
|
-
subscribeTournamentsById(props: SubscribeBettingTournamentsByIdProps): void;
|
|
28
|
-
unsubscribeTournamentsById(uid: string): void;
|
|
19
|
+
private sendTopTournaments;
|
|
20
|
+
sendUpdateEntity(d: BaseObservableSubscriber & ObservableSettingType): UpdateData | null;
|
|
29
21
|
reset(): void;
|
|
30
22
|
}
|
|
@@ -15,9 +15,6 @@ export type CategoryTournament = {
|
|
|
15
15
|
[tournamentId: number]: number;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
export type ObservableSettingsType = {
|
|
19
|
-
[uid: string]: ObservableSettingType;
|
|
20
|
-
};
|
|
21
18
|
export type ObservableSettingType = {
|
|
22
19
|
isPrematch: boolean;
|
|
23
20
|
categoryId: number;
|
|
@@ -28,10 +25,8 @@ export type ObservableSettingType = {
|
|
|
28
25
|
sportId: number;
|
|
29
26
|
isPrematch: boolean;
|
|
30
27
|
time: number | null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
uid: string;
|
|
34
|
-
callback: (status: Tournament[]) => void;
|
|
28
|
+
} | {
|
|
29
|
+
isTop: true;
|
|
35
30
|
};
|
|
36
31
|
export type SubscribeBettingTournamentsByCategoryIdOrSportIdProps = {
|
|
37
32
|
uid: string;
|
|
@@ -50,20 +45,13 @@ export type SubscribeBettingTournamentsByCategoryIdOrSportIdProps = {
|
|
|
50
45
|
sportId?: undefined;
|
|
51
46
|
categoryId: number;
|
|
52
47
|
});
|
|
53
|
-
export type SubscribeBettingTournamentsByIdProps = {
|
|
54
|
-
uid: string;
|
|
55
|
-
tournamentId: number;
|
|
56
|
-
callback: (info: Tournament | null) => void;
|
|
57
|
-
};
|
|
58
48
|
export type SendTournamentsBySportIdProps = {
|
|
59
49
|
sportId: number;
|
|
60
|
-
uid: string;
|
|
61
50
|
isPrematch: boolean;
|
|
62
51
|
time: null | number;
|
|
63
52
|
};
|
|
64
53
|
export type SendTournamentsByCategoryIdUpdatesProps = {
|
|
65
54
|
categoryId: number;
|
|
66
|
-
uid: string;
|
|
67
55
|
isPrematch: boolean;
|
|
68
56
|
time: null | number;
|
|
69
57
|
};
|
|
@@ -3,15 +3,16 @@ import { Events } from './entities/events';
|
|
|
3
3
|
import { BettingMarkets } from './entities/markets';
|
|
4
4
|
import { Sports } from './entities/sports';
|
|
5
5
|
import { Tournaments } from './entities/tournaments';
|
|
6
|
-
import {
|
|
7
|
-
import { EntitiesProps, HandleEventUpdatesProps, SubscribeBettingStatusProps } from './types';
|
|
6
|
+
import { BettingEntitySubscribers, BettingProps } from './types';
|
|
8
7
|
import { BettingServices } from './services';
|
|
9
|
-
import {
|
|
8
|
+
import { TBettingSettings } from '../../socket/types';
|
|
10
9
|
import { BetSlip } from './entities/betslip';
|
|
11
10
|
import { BettingTickets } from './entities/tickets';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
11
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
12
|
+
import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
|
|
13
|
+
import { BettingResponseAdapter } from './adapter';
|
|
14
|
+
export declare class Betting extends ObservableEntity<undefined> {
|
|
15
|
+
bettingResponseAdapter: BettingResponseAdapter;
|
|
15
16
|
markets: BettingMarkets;
|
|
16
17
|
categories: Categories;
|
|
17
18
|
tournaments: Tournaments;
|
|
@@ -22,24 +23,17 @@ export declare class Betting {
|
|
|
22
23
|
tickets: BettingTickets;
|
|
23
24
|
_banUserCashOut: boolean;
|
|
24
25
|
bettingServices: BettingServices;
|
|
25
|
-
|
|
26
|
-
bettingSettingsObservable: Observable;
|
|
27
|
-
sendCommand: SendCommand;
|
|
28
|
-
callbackCommand: SendCommand;
|
|
29
|
-
private _isBettingAvailable;
|
|
26
|
+
_isBettingAvailable: boolean;
|
|
30
27
|
_isSettingInstalled: boolean;
|
|
31
|
-
constructor(
|
|
28
|
+
constructor(props: BettingProps);
|
|
32
29
|
set banUserCashOut(state: boolean);
|
|
33
30
|
get banUserCashOut(): boolean;
|
|
34
31
|
set isBettingAvailable(value: boolean);
|
|
35
32
|
get isBettingAvailable(): boolean;
|
|
36
33
|
getConfigurations(): Promise<void>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
unsubscribeBettingStatus(uid: string): void;
|
|
42
|
-
subscribeBettingSettingsStatus({ uid, callback, }: SubscribeBettingStatusProps): void;
|
|
43
|
-
unsubscribeBettingSettingsStatus(uid: string): void;
|
|
34
|
+
entitySubscribers(subscribeInfo: BettingEntitySubscribers): boolean;
|
|
35
|
+
sendUpdateEntity(d: BaseObservableSubscriber & {
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}): UpdateData | null;
|
|
44
38
|
resetBettingStates(): void;
|
|
45
39
|
}
|
|
@@ -8,52 +8,18 @@ import { Tournament } from '../entities/tournaments/types';
|
|
|
8
8
|
import { GetBetSlipLimitProps, GetOddProps, ReturnGetMarketsByComboMarketIdProps, ReturnGetOddType } from './types';
|
|
9
9
|
import { ResponseAdapterService } from 'service/responseAdapter/services';
|
|
10
10
|
import { ENotifications } from 'store/notifications/types';
|
|
11
|
+
import { BettingProps } from '../types';
|
|
12
|
+
import { CallbackStatus, SendCommand } from 'socket/types';
|
|
11
13
|
export declare class BettingServices {
|
|
12
14
|
parent: Betting;
|
|
13
15
|
adapterService: ResponseAdapterService;
|
|
14
|
-
|
|
16
|
+
sendCommand: SendCommand;
|
|
17
|
+
callbackCommand: CallbackStatus;
|
|
18
|
+
constructor(betting: Betting, props: BettingProps);
|
|
15
19
|
sendErrorCommand(code: ENotifications, data: {
|
|
16
20
|
description?: string;
|
|
17
21
|
}): void;
|
|
18
22
|
updateEvent(currentEvent: PrematchEvent | LiveEvent, eventUpdate: PrematchEvent | LiveEvent): {
|
|
19
|
-
lines: {
|
|
20
|
-
[x: string]: EventLine;
|
|
21
|
-
} | {
|
|
22
|
-
[x: string]: EventLine;
|
|
23
|
-
} | {
|
|
24
|
-
[x: string]: EventLine;
|
|
25
|
-
} | {
|
|
26
|
-
[x: string]: EventLine;
|
|
27
|
-
};
|
|
28
|
-
linesByMarketId: {
|
|
29
|
-
[x: number]: EventLine[];
|
|
30
|
-
} | {
|
|
31
|
-
[x: number]: EventLine[];
|
|
32
|
-
} | {
|
|
33
|
-
[x: number]: EventLine[];
|
|
34
|
-
} | {
|
|
35
|
-
[x: number]: EventLine[];
|
|
36
|
-
};
|
|
37
|
-
objectId: number;
|
|
38
|
-
uid: string;
|
|
39
|
-
awayId: number;
|
|
40
|
-
awayName: string;
|
|
41
|
-
blockedStatus: number;
|
|
42
|
-
willBeLive: number;
|
|
43
|
-
categoryId: number;
|
|
44
|
-
gbId: number;
|
|
45
|
-
homeId: number;
|
|
46
|
-
homeName: string;
|
|
47
|
-
lineTypeRadar: number;
|
|
48
|
-
counterLines: number;
|
|
49
|
-
radarOriginalId: number;
|
|
50
|
-
sportId: number;
|
|
51
|
-
status: import("../entities/events/types").EStatusEvent;
|
|
52
|
-
timeStart: number;
|
|
53
|
-
tournamentId: number;
|
|
54
|
-
tournamentTypeRadar: number;
|
|
55
|
-
providerEvent: import("../entities/events/types").EventProviderId;
|
|
56
|
-
} | {
|
|
57
23
|
lines: {
|
|
58
24
|
[x: string]: EventLine;
|
|
59
25
|
} | {
|
|
@@ -114,7 +80,6 @@ export declare class BettingServices {
|
|
|
114
80
|
uid: string;
|
|
115
81
|
videoId: string;
|
|
116
82
|
videoProviderId: number;
|
|
117
|
-
willBeLive: number;
|
|
118
83
|
} | {
|
|
119
84
|
lines: {
|
|
120
85
|
[x: string]: EventLine;
|
|
@@ -238,6 +203,45 @@ export declare class BettingServices {
|
|
|
238
203
|
uid: string;
|
|
239
204
|
videoId: string;
|
|
240
205
|
videoProviderId: number;
|
|
206
|
+
willBeLive: number;
|
|
207
|
+
} | {
|
|
208
|
+
lines: {
|
|
209
|
+
[x: string]: EventLine;
|
|
210
|
+
} | {
|
|
211
|
+
[x: string]: EventLine;
|
|
212
|
+
} | {
|
|
213
|
+
[x: string]: EventLine;
|
|
214
|
+
} | {
|
|
215
|
+
[x: string]: EventLine;
|
|
216
|
+
};
|
|
217
|
+
linesByMarketId: {
|
|
218
|
+
[x: number]: EventLine[];
|
|
219
|
+
} | {
|
|
220
|
+
[x: number]: EventLine[];
|
|
221
|
+
} | {
|
|
222
|
+
[x: number]: EventLine[];
|
|
223
|
+
} | {
|
|
224
|
+
[x: number]: EventLine[];
|
|
225
|
+
};
|
|
226
|
+
objectId: number;
|
|
227
|
+
uid: string;
|
|
228
|
+
awayId: number;
|
|
229
|
+
awayName: string;
|
|
230
|
+
blockedStatus: number;
|
|
231
|
+
willBeLive: number;
|
|
232
|
+
categoryId: number;
|
|
233
|
+
gbId: number;
|
|
234
|
+
homeId: number;
|
|
235
|
+
homeName: string;
|
|
236
|
+
lineTypeRadar: number;
|
|
237
|
+
counterLines: number;
|
|
238
|
+
radarOriginalId: number;
|
|
239
|
+
sportId: number;
|
|
240
|
+
status: import("../entities/events/types").EStatusEvent;
|
|
241
|
+
timeStart: number;
|
|
242
|
+
tournamentId: number;
|
|
243
|
+
tournamentTypeRadar: number;
|
|
244
|
+
providerEvent: import("../entities/events/types").EventProviderId;
|
|
241
245
|
};
|
|
242
246
|
getSpecValue(specValues: string[], marketId: number): string;
|
|
243
247
|
getValidMarketId(marketId: number, event: PrematchEvent | LiveEvent, isPrematch?: boolean): {
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export type EntitiesProps = {
|
|
10
|
-
tournaments: TTournaments;
|
|
11
|
-
sports: TSports;
|
|
12
|
-
categories: TCategories;
|
|
13
|
-
markets: TMarkets;
|
|
14
|
-
marketList: ComboMarketsInfo;
|
|
15
|
-
backOfficeSettings: BackOfficeSettings;
|
|
1
|
+
import { BaseObservableSubscriber } from 'service/observable/type';
|
|
2
|
+
import { ResponseAdapterService } from 'service/responseAdapter/services';
|
|
3
|
+
import { CallbackStatus, SendCommand, TBettingSettings } from 'socket/types';
|
|
4
|
+
export type BettingProps = {
|
|
5
|
+
bettingSettings: TBettingSettings;
|
|
6
|
+
sendCommand: SendCommand;
|
|
7
|
+
adapterService: ResponseAdapterService;
|
|
8
|
+
callbackCommand: CallbackStatus;
|
|
16
9
|
};
|
|
17
10
|
export type BettingSettings = {
|
|
18
11
|
isBetRadarLiveDisabled: boolean;
|
|
@@ -29,16 +22,15 @@ export type BettingSettings = {
|
|
|
29
22
|
countEventsUpcoming: number;
|
|
30
23
|
frequencyMinTop: number;
|
|
31
24
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[key: string]: PrematchEvent | LiveEvent;
|
|
38
|
-
};
|
|
39
|
-
export type SubscribeBettingStatusProps = {
|
|
25
|
+
type BettingSubscribeEntity = 'markets' | 'events' | 'categories' | 'tournaments' | 'sports' | 'betSlip' | 'tickets';
|
|
26
|
+
export type BettingEntitySubscribers = {
|
|
27
|
+
entity: BettingSubscribeEntity;
|
|
28
|
+
} & ({
|
|
29
|
+
isRemove: true;
|
|
40
30
|
uid: string;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
31
|
+
} | {
|
|
32
|
+
data: BaseObservableSubscriber & {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
2
|
+
import { StorySection } from './types';
|
|
3
|
+
import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
|
|
4
|
+
import { UserServices } from 'store/user/services';
|
|
5
|
+
export declare class Stories extends ObservableEntity<undefined> {
|
|
6
|
+
_stories: StorySection[];
|
|
7
|
+
_requested: boolean;
|
|
8
|
+
service: UserServices;
|
|
9
|
+
_tryFetch: number;
|
|
10
|
+
constructor(service: UserServices);
|
|
11
|
+
set tryFetch(tryFetch: number);
|
|
12
|
+
get tryFetch(): number;
|
|
13
|
+
set stories(stories: StorySection[]);
|
|
14
|
+
get stories(): StorySection[];
|
|
15
|
+
sendUpdateEntity(d: BaseObservableSubscriber & {
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}): UpdateData | null;
|
|
18
|
+
}
|
|
@@ -13,6 +13,7 @@ import { BonusWheel } from './entities/bonusWheel';
|
|
|
13
13
|
import { DailyActivities } from './entities/daily';
|
|
14
14
|
import { Avatar } from './entities/avatar';
|
|
15
15
|
import { PromoCode } from './entities/promoCode';
|
|
16
|
+
import { Stories } from './entities/stories';
|
|
16
17
|
export declare class User {
|
|
17
18
|
userObservable: Observable;
|
|
18
19
|
services: UserServices;
|
|
@@ -26,6 +27,7 @@ export declare class User {
|
|
|
26
27
|
dailyActivities: DailyActivities;
|
|
27
28
|
avatars: Avatar;
|
|
28
29
|
promoCode: PromoCode;
|
|
30
|
+
storiesInstance: Stories;
|
|
29
31
|
observableSettings: ObservableSettings;
|
|
30
32
|
minDepositOdd: number;
|
|
31
33
|
token: string | null;
|