react-memory-optimization 0.0.59 → 0.0.61
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/api/index.d.ts +2 -2
- package/dist/lib/socket/index.d.ts +3 -0
- package/dist/lib/socket/types/socket.d.ts +4 -0
- package/dist/lib/store/casino/entities/promotions/index.d.ts +18 -0
- package/dist/lib/store/casino/entities/promotions/types.d.ts +79 -0
- package/dist/lib/store/casino/entities/promotions/types.js +2 -0
- package/dist/lib/store/casino/index.d.ts +2 -0
- package/dist/lib/store/casino/services/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ declare class Api {
|
|
|
10
10
|
constructor();
|
|
11
11
|
setToken(token: string): void;
|
|
12
12
|
private request;
|
|
13
|
-
get<T>(url: EApiPath, config?: Partial<ApiRequestConfig>): Promise<T | null>;
|
|
14
|
-
post<T, U = unknown>(url: EApiPath, body: U, config?: Partial<ApiRequestConfig>): Promise<T | null>;
|
|
13
|
+
get<T>(url: EApiPath | string, config?: Partial<ApiRequestConfig>): Promise<T | null>;
|
|
14
|
+
post<T, U = unknown>(url: EApiPath | string, body: U, config?: Partial<ApiRequestConfig>): Promise<T | null>;
|
|
15
15
|
registration(path: string, sendData: RestCommandDataProps): Promise<any>;
|
|
16
16
|
}
|
|
17
17
|
export declare const api: Api;
|
|
@@ -28,6 +28,7 @@ import { JackpotSettings } from 'store/casino/entities/jackpots/types';
|
|
|
28
28
|
import { CasinoHistoryGamesSubscriber } from 'store/operations/entities/casinoHistory/types';
|
|
29
29
|
import { BettingEntitySubscribers } from 'store/betting/types';
|
|
30
30
|
import { SubscribeUserKeys } from 'store/user/types';
|
|
31
|
+
import { PromotionSubscribeProps } from 'store/casino/entities/promotions/types';
|
|
31
32
|
export declare class Socket implements SocketInterface {
|
|
32
33
|
socketServices: SocketServices;
|
|
33
34
|
initialSettings: ISocketSettings;
|
|
@@ -92,6 +93,8 @@ export declare class Socket implements SocketInterface {
|
|
|
92
93
|
isFinished: boolean;
|
|
93
94
|
}): boolean;
|
|
94
95
|
unsubscribeCasinoBattles(uid: string): boolean;
|
|
96
|
+
subscribeCasinoPromotions(props: PromotionSubscribeProps): boolean;
|
|
97
|
+
unsubscribeCasinoPromotions(uid: string): boolean;
|
|
95
98
|
subscribeCasinoGameHistory(props: CasinoHistoryGamesSubscriber): boolean;
|
|
96
99
|
unsubscribeCasinoGameHistory(uid: string): boolean;
|
|
97
100
|
subscribeTransactions(props: SubscribeComposeTransactionsProps): boolean;
|
|
@@ -27,6 +27,7 @@ import { SubscribeCasinoCategoriesInfoProps } from 'store/casino/entities/catego
|
|
|
27
27
|
import { BettingEntitySubscribers } from 'store/betting/types';
|
|
28
28
|
import { SubscribeUserKeys } from 'store/user/types';
|
|
29
29
|
import { ResponseAdapter } from 'service/responseAdapter';
|
|
30
|
+
import { CasinoPromotionSettings, PromotionSubscribeProps } from 'store/casino/entities/promotions/types';
|
|
30
31
|
export declare enum ESocketCallbackStep {
|
|
31
32
|
Unknown = 0,
|
|
32
33
|
Init = 1,
|
|
@@ -61,6 +62,7 @@ export type TCasinoSettings = {
|
|
|
61
62
|
webp: boolean;
|
|
62
63
|
tournaments: TournamentSettings;
|
|
63
64
|
jackpot: JackpotSettings;
|
|
65
|
+
promotions: CasinoPromotionSettings;
|
|
64
66
|
};
|
|
65
67
|
export type TBettingSettings = {
|
|
66
68
|
pathname: string;
|
|
@@ -154,6 +156,8 @@ export interface SocketInterface {
|
|
|
154
156
|
unsubscribeCasinoProviders: (uid: string) => boolean;
|
|
155
157
|
subscribeCasinoBattles: (props: TournamentSubscribeProps) => boolean;
|
|
156
158
|
unsubscribeCasinoBattles: (uid: string) => boolean;
|
|
159
|
+
subscribeCasinoPromotions: (props: PromotionSubscribeProps) => boolean;
|
|
160
|
+
unsubscribeCasinoPromotions: (uid: string) => boolean;
|
|
157
161
|
subscribeCasinoLastWinners: (props: SubscribeCasinoLastWinnersProps) => boolean;
|
|
158
162
|
unsubscribeCasinoLastWinnerEntities: (uid: string) => boolean;
|
|
159
163
|
subscribeCasinoGameHistory: (config: CasinoHistoryGamesSubscriber) => boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ObservableEntity } from 'service/observableEntity';
|
|
2
|
+
import { CasinoServices } from 'store/casino/services';
|
|
3
|
+
import { CasinoPromotionSettings, PromotionEntity } from './types';
|
|
4
|
+
import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
|
|
5
|
+
export declare class Promotions extends ObservableEntity<unknown> {
|
|
6
|
+
service: CasinoServices;
|
|
7
|
+
settings: CasinoPromotionSettings;
|
|
8
|
+
_activePromotion: PromotionEntity;
|
|
9
|
+
_promotionHistory: PromotionEntity[];
|
|
10
|
+
constructor(service: CasinoServices, settings: CasinoPromotionSettings);
|
|
11
|
+
set activePromotion(promo: PromotionEntity);
|
|
12
|
+
get activePromotion(): PromotionEntity;
|
|
13
|
+
init(): Promise<void>;
|
|
14
|
+
private handleActivePromotions;
|
|
15
|
+
sendUpdateEntity(d: BaseObservableSubscriber & {
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}): UpdateData | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { BaseObservableSubscriber } from 'service/observable/type';
|
|
2
|
+
export type CasinoPromotionSettings = {
|
|
3
|
+
activePromotionPath: string;
|
|
4
|
+
};
|
|
5
|
+
export type PromotionEntity = {
|
|
6
|
+
id: number;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
name: string;
|
|
9
|
+
isDeleted: boolean;
|
|
10
|
+
battleIds: number[];
|
|
11
|
+
assets: PromotionAssetsEntity;
|
|
12
|
+
participateTranslate: ParticipateTranslates;
|
|
13
|
+
ruleTranslates: RuleTranslates;
|
|
14
|
+
drawerTranslates?: DrawerCardTranslates;
|
|
15
|
+
};
|
|
16
|
+
export type PromotionAssetsEntity = {
|
|
17
|
+
id: number;
|
|
18
|
+
isDelete: boolean;
|
|
19
|
+
translations: PromoBannerTranslate;
|
|
20
|
+
desktopHistoryBanner?: FileType;
|
|
21
|
+
desktopBanner?: FileType;
|
|
22
|
+
mobileBanner?: FileType;
|
|
23
|
+
mobileHistoryBanner?: FileType;
|
|
24
|
+
battleBackground?: FileType;
|
|
25
|
+
battleBackgroundHistory?: FileType;
|
|
26
|
+
battleMobileBackgroundHistory?: FileType;
|
|
27
|
+
battleMobileBackground?: FileType;
|
|
28
|
+
drawer?: FileType;
|
|
29
|
+
};
|
|
30
|
+
export type PromotionAdaptedEntity = {
|
|
31
|
+
id: number;
|
|
32
|
+
name: string;
|
|
33
|
+
assets: PromotionAssetsEntity;
|
|
34
|
+
drawerTranslates: DrawerCardTranslate;
|
|
35
|
+
ruleTranslates: RuleTranslate;
|
|
36
|
+
participateTranslate: ParticipateTranslate;
|
|
37
|
+
bannerTranslate: TranslateBox;
|
|
38
|
+
};
|
|
39
|
+
export type FileType = {
|
|
40
|
+
filename: string;
|
|
41
|
+
id: number;
|
|
42
|
+
isDeleted: boolean;
|
|
43
|
+
path: string;
|
|
44
|
+
updateAt: string;
|
|
45
|
+
};
|
|
46
|
+
export type PromoBannerTranslate = {
|
|
47
|
+
[language: string]: TranslateBox;
|
|
48
|
+
};
|
|
49
|
+
export type TranslateBox = {
|
|
50
|
+
title: string;
|
|
51
|
+
subTitle?: string;
|
|
52
|
+
buttonText: string;
|
|
53
|
+
};
|
|
54
|
+
export type ParticipateTranslates = {
|
|
55
|
+
[code: string]: ParticipateTranslate;
|
|
56
|
+
};
|
|
57
|
+
export type ParticipateTranslate = {
|
|
58
|
+
title: string;
|
|
59
|
+
subTitle: string;
|
|
60
|
+
prizes: string;
|
|
61
|
+
button: string;
|
|
62
|
+
};
|
|
63
|
+
export type RuleTranslates = {
|
|
64
|
+
[code: string]: RuleTranslate;
|
|
65
|
+
};
|
|
66
|
+
export type RuleTranslate = {
|
|
67
|
+
title: string;
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
export type DrawerCardTranslates = {
|
|
71
|
+
[code: string]: DrawerCardTranslate;
|
|
72
|
+
};
|
|
73
|
+
export type DrawerCardTranslate = {
|
|
74
|
+
title: string;
|
|
75
|
+
button: string;
|
|
76
|
+
};
|
|
77
|
+
export type PromotionSubscribeProps = BaseObservableSubscriber & {
|
|
78
|
+
isActive: boolean;
|
|
79
|
+
};
|
|
@@ -7,6 +7,7 @@ import { CasinoServices } from './services';
|
|
|
7
7
|
import { LastWinners } from './entities/lastWinners';
|
|
8
8
|
import { ResponseAdapterService } from 'service/responseAdapter/services';
|
|
9
9
|
import { Jackpots } from './entities/jackpots';
|
|
10
|
+
import { Promotions } from './entities/promotions';
|
|
10
11
|
export declare class Casino {
|
|
11
12
|
categories: CasinoCategories;
|
|
12
13
|
games: CasinoGames;
|
|
@@ -14,6 +15,7 @@ export declare class Casino {
|
|
|
14
15
|
services: CasinoServices;
|
|
15
16
|
lastWinners: LastWinners;
|
|
16
17
|
jackpots: Jackpots;
|
|
18
|
+
promotions: Promotions;
|
|
17
19
|
isVertical: boolean;
|
|
18
20
|
isWebP: boolean;
|
|
19
21
|
customPath: string;
|
|
@@ -6,6 +6,7 @@ import { InitialProviders, InstanceProviders } from '../types';
|
|
|
6
6
|
import { ResponseAdapterService } from 'service/responseAdapter/services';
|
|
7
7
|
import { JackpotHookInfo, JackpotInfo, JackpotResponse } from '../entities/jackpots/types';
|
|
8
8
|
import { ESortType } from 'globalTypes/utils';
|
|
9
|
+
import { PromotionAdaptedEntity, PromotionEntity } from '../entities/promotions/types';
|
|
9
10
|
export declare class CasinoServices {
|
|
10
11
|
parent: Casino;
|
|
11
12
|
mainService: ResponseAdapterService;
|
|
@@ -66,4 +67,6 @@ export declare class CasinoServices {
|
|
|
66
67
|
configureCasinoData(): any;
|
|
67
68
|
decodeCasinoData(stream: Uint8Array): ResponseEncodeConfig;
|
|
68
69
|
getGamesSortFnByType(type: ESortType): (a: AdaptedGame, b: AdaptedGame) => number;
|
|
70
|
+
fetchingPromotions(path: string): Promise<any>;
|
|
71
|
+
promotionAdapter(promotion: PromotionEntity): PromotionAdaptedEntity;
|
|
69
72
|
}
|