react-memory-optimization 0.0.92 → 0.0.93
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.js +14 -4
- package/dist/lib/service/api/types.d.ts +13 -9
- package/dist/lib/service/api/types.js +15 -11
- package/dist/lib/service/api/utils.d.ts +3 -3
- package/dist/lib/service/api/utils.js +7 -7
- package/dist/lib/store/user/constants.js +0 -1
- package/dist/lib/store/user/types.d.ts +3 -2
- package/dist/lib/store/user/types.js +2 -1
- package/package.json +1 -1
|
@@ -4,12 +4,22 @@ exports.PAYMENT_REQUEST_PATHS = void 0;
|
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
6
|
exports.PAYMENT_REQUEST_PATHS = {
|
|
7
|
+
// UPI FlashPay
|
|
7
8
|
[types_1.EPaymentRequestPath.FlashPayUpiDeposit]: {
|
|
8
|
-
path: types_1.EApiPath.
|
|
9
|
-
adapterFn: utils_1.
|
|
9
|
+
path: types_1.EApiPath.CreateDevDeposit,
|
|
10
|
+
adapterFn: utils_1.restAdapterDeposit,
|
|
10
11
|
},
|
|
11
12
|
[types_1.EPaymentRequestPath.FlashPayImpusWithdraw]: {
|
|
12
|
-
path: types_1.EApiPath.
|
|
13
|
-
adapterFn: utils_1.
|
|
13
|
+
path: types_1.EApiPath.CreateDevWithdraw,
|
|
14
|
+
adapterFn: utils_1.restAdapterWithdraw,
|
|
15
|
+
},
|
|
16
|
+
// PicPay Bkash Nagad
|
|
17
|
+
[types_1.EPaymentRequestPath.PicoPayBkashNagadDeposit]: {
|
|
18
|
+
path: types_1.EApiPath.CreateDevDeposit,
|
|
19
|
+
adapterFn: utils_1.restAdapterDeposit,
|
|
20
|
+
},
|
|
21
|
+
[types_1.EPaymentRequestPath.PicoPayBkashNagadWithdraw]: {
|
|
22
|
+
path: types_1.EApiPath.CreateDevWithdraw,
|
|
23
|
+
adapterFn: utils_1.restAdapterWithdraw,
|
|
14
24
|
},
|
|
15
25
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare enum EApiPath {
|
|
2
2
|
AccrualHistory = "/ref_service/api/v1/client/accural_bonus",
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
CreateDevDeposit = "/pay-service-dev/api/v2/deposit/create",
|
|
4
|
+
CreateProdDeposit = "/pay-service/api/v2/deposit/create",
|
|
5
|
+
CreateDevWithdraw = "/pay-service-dev/api/v2/withdrawal/create",
|
|
6
|
+
CreateProdWithdraw = "/pay-service/api/v2/withdrawal/create"
|
|
5
7
|
}
|
|
6
8
|
export type RestCommandDataProps = {
|
|
7
9
|
[key: string]: string | number | any[];
|
|
@@ -13,7 +15,9 @@ export declare enum EValidationCommandDataProps {
|
|
|
13
15
|
export declare enum EPaymentRequestPath {
|
|
14
16
|
Unknown = "",
|
|
15
17
|
FlashPayUpiDeposit = "flash_pay_upi_deposit",
|
|
16
|
-
FlashPayImpusWithdraw = "flash_pay_impus_withdraw"
|
|
18
|
+
FlashPayImpusWithdraw = "flash_pay_impus_withdraw",
|
|
19
|
+
PicoPayBkashNagadDeposit = "pico_pay_bkash_nagad_deposit",
|
|
20
|
+
PicoPayBkashNagadWithdraw = "pico_pay_bkash_nagad_withdraw"
|
|
17
21
|
}
|
|
18
22
|
export type ApiList = {
|
|
19
23
|
[key: string]: {
|
|
@@ -22,26 +26,26 @@ export type ApiList = {
|
|
|
22
26
|
};
|
|
23
27
|
};
|
|
24
28
|
export type RequestList = ApiList | null;
|
|
25
|
-
export declare enum
|
|
29
|
+
export declare enum EPaymentStatusCode {
|
|
26
30
|
Initiated = 0,
|
|
27
31
|
Success = 1,
|
|
28
32
|
Failed = 2,
|
|
29
33
|
Canceled = 3,
|
|
30
34
|
WaitingNotification = 4
|
|
31
35
|
}
|
|
32
|
-
export type
|
|
33
|
-
status: keyof typeof
|
|
36
|
+
export type ResponseDeposit = {
|
|
37
|
+
status: keyof typeof EPaymentStatusCode;
|
|
34
38
|
operationId: string;
|
|
35
39
|
paymentUrl: string;
|
|
36
|
-
deepLink
|
|
40
|
+
deepLink?: {
|
|
37
41
|
upi_intent: string;
|
|
38
42
|
upi_phonepe: string;
|
|
39
43
|
upi_gpay: string;
|
|
40
44
|
upi_paytm: string;
|
|
41
45
|
};
|
|
42
46
|
};
|
|
43
|
-
export type
|
|
44
|
-
status: keyof typeof
|
|
47
|
+
export type ResponseWithdraw = {
|
|
48
|
+
status: keyof typeof EPaymentStatusCode;
|
|
45
49
|
code: string;
|
|
46
50
|
postponed: boolean;
|
|
47
51
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.EPaymentStatusCode = 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["
|
|
8
|
-
EApiPath["
|
|
7
|
+
EApiPath["CreateDevDeposit"] = "/pay-service-dev/api/v2/deposit/create";
|
|
8
|
+
EApiPath["CreateProdDeposit"] = "/pay-service/api/v2/deposit/create";
|
|
9
|
+
EApiPath["CreateDevWithdraw"] = "/pay-service-dev/api/v2/withdrawal/create";
|
|
10
|
+
EApiPath["CreateProdWithdraw"] = "/pay-service/api/v2/withdrawal/create";
|
|
9
11
|
})(EApiPath || (exports.EApiPath = EApiPath = {}));
|
|
10
12
|
var EValidationCommandDataProps;
|
|
11
13
|
(function (EValidationCommandDataProps) {
|
|
@@ -17,13 +19,15 @@ var EPaymentRequestPath;
|
|
|
17
19
|
EPaymentRequestPath["Unknown"] = "";
|
|
18
20
|
EPaymentRequestPath["FlashPayUpiDeposit"] = "flash_pay_upi_deposit";
|
|
19
21
|
EPaymentRequestPath["FlashPayImpusWithdraw"] = "flash_pay_impus_withdraw";
|
|
22
|
+
EPaymentRequestPath["PicoPayBkashNagadDeposit"] = "pico_pay_bkash_nagad_deposit";
|
|
23
|
+
EPaymentRequestPath["PicoPayBkashNagadWithdraw"] = "pico_pay_bkash_nagad_withdraw";
|
|
20
24
|
})(EPaymentRequestPath || (exports.EPaymentRequestPath = EPaymentRequestPath = {}));
|
|
21
25
|
// FlashPayUpiDeposit
|
|
22
|
-
var
|
|
23
|
-
(function (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})(
|
|
26
|
+
var EPaymentStatusCode;
|
|
27
|
+
(function (EPaymentStatusCode) {
|
|
28
|
+
EPaymentStatusCode[EPaymentStatusCode["Initiated"] = 0] = "Initiated";
|
|
29
|
+
EPaymentStatusCode[EPaymentStatusCode["Success"] = 1] = "Success";
|
|
30
|
+
EPaymentStatusCode[EPaymentStatusCode["Failed"] = 2] = "Failed";
|
|
31
|
+
EPaymentStatusCode[EPaymentStatusCode["Canceled"] = 3] = "Canceled";
|
|
32
|
+
EPaymentStatusCode[EPaymentStatusCode["WaitingNotification"] = 4] = "WaitingNotification";
|
|
33
|
+
})(EPaymentStatusCode || (exports.EPaymentStatusCode = EPaymentStatusCode = {}));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ParseBaseResponseType } from 'service/moneyResponse/types';
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
2
|
+
import { ResponseDeposit, ResponseWithdraw } from './types';
|
|
3
|
+
export declare const restAdapterDeposit: (data: ResponseDeposit | null) => {
|
|
4
4
|
key: 'deposit';
|
|
5
5
|
responseData: ParseBaseResponseType;
|
|
6
6
|
};
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const restAdapterWithdraw: (data: ResponseWithdraw | null) => {
|
|
8
8
|
key: 'withdraw';
|
|
9
9
|
responseData: ParseBaseResponseType;
|
|
10
10
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.restAdapterWithdraw = exports.restAdapterDeposit = void 0;
|
|
4
4
|
const types_1 = require("service/moneyResponse/types");
|
|
5
5
|
const types_2 = require("../../binary/types");
|
|
6
6
|
const types_3 = require("./types");
|
|
7
7
|
const moneyResponse_1 = require("service/moneyResponse");
|
|
8
|
-
const
|
|
8
|
+
const restAdapterDeposit = (data) => {
|
|
9
9
|
var _a, _b;
|
|
10
10
|
const key = 'deposit';
|
|
11
11
|
// Handle null or undefined data
|
|
@@ -25,7 +25,7 @@ const upiFlashPayRestAdapterDeposit = (data) => {
|
|
|
25
25
|
const status = (_b = (_a = response.status) !== null && _a !== void 0 ? _a : response.code) !== null && _b !== void 0 ? _b : 'Failed';
|
|
26
26
|
const requestId = types_2.ERequestIds.RequestDeposit;
|
|
27
27
|
const url = response.paymentUrl;
|
|
28
|
-
const isSuccess = status === types_3.
|
|
28
|
+
const isSuccess = status === types_3.EPaymentStatusCode[1];
|
|
29
29
|
// Determine icon type based on status
|
|
30
30
|
const iconType = isSuccess ? types_1.EIconType.Success : types_1.EIconType.Error;
|
|
31
31
|
// Build response text
|
|
@@ -42,8 +42,8 @@ const upiFlashPayRestAdapterDeposit = (data) => {
|
|
|
42
42
|
};
|
|
43
43
|
return { key, responseData };
|
|
44
44
|
};
|
|
45
|
-
exports.
|
|
46
|
-
const
|
|
45
|
+
exports.restAdapterDeposit = restAdapterDeposit;
|
|
46
|
+
const restAdapterWithdraw = (data) => {
|
|
47
47
|
const key = 'withdraw';
|
|
48
48
|
if (!data) {
|
|
49
49
|
return {
|
|
@@ -58,7 +58,7 @@ const impusFlashPayRestAdapterWithdraw = (data) => {
|
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
if (data.status === types_3.
|
|
61
|
+
if (data.status === types_3.EPaymentStatusCode[0]) {
|
|
62
62
|
if (data.postponed) {
|
|
63
63
|
return {
|
|
64
64
|
key,
|
|
@@ -98,4 +98,4 @@ const impusFlashPayRestAdapterWithdraw = (data) => {
|
|
|
98
98
|
};
|
|
99
99
|
return { key, responseData };
|
|
100
100
|
};
|
|
101
|
-
exports.
|
|
101
|
+
exports.restAdapterWithdraw = restAdapterWithdraw;
|
|
@@ -1158,7 +1158,6 @@ exports.WELLEXPAY = [
|
|
|
1158
1158
|
types_1.PaymentChannelType.WellxpayUpay,
|
|
1159
1159
|
types_1.PaymentChannelType.WellxpayRocket,
|
|
1160
1160
|
types_1.PaymentChannelType.BKashFastWellexPayCopy,
|
|
1161
|
-
types_1.PaymentChannelType.NagadFastWellexPayCopy,
|
|
1162
1161
|
];
|
|
1163
1162
|
exports.XOOM_PAY = [
|
|
1164
1163
|
types_1.PaymentChannelType.BkashXoomPay,
|
|
@@ -163,13 +163,14 @@ export declare enum PaymentChannelType {
|
|
|
163
163
|
Nagad = 42,
|
|
164
164
|
FlashPayIMPUS = 43,
|
|
165
165
|
BKashFastWellexPayCopy = 62,
|
|
166
|
-
|
|
166
|
+
PicPayBkash = 63,
|
|
167
167
|
ApayNagad = 64,
|
|
168
168
|
NagadCashX = 65,
|
|
169
169
|
BkashXoomPay = 69,
|
|
170
170
|
BkashCashX = 70,
|
|
171
171
|
WithdrawRubSber = 71,
|
|
172
172
|
WithdrawRubTinkof = 72,
|
|
173
|
+
PicPayNagad = 73,
|
|
173
174
|
BKashFastWellexPay = 75,
|
|
174
175
|
NagadFastWellexPay = 76,
|
|
175
176
|
NagadWellexPay = 77,
|
|
@@ -273,6 +274,6 @@ export declare enum PaymentChannelType {
|
|
|
273
274
|
FluxNagad = 253
|
|
274
275
|
}
|
|
275
276
|
export type MPayMethods = PaymentChannelType.MPayParazula | PaymentChannelType.MPayPayco | PaymentChannelType.MPayVCC | PaymentChannelType.PaparaMPay | PaymentChannelType.MefeteMpay | PaymentChannelType.MefeteMpayQr | PaymentChannelType.EFTMPay | PaymentChannelType.MiniHavaleMpay | PaymentChannelType.PopyMpay;
|
|
276
|
-
export type WellexPayMethods = PaymentChannelType.BKashFastWellexPay | PaymentChannelType.NagadFastWellexPay | PaymentChannelType.NagadWellexPay | PaymentChannelType.BkashWellexPay | PaymentChannelType.WellxpayUpay | PaymentChannelType.BKashFastWellexPayCopy | PaymentChannelType.
|
|
277
|
+
export type WellexPayMethods = PaymentChannelType.BKashFastWellexPay | PaymentChannelType.NagadFastWellexPay | PaymentChannelType.NagadWellexPay | PaymentChannelType.BkashWellexPay | PaymentChannelType.WellxpayUpay | PaymentChannelType.BKashFastWellexPayCopy | PaymentChannelType.WellxpayRocket;
|
|
277
278
|
export type CashXMethods = PaymentChannelType.NagadCashX | PaymentChannelType.BkashCashX;
|
|
278
279
|
export type RublesMethods = PaymentChannelType.WithdrawRubSber | PaymentChannelType.WithdrawRubTinkof | PaymentChannelType.CreditCard | PaymentChannelType.CreditCardFast | PaymentChannelType.CreditCardAcquirning;
|
|
@@ -51,13 +51,14 @@ var PaymentChannelType;
|
|
|
51
51
|
PaymentChannelType[PaymentChannelType["Nagad"] = 42] = "Nagad";
|
|
52
52
|
PaymentChannelType[PaymentChannelType["FlashPayIMPUS"] = 43] = "FlashPayIMPUS";
|
|
53
53
|
PaymentChannelType[PaymentChannelType["BKashFastWellexPayCopy"] = 62] = "BKashFastWellexPayCopy";
|
|
54
|
-
PaymentChannelType[PaymentChannelType["
|
|
54
|
+
PaymentChannelType[PaymentChannelType["PicPayBkash"] = 63] = "PicPayBkash";
|
|
55
55
|
PaymentChannelType[PaymentChannelType["ApayNagad"] = 64] = "ApayNagad";
|
|
56
56
|
PaymentChannelType[PaymentChannelType["NagadCashX"] = 65] = "NagadCashX";
|
|
57
57
|
PaymentChannelType[PaymentChannelType["BkashXoomPay"] = 69] = "BkashXoomPay";
|
|
58
58
|
PaymentChannelType[PaymentChannelType["BkashCashX"] = 70] = "BkashCashX";
|
|
59
59
|
PaymentChannelType[PaymentChannelType["WithdrawRubSber"] = 71] = "WithdrawRubSber";
|
|
60
60
|
PaymentChannelType[PaymentChannelType["WithdrawRubTinkof"] = 72] = "WithdrawRubTinkof";
|
|
61
|
+
PaymentChannelType[PaymentChannelType["PicPayNagad"] = 73] = "PicPayNagad";
|
|
61
62
|
PaymentChannelType[PaymentChannelType["BKashFastWellexPay"] = 75] = "BKashFastWellexPay";
|
|
62
63
|
// ------------------------ DEPOSITS ------------------------ MOVE TO UP
|
|
63
64
|
PaymentChannelType[PaymentChannelType["NagadFastWellexPay"] = 76] = "NagadFastWellexPay";
|