react-memory-optimization 0.0.128 → 0.0.129
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/types.d.ts +3 -0
- package/dist/lib/service/api/types.js +1 -0
- package/dist/lib/service/api/utils.js +10 -1
- package/dist/lib/service/moneyResponse/types.d.ts +6 -0
- package/dist/lib/store/user/types.d.ts +4 -1
- package/dist/lib/store/user/types.js +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { TDepositResponseLaunchParameter } from 'service/moneyResponse/types';
|
|
1
2
|
export declare enum EApiPath {
|
|
3
|
+
ProfileInfo = "/ref_service/api/v1/client/profile_info",
|
|
2
4
|
AccrualHistory = "/ref_service/api/v1/client/accural_bonus",
|
|
3
5
|
DynamicPresetsInfo = "/ref_service/api/v1/client/additional_info",
|
|
4
6
|
CreateDevDeposit = "/pay-service-dev/api/v2/deposit/create",
|
|
@@ -75,6 +77,7 @@ export type ResponseDeposit = {
|
|
|
75
77
|
status: keyof typeof EPaymentStatusCode;
|
|
76
78
|
operationId: string;
|
|
77
79
|
paymentUrl: string;
|
|
80
|
+
parameters?: TDepositResponseLaunchParameter[] | null;
|
|
78
81
|
deepLink?: {
|
|
79
82
|
upi_intent: string;
|
|
80
83
|
upi_phonepe: string;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EPaymentStatusCode = exports.EPaymentRequestPath = exports.EValidationCommandDataProps = exports.EApiPath = void 0;
|
|
4
4
|
var EApiPath;
|
|
5
5
|
(function (EApiPath) {
|
|
6
|
+
EApiPath["ProfileInfo"] = "/ref_service/api/v1/client/profile_info";
|
|
6
7
|
EApiPath["AccrualHistory"] = "/ref_service/api/v1/client/accural_bonus";
|
|
7
8
|
EApiPath["DynamicPresetsInfo"] = "/ref_service/api/v1/client/additional_info";
|
|
8
9
|
EApiPath["CreateDevDeposit"] = "/pay-service-dev/api/v2/deposit/create";
|
|
@@ -17,6 +17,8 @@ const restAdapterDeposit = (data) => {
|
|
|
17
17
|
iconType: types_1.EIconType.Error,
|
|
18
18
|
requestId: types_2.ERequestIds.Unknown,
|
|
19
19
|
isError: true,
|
|
20
|
+
parameters: null,
|
|
21
|
+
rawResponse: data,
|
|
20
22
|
};
|
|
21
23
|
return { key, responseData };
|
|
22
24
|
}
|
|
@@ -25,6 +27,7 @@ const restAdapterDeposit = (data) => {
|
|
|
25
27
|
const status = (_b = (_a = response.status) !== null && _a !== void 0 ? _a : response.code) !== null && _b !== void 0 ? _b : 'Failed';
|
|
26
28
|
const requestId = types_2.ERequestIds.RequestDeposit;
|
|
27
29
|
const url = response.paymentUrl;
|
|
30
|
+
const parameters = response.parameters;
|
|
28
31
|
const isSuccess = status === types_3.EPaymentStatusCode[1];
|
|
29
32
|
// Determine icon type based on status
|
|
30
33
|
const iconType = isSuccess ? types_1.EIconType.Success : types_1.EIconType.Error;
|
|
@@ -34,11 +37,13 @@ const restAdapterDeposit = (data) => {
|
|
|
34
37
|
: 'responseMoney.OperatorResponseError';
|
|
35
38
|
const responseData = {
|
|
36
39
|
text: responseText,
|
|
37
|
-
url
|
|
40
|
+
url,
|
|
38
41
|
isQR: false,
|
|
39
42
|
iconType,
|
|
40
43
|
requestId,
|
|
41
44
|
isError: !isSuccess,
|
|
45
|
+
parameters,
|
|
46
|
+
rawResponse: response,
|
|
42
47
|
};
|
|
43
48
|
return { key, responseData };
|
|
44
49
|
};
|
|
@@ -55,6 +60,7 @@ const restAdapterWithdraw = (data) => {
|
|
|
55
60
|
iconType: types_1.EIconType.Error,
|
|
56
61
|
requestId: types_2.ERequestIds.WithdrawRequest,
|
|
57
62
|
isError: true,
|
|
63
|
+
rawResponse: data,
|
|
58
64
|
},
|
|
59
65
|
};
|
|
60
66
|
}
|
|
@@ -70,6 +76,7 @@ const restAdapterWithdraw = (data) => {
|
|
|
70
76
|
requestId: types_2.ERequestIds.WithdrawRequest,
|
|
71
77
|
// Notice: We can't show waiting notification description because we don't have the notification
|
|
72
78
|
isError: true,
|
|
79
|
+
rawResponse: data,
|
|
73
80
|
},
|
|
74
81
|
};
|
|
75
82
|
}
|
|
@@ -82,6 +89,7 @@ const restAdapterWithdraw = (data) => {
|
|
|
82
89
|
iconType: types_1.EIconType.Success,
|
|
83
90
|
requestId: types_2.ERequestIds.WithdrawRequest,
|
|
84
91
|
isError: false,
|
|
92
|
+
rawResponse: data,
|
|
85
93
|
},
|
|
86
94
|
};
|
|
87
95
|
}
|
|
@@ -95,6 +103,7 @@ const restAdapterWithdraw = (data) => {
|
|
|
95
103
|
iconType: iconType !== null && iconType !== void 0 ? iconType : types_1.EIconType.Error,
|
|
96
104
|
requestId: types_2.ERequestIds.WithdrawRequest,
|
|
97
105
|
isError: isError !== null && isError !== void 0 ? isError : true,
|
|
106
|
+
rawResponse: data,
|
|
98
107
|
};
|
|
99
108
|
return { key, responseData };
|
|
100
109
|
};
|
|
@@ -81,6 +81,10 @@ export declare enum EImgType {
|
|
|
81
81
|
RedCoin = 1,
|
|
82
82
|
Pack = 2
|
|
83
83
|
}
|
|
84
|
+
export type TDepositResponseLaunchParameter = {
|
|
85
|
+
name: string;
|
|
86
|
+
value: string;
|
|
87
|
+
};
|
|
84
88
|
export type ParseBaseResponseType = {
|
|
85
89
|
text: string;
|
|
86
90
|
url: string;
|
|
@@ -88,6 +92,8 @@ export type ParseBaseResponseType = {
|
|
|
88
92
|
iconType: EIconType;
|
|
89
93
|
requestId: ERequestIds;
|
|
90
94
|
isError: boolean;
|
|
95
|
+
parameters?: TDepositResponseLaunchParameter[] | null;
|
|
96
|
+
rawResponse: unknown;
|
|
91
97
|
};
|
|
92
98
|
export type ParseResponseType = ParseBaseResponseType & {
|
|
93
99
|
requestId: ERequestIds.GetBillingAddress;
|
|
@@ -134,7 +134,8 @@ export type Payment = {
|
|
|
134
134
|
export declare enum EPaymentLaunch {
|
|
135
135
|
Frame = 1,
|
|
136
136
|
Redirect = 2,
|
|
137
|
-
Qr = 3
|
|
137
|
+
Qr = 3,
|
|
138
|
+
HTML = 4
|
|
138
139
|
}
|
|
139
140
|
export declare enum PaymentChannelType {
|
|
140
141
|
BTC = 1,
|
|
@@ -199,6 +200,8 @@ export declare enum PaymentChannelType {
|
|
|
199
200
|
BetterBroEasypaisa = 108,
|
|
200
201
|
BetterBroJazzCash = 109,
|
|
201
202
|
PayinOnlineBankingMYR = 105,
|
|
203
|
+
APayBKashApiV = 121,
|
|
204
|
+
APayRaastP2P = 123,
|
|
202
205
|
BkashMonetics = 126,
|
|
203
206
|
NagadMonetics = 127,
|
|
204
207
|
OctopayNagad = 134,
|
|
@@ -17,6 +17,7 @@ var EPaymentLaunch;
|
|
|
17
17
|
EPaymentLaunch[EPaymentLaunch["Frame"] = 1] = "Frame";
|
|
18
18
|
EPaymentLaunch[EPaymentLaunch["Redirect"] = 2] = "Redirect";
|
|
19
19
|
EPaymentLaunch[EPaymentLaunch["Qr"] = 3] = "Qr";
|
|
20
|
+
EPaymentLaunch[EPaymentLaunch["HTML"] = 4] = "HTML";
|
|
20
21
|
})(EPaymentLaunch || (exports.EPaymentLaunch = EPaymentLaunch = {}));
|
|
21
22
|
var PaymentChannelType;
|
|
22
23
|
(function (PaymentChannelType) {
|
|
@@ -91,6 +92,8 @@ var PaymentChannelType;
|
|
|
91
92
|
PaymentChannelType[PaymentChannelType["BetterBroEasypaisa"] = 108] = "BetterBroEasypaisa";
|
|
92
93
|
PaymentChannelType[PaymentChannelType["BetterBroJazzCash"] = 109] = "BetterBroJazzCash";
|
|
93
94
|
PaymentChannelType[PaymentChannelType["PayinOnlineBankingMYR"] = 105] = "PayinOnlineBankingMYR";
|
|
95
|
+
PaymentChannelType[PaymentChannelType["APayBKashApiV"] = 121] = "APayBKashApiV";
|
|
96
|
+
PaymentChannelType[PaymentChannelType["APayRaastP2P"] = 123] = "APayRaastP2P";
|
|
94
97
|
PaymentChannelType[PaymentChannelType["BkashMonetics"] = 126] = "BkashMonetics";
|
|
95
98
|
PaymentChannelType[PaymentChannelType["NagadMonetics"] = 127] = "NagadMonetics";
|
|
96
99
|
PaymentChannelType[PaymentChannelType["OctopayNagad"] = 134] = "OctopayNagad";
|