ggez-banking-sdk 0.1.101 → 0.1.103

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.
@@ -7,7 +7,8 @@ declare class CookiesHelper {
7
7
  static GetUSR: () => USR;
8
8
  static SetUSR: (deviceId: string, userId: string) => void;
9
9
  static GetDeviceSecurityCode: () => string;
10
- static SET: (key: string, value: string, expires?: Date) => void;
11
10
  static GET: (key: string) => string | undefined;
11
+ static SET: (key: string, value: string, expires?: Date) => void;
12
+ static REMOVE: (key: string) => void;
12
13
  }
13
14
  export { CookiesHelper };
@@ -114,6 +114,9 @@ CookiesHelper.GetDeviceSecurityCode = () => {
114
114
  };
115
115
  // #endregion
116
116
  // #region "Getters & Setters"
117
+ CookiesHelper.GET = (key) => {
118
+ return Cookies.get(key);
119
+ };
117
120
  CookiesHelper.SET = (key, value, expires) => {
118
121
  const defaultExpireDate = new Date(Date.now() + 1000 * 60 * 60 * 24 * 365);
119
122
  Cookies.set(key, value, {
@@ -123,7 +126,7 @@ CookiesHelper.SET = (key, value, expires) => {
123
126
  expires: expires || defaultExpireDate,
124
127
  });
125
128
  };
126
- CookiesHelper.GET = (key) => {
127
- return Cookies.get(key);
129
+ CookiesHelper.REMOVE = (key) => {
130
+ Cookies.remove(key);
128
131
  };
129
132
  export { CookiesHelper };
@@ -7,4 +7,5 @@ declare const UserHelper: (userInfo: any) => {
7
7
  errorHandler: (error: any, funcName: string, response?: string) => never;
8
8
  };
9
9
  };
10
+ export declare function sortUserInfo(list?: any[] | null): any;
10
11
  export default UserHelper;
@@ -1,4 +1,3 @@
1
- import { sortUserInfo } from "../utils/sortUserInfo";
2
1
  import { EntityVerificationStatus } from "../constants/enum";
3
2
  import { SystemResponses } from "../constants";
4
3
  const UserHelper = (userInfo) => {
@@ -295,4 +294,43 @@ const UserHelper = (userInfo) => {
295
294
  checkResponse,
296
295
  };
297
296
  };
297
+ export function sortUserInfo(list) {
298
+ try {
299
+ const verificationStatusOrder = {
300
+ "1": 0, // Verified
301
+ "2": 1, // Pending
302
+ "3": 2, // Failed
303
+ "0": 3, // Not Verified
304
+ "-1": 4, // Undefined
305
+ };
306
+ return list
307
+ ? list?.sort((a, b) => {
308
+ // First, compare by 'is_primary'
309
+ const isPrimaryComparison = a?.is_primary != undefined && b?.is_primary != undefined
310
+ ? b?.is_primary - a?.is_primary
311
+ : 0;
312
+ // If 'is_primary' values are equal, compare by 'verification_status'
313
+ if (isPrimaryComparison === 0) {
314
+ const verificationStatusComparison = verificationStatusOrder[a?.verification_status] -
315
+ verificationStatusOrder[b?.verification_status];
316
+ // If 'is_primary' values are equal, and 'verification_status' values are equal, compare by id
317
+ if (verificationStatusComparison == 0) {
318
+ return b?.id - a?.id;
319
+ }
320
+ return verificationStatusComparison;
321
+ }
322
+ return isPrimaryComparison;
323
+ })
324
+ : list;
325
+ }
326
+ catch (error) {
327
+ const errorObj = {
328
+ status: "failed",
329
+ message: error,
330
+ funcName: "sortUserInfo",
331
+ response: null,
332
+ };
333
+ return errorObj;
334
+ }
335
+ }
298
336
  export default UserHelper;
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/api/index.ts","../src/api/clients/account.ts","../src/api/clients/auth.ts","../src/api/clients/blockchain.ts","../src/api/clients/index.ts","../src/api/clients/ipAddressAndLocation.ts","../src/api/clients/limited.ts","../src/api/clients/order.ts","../src/api/clients/organization.ts","../src/api/clients/promotion.ts","../src/api/clients/transaction.ts","../src/api/clients/user.ts","../src/api/data/auth.ts","../src/api/data/blockchain.ts","../src/api/data/index.ts","../src/api/data/limited.ts","../src/api/data/order.ts","../src/api/data/organization.ts","../src/api/data/transaction.ts","../src/api/data/user/activity.ts","../src/api/data/user/address.ts","../src/api/data/user/auth.ts","../src/api/data/user/bankAccount.ts","../src/api/data/user/device.ts","../src/api/data/user/document.ts","../src/api/data/user/email.ts","../src/api/data/user/identification.ts","../src/api/data/user/index.ts","../src/api/data/user/personalInfo.ts","../src/api/data/user/phone.ts","../src/api/data/user/preferences.ts","../src/api/data/user/security.ts","../src/api/data/user/ticket.ts","../src/api/services/account.ts","../src/api/services/auth.ts","../src/api/services/base.ts","../src/api/services/blockchain.ts","../src/api/services/index.ts","../src/api/services/ipAddressAndLocation.ts","../src/api/services/limited.ts","../src/api/services/order.ts","../src/api/services/organization.ts","../src/api/services/promotion.ts","../src/api/services/transaction.ts","../src/api/services/user.ts","../src/constants/constants.ts","../src/constants/enum.ts","../src/constants/index.ts","../src/constants/regex.ts","../src/constants/structure.ts","../src/content/accountCurrencies.ts","../src/content/countries.ts","../src/content/currencies.ts","../src/content/index.ts","../src/content/state.ts","../src/helper/cipherHelper.ts","../src/helper/clientHelper.ts","../src/helper/cookiesHelper.ts","../src/helper/dateTimeHelper.ts","../src/helper/deviceHelper.ts","../src/helper/geoHelper.ts","../src/helper/index.ts","../src/helper/userHelper.ts","../src/helper/api/axiosHelper.ts","../src/helper/api/index.ts","../src/helper/api/responseHelper.ts","../src/types/index.ts","../src/types/api/index.ts","../src/types/api/client/account.ts","../src/types/api/client/auth.ts","../src/types/api/client/blockchain.ts","../src/types/api/client/index.ts","../src/types/api/client/ipAddressAndLocation.ts","../src/types/api/client/limited.ts","../src/types/api/client/order.ts","../src/types/api/client/organization.ts","../src/types/api/client/promotion.ts","../src/types/api/client/transaction.ts","../src/types/api/client/user.ts","../src/types/api/data/account.ts","../src/types/api/data/auth.ts","../src/types/api/data/blockchain.ts","../src/types/api/data/index.ts","../src/types/api/data/limited.ts","../src/types/api/data/order.ts","../src/types/api/data/organization.ts","../src/types/api/data/transaction.ts","../src/types/api/data/user/address.ts","../src/types/api/data/user/auth.ts","../src/types/api/data/user/bankAccount.ts","../src/types/api/data/user/device.ts","../src/types/api/data/user/document.ts","../src/types/api/data/user/email.ts","../src/types/api/data/user/identification.ts","../src/types/api/data/user/index.ts","../src/types/api/data/user/personalInfo.ts","../src/types/api/data/user/phone.ts","../src/types/api/data/user/preferences.ts","../src/types/api/data/user/security.ts","../src/types/api/data/user/ticket.ts","../src/types/banking/index.ts","../src/types/banking/account/accountStatementData.ts","../src/types/banking/account/accountdata.ts","../src/types/banking/account/accountstatementdetails.ts","../src/types/banking/account/accountstatementinfo.ts","../src/types/banking/account/accountstatementtransaction.ts","../src/types/banking/account/creditlimit.ts","../src/types/banking/account/fulfilment.ts","../src/types/banking/account/index.ts","../src/types/banking/account/info.ts","../src/types/banking/account/security.ts","../src/types/banking/account/chaindata/chaindata.ts","../src/types/banking/account/chaindata/index.ts","../src/types/banking/account/limits/dailylimit.ts","../src/types/banking/account/limits/deposit.ts","../src/types/banking/account/limits/depositinterchange.ts","../src/types/banking/account/limits/depositmonthly.ts","../src/types/banking/account/limits/depositpaymentgateway.ts","../src/types/banking/account/limits/deposityearly.ts","../src/types/banking/account/limits/globaldailylimit.ts","../src/types/banking/account/limits/index.ts","../src/types/banking/account/limits/limits.ts","../src/types/banking/account/limits/monthlylimit.ts","../src/types/banking/account/limits/transferreceiving.ts","../src/types/banking/account/limits/transfersending.ts","../src/types/banking/account/limits/withdraw.ts","../src/types/banking/account/limits/withdrawinterchange.ts","../src/types/banking/account/limits/withdrawmonthly.ts","../src/types/banking/account/limits/withdraworder.ts","../src/types/banking/account/limits/withdrawpurchaseinterchange.ts","../src/types/banking/account/limits/yearlylimit.ts","../src/types/banking/account/options/bulkshipping.ts","../src/types/banking/account/options/carddetails.ts","../src/types/banking/account/options/cardproduction.ts","../src/types/banking/account/options/courier.ts","../src/types/banking/account/options/fulfilment.ts","../src/types/banking/account/options/fulfilmentdetails.ts","../src/types/banking/account/options/fulfilmentinfo.ts","../src/types/banking/account/options/index.ts","../src/types/banking/account/options/options.ts","../src/types/banking/account/options/security.ts","../src/types/banking/account/tokenization/index.ts","../src/types/banking/account/tokenization/provision.ts","../src/types/banking/account/tokenization/provisionrequest.ts","../src/types/banking/account/tokenization/provisionresponse.ts","../src/types/banking/account/tokenization/tokenization.ts","../src/types/banking/blockchain/blockchainData.ts","../src/types/banking/blockchain/chainTransactionData.ts","../src/types/banking/blockchain/coin.ts","../src/types/banking/blockchain/delegateData.ts","../src/types/banking/blockchain/delegationData.ts","../src/types/banking/blockchain/index.ts","../src/types/banking/blockchain/info.ts","../src/types/banking/blockchain/multiSendData.ts","../src/types/banking/blockchain/sendData.ts","../src/types/banking/blockchain/undelegateData.ts","../src/types/banking/common/archive.ts","../src/types/banking/common/authentication.ts","../src/types/banking/common/bankextendeddata.ts","../src/types/banking/common/baseresult.ts","../src/types/banking/common/beneficiaryaddress.ts","../src/types/banking/common/classification.ts","../src/types/banking/common/contentfile.ts","../src/types/banking/common/cryptoaddressextendeddata.ts","../src/types/banking/common/currencyclouddata.ts","../src/types/banking/common/devicecultureinfo.ts","../src/types/banking/common/externalhostinfo.ts","../src/types/banking/common/geocoordinates.ts","../src/types/banking/common/history.ts","../src/types/banking/common/index.ts","../src/types/banking/common/lastactivity.ts","../src/types/banking/common/notes.ts","../src/types/banking/common/openpayddata.ts","../src/types/banking/common/result.ts","../src/types/banking/common/snbdata.ts","../src/types/banking/common/workinghour.ts","../src/types/banking/common/people/alias.ts","../src/types/banking/common/people/billpaydata.ts","../src/types/banking/common/people/customerinfo.ts","../src/types/banking/common/people/eftdata.ts","../src/types/banking/common/people/etransferdata.ts","../src/types/banking/common/people/index.ts","../src/types/banking/common/people/peoplesdata.ts","../src/types/banking/common/security/index.ts","../src/types/banking/common/security/simplifiedaccessrule.ts","../src/types/banking/common/security/simplifiedaccessruleinfo.ts","../src/types/banking/entities/address.ts","../src/types/banking/entities/bankaccount.ts","../src/types/banking/entities/creditcard.ts","../src/types/banking/entities/cryptoWallet.ts","../src/types/banking/entities/cryptoaddress.ts","../src/types/banking/entities/device.ts","../src/types/banking/entities/devicehistory.ts","../src/types/banking/entities/email.ts","../src/types/banking/entities/externalauthentication.ts","../src/types/banking/entities/generalrequirements.ts","../src/types/banking/entities/identification.ts","../src/types/banking/entities/index.ts","../src/types/banking/entities/notification.ts","../src/types/banking/entities/paymentCryptoAddress.ts","../src/types/banking/entities/paymentInfo.ts","../src/types/banking/entities/phone.ts","../src/types/banking/entities/relationship.ts","../src/types/banking/entities/socialmedia.ts","../src/types/banking/entities/termsconditions.ts","../src/types/banking/entities/customField/index.ts","../src/types/banking/entities/customField/promotionData/giftData.ts","../src/types/banking/entities/customField/promotionData/index.ts","../src/types/banking/entities/customField/promotionData/promotionData.ts","../src/types/banking/entities/customField/promotionData/referralData.ts","../src/types/banking/entities/customField/userAccessControl/action.ts","../src/types/banking/entities/customField/userAccessControl/index.ts","../src/types/banking/entities/customField/userAccessControl/page.ts","../src/types/banking/entities/customField/userAccessControl/section.ts","../src/types/banking/entities/customField/userAccessControl/userAccessControl.ts","../src/types/banking/entities/json/IdentificationExtraData.ts","../src/types/banking/entities/json/index.ts","../src/types/banking/entities/json/device/deviceextendedinfo.ts","../src/types/banking/entities/json/device/index.ts","../src/types/banking/entities/json/device/siminfo.ts","../src/types/banking/group/details.ts","../src/types/banking/group/groupdata.ts","../src/types/banking/group/groupuser.ts","../src/types/banking/group/index.ts","../src/types/banking/group/info.ts","../src/types/banking/group/localization.ts","../src/types/banking/group/media.ts","../src/types/banking/group/settings/classificationinfo.ts","../src/types/banking/group/settings/companyusers.ts","../src/types/banking/group/settings/externalintegration.ts","../src/types/banking/group/settings/fortnox.ts","../src/types/banking/group/settings/index.ts","../src/types/banking/group/settings/messagingsetup.ts","../src/types/banking/group/settings/qvitoo.ts","../src/types/banking/group/settings/setting.ts","../src/types/banking/group/settings/voucherrows.ts","../src/types/banking/oauth/credentialsData.ts","../src/types/banking/oauth/index.ts","../src/types/banking/oauth/tokenData.ts","../src/types/banking/order/customFormData.ts","../src/types/banking/order/features.ts","../src/types/banking/order/fee.ts","../src/types/banking/order/index.ts","../src/types/banking/order/info.ts","../src/types/banking/order/lotteryTicket.ts","../src/types/banking/order/orderData.ts","../src/types/banking/order/orderError.ts","../src/types/banking/order/paymentMethod.ts","../src/types/banking/order/pinCode.ts","../src/types/banking/order/profit.ts","../src/types/banking/order/promotion.ts","../src/types/banking/order/reverseData.ts","../src/types/banking/order/reverseItem.ts","../src/types/banking/order/reversePinCode.ts","../src/types/banking/order/ticket.ts","../src/types/banking/order/topUp.ts","../src/types/banking/order/variant.ts","../src/types/banking/order/voucher.ts","../src/types/banking/order/voucherInfo.ts","../src/types/banking/order/customForm/ggez1.ts","../src/types/banking/order/customForm/ggezGiftRewards.ts","../src/types/banking/order/customForm/ggezReferralRewards.ts","../src/types/banking/order/customForm/index.ts","../src/types/banking/order/fulfilment/fulfilmentInfo.ts","../src/types/banking/order/fulfilment/index.ts","../src/types/banking/order/fulfilment/orderFulfilment.ts","../src/types/banking/order/fulfilment/pinCodeFulfilment.ts","../src/types/banking/order/items/index.ts","../src/types/banking/order/items/info.ts","../src/types/banking/order/items/orderItem.ts","../src/types/banking/organization/details.ts","../src/types/banking/organization/index.ts","../src/types/banking/organization/info.ts","../src/types/banking/organization/organizationdata.ts","../src/types/banking/ticket/content.ts","../src/types/banking/ticket/history.ts","../src/types/banking/ticket/index.ts","../src/types/banking/ticket/info.ts","../src/types/banking/ticket/subentity.ts","../src/types/banking/ticket/ticketdata.ts","../src/types/banking/transaction/billingAddress.ts","../src/types/banking/transaction/conversion.ts","../src/types/banking/transaction/exchange.ts","../src/types/banking/transaction/fee.ts","../src/types/banking/transaction/index.ts","../src/types/banking/transaction/info.ts","../src/types/banking/transaction/receiverInfo.ts","../src/types/banking/transaction/tax.ts","../src/types/banking/transaction/transactionData.ts","../src/types/banking/transaction/transactionInquiry.ts","../src/types/banking/transaction/transfer.ts","../src/types/banking/user/activity.ts","../src/types/banking/user/attachment.ts","../src/types/banking/user/confirmForgetSecurityData.ts","../src/types/banking/user/confirmSecurityData.ts","../src/types/banking/user/confirmUserSecurity.ts","../src/types/banking/user/confirmUserSecurityInfo.ts","../src/types/banking/user/currency.ts","../src/types/banking/user/documentdata.ts","../src/types/banking/user/documentinfo.ts","../src/types/banking/user/forgetPassword.ts","../src/types/banking/user/forgetSecurityData.ts","../src/types/banking/user/forgetSecurityInfo.ts","../src/types/banking/user/index.ts","../src/types/banking/user/info.ts","../src/types/banking/user/personalinfo.ts","../src/types/banking/user/preferences.ts","../src/types/banking/user/resetPassword.ts","../src/types/banking/user/resetSecurityCode.ts","../src/types/banking/user/resetSecurityData.ts","../src/types/banking/user/resetSecurityQuestions.ts","../src/types/banking/user/resetUserSecurity.ts","../src/types/banking/user/resetUserSecurityInfo.ts","../src/types/banking/user/security.ts","../src/types/banking/user/userauthenticationdata.ts","../src/types/banking/user/usercreditlimit.ts","../src/types/banking/user/userdata.ts","../src/types/banking/user/validateForgetSecurityData.ts","../src/types/banking/user/validateLimitedSecurity.ts","../src/types/banking/user/validateLimitedSecurityData.ts","../src/types/banking/user/validateSecurityData.ts","../src/types/banking/user/validateUserSecurity.ts","../src/types/banking/user/validateUserSecurityInfo.ts","../src/types/banking/user/verifySecurityData.ts","../src/types/banking/user/verifyUserSecurity.ts","../src/types/banking/user/verifyUserSecurityInfo.ts","../src/types/banking/user/commerce/commerce.ts","../src/types/banking/user/commerce/index.ts","../src/types/banking/user/commerce/role.ts","../src/types/banking/user/commerce/usercommerceconfiguration.ts","../src/types/banking/user/validation/index.ts","../src/types/banking/user/validation/info.ts","../src/types/banking/user/validation/validationdata.ts","../src/types/helper/axiosHelper.ts","../src/types/helper/cipherHelper.ts","../src/types/helper/geoHelper.ts","../src/types/helper/index.ts","../src/types/node/amount.ts","../src/types/node/index.ts","../src/types/node/lotteryPrize.ts","../src/types/node/promotionDetails.ts","../src/utils/chainAddressMasking.ts","../src/utils/copyText.ts","../src/utils/countryAndCurrencyData.ts","../src/utils/enumToOption.ts","../src/utils/generateOneLiner.ts","../src/utils/generateSourceId.ts","../src/utils/getCountryName.ts","../src/utils/getEnumName.ts","../src/utils/getStateByCountryCode.ts","../src/utils/index.ts","../src/utils/maskingFunction.ts","../src/utils/sortUserInfo.ts"],"version":"5.9.3"}
1
+ {"root":["../src/index.ts","../src/api/index.ts","../src/api/clients/account.ts","../src/api/clients/auth.ts","../src/api/clients/blockchain.ts","../src/api/clients/index.ts","../src/api/clients/ipAddressAndLocation.ts","../src/api/clients/limited.ts","../src/api/clients/order.ts","../src/api/clients/organization.ts","../src/api/clients/promotion.ts","../src/api/clients/transaction.ts","../src/api/clients/user.ts","../src/api/data/auth.ts","../src/api/data/blockchain.ts","../src/api/data/index.ts","../src/api/data/limited.ts","../src/api/data/order.ts","../src/api/data/organization.ts","../src/api/data/transaction.ts","../src/api/data/user/activity.ts","../src/api/data/user/address.ts","../src/api/data/user/auth.ts","../src/api/data/user/bankAccount.ts","../src/api/data/user/device.ts","../src/api/data/user/document.ts","../src/api/data/user/email.ts","../src/api/data/user/identification.ts","../src/api/data/user/index.ts","../src/api/data/user/personalInfo.ts","../src/api/data/user/phone.ts","../src/api/data/user/preferences.ts","../src/api/data/user/security.ts","../src/api/data/user/ticket.ts","../src/api/services/account.ts","../src/api/services/auth.ts","../src/api/services/base.ts","../src/api/services/blockchain.ts","../src/api/services/index.ts","../src/api/services/ipAddressAndLocation.ts","../src/api/services/limited.ts","../src/api/services/order.ts","../src/api/services/organization.ts","../src/api/services/promotion.ts","../src/api/services/transaction.ts","../src/api/services/user.ts","../src/constants/constants.ts","../src/constants/enum.ts","../src/constants/index.ts","../src/constants/regex.ts","../src/constants/structure.ts","../src/content/accountCurrencies.ts","../src/content/countries.ts","../src/content/currencies.ts","../src/content/index.ts","../src/content/state.ts","../src/helper/cipherHelper.ts","../src/helper/clientHelper.ts","../src/helper/cookiesHelper.ts","../src/helper/dateTimeHelper.ts","../src/helper/deviceHelper.ts","../src/helper/geoHelper.ts","../src/helper/index.ts","../src/helper/userHelper.ts","../src/helper/api/axiosHelper.ts","../src/helper/api/index.ts","../src/helper/api/responseHelper.ts","../src/types/index.ts","../src/types/api/index.ts","../src/types/api/client/account.ts","../src/types/api/client/auth.ts","../src/types/api/client/blockchain.ts","../src/types/api/client/index.ts","../src/types/api/client/ipAddressAndLocation.ts","../src/types/api/client/limited.ts","../src/types/api/client/order.ts","../src/types/api/client/organization.ts","../src/types/api/client/promotion.ts","../src/types/api/client/transaction.ts","../src/types/api/client/user.ts","../src/types/api/data/account.ts","../src/types/api/data/auth.ts","../src/types/api/data/blockchain.ts","../src/types/api/data/index.ts","../src/types/api/data/limited.ts","../src/types/api/data/order.ts","../src/types/api/data/organization.ts","../src/types/api/data/transaction.ts","../src/types/api/data/user/address.ts","../src/types/api/data/user/auth.ts","../src/types/api/data/user/bankAccount.ts","../src/types/api/data/user/device.ts","../src/types/api/data/user/document.ts","../src/types/api/data/user/email.ts","../src/types/api/data/user/identification.ts","../src/types/api/data/user/index.ts","../src/types/api/data/user/personalInfo.ts","../src/types/api/data/user/phone.ts","../src/types/api/data/user/preferences.ts","../src/types/api/data/user/security.ts","../src/types/api/data/user/ticket.ts","../src/types/banking/index.ts","../src/types/banking/account/accountStatementData.ts","../src/types/banking/account/accountdata.ts","../src/types/banking/account/accountstatementdetails.ts","../src/types/banking/account/accountstatementinfo.ts","../src/types/banking/account/accountstatementtransaction.ts","../src/types/banking/account/creditlimit.ts","../src/types/banking/account/fulfilment.ts","../src/types/banking/account/index.ts","../src/types/banking/account/info.ts","../src/types/banking/account/security.ts","../src/types/banking/account/chaindata/chaindata.ts","../src/types/banking/account/chaindata/index.ts","../src/types/banking/account/limits/dailylimit.ts","../src/types/banking/account/limits/deposit.ts","../src/types/banking/account/limits/depositinterchange.ts","../src/types/banking/account/limits/depositmonthly.ts","../src/types/banking/account/limits/depositpaymentgateway.ts","../src/types/banking/account/limits/deposityearly.ts","../src/types/banking/account/limits/globaldailylimit.ts","../src/types/banking/account/limits/index.ts","../src/types/banking/account/limits/limits.ts","../src/types/banking/account/limits/monthlylimit.ts","../src/types/banking/account/limits/transferreceiving.ts","../src/types/banking/account/limits/transfersending.ts","../src/types/banking/account/limits/withdraw.ts","../src/types/banking/account/limits/withdrawinterchange.ts","../src/types/banking/account/limits/withdrawmonthly.ts","../src/types/banking/account/limits/withdraworder.ts","../src/types/banking/account/limits/withdrawpurchaseinterchange.ts","../src/types/banking/account/limits/yearlylimit.ts","../src/types/banking/account/options/bulkshipping.ts","../src/types/banking/account/options/carddetails.ts","../src/types/banking/account/options/cardproduction.ts","../src/types/banking/account/options/courier.ts","../src/types/banking/account/options/fulfilment.ts","../src/types/banking/account/options/fulfilmentdetails.ts","../src/types/banking/account/options/fulfilmentinfo.ts","../src/types/banking/account/options/index.ts","../src/types/banking/account/options/options.ts","../src/types/banking/account/options/security.ts","../src/types/banking/account/tokenization/index.ts","../src/types/banking/account/tokenization/provision.ts","../src/types/banking/account/tokenization/provisionrequest.ts","../src/types/banking/account/tokenization/provisionresponse.ts","../src/types/banking/account/tokenization/tokenization.ts","../src/types/banking/blockchain/blockchainData.ts","../src/types/banking/blockchain/chainTransactionData.ts","../src/types/banking/blockchain/coin.ts","../src/types/banking/blockchain/delegateData.ts","../src/types/banking/blockchain/delegationData.ts","../src/types/banking/blockchain/index.ts","../src/types/banking/blockchain/info.ts","../src/types/banking/blockchain/multiSendData.ts","../src/types/banking/blockchain/sendData.ts","../src/types/banking/blockchain/undelegateData.ts","../src/types/banking/common/archive.ts","../src/types/banking/common/authentication.ts","../src/types/banking/common/bankextendeddata.ts","../src/types/banking/common/baseresult.ts","../src/types/banking/common/beneficiaryaddress.ts","../src/types/banking/common/classification.ts","../src/types/banking/common/contentfile.ts","../src/types/banking/common/cryptoaddressextendeddata.ts","../src/types/banking/common/currencyclouddata.ts","../src/types/banking/common/devicecultureinfo.ts","../src/types/banking/common/externalhostinfo.ts","../src/types/banking/common/geocoordinates.ts","../src/types/banking/common/history.ts","../src/types/banking/common/index.ts","../src/types/banking/common/lastactivity.ts","../src/types/banking/common/notes.ts","../src/types/banking/common/openpayddata.ts","../src/types/banking/common/result.ts","../src/types/banking/common/snbdata.ts","../src/types/banking/common/workinghour.ts","../src/types/banking/common/people/alias.ts","../src/types/banking/common/people/billpaydata.ts","../src/types/banking/common/people/customerinfo.ts","../src/types/banking/common/people/eftdata.ts","../src/types/banking/common/people/etransferdata.ts","../src/types/banking/common/people/index.ts","../src/types/banking/common/people/peoplesdata.ts","../src/types/banking/common/security/index.ts","../src/types/banking/common/security/simplifiedaccessrule.ts","../src/types/banking/common/security/simplifiedaccessruleinfo.ts","../src/types/banking/entities/address.ts","../src/types/banking/entities/bankaccount.ts","../src/types/banking/entities/creditcard.ts","../src/types/banking/entities/cryptoWallet.ts","../src/types/banking/entities/cryptoaddress.ts","../src/types/banking/entities/device.ts","../src/types/banking/entities/devicehistory.ts","../src/types/banking/entities/email.ts","../src/types/banking/entities/externalauthentication.ts","../src/types/banking/entities/generalrequirements.ts","../src/types/banking/entities/identification.ts","../src/types/banking/entities/index.ts","../src/types/banking/entities/notification.ts","../src/types/banking/entities/paymentCryptoAddress.ts","../src/types/banking/entities/paymentInfo.ts","../src/types/banking/entities/phone.ts","../src/types/banking/entities/relationship.ts","../src/types/banking/entities/socialmedia.ts","../src/types/banking/entities/termsconditions.ts","../src/types/banking/entities/customField/index.ts","../src/types/banking/entities/customField/promotionData/giftData.ts","../src/types/banking/entities/customField/promotionData/index.ts","../src/types/banking/entities/customField/promotionData/promotionData.ts","../src/types/banking/entities/customField/promotionData/referralData.ts","../src/types/banking/entities/customField/userAccessControl/action.ts","../src/types/banking/entities/customField/userAccessControl/index.ts","../src/types/banking/entities/customField/userAccessControl/page.ts","../src/types/banking/entities/customField/userAccessControl/section.ts","../src/types/banking/entities/customField/userAccessControl/userAccessControl.ts","../src/types/banking/entities/json/IdentificationExtraData.ts","../src/types/banking/entities/json/index.ts","../src/types/banking/entities/json/device/deviceextendedinfo.ts","../src/types/banking/entities/json/device/index.ts","../src/types/banking/entities/json/device/siminfo.ts","../src/types/banking/group/details.ts","../src/types/banking/group/groupdata.ts","../src/types/banking/group/groupuser.ts","../src/types/banking/group/index.ts","../src/types/banking/group/info.ts","../src/types/banking/group/localization.ts","../src/types/banking/group/media.ts","../src/types/banking/group/settings/classificationinfo.ts","../src/types/banking/group/settings/companyusers.ts","../src/types/banking/group/settings/externalintegration.ts","../src/types/banking/group/settings/fortnox.ts","../src/types/banking/group/settings/index.ts","../src/types/banking/group/settings/messagingsetup.ts","../src/types/banking/group/settings/qvitoo.ts","../src/types/banking/group/settings/setting.ts","../src/types/banking/group/settings/voucherrows.ts","../src/types/banking/oauth/credentialsData.ts","../src/types/banking/oauth/index.ts","../src/types/banking/oauth/tokenData.ts","../src/types/banking/order/customFormData.ts","../src/types/banking/order/features.ts","../src/types/banking/order/fee.ts","../src/types/banking/order/index.ts","../src/types/banking/order/info.ts","../src/types/banking/order/lotteryTicket.ts","../src/types/banking/order/orderData.ts","../src/types/banking/order/orderError.ts","../src/types/banking/order/paymentMethod.ts","../src/types/banking/order/pinCode.ts","../src/types/banking/order/profit.ts","../src/types/banking/order/promotion.ts","../src/types/banking/order/reverseData.ts","../src/types/banking/order/reverseItem.ts","../src/types/banking/order/reversePinCode.ts","../src/types/banking/order/ticket.ts","../src/types/banking/order/topUp.ts","../src/types/banking/order/variant.ts","../src/types/banking/order/voucher.ts","../src/types/banking/order/voucherInfo.ts","../src/types/banking/order/customForm/ggez1.ts","../src/types/banking/order/customForm/ggezGiftRewards.ts","../src/types/banking/order/customForm/ggezReferralRewards.ts","../src/types/banking/order/customForm/index.ts","../src/types/banking/order/fulfilment/fulfilmentInfo.ts","../src/types/banking/order/fulfilment/index.ts","../src/types/banking/order/fulfilment/orderFulfilment.ts","../src/types/banking/order/fulfilment/pinCodeFulfilment.ts","../src/types/banking/order/items/index.ts","../src/types/banking/order/items/info.ts","../src/types/banking/order/items/orderItem.ts","../src/types/banking/organization/details.ts","../src/types/banking/organization/index.ts","../src/types/banking/organization/info.ts","../src/types/banking/organization/organizationdata.ts","../src/types/banking/ticket/content.ts","../src/types/banking/ticket/history.ts","../src/types/banking/ticket/index.ts","../src/types/banking/ticket/info.ts","../src/types/banking/ticket/subentity.ts","../src/types/banking/ticket/ticketdata.ts","../src/types/banking/transaction/billingAddress.ts","../src/types/banking/transaction/conversion.ts","../src/types/banking/transaction/exchange.ts","../src/types/banking/transaction/fee.ts","../src/types/banking/transaction/index.ts","../src/types/banking/transaction/info.ts","../src/types/banking/transaction/receiverInfo.ts","../src/types/banking/transaction/tax.ts","../src/types/banking/transaction/transactionData.ts","../src/types/banking/transaction/transactionInquiry.ts","../src/types/banking/transaction/transfer.ts","../src/types/banking/user/activity.ts","../src/types/banking/user/attachment.ts","../src/types/banking/user/confirmForgetSecurityData.ts","../src/types/banking/user/confirmSecurityData.ts","../src/types/banking/user/confirmUserSecurity.ts","../src/types/banking/user/confirmUserSecurityInfo.ts","../src/types/banking/user/currency.ts","../src/types/banking/user/documentdata.ts","../src/types/banking/user/documentinfo.ts","../src/types/banking/user/forgetPassword.ts","../src/types/banking/user/forgetSecurityData.ts","../src/types/banking/user/forgetSecurityInfo.ts","../src/types/banking/user/index.ts","../src/types/banking/user/info.ts","../src/types/banking/user/personalinfo.ts","../src/types/banking/user/preferences.ts","../src/types/banking/user/resetPassword.ts","../src/types/banking/user/resetSecurityCode.ts","../src/types/banking/user/resetSecurityData.ts","../src/types/banking/user/resetSecurityQuestions.ts","../src/types/banking/user/resetUserSecurity.ts","../src/types/banking/user/resetUserSecurityInfo.ts","../src/types/banking/user/security.ts","../src/types/banking/user/userauthenticationdata.ts","../src/types/banking/user/usercreditlimit.ts","../src/types/banking/user/userdata.ts","../src/types/banking/user/validateForgetSecurityData.ts","../src/types/banking/user/validateLimitedSecurity.ts","../src/types/banking/user/validateLimitedSecurityData.ts","../src/types/banking/user/validateSecurityData.ts","../src/types/banking/user/validateUserSecurity.ts","../src/types/banking/user/validateUserSecurityInfo.ts","../src/types/banking/user/verifySecurityData.ts","../src/types/banking/user/verifyUserSecurity.ts","../src/types/banking/user/verifyUserSecurityInfo.ts","../src/types/banking/user/commerce/commerce.ts","../src/types/banking/user/commerce/index.ts","../src/types/banking/user/commerce/role.ts","../src/types/banking/user/commerce/usercommerceconfiguration.ts","../src/types/banking/user/validation/index.ts","../src/types/banking/user/validation/info.ts","../src/types/banking/user/validation/validationdata.ts","../src/types/helper/axiosHelper.ts","../src/types/helper/cipherHelper.ts","../src/types/helper/geoHelper.ts","../src/types/helper/index.ts","../src/types/node/amount.ts","../src/types/node/index.ts","../src/types/node/lotteryPrize.ts","../src/types/node/promotionDetails.ts","../src/utils/generateSourceId.ts","../src/utils/index.ts"],"version":"5.9.3"}
@@ -1,11 +1 @@
1
- export * from "./chainAddressMasking";
2
- export * from "./copyText";
3
- export * from "./countryAndCurrencyData";
4
- export * from "./enumToOption";
5
- export * from "./generateOneLiner";
6
1
  export * from "./generateSourceId";
7
- export * from "./getCountryName";
8
- export * from "./getEnumName";
9
- export * from "./getStateByCountryCode";
10
- export * from "./maskingFunction";
11
- export * from "./sortUserInfo";
@@ -1,11 +1 @@
1
- export * from "./chainAddressMasking";
2
- export * from "./copyText";
3
- export * from "./countryAndCurrencyData";
4
- export * from "./enumToOption";
5
- export * from "./generateOneLiner";
6
1
  export * from "./generateSourceId";
7
- export * from "./getCountryName";
8
- export * from "./getEnumName";
9
- export * from "./getStateByCountryCode";
10
- export * from "./maskingFunction";
11
- export * from "./sortUserInfo";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.101",
3
+ "version": "0.1.103",
4
4
  "description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "homepage": "https://github.com/GGEZLabs/ggez-banking-sdk#readme",
26
26
  "scripts": {
27
- "test": "echo \"Error: no test specified\" && exit 1",
28
27
  "build": "tsc --build",
29
- "start": "react-app-rewired start"
28
+ "test": "jest",
29
+ "prepare": "npm run build"
30
30
  },
31
31
  "keywords": [
32
32
  "REST",
@@ -42,12 +42,11 @@
42
42
  "author": "GGEZ1 Foundation DAO LLC",
43
43
  "license": "ISC",
44
44
  "dependencies": {
45
- "@types/qs": "^6.9.9",
45
+ "axios": "^1.11.0",
46
46
  "dayjs": "^1.11.10",
47
47
  "dotenv": "^16.3.1",
48
48
  "js-cookie": "^3.0.5",
49
49
  "qs": "^6.11.2",
50
- "react": "^18.2.0",
51
50
  "ua-parser-js": "^2.0.5",
52
51
  "uuid": "^13.0.0"
53
52
  },
@@ -56,7 +55,7 @@
56
55
  "@types/jest": "^29.5.6",
57
56
  "@types/js-cookie": "^3.0.6",
58
57
  "@types/node": "^20.8.8",
59
- "@types/react": "^18.2.35",
58
+ "@types/qs": "^6.9.9",
60
59
  "@types/uuid": "^11.0.0",
61
60
  "axios": "^1.11.0",
62
61
  "jest": "^29.7.0",
@@ -1,2 +0,0 @@
1
- declare function chainAddressMasking(address: string): string;
2
- export { chainAddressMasking };
@@ -1,10 +0,0 @@
1
- function chainAddressMasking(address) {
2
- if (!address) {
3
- return "loading";
4
- }
5
- if (typeof address === "string") {
6
- return `${address.substring(0, 15)}...${address.substring(address?.length - 5)}`;
7
- }
8
- return "loading";
9
- }
10
- export { chainAddressMasking };
@@ -1,6 +0,0 @@
1
- declare const handleCopy: (text: string | undefined) => Promise<{
2
- text: string;
3
- status: string;
4
- message: string;
5
- }>;
6
- export { handleCopy };
@@ -1,18 +0,0 @@
1
- const handleCopy = async (text) => {
2
- try {
3
- text && (await navigator.clipboard.writeText(text));
4
- return {
5
- text: text,
6
- status: "success",
7
- message: "Text copied to clipboard successfully.",
8
- };
9
- }
10
- catch (error) {
11
- return {
12
- text: text,
13
- status: "failed",
14
- message: `Error copying text to clipboard: ${error}`,
15
- };
16
- }
17
- };
18
- export { handleCopy };
@@ -1,11 +0,0 @@
1
- declare const UseCountryAndCurrencyData: () => {
2
- country: {
3
- label: string;
4
- value: string;
5
- }[];
6
- currency: {
7
- label: string;
8
- value: string;
9
- }[];
10
- };
11
- export { UseCountryAndCurrencyData };
@@ -1,17 +0,0 @@
1
- import countries from "../content/countries";
2
- import accountCurrencies from "../content/accountCurrencies";
3
- const UseCountryAndCurrencyData = () => {
4
- const country = countries.map((e) => {
5
- const data = { label: e.Name, value: e.Code.toString() };
6
- return data;
7
- });
8
- const currency = accountCurrencies.map((e) => {
9
- const data = {
10
- label: `${e.Code} - ${e.Location}`,
11
- value: e.Code,
12
- };
13
- return data;
14
- });
15
- return { country, currency };
16
- };
17
- export { UseCountryAndCurrencyData };
@@ -1,5 +0,0 @@
1
- declare function enumsToOptions(enumObject: any, translateFile: string, t: any): {
2
- value: number;
3
- label: any;
4
- }[];
5
- export { enumsToOptions };
@@ -1,16 +0,0 @@
1
- function enumsToOptions(enumObject, translateFile, t) {
2
- const lst = [];
3
- let keys = Object.keys(enumObject).sort();
4
- const length = keys.length;
5
- keys = keys.slice(0, length / 2);
6
- for (const key of keys) {
7
- if (key == "-1")
8
- continue;
9
- lst.push({
10
- value: Number(key),
11
- label: t(`${translateFile}${enumObject[key].toString()}`),
12
- });
13
- }
14
- return lst;
15
- }
16
- export { enumsToOptions };
@@ -1 +0,0 @@
1
- export declare function generateOneLiner(lst: string[]): string[];
@@ -1,13 +0,0 @@
1
- export function generateOneLiner(lst) {
2
- const newLst = lst.map((value, index) => {
3
- if (value != undefined && value != null && value != "") {
4
- if (index == 0) {
5
- return `${value}`;
6
- }
7
- else {
8
- return ` - ${value}`;
9
- }
10
- }
11
- });
12
- return newLst;
13
- }
@@ -1,2 +0,0 @@
1
- export declare function getCountryName(code: number): string;
2
- export declare function getCountryCodeByISO_A2(ISO_A2: string): number;
@@ -1,20 +0,0 @@
1
- import countries from "../content/countries";
2
- export function getCountryName(code) {
3
- if (typeof code == "string") {
4
- code = Number(code);
5
- }
6
- const country = countries.find((country) => {
7
- if (country.Code === code) {
8
- return country;
9
- }
10
- });
11
- return country?.Name ?? "";
12
- }
13
- export function getCountryCodeByISO_A2(ISO_A2) {
14
- const country = countries.find((country) => {
15
- if (country.ISO_A2 === ISO_A2) {
16
- return country;
17
- }
18
- });
19
- return country?.Code ?? 0;
20
- }
@@ -1 +0,0 @@
1
- export declare function getEnumName(enumObject: any, index: number | string, translateFile?: string, t?: any): any;
@@ -1,6 +0,0 @@
1
- export function getEnumName(enumObject, index, translateFile, t) {
2
- if (translateFile && t) {
3
- return t(`${translateFile}${enumObject[index]?.toString()}`);
4
- }
5
- return enumObject[index]?.toString();
6
- }
@@ -1 +0,0 @@
1
- export declare function getStateByCountry(code: number): any;
@@ -1,8 +0,0 @@
1
- import state from "../content/state";
2
- export function getStateByCountry(code) {
3
- if (typeof code == "string") {
4
- code = Number(code);
5
- }
6
- const stateObj = state.filter((state) => state.Country_Code === code);
7
- return stateObj ?? "";
8
- }
@@ -1 +0,0 @@
1
- export declare function maskMiddleOfString(inputString: any): string;
@@ -1,24 +0,0 @@
1
- export function maskMiddleOfString(inputString) {
2
- try {
3
- const stringValue = String(inputString);
4
- const stringLength = stringValue.length;
5
- if (stringLength <= 5) {
6
- return "*".repeat(stringLength);
7
- }
8
- else if (stringLength >= 16) {
9
- return (stringValue.substring(0, 6) +
10
- "*".repeat(9) +
11
- stringValue.substring(stringLength - 4));
12
- }
13
- else {
14
- return (stringValue.substring(0, 2) +
15
- "*".repeat(stringLength - 4) +
16
- stringValue.substring(stringLength - 2));
17
- }
18
- }
19
- catch (error) {
20
- console.log(error);
21
- return inputString;
22
- }
23
- }
24
- //update error
@@ -1 +0,0 @@
1
- export declare function sortUserInfo(list?: any[] | null): any;
@@ -1,39 +0,0 @@
1
- export function sortUserInfo(list) {
2
- try {
3
- const verificationStatusOrder = {
4
- "1": 0, // Verified
5
- "2": 1, // Pending
6
- "3": 2, // Failed
7
- "0": 3, // Not Verified
8
- "-1": 4, // Undefined
9
- };
10
- return list
11
- ? list?.sort((a, b) => {
12
- // First, compare by 'is_primary'
13
- const isPrimaryComparison = a?.is_primary != undefined && b?.is_primary != undefined
14
- ? b?.is_primary - a?.is_primary
15
- : 0;
16
- // If 'is_primary' values are equal, compare by 'verification_status'
17
- if (isPrimaryComparison === 0) {
18
- const verificationStatusComparison = verificationStatusOrder[a?.verification_status] -
19
- verificationStatusOrder[b?.verification_status];
20
- // If 'is_primary' values are equal, and 'verification_status' values are equal, compare by id
21
- if (verificationStatusComparison == 0) {
22
- return b?.id - a?.id;
23
- }
24
- return verificationStatusComparison;
25
- }
26
- return isPrimaryComparison;
27
- })
28
- : list;
29
- }
30
- catch (error) {
31
- const errorObj = {
32
- status: "failed",
33
- message: error,
34
- funcName: "sortUserInfo",
35
- response: null,
36
- };
37
- return errorObj;
38
- }
39
- }