react-memory-optimization 0.0.127 → 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.
@@ -118,4 +118,52 @@ exports.PAYMENT_REQUEST_PATHS = {
118
118
  path: types_1.EApiPath.CreateProdWithdraw,
119
119
  adapterFn: utils_1.restAdapterWithdraw,
120
120
  },
121
+ [types_1.EPaymentRequestPath.CreedoBKashBDTDeposit]: {
122
+ path: types_1.EApiPath.CreateProdDeposit,
123
+ adapterFn: utils_1.restAdapterDeposit,
124
+ },
125
+ [types_1.EPaymentRequestPath.CreedoBKashBDTWithdraw]: {
126
+ path: types_1.EApiPath.CreateProdWithdraw,
127
+ adapterFn: utils_1.restAdapterWithdraw,
128
+ },
129
+ [types_1.EPaymentRequestPath.CreedoNagadBDTDeposit]: {
130
+ path: types_1.EApiPath.CreateProdDeposit,
131
+ adapterFn: utils_1.restAdapterDeposit,
132
+ },
133
+ [types_1.EPaymentRequestPath.CreedoNagadBDTWithdraw]: {
134
+ path: types_1.EApiPath.CreateProdWithdraw,
135
+ adapterFn: utils_1.restAdapterWithdraw,
136
+ },
137
+ [types_1.EPaymentRequestPath.CreedoEasyPaisaPKRDeposit]: {
138
+ path: types_1.EApiPath.CreateProdDeposit,
139
+ adapterFn: utils_1.restAdapterDeposit,
140
+ },
141
+ [types_1.EPaymentRequestPath.CreedoEasyPaisaPKRWithdraw]: {
142
+ path: types_1.EApiPath.CreateProdWithdraw,
143
+ adapterFn: utils_1.restAdapterWithdraw,
144
+ },
145
+ [types_1.EPaymentRequestPath.CreedoJazzCashPKRDeposit]: {
146
+ path: types_1.EApiPath.CreateProdDeposit,
147
+ adapterFn: utils_1.restAdapterDeposit,
148
+ },
149
+ [types_1.EPaymentRequestPath.CreedoJazzCashPKRWithdraw]: {
150
+ path: types_1.EApiPath.CreateProdWithdraw,
151
+ adapterFn: utils_1.restAdapterWithdraw,
152
+ },
153
+ [types_1.EPaymentRequestPath.CreedoGCashPHPDeposit]: {
154
+ path: types_1.EApiPath.CreateProdDeposit,
155
+ adapterFn: utils_1.restAdapterDeposit,
156
+ },
157
+ [types_1.EPaymentRequestPath.CreedoGCashPHPWithdraw]: {
158
+ path: types_1.EApiPath.CreateProdWithdraw,
159
+ adapterFn: utils_1.restAdapterWithdraw,
160
+ },
161
+ [types_1.EPaymentRequestPath.CreedoPayMayaPHPDeposit]: {
162
+ path: types_1.EApiPath.CreateProdDeposit,
163
+ adapterFn: utils_1.restAdapterDeposit,
164
+ },
165
+ [types_1.EPaymentRequestPath.CreedoPayMayaPHPWithdraw]: {
166
+ path: types_1.EApiPath.CreateProdWithdraw,
167
+ adapterFn: utils_1.restAdapterWithdraw,
168
+ },
121
169
  };
@@ -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",
@@ -43,7 +45,19 @@ export declare enum EPaymentRequestPath {
43
45
  BetterBroEasypaisaDeposit = "better_bro_easypaisa_deposit",
44
46
  BetterBroEasypaisaWithdraw = "better_bro_easypaisa_withdraw",
45
47
  BetterBroJazzCashDeposit = "better_bro_jazzcash_deposit",
46
- BetterBroJazzCashWithdraw = "better_bro_jazzcash_withdraw"
48
+ BetterBroJazzCashWithdraw = "better_bro_jazzcash_withdraw",
49
+ CreedoBKashBDTDeposit = "creedo_bkash_bdt_deposit",
50
+ CreedoBKashBDTWithdraw = "creedo_bkash_bdt_withdraw",
51
+ CreedoNagadBDTDeposit = "creedo_nagad_bdt_deposit",
52
+ CreedoNagadBDTWithdraw = "creedo_nagad_bdt_withdraw",
53
+ CreedoEasyPaisaPKRDeposit = "creedo_easy_paisa_pkr_deposit",
54
+ CreedoEasyPaisaPKRWithdraw = "creedo_easy_paisa_pkr_withdraw",
55
+ CreedoJazzCashPKRDeposit = "creedo_jazz_cash_pkr_deposit",
56
+ CreedoJazzCashPKRWithdraw = "creedo_jazz_cash_pkr_withdraw",
57
+ CreedoGCashPHPDeposit = "creedo_g_cash_php_deposit",
58
+ CreedoGCashPHPWithdraw = "creedo_g_cash_php_withdraw",
59
+ CreedoPayMayaPHPDeposit = "creedo_pay_maya_php_deposit",
60
+ CreedoPayMayaPHPWithdraw = "creedo_pay_maya_php_withdraw"
47
61
  }
48
62
  export type ApiList = {
49
63
  [key: string]: {
@@ -63,6 +77,7 @@ export type ResponseDeposit = {
63
77
  status: keyof typeof EPaymentStatusCode;
64
78
  operationId: string;
65
79
  paymentUrl: string;
80
+ parameters?: TDepositResponseLaunchParameter[] | null;
66
81
  deepLink?: {
67
82
  upi_intent: string;
68
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";
@@ -52,6 +53,18 @@ var EPaymentRequestPath;
52
53
  EPaymentRequestPath["BetterBroEasypaisaWithdraw"] = "better_bro_easypaisa_withdraw";
53
54
  EPaymentRequestPath["BetterBroJazzCashDeposit"] = "better_bro_jazzcash_deposit";
54
55
  EPaymentRequestPath["BetterBroJazzCashWithdraw"] = "better_bro_jazzcash_withdraw";
56
+ EPaymentRequestPath["CreedoBKashBDTDeposit"] = "creedo_bkash_bdt_deposit";
57
+ EPaymentRequestPath["CreedoBKashBDTWithdraw"] = "creedo_bkash_bdt_withdraw";
58
+ EPaymentRequestPath["CreedoNagadBDTDeposit"] = "creedo_nagad_bdt_deposit";
59
+ EPaymentRequestPath["CreedoNagadBDTWithdraw"] = "creedo_nagad_bdt_withdraw";
60
+ EPaymentRequestPath["CreedoEasyPaisaPKRDeposit"] = "creedo_easy_paisa_pkr_deposit";
61
+ EPaymentRequestPath["CreedoEasyPaisaPKRWithdraw"] = "creedo_easy_paisa_pkr_withdraw";
62
+ EPaymentRequestPath["CreedoJazzCashPKRDeposit"] = "creedo_jazz_cash_pkr_deposit";
63
+ EPaymentRequestPath["CreedoJazzCashPKRWithdraw"] = "creedo_jazz_cash_pkr_withdraw";
64
+ EPaymentRequestPath["CreedoGCashPHPDeposit"] = "creedo_g_cash_php_deposit";
65
+ EPaymentRequestPath["CreedoGCashPHPWithdraw"] = "creedo_g_cash_php_withdraw";
66
+ EPaymentRequestPath["CreedoPayMayaPHPDeposit"] = "creedo_pay_maya_php_deposit";
67
+ EPaymentRequestPath["CreedoPayMayaPHPWithdraw"] = "creedo_pay_maya_php_withdraw";
55
68
  })(EPaymentRequestPath || (exports.EPaymentRequestPath = EPaymentRequestPath = {}));
56
69
  // FlashPayUpiDeposit
57
70
  var EPaymentStatusCode;
@@ -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: 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,
@@ -212,6 +215,8 @@ export declare enum PaymentChannelType {
212
215
  INRRGTS = 142,
213
216
  InrDeposit = 144,
214
217
  INRWithdrawImp = 147,
218
+ CreedoGCash = 145,
219
+ CreedoPayMaya = 146,
215
220
  MPayCC = 148,
216
221
  MPayFix = 149,
217
222
  PagsmileBoleto = 152,
@@ -277,10 +282,10 @@ export declare enum PaymentChannelType {
277
282
  APayBankTransfer = 245,
278
283
  PKRPlixoEasypaisa = 246,
279
284
  PKRPlixoJazzCash = 247,
280
- PlixoCreedoBkash = 248,
281
- PlixoCreedoNagad = 249,
282
- PlixoCreedoEasyPaisa = 250,
283
- PlixoCreedoJazzCash = 251,
285
+ CreedoBkash = 248,
286
+ CreedoNagad = 249,
287
+ CreedoEasyPaisa = 250,
288
+ CreedoJazzCash = 251,
284
289
  FluxBKash = 252,
285
290
  FluxNagad = 253
286
291
  }
@@ -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";
@@ -105,6 +108,9 @@ var PaymentChannelType;
105
108
  PaymentChannelType[PaymentChannelType["INRRGTS"] = 142] = "INRRGTS";
106
109
  PaymentChannelType[PaymentChannelType["InrDeposit"] = 144] = "InrDeposit";
107
110
  PaymentChannelType[PaymentChannelType["INRWithdrawImp"] = 147] = "INRWithdrawImp";
111
+ //Creedo
112
+ PaymentChannelType[PaymentChannelType["CreedoGCash"] = 145] = "CreedoGCash";
113
+ PaymentChannelType[PaymentChannelType["CreedoPayMaya"] = 146] = "CreedoPayMaya";
108
114
  PaymentChannelType[PaymentChannelType["MPayCC"] = 148] = "MPayCC";
109
115
  PaymentChannelType[PaymentChannelType["MPayFix"] = 149] = "MPayFix";
110
116
  PaymentChannelType[PaymentChannelType["PagsmileBoleto"] = 152] = "PagsmileBoleto";
@@ -173,10 +179,11 @@ var PaymentChannelType;
173
179
  PaymentChannelType[PaymentChannelType["APayBankTransfer"] = 245] = "APayBankTransfer";
174
180
  PaymentChannelType[PaymentChannelType["PKRPlixoEasypaisa"] = 246] = "PKRPlixoEasypaisa";
175
181
  PaymentChannelType[PaymentChannelType["PKRPlixoJazzCash"] = 247] = "PKRPlixoJazzCash";
176
- PaymentChannelType[PaymentChannelType["PlixoCreedoBkash"] = 248] = "PlixoCreedoBkash";
177
- PaymentChannelType[PaymentChannelType["PlixoCreedoNagad"] = 249] = "PlixoCreedoNagad";
178
- PaymentChannelType[PaymentChannelType["PlixoCreedoEasyPaisa"] = 250] = "PlixoCreedoEasyPaisa";
179
- PaymentChannelType[PaymentChannelType["PlixoCreedoJazzCash"] = 251] = "PlixoCreedoJazzCash";
182
+ // Creedo
183
+ PaymentChannelType[PaymentChannelType["CreedoBkash"] = 248] = "CreedoBkash";
184
+ PaymentChannelType[PaymentChannelType["CreedoNagad"] = 249] = "CreedoNagad";
185
+ PaymentChannelType[PaymentChannelType["CreedoEasyPaisa"] = 250] = "CreedoEasyPaisa";
186
+ PaymentChannelType[PaymentChannelType["CreedoJazzCash"] = 251] = "CreedoJazzCash";
180
187
  PaymentChannelType[PaymentChannelType["FluxBKash"] = 252] = "FluxBKash";
181
188
  PaymentChannelType[PaymentChannelType["FluxNagad"] = 253] = "FluxNagad";
182
189
  })(PaymentChannelType || (exports.PaymentChannelType = PaymentChannelType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-memory-optimization",
3
- "version": "0.0.127",
3
+ "version": "0.0.129",
4
4
  "description": "react memory optimization library",
5
5
  "sideEffects": false,
6
6
  "files": [