react-memory-optimization 0.0.80 → 0.0.82
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/constants.d.ts +2 -0
- package/dist/lib/service/api/constants.js +15 -0
- package/dist/lib/service/api/index.d.ts +8 -4
- package/dist/lib/service/api/types.d.ts +37 -1
- package/dist/lib/service/api/types.js +23 -1
- package/dist/lib/service/api/utils.d.ts +6 -0
- package/dist/lib/service/api/utils.js +44 -0
- package/dist/lib/service/moneyResponse/types.d.ts +3 -2
- package/dist/lib/socket/types/socket.d.ts +1 -0
- package/dist/lib/store/casino/entities/categories/constants.d.ts +2 -0
- package/dist/lib/store/casino/entities/categories/constants.js +67 -0
- package/dist/lib/store/casino/entities/categories/index.d.ts +11 -4
- package/dist/lib/store/casino/entities/categories/types.d.ts +25 -2
- package/dist/lib/store/casino/services/index.d.ts +1 -0
- package/dist/lib/store/user/types.d.ts +2 -2
- package/dist/lib/store/user/types.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAYMENT_REQUEST_PATHS = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
const utils_1 = require("./utils");
|
|
6
|
+
exports.PAYMENT_REQUEST_PATHS = {
|
|
7
|
+
[types_1.EPaymentRequestPath.FlashPayUpiDeposit]: {
|
|
8
|
+
path: types_1.EApiPath.FlashPayUpiDepositCreate,
|
|
9
|
+
adapterFn: utils_1.upiFlashPayRestAdapterDeposit,
|
|
10
|
+
},
|
|
11
|
+
[types_1.EPaymentRequestPath.FlashPayUpiWithdraw]: {
|
|
12
|
+
path: types_1.EApiPath.FlashPayUpiWithdrawCreate,
|
|
13
|
+
adapterFn: utils_1.upiFlashPayRestAdapterDeposit,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { EApiPath, RestCommandDataProps } from './types';
|
|
1
|
+
import { EApiPath, EPaymentRequestPath, RestCommandDataProps } from './types';
|
|
2
2
|
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
3
3
|
interface ApiRequestConfig extends RequestInit {
|
|
4
4
|
method: HttpMethod;
|
|
5
|
-
headers?: HeadersInit
|
|
5
|
+
headers?: HeadersInit & {
|
|
6
|
+
Authorization: string;
|
|
7
|
+
};
|
|
6
8
|
}
|
|
7
9
|
declare class Api {
|
|
8
10
|
private baseUrl;
|
|
@@ -10,8 +12,10 @@ declare class Api {
|
|
|
10
12
|
constructor();
|
|
11
13
|
setToken(token: string): void;
|
|
12
14
|
private request;
|
|
13
|
-
get<T>(url: EApiPath
|
|
14
|
-
post<T, U = unknown>(url: EApiPath
|
|
15
|
+
get<T>(url: EApiPath, config?: Partial<ApiRequestConfig>): Promise<T | null>;
|
|
16
|
+
post<T, U = unknown>(url: EApiPath, body: U, config?: Partial<ApiRequestConfig>): Promise<T | null>;
|
|
17
|
+
private getCommandList;
|
|
18
|
+
validationCommand<T = unknown>(command: EPaymentRequestPath, sendData?: any): Promise<T | null>;
|
|
15
19
|
registration(path: string, sendData: RestCommandDataProps): Promise<any>;
|
|
16
20
|
}
|
|
17
21
|
export declare const api: Api;
|
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
export declare enum EApiPath {
|
|
2
|
-
AccrualHistory = "/ref_service/api/v1/client/accural_bonus"
|
|
2
|
+
AccrualHistory = "/ref_service/api/v1/client/accural_bonus",
|
|
3
|
+
FlashPayUpiDepositCreate = "/pay-service-dev/api/v2/deposit/create",
|
|
4
|
+
FlashPayUpiWithdrawCreate = "/pay-service-dev/api/v2/withdraw/create"
|
|
3
5
|
}
|
|
4
6
|
export type RestCommandDataProps = {
|
|
5
7
|
[key: string]: string | number | any[];
|
|
6
8
|
};
|
|
9
|
+
export declare enum EValidationCommandDataProps {
|
|
10
|
+
Unknown = 0,
|
|
11
|
+
Payment = "payment"
|
|
12
|
+
}
|
|
13
|
+
export declare enum EPaymentRequestPath {
|
|
14
|
+
Unknown = "",
|
|
15
|
+
FlashPayUpiDeposit = "flash_pay_upi_deposit",
|
|
16
|
+
FlashPayUpiWithdraw = "flash_pay_impus_withdraw"
|
|
17
|
+
}
|
|
18
|
+
export type ApiList = {
|
|
19
|
+
[key: string]: {
|
|
20
|
+
path: string;
|
|
21
|
+
adapterFn: (data: any) => any;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type RequestList = ApiList | null;
|
|
25
|
+
export declare enum EFlashPayStatusCode {
|
|
26
|
+
Initiated = 0,
|
|
27
|
+
Success = 1,
|
|
28
|
+
Failed = 2,
|
|
29
|
+
Canceled = 3,
|
|
30
|
+
WaitingNotification = 4
|
|
31
|
+
}
|
|
32
|
+
export type ResponseFlashPayUpiDeposit = {
|
|
33
|
+
status: keyof typeof EFlashPayStatusCode;
|
|
34
|
+
operationId: string;
|
|
35
|
+
paymentUrl: string;
|
|
36
|
+
deepLink: {
|
|
37
|
+
upi_intent: string;
|
|
38
|
+
upi_phonepe: string;
|
|
39
|
+
upi_gpay: string;
|
|
40
|
+
upi_paytm: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EApiPath = void 0;
|
|
3
|
+
exports.EFlashPayStatusCode = exports.EPaymentRequestPath = exports.EValidationCommandDataProps = exports.EApiPath = void 0;
|
|
4
4
|
var EApiPath;
|
|
5
5
|
(function (EApiPath) {
|
|
6
6
|
EApiPath["AccrualHistory"] = "/ref_service/api/v1/client/accural_bonus";
|
|
7
|
+
EApiPath["FlashPayUpiDepositCreate"] = "/pay-service-dev/api/v2/deposit/create";
|
|
8
|
+
EApiPath["FlashPayUpiWithdrawCreate"] = "/pay-service-dev/api/v2/withdraw/create";
|
|
7
9
|
})(EApiPath || (exports.EApiPath = EApiPath = {}));
|
|
10
|
+
var EValidationCommandDataProps;
|
|
11
|
+
(function (EValidationCommandDataProps) {
|
|
12
|
+
EValidationCommandDataProps[EValidationCommandDataProps["Unknown"] = 0] = "Unknown";
|
|
13
|
+
EValidationCommandDataProps["Payment"] = "payment";
|
|
14
|
+
})(EValidationCommandDataProps || (exports.EValidationCommandDataProps = EValidationCommandDataProps = {}));
|
|
15
|
+
var EPaymentRequestPath;
|
|
16
|
+
(function (EPaymentRequestPath) {
|
|
17
|
+
EPaymentRequestPath["Unknown"] = "";
|
|
18
|
+
EPaymentRequestPath["FlashPayUpiDeposit"] = "flash_pay_upi_deposit";
|
|
19
|
+
EPaymentRequestPath["FlashPayUpiWithdraw"] = "flash_pay_impus_withdraw";
|
|
20
|
+
})(EPaymentRequestPath || (exports.EPaymentRequestPath = EPaymentRequestPath = {}));
|
|
21
|
+
// FlashPayUpiDeposit
|
|
22
|
+
var EFlashPayStatusCode;
|
|
23
|
+
(function (EFlashPayStatusCode) {
|
|
24
|
+
EFlashPayStatusCode[EFlashPayStatusCode["Initiated"] = 0] = "Initiated";
|
|
25
|
+
EFlashPayStatusCode[EFlashPayStatusCode["Success"] = 1] = "Success";
|
|
26
|
+
EFlashPayStatusCode[EFlashPayStatusCode["Failed"] = 2] = "Failed";
|
|
27
|
+
EFlashPayStatusCode[EFlashPayStatusCode["Canceled"] = 3] = "Canceled";
|
|
28
|
+
EFlashPayStatusCode[EFlashPayStatusCode["WaitingNotification"] = 4] = "WaitingNotification";
|
|
29
|
+
})(EFlashPayStatusCode || (exports.EFlashPayStatusCode = EFlashPayStatusCode = {}));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ParseBaseResponseType } from 'service/moneyResponse/types';
|
|
2
|
+
import { ResponseFlashPayUpiDeposit } from './types';
|
|
3
|
+
export declare const upiFlashPayRestAdapterDeposit: (data: ResponseFlashPayUpiDeposit | null) => {
|
|
4
|
+
key: 'deposit';
|
|
5
|
+
responseData: ParseBaseResponseType;
|
|
6
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.upiFlashPayRestAdapterDeposit = void 0;
|
|
4
|
+
const types_1 = require("service/moneyResponse/types");
|
|
5
|
+
const types_2 = require("../../binary/types");
|
|
6
|
+
const types_3 = require("./types");
|
|
7
|
+
const upiFlashPayRestAdapterDeposit = (data) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const key = 'deposit';
|
|
10
|
+
// Handle null or undefined data
|
|
11
|
+
if (!data || typeof data !== 'object') {
|
|
12
|
+
const responseData = {
|
|
13
|
+
text: 'responseMoney.OperatorResponseError',
|
|
14
|
+
url: '',
|
|
15
|
+
isQR: false,
|
|
16
|
+
iconType: types_1.EIconType.Error,
|
|
17
|
+
requestId: types_2.ERequestIds.Unknown,
|
|
18
|
+
isError: true,
|
|
19
|
+
};
|
|
20
|
+
return { key, responseData };
|
|
21
|
+
}
|
|
22
|
+
const response = data;
|
|
23
|
+
// Extract common fields with fallbacks
|
|
24
|
+
const status = (_b = (_a = response.status) !== null && _a !== void 0 ? _a : response.code) !== null && _b !== void 0 ? _b : 'Failed';
|
|
25
|
+
const requestId = types_2.ERequestIds.RequestDeposit;
|
|
26
|
+
const url = response.paymentUrl;
|
|
27
|
+
const isSuccess = status === types_3.EFlashPayStatusCode[1];
|
|
28
|
+
// Determine icon type based on status
|
|
29
|
+
const iconType = isSuccess ? types_1.EIconType.Success : types_1.EIconType.Error;
|
|
30
|
+
// Build response text
|
|
31
|
+
const responseText = isSuccess
|
|
32
|
+
? 'responseMoney.successDescription'
|
|
33
|
+
: 'responseMoney.OperatorResponseError';
|
|
34
|
+
const responseData = {
|
|
35
|
+
text: responseText,
|
|
36
|
+
url: url,
|
|
37
|
+
isQR: false,
|
|
38
|
+
iconType,
|
|
39
|
+
requestId,
|
|
40
|
+
isError: !isSuccess,
|
|
41
|
+
};
|
|
42
|
+
return { key, responseData };
|
|
43
|
+
};
|
|
44
|
+
exports.upiFlashPayRestAdapterDeposit = upiFlashPayRestAdapterDeposit;
|
|
@@ -81,14 +81,15 @@ export declare enum EImgType {
|
|
|
81
81
|
RedCoin = 1,
|
|
82
82
|
Pack = 2
|
|
83
83
|
}
|
|
84
|
-
export type
|
|
84
|
+
export type ParseBaseResponseType = {
|
|
85
85
|
text: string;
|
|
86
86
|
url: string;
|
|
87
87
|
isQR: boolean;
|
|
88
88
|
iconType: EIconType;
|
|
89
89
|
requestId: ERequestIds;
|
|
90
90
|
isError: boolean;
|
|
91
|
-
}
|
|
91
|
+
};
|
|
92
|
+
export type ParseResponseType = ParseBaseResponseType & {
|
|
92
93
|
requestId: ERequestIds.GetBillingAddress;
|
|
93
94
|
billingAccount: string;
|
|
94
95
|
imgType: EImgType;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOME_DEFAULT_ORDER = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
const HOME_CATEGORIES = [
|
|
6
|
+
{
|
|
7
|
+
names: {
|
|
8
|
+
default: 'Popular',
|
|
9
|
+
},
|
|
10
|
+
isTwoRow: true,
|
|
11
|
+
position: 1,
|
|
12
|
+
categoryId: types_1.ECasinoCategoryIds.Popular,
|
|
13
|
+
subCategoryId: null,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
names: {
|
|
17
|
+
default: 'SlotTop',
|
|
18
|
+
},
|
|
19
|
+
isTwoRow: true,
|
|
20
|
+
position: 2,
|
|
21
|
+
categoryId: types_1.ECasinoCategoryIds.Slots,
|
|
22
|
+
subCategoryId: types_1.ECasinoCategoryIds.SubSlotsTop,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
names: {
|
|
26
|
+
default: 'Crash',
|
|
27
|
+
},
|
|
28
|
+
isTwoRow: true,
|
|
29
|
+
position: 3,
|
|
30
|
+
categoryId: types_1.ECasinoCategoryIds.Crash,
|
|
31
|
+
subCategoryId: null,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
names: {
|
|
35
|
+
default: 'Game Show',
|
|
36
|
+
},
|
|
37
|
+
isTwoRow: true,
|
|
38
|
+
position: 4,
|
|
39
|
+
categoryId: types_1.ECasinoCategoryIds.Casino,
|
|
40
|
+
subCategoryId: types_1.ECasinoCategoryIds.SubGameShow,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
names: {
|
|
44
|
+
default: 'Turbo',
|
|
45
|
+
},
|
|
46
|
+
isTwoRow: true,
|
|
47
|
+
position: 5,
|
|
48
|
+
categoryId: types_1.ECasinoCategoryIds.Turbo,
|
|
49
|
+
subCategoryId: null,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
names: {
|
|
53
|
+
default: 'SlotNew',
|
|
54
|
+
},
|
|
55
|
+
isTwoRow: true,
|
|
56
|
+
position: 6,
|
|
57
|
+
categoryId: types_1.ECasinoCategoryIds.Slots,
|
|
58
|
+
subCategoryId: types_1.ECasinoCategoryIds.SubSlotsNew,
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
exports.HOME_DEFAULT_ORDER = {
|
|
62
|
+
default: {
|
|
63
|
+
isProviderSection: true,
|
|
64
|
+
providerSectionPosition: 3,
|
|
65
|
+
categories: HOME_CATEGORIES,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import { CategoriesInfo, ResponseEncodeConfig, SubscribeCasinoCategoriesInfoProps, UpdateCategoriesProps } from './types';
|
|
1
|
+
import { CategoriesInfo, HomeCategoriesInfo, ResponseEncodeConfig, SubscribeCasinoCategoriesInfoProps, UpdateCategoriesProps } from './types';
|
|
2
2
|
import { CasinoServices } from 'store/casino/services';
|
|
3
3
|
import { ObservableEntity } from 'service/observableEntity';
|
|
4
4
|
import { UpdateData } from 'service/observable/type';
|
|
5
|
+
import { CountryInfo } from 'store/user/types';
|
|
6
|
+
import { TCasinoSettings } from 'socket/types/socket';
|
|
5
7
|
export declare class CasinoCategories extends ObservableEntity<undefined> {
|
|
6
8
|
services: CasinoServices;
|
|
9
|
+
_homeCategoriesConfig: HomeCategoriesInfo;
|
|
7
10
|
mobileCategoriesInfo: CategoriesInfo;
|
|
8
11
|
desktopCategoriesInfo: CategoriesInfo;
|
|
9
12
|
config: null | ResponseEncodeConfig;
|
|
10
13
|
isNeedToConfigureData: boolean;
|
|
11
|
-
|
|
12
|
-
constructor(services: CasinoServices,
|
|
14
|
+
_countryId: number;
|
|
15
|
+
constructor(services: CasinoServices, casinoSettings: TCasinoSettings);
|
|
16
|
+
set homeCategoriesConfig(homeCategoriesConfig: HomeCategoriesInfo);
|
|
17
|
+
get homeCategoriesConfig(): HomeCategoriesInfo;
|
|
18
|
+
set countryId(countryId: number);
|
|
19
|
+
get countryId(): number;
|
|
13
20
|
private setConfig;
|
|
14
21
|
private request;
|
|
15
22
|
getMainFile(url: string): Promise<void>;
|
|
16
23
|
getConfig(urls: [string, string]): Promise<void>;
|
|
17
|
-
updateCountryId(
|
|
24
|
+
updateCountryId(countryInfo: CountryInfo): void;
|
|
18
25
|
configureCasinoData(): void;
|
|
19
26
|
updateGamesRestricts(): void;
|
|
20
27
|
startCasinoConfigSubscribers(): void;
|
|
@@ -123,7 +123,30 @@ export type SubCategoryWithGame = {
|
|
|
123
123
|
gameIds: ResponseGameIds;
|
|
124
124
|
};
|
|
125
125
|
export type ResponseHomePageInfo = {
|
|
126
|
-
rows: (
|
|
127
|
-
|
|
126
|
+
rows: (Omit<HomeCategoryInfo, 'names'> & {
|
|
127
|
+
name: string;
|
|
128
|
+
})[];
|
|
129
|
+
isProviderSection: boolean;
|
|
130
|
+
providerSectionPosition: null | number;
|
|
131
|
+
};
|
|
132
|
+
export type HomeCategoriesInfo = {
|
|
133
|
+
[countryCode: string]: CategoriesHomeInfo;
|
|
134
|
+
} & {
|
|
135
|
+
default: CategoriesHomeInfo;
|
|
136
|
+
};
|
|
137
|
+
export type CategoriesHomeInfo = {
|
|
138
|
+
isProviderSection: boolean;
|
|
139
|
+
providerSectionPosition: null | number;
|
|
140
|
+
categories: HomeCategoryInfo[];
|
|
141
|
+
};
|
|
142
|
+
export type HomeCategoryInfo = {
|
|
143
|
+
names: {
|
|
144
|
+
[name: string]: string;
|
|
145
|
+
default: string;
|
|
146
|
+
};
|
|
147
|
+
isTwoRow: boolean;
|
|
148
|
+
position: number;
|
|
149
|
+
categoryId: number;
|
|
150
|
+
subCategoryId: number | null;
|
|
128
151
|
};
|
|
129
152
|
export {};
|
|
@@ -71,4 +71,5 @@ export declare class CasinoServices {
|
|
|
71
71
|
promotionAdapter(promotion: PromotionEntity): PromotionAdaptedEntity | null;
|
|
72
72
|
getCategoryByGameId(gameId: number, isMobile: boolean): null | CasinoCategory;
|
|
73
73
|
getSubCategoryByGameId(categoryId: number, gameId: number, isMobile: boolean): null | CasinoSubCategory;
|
|
74
|
+
getHomeCategoriesConfig(homePath: string): Promise<void>;
|
|
74
75
|
}
|
|
@@ -158,10 +158,10 @@ export declare enum PaymentChannelType {
|
|
|
158
158
|
CreditCard = 29,
|
|
159
159
|
CreditCardFast = 30,
|
|
160
160
|
CreditCardAcquirning = 31,
|
|
161
|
-
|
|
161
|
+
FlashPayUpi = 32,
|
|
162
162
|
BKash = 41,
|
|
163
163
|
Nagad = 42,
|
|
164
|
-
|
|
164
|
+
FlashPayIMPUS = 43,
|
|
165
165
|
BKashFastWellexPayCopy = 62,
|
|
166
166
|
NagadFastWellexPayCopy = 63,
|
|
167
167
|
ApayNagad = 64,
|
|
@@ -45,11 +45,11 @@ var PaymentChannelType;
|
|
|
45
45
|
PaymentChannelType[PaymentChannelType["CreditCard"] = 29] = "CreditCard";
|
|
46
46
|
PaymentChannelType[PaymentChannelType["CreditCardFast"] = 30] = "CreditCardFast";
|
|
47
47
|
PaymentChannelType[PaymentChannelType["CreditCardAcquirning"] = 31] = "CreditCardAcquirning";
|
|
48
|
-
PaymentChannelType[PaymentChannelType["
|
|
48
|
+
PaymentChannelType[PaymentChannelType["FlashPayUpi"] = 32] = "FlashPayUpi";
|
|
49
49
|
// END RUN
|
|
50
50
|
PaymentChannelType[PaymentChannelType["BKash"] = 41] = "BKash";
|
|
51
51
|
PaymentChannelType[PaymentChannelType["Nagad"] = 42] = "Nagad";
|
|
52
|
-
PaymentChannelType[PaymentChannelType["
|
|
52
|
+
PaymentChannelType[PaymentChannelType["FlashPayIMPUS"] = 43] = "FlashPayIMPUS";
|
|
53
53
|
PaymentChannelType[PaymentChannelType["BKashFastWellexPayCopy"] = 62] = "BKashFastWellexPayCopy";
|
|
54
54
|
PaymentChannelType[PaymentChannelType["NagadFastWellexPayCopy"] = 63] = "NagadFastWellexPayCopy";
|
|
55
55
|
PaymentChannelType[PaymentChannelType["ApayNagad"] = 64] = "ApayNagad";
|