react-memory-optimization 0.0.19 → 0.0.20

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,4 +1,4 @@
1
- import { TournamentPlayer, CurrentTournamentPlayer, AdaptedCasinoTournament, InitialTournaments, RequestCommands, TournamentSettings, CasinoTournamentsProps, ProviderTournament, InHouseTournaments, TournamentSubscribeProps } from './types';
1
+ import { TournamentPlayer, CurrentTournamentPlayer, AdaptedCasinoTournament, InitialTournaments, RequestCommands, TournamentSettings, CasinoTournamentsProps, ProviderTournament, InHouseTournaments, TournamentSubscribeProps, NewFormatProviderTournamentEntity, NewFormatStore } from './types';
2
2
  import { TournamentServices } from './service';
3
3
  import { ObservableEntity } from 'service/observableEntity';
4
4
  import { UpdateData } from 'service/observable/type';
@@ -21,10 +21,13 @@ export declare class CasinoTournaments extends ObservableEntity<undefined> {
21
21
  tournaments: {
22
22
  [id: number]: AdaptedCasinoTournament;
23
23
  };
24
+ _newFormatTournaments: NewFormatStore;
24
25
  currentUserInfo: {
25
26
  [tournamentId: number]: CurrentTournamentPlayer;
26
27
  };
27
28
  constructor({ parent, sendCommand, tournamentSettings, }: CasinoTournamentsProps);
29
+ set newFormatTournaments(tournaments: NewFormatProviderTournamentEntity[]);
30
+ get newFormatTournaments(): NewFormatStore;
28
31
  set inHouseTournaments(tournaments: InHouseTournaments);
29
32
  get inHouseTournaments(): InHouseTournaments;
30
33
  set providerTournaments(v: {
@@ -1,18 +1,19 @@
1
1
  import { UpdateData } from 'service/observable/type';
2
2
  import { CasinoTournaments } from 'store/casino/entities/casinoTournaments';
3
- import { BattleHookInfo, BattleInfo, ProviderTournament, TournamentInfo } from 'store/casino/entities/casinoTournaments/types';
3
+ import { BattleHookInfo, BattleInfo, NewFormatProviderTournamentEntity, ProviderTournament, TournamentInfo } from 'store/casino/entities/casinoTournaments/types';
4
4
  export declare class TournamentServices {
5
5
  parent: CasinoTournaments;
6
6
  constructor(parent: CasinoTournaments);
7
- getTournamentById(info: BattleInfo, isMobile: boolean): UpdateData | null;
7
+ getTournamentById(info: BattleInfo, isMobile: boolean, isExperimental?: boolean): UpdateData | null;
8
8
  private getImages;
9
9
  requestTournaments(isSocket?: boolean): Promise<void>;
10
- getHistoryTournaments(): {
10
+ getHistoryTournaments(isProviderExperimental?: boolean): {
11
11
  data: BattleHookInfo[];
12
12
  isArray: boolean;
13
13
  property: string;
14
14
  withCompare: boolean;
15
15
  };
16
- getActiveTournaments(): null | UpdateData;
16
+ getActiveTournaments(isProviderExperimental?: boolean): null | UpdateData;
17
+ adaptingNewFormatTournaments(battles: NewFormatProviderTournamentEntity[], isHistory: boolean): BattleHookInfo[];
17
18
  convertTournamentToBaseType(isProviderBattle: boolean, battle: TournamentInfo | ProviderTournament, isHistory?: boolean, convertPlayers?: boolean): BattleHookInfo;
18
19
  }
@@ -103,7 +103,9 @@ export type TournamentsSubscribe = {
103
103
  export type TournamentSubscribeProps = BaseObservableSubscriber & (TournamentsSubscribe | {
104
104
  battleInfo: BattleInfo;
105
105
  isMobile: boolean;
106
- });
106
+ }) & {
107
+ isProviderExperimental?: boolean;
108
+ };
107
109
  export type BattleHookInfo = Omit<TournamentInfo, 'status' | 'amount' | 'players'> & {
108
110
  name: string;
109
111
  isInHouse: boolean;
@@ -114,6 +116,9 @@ export type BattleHookInfo = Omit<TournamentInfo, 'status' | 'amount' | 'players
114
116
  providerName: string;
115
117
  isFinished: boolean;
116
118
  players: AdaptedTournamentPlayer[];
119
+ gameIds?: string[];
120
+ rules?: string[];
121
+ images?: NewFormatBattleImages;
117
122
  };
118
123
  export type BattleDetails = BattleHookInfo & {
119
124
  isFinished: boolean;
@@ -132,4 +137,34 @@ export type GetImagesProps = {
132
137
  isHistory: boolean;
133
138
  isProvider: boolean;
134
139
  id: number;
140
+ images?: NewFormatBattleImages;
141
+ isDetails: boolean;
142
+ };
143
+ export type NewFormatProviderTournamentEntity = {
144
+ id: number;
145
+ name: string;
146
+ gameIds: string[];
147
+ providerName: string;
148
+ prizePool: {
149
+ [currencyId: string]: string;
150
+ };
151
+ images: {
152
+ [en: string]: NewFormatBattleImages;
153
+ };
154
+ startDate: string;
155
+ endDate: string;
156
+ rules: {
157
+ [en: string]: string[];
158
+ };
159
+ };
160
+ export type NewFormatStore = {
161
+ active: NewFormatProviderTournamentEntity[];
162
+ finished: NewFormatProviderTournamentEntity[];
163
+ upcoming: NewFormatProviderTournamentEntity[];
164
+ };
165
+ export type NewFormatBattleImages = {
166
+ Tournament: string;
167
+ TournamentBg: string;
168
+ TournamentHistory: string;
169
+ TournamentHistoryBg: string;
135
170
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-memory-optimization",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "react memory optimization library",
5
5
  "sideEffects": false,
6
6
  "files": [