react-memory-optimization 0.1.5 → 0.1.7

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.
@@ -238,4 +238,40 @@ exports.PAYMENT_REQUEST_PATHS = {
238
238
  path: types_1.EApiPath.CreateProdWithdraw,
239
239
  adapterFn: utils_1.restAdapterWithdraw,
240
240
  },
241
+ [types_1.EPaymentRequestPath.AcerpayFPXMYRDeposit]: {
242
+ path: types_1.EApiPath.CreateProdDeposit,
243
+ adapterFn: utils_1.restAdapterDeposit,
244
+ },
245
+ [types_1.EPaymentRequestPath.AcerpayOnlineBankingMYRDeposit]: {
246
+ path: types_1.EApiPath.CreateProdDeposit,
247
+ adapterFn: utils_1.restAdapterDeposit,
248
+ },
249
+ [types_1.EPaymentRequestPath.AcerpayOnlineBankingMYRWithdraw]: {
250
+ path: types_1.EApiPath.CreateProdWithdraw,
251
+ adapterFn: utils_1.restAdapterWithdraw,
252
+ },
253
+ [types_1.EPaymentRequestPath.AcerpayDuitNowMYRDeposit]: {
254
+ path: types_1.EApiPath.CreateProdDeposit,
255
+ adapterFn: utils_1.restAdapterDeposit,
256
+ },
257
+ [types_1.EPaymentRequestPath.AcerpayTouchNGoMYRDeposit]: {
258
+ path: types_1.EApiPath.CreateProdDeposit,
259
+ adapterFn: utils_1.restAdapterDeposit,
260
+ },
261
+ [types_1.EPaymentRequestPath.AcerpayTouchNGoMYRWithdraw]: {
262
+ path: types_1.EApiPath.CreateProdWithdraw,
263
+ adapterFn: utils_1.restAdapterWithdraw,
264
+ },
265
+ [types_1.EPaymentRequestPath.AcerpayGrabpayMYRDeposit]: {
266
+ path: types_1.EApiPath.CreateProdDeposit,
267
+ adapterFn: utils_1.restAdapterDeposit,
268
+ },
269
+ [types_1.EPaymentRequestPath.AcerpayShopeepayMYRDeposit]: {
270
+ path: types_1.EApiPath.CreateProdDeposit,
271
+ adapterFn: utils_1.restAdapterDeposit,
272
+ },
273
+ [types_1.EPaymentRequestPath.AcerpayBoostMYRDeposit]: {
274
+ path: types_1.EApiPath.CreateProdDeposit,
275
+ adapterFn: utils_1.restAdapterDeposit,
276
+ },
241
277
  };
@@ -10,6 +10,8 @@ export declare enum EApiPath {
10
10
  CreateDevWithdraw = "/pay-service-dev/api/v2/withdrawal/create",
11
11
  CreateProdWithdraw = "/pay-service/api/v2/withdrawal/create",
12
12
  GetLimepayBankListMYWithdraw = "/api/v2/info/lime-pay/banks/MY/cashout",
13
+ GetAcerpayMYRBankListDeposit = "/api/v2/info/acer-pay/banks/payin?currency=MYR",
14
+ GetAcerpayMYRBankListWithdraw = "/api/v2/info/acer-pay/banks/payout?currency=MYR",
13
15
  GetPaymentBankListDeposit = "/pay-service/api/v2/info/banks/malaysia/payin",
14
16
  GetPaymentBankListWithdraw = "/pay-service/api/v2/info/banks/malaysia/payout",
15
17
  CancelWithdrawal = "/pay-service/api/v2/withdrawal/cancel"
@@ -78,7 +80,16 @@ export declare enum EPaymentRequestPath {
78
80
  LimepayBigpayMYRDeposit = "limepay_bigpay_myr_deposit",
79
81
  LimepayBigpayMYRWithdraw = "limepay_bigpay_myr_withdraw",
80
82
  LimepayMAEByMaybankMYRDeposit = "limepay_mae_by_maybank_myr_deposit",
81
- LimepayMAEByMaybankMYRWithdraw = "limepay_mae_by_maybank_myr_withdraw"
83
+ LimepayMAEByMaybankMYRWithdraw = "limepay_mae_by_maybank_myr_withdraw",
84
+ AcerpayFPXMYRDeposit = "acerpay_fpx_myr_deposit",
85
+ AcerpayOnlineBankingMYRDeposit = "acerpay_online_banking_myr_deposit",
86
+ AcerpayOnlineBankingMYRWithdraw = "acerpay_online_banking_myr_withdraw",
87
+ AcerpayDuitNowMYRDeposit = "acerpay_duitnow_myr_deposit",
88
+ AcerpayTouchNGoMYRDeposit = "acerpay_touch_n_go_myr_deposit",
89
+ AcerpayTouchNGoMYRWithdraw = "acerpay_touch_n_go_myr_withdraw",
90
+ AcerpayGrabpayMYRDeposit = "acerpay_grabpay_myr_deposit",
91
+ AcerpayShopeepayMYRDeposit = "acerpay_shopeepay_myr_deposit",
92
+ AcerpayBoostMYRDeposit = "acerpay_boost_myr_deposit"
82
93
  }
83
94
  export type ApiList = {
84
95
  [key: string]: {
@@ -13,6 +13,8 @@ var EApiPath;
13
13
  EApiPath["CreateDevWithdraw"] = "/pay-service-dev/api/v2/withdrawal/create";
14
14
  EApiPath["CreateProdWithdraw"] = "/pay-service/api/v2/withdrawal/create";
15
15
  EApiPath["GetLimepayBankListMYWithdraw"] = "/api/v2/info/lime-pay/banks/MY/cashout";
16
+ EApiPath["GetAcerpayMYRBankListDeposit"] = "/api/v2/info/acer-pay/banks/payin?currency=MYR";
17
+ EApiPath["GetAcerpayMYRBankListWithdraw"] = "/api/v2/info/acer-pay/banks/payout?currency=MYR";
16
18
  EApiPath["GetPaymentBankListDeposit"] = "/pay-service/api/v2/info/banks/malaysia/payin";
17
19
  EApiPath["GetPaymentBankListWithdraw"] = "/pay-service/api/v2/info/banks/malaysia/payout";
18
20
  EApiPath["CancelWithdrawal"] = "/pay-service/api/v2/withdrawal/cancel";
@@ -86,6 +88,15 @@ var EPaymentRequestPath;
86
88
  EPaymentRequestPath["LimepayBigpayMYRWithdraw"] = "limepay_bigpay_myr_withdraw";
87
89
  EPaymentRequestPath["LimepayMAEByMaybankMYRDeposit"] = "limepay_mae_by_maybank_myr_deposit";
88
90
  EPaymentRequestPath["LimepayMAEByMaybankMYRWithdraw"] = "limepay_mae_by_maybank_myr_withdraw";
91
+ EPaymentRequestPath["AcerpayFPXMYRDeposit"] = "acerpay_fpx_myr_deposit";
92
+ EPaymentRequestPath["AcerpayOnlineBankingMYRDeposit"] = "acerpay_online_banking_myr_deposit";
93
+ EPaymentRequestPath["AcerpayOnlineBankingMYRWithdraw"] = "acerpay_online_banking_myr_withdraw";
94
+ EPaymentRequestPath["AcerpayDuitNowMYRDeposit"] = "acerpay_duitnow_myr_deposit";
95
+ EPaymentRequestPath["AcerpayTouchNGoMYRDeposit"] = "acerpay_touch_n_go_myr_deposit";
96
+ EPaymentRequestPath["AcerpayTouchNGoMYRWithdraw"] = "acerpay_touch_n_go_myr_withdraw";
97
+ EPaymentRequestPath["AcerpayGrabpayMYRDeposit"] = "acerpay_grabpay_myr_deposit";
98
+ EPaymentRequestPath["AcerpayShopeepayMYRDeposit"] = "acerpay_shopeepay_myr_deposit";
99
+ EPaymentRequestPath["AcerpayBoostMYRDeposit"] = "acerpay_boost_myr_deposit";
89
100
  })(EPaymentRequestPath || (exports.EPaymentRequestPath = EPaymentRequestPath = {}));
90
101
  // FlashPayUpiDeposit
91
102
  var EPaymentStatusCode;
@@ -32,14 +32,13 @@ export declare class User extends ObservableEntity<undefined> {
32
32
  _isAuthorized: boolean;
33
33
  _currencyInfo: CurrencyInfo | null;
34
34
  _ratio: number;
35
- userInfo: null | UserInfo;
36
- _profileInfo: null | UserInfo;
35
+ _userInfo: null | UserInfo;
37
36
  _statusProfileInfo: RequestStatus;
38
37
  _requestUserStatuses: Record<string, RequestStatus>;
39
38
  userInfoSettings: UserInfoSettings;
40
39
  constructor(sendCommand: SendCommand, callbackStatus: CallbackStatus, parentService: ResponseAdapterService, userInfoSettings: UserInfoSettings);
41
- set profileInfo(info: UserInfo | null);
42
- get profileInfo(): UserInfo | null;
40
+ get userInfo(): UserInfo | null;
41
+ set userInfo(info: UserInfo | null);
43
42
  set statusProfileInfo(status: RequestStatus);
44
43
  get statusProfileInfo(): RequestStatus;
45
44
  set requestUserStatuses(value: Record<string, RequestStatus>);
@@ -15,6 +15,7 @@ export type UserInfo = {
15
15
  email: string;
16
16
  phoneNumber: string;
17
17
  login: string;
18
+ isEmailConfirmed: boolean;
18
19
  name: string;
19
20
  patronymic: string;
20
21
  surname: string;
@@ -289,7 +290,14 @@ export declare enum PaymentChannelType {
289
290
  CreedoEasyPaisa = 250,
290
291
  CreedoJazzCash = 251,
291
292
  FluxBKash = 252,
292
- FluxNagad = 253
293
+ FluxNagad = 253,
294
+ AcerpayFPX = 301,
295
+ AcerpayOnlineBanking = 302,
296
+ AcerpayDuitNow = 303,
297
+ AcerpayTouchNGo = 304,
298
+ AcerpayGrabpay = 305,
299
+ AcerpayShopeepay = 306,
300
+ AcerpayBoost = 307
293
301
  }
294
302
  export type MPayMethods = PaymentChannelType.MPayParazula | PaymentChannelType.MPayPayco | PaymentChannelType.MPayVCC | PaymentChannelType.PaparaMPay | PaymentChannelType.MefeteMpay | PaymentChannelType.MefeteMpayQr | PaymentChannelType.EFTMPay | PaymentChannelType.MiniHavaleMpay | PaymentChannelType.PopyMpay;
295
303
  export type WellexPayMethods = PaymentChannelType.BKashFastWellexPay | PaymentChannelType.NagadFastWellexPay | PaymentChannelType.NagadWellexPay | PaymentChannelType.BKashFastWellexPayCopy;
@@ -305,3 +313,18 @@ export type ConfirmEmailByCodeProps = {
305
313
  actionKey: string;
306
314
  };
307
315
  export type RequestStatus = 'idle' | 'pending' | 'success' | 'rejected';
316
+ export type RestUserInfoResponse = {
317
+ birthDate: number;
318
+ clientId: number;
319
+ country: string;
320
+ currencyCode: string;
321
+ currencyId: number;
322
+ email: string;
323
+ isEmailConfirmed: false;
324
+ kycStatus: number;
325
+ lastName: string;
326
+ login: string;
327
+ name: string;
328
+ phoneNumber: string;
329
+ ratioUsd: number;
330
+ };
@@ -186,4 +186,12 @@ var PaymentChannelType;
186
186
  PaymentChannelType[PaymentChannelType["CreedoJazzCash"] = 251] = "CreedoJazzCash";
187
187
  PaymentChannelType[PaymentChannelType["FluxBKash"] = 252] = "FluxBKash";
188
188
  PaymentChannelType[PaymentChannelType["FluxNagad"] = 253] = "FluxNagad";
189
+ // MYR
190
+ PaymentChannelType[PaymentChannelType["AcerpayFPX"] = 301] = "AcerpayFPX";
191
+ PaymentChannelType[PaymentChannelType["AcerpayOnlineBanking"] = 302] = "AcerpayOnlineBanking";
192
+ PaymentChannelType[PaymentChannelType["AcerpayDuitNow"] = 303] = "AcerpayDuitNow";
193
+ PaymentChannelType[PaymentChannelType["AcerpayTouchNGo"] = 304] = "AcerpayTouchNGo";
194
+ PaymentChannelType[PaymentChannelType["AcerpayGrabpay"] = 305] = "AcerpayGrabpay";
195
+ PaymentChannelType[PaymentChannelType["AcerpayShopeepay"] = 306] = "AcerpayShopeepay";
196
+ PaymentChannelType[PaymentChannelType["AcerpayBoost"] = 307] = "AcerpayBoost";
189
197
  })(PaymentChannelType || (exports.PaymentChannelType = PaymentChannelType = {}));
@@ -1,4 +1,5 @@
1
- import { CurrencyInfo, HandleAuthResponseProps, UserInfo } from './types';
2
- export declare const getAdaptedUserInfo: (result: HandleAuthResponseProps & {
1
+ import { CurrencyInfo, HandleAuthResponseProps, RestUserInfoResponse, UserInfo } from './types';
2
+ export declare const getSocketAdaptedUserInfo: (result: HandleAuthResponseProps & {
3
3
  currencyInfo: CurrencyInfo | null;
4
4
  }) => UserInfo;
5
+ export declare const mergeUserInfo: (result: UserInfo, resetUserInfo: RestUserInfoResponse) => UserInfo;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAdaptedUserInfo = void 0;
4
- const getAdaptedUserInfo = (result) => {
3
+ exports.mergeUserInfo = exports.getSocketAdaptedUserInfo = void 0;
4
+ const getSocketAdaptedUserInfo = (result) => {
5
5
  var _a, _b;
6
6
  return ({
7
7
  token: result.accessToken,
@@ -11,6 +11,7 @@ const getAdaptedUserInfo = (result) => {
11
11
  currencyCode: ((_a = result.currencyInfo) === null || _a === void 0 ? void 0 : _a.shortView) || ((_b = result.currencyInfo) === null || _b === void 0 ? void 0 : _b.code) || 'n-f',
12
12
  ratioUSD: result.ratioUSD,
13
13
  email: result.email,
14
+ isEmailConfirmed: false,
14
15
  phoneNumber: result.phoneNumber,
15
16
  login: result.login,
16
17
  name: result.name,
@@ -19,4 +20,6 @@ const getAdaptedUserInfo = (result) => {
19
20
  birthDay: result.birthDay,
20
21
  });
21
22
  };
22
- exports.getAdaptedUserInfo = getAdaptedUserInfo;
23
+ exports.getSocketAdaptedUserInfo = getSocketAdaptedUserInfo;
24
+ const mergeUserInfo = (result, resetUserInfo) => (Object.assign(Object.assign({}, result), resetUserInfo));
25
+ exports.mergeUserInfo = mergeUserInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-memory-optimization",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "react memory optimization library",
5
5
  "sideEffects": false,
6
6
  "files": [