@eaera-com/client-sdk-v1 0.2.108

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.
Files changed (216) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +86 -0
  3. package/dist/channels/accounts.d.ts +11 -0
  4. package/dist/channels/metrics.d.ts +8 -0
  5. package/dist/channels/position.d.ts +13 -0
  6. package/dist/channels/users.d.ts +38 -0
  7. package/dist/common/constants/category.constant.d.ts +30 -0
  8. package/dist/common/constants/category.constant.js +31 -0
  9. package/dist/common/constants/communication.constant.d.ts +52 -0
  10. package/dist/common/constants/communication.constant.js +85 -0
  11. package/dist/common/constants/email.constant.d.ts +4 -0
  12. package/dist/common/constants/email.constant.js +7 -0
  13. package/dist/common/constants/filter.constants.d.ts +1 -0
  14. package/dist/common/constants/filter.constants.js +6 -0
  15. package/dist/common/constants/index.d.ts +15 -0
  16. package/dist/common/constants/index.js +79 -0
  17. package/dist/common/constants/kyc.constant.d.ts +42 -0
  18. package/dist/common/constants/kyc.constant.js +43 -0
  19. package/dist/common/constants/listStatus.constants.d.ts +2 -0
  20. package/dist/common/constants/listStatus.constants.js +19 -0
  21. package/dist/common/constants/methods.constant.d.ts +43 -0
  22. package/dist/common/constants/methods.constant.js +84 -0
  23. package/dist/common/constants/passwordRule.constants.d.ts +4 -0
  24. package/dist/common/constants/passwordRule.constants.js +7 -0
  25. package/dist/common/constants/program.constants.d.ts +2 -0
  26. package/dist/common/constants/program.constants.js +31 -0
  27. package/dist/common/constants/propAccount.constant.d.ts +8 -0
  28. package/dist/common/constants/propAccount.constant.js +11 -0
  29. package/dist/common/constants/site-settings.constants.d.ts +40 -0
  30. package/dist/common/constants/site-settings.constants.js +10 -0
  31. package/dist/common/constants/store.constants.d.ts +1 -0
  32. package/dist/common/constants/store.constants.js +7 -0
  33. package/dist/common/constants/supportTicket.constant.d.ts +11 -0
  34. package/dist/common/constants/supportTicket.constant.js +14 -0
  35. package/dist/common/constants/tradingPlatform.constants.d.ts +4 -0
  36. package/dist/common/constants/tradingPlatform.constants.js +7 -0
  37. package/dist/common/constants/transaction.constant.d.ts +16 -0
  38. package/dist/common/constants/transaction.constant.js +19 -0
  39. package/dist/common/constants/type.constants.d.ts +5 -0
  40. package/dist/common/constants/type.constants.js +28 -0
  41. package/dist/common/constants/withdraw.constant.d.ts +1 -0
  42. package/dist/common/constants/withdraw.constant.js +7 -0
  43. package/dist/common/types/addon.type.d.ts +30 -0
  44. package/dist/common/types/category.type.d.ts +8 -0
  45. package/dist/common/types/common.type.d.ts +3 -0
  46. package/dist/common/types/communication.type.d.ts +51 -0
  47. package/dist/common/types/coupon.type.d.ts +27 -0
  48. package/dist/common/types/email.type.d.ts +8 -0
  49. package/dist/common/types/fundingSource.type.d.ts +80 -0
  50. package/dist/common/types/ibs.type.d.ts +15 -0
  51. package/dist/common/types/index.d.ts +16 -0
  52. package/dist/common/types/kyc.type.d.ts +52 -0
  53. package/dist/common/types/liveNotification.type.d.ts +10 -0
  54. package/dist/common/types/news.type.d.ts +17 -0
  55. package/dist/common/types/notification.types.d.ts +30 -0
  56. package/dist/common/types/passwordRule.type.d.ts +16 -0
  57. package/dist/common/types/paymentMethod/blockbee.type.d.ts +27 -0
  58. package/dist/common/types/paymentMethod/index.d.ts +2 -0
  59. package/dist/common/types/paymentMethod/match2pay.type.d.ts +27 -0
  60. package/dist/common/types/product.type.d.ts +63 -0
  61. package/dist/common/types/siteSetting.type.d.ts +77 -0
  62. package/dist/common/types/wallet.type.d.ts +36 -0
  63. package/dist/common/use-utils/data/countriesWithCurrencies.d.ts +7 -0
  64. package/dist/common/use-utils/data/dragonpayBank.d.ts +6 -0
  65. package/dist/common/use-utils/data/help2pay_banks.d.ts +7 -0
  66. package/dist/common/use-utils/data/listCryptoCurrencies.d.ts +5 -0
  67. package/dist/common/use-utils/data/regions.d.ts +16 -0
  68. package/dist/common/use-utils/data/widgets.d.ts +4 -0
  69. package/dist/common/use-utils/error-handlers/index.d.ts +1 -0
  70. package/dist/common/use-utils/helpers/color.helpers.d.ts +2 -0
  71. package/dist/common/use-utils/helpers/color.helpers.js +19 -0
  72. package/dist/common/use-utils/helpers/currency.helpers.d.ts +25 -0
  73. package/dist/common/use-utils/helpers/currency.helpers.js +762 -0
  74. package/dist/common/use-utils/helpers/date.helpers.d.ts +8 -0
  75. package/dist/common/use-utils/helpers/date.helpers.js +64 -0
  76. package/dist/common/use-utils/helpers/kyc.helpers.d.ts +22 -0
  77. package/dist/common/use-utils/helpers/kyc.helpers.js +165 -0
  78. package/dist/common/use-utils/helpers/misc.helpers.d.ts +45 -0
  79. package/dist/common/use-utils/helpers/misc.helpers.js +141 -0
  80. package/dist/common/use-utils/helpers/number.helpers.d.ts +11 -0
  81. package/dist/common/use-utils/helpers/number.helpers.js +76 -0
  82. package/dist/common/use-utils/helpers/passwordRule.helpers.d.ts +5 -0
  83. package/dist/common/use-utils/helpers/passwordRule.helpers.js +31 -0
  84. package/dist/common/use-utils/helpers/schema.helpers.d.ts +2 -0
  85. package/dist/common/use-utils/helpers/schema.helpers.js +2036 -0
  86. package/dist/common/use-utils/helpers/string.helpers.d.ts +7 -0
  87. package/dist/common/use-utils/helpers/string.helpers.js +38 -0
  88. package/dist/common/use-utils/helpers/transaction.helpers.d.ts +8 -0
  89. package/dist/common/use-utils/helpers/transaction.helpers.js +44 -0
  90. package/dist/common/use-utils/schemas/fundingMethod.schema.d.ts +1313 -0
  91. package/dist/common/use-utils/validators/index.d.ts +4 -0
  92. package/dist/common/use-utils/validators/index.js +8 -0
  93. package/dist/index-6dV6pxDN.js +334 -0
  94. package/dist/index-BTVWGSPO.js +2897 -0
  95. package/dist/index.d.ts +1763 -0
  96. package/dist/index.js +10326 -0
  97. package/dist/regions-Dsypl2zG.js +18768 -0
  98. package/dist/services/ClientSDK/account/index.d.ts +57 -0
  99. package/dist/services/ClientSDK/activityLog/index.d.ts +6 -0
  100. package/dist/services/ClientSDK/auth/index.d.ts +21 -0
  101. package/dist/services/ClientSDK/auth/types.d.ts +11 -0
  102. package/dist/services/ClientSDK/captcha/index.d.ts +5 -0
  103. package/dist/services/ClientSDK/category/index.d.ts +9 -0
  104. package/dist/services/ClientSDK/client/index.d.ts +15 -0
  105. package/dist/services/ClientSDK/commissionProfile/index.d.ts +10 -0
  106. package/dist/services/ClientSDK/contact/index.d.ts +9 -0
  107. package/dist/services/ClientSDK/content/index.d.ts +18 -0
  108. package/dist/services/ClientSDK/contentType/index.d.ts +6 -0
  109. package/dist/services/ClientSDK/conversionRate/index.d.ts +7 -0
  110. package/dist/services/ClientSDK/coupon/index.d.ts +15 -0
  111. package/dist/services/ClientSDK/coupon/type.d.ts +35 -0
  112. package/dist/services/ClientSDK/department/index.d.ts +10 -0
  113. package/dist/services/ClientSDK/devices/index.d.ts +6 -0
  114. package/dist/services/ClientSDK/emailLayout/index.d.ts +10 -0
  115. package/dist/services/ClientSDK/emailTemplate/index.d.ts +15 -0
  116. package/dist/services/ClientSDK/employee/index.d.ts +15 -0
  117. package/dist/services/ClientSDK/folder/index.d.ts +12 -0
  118. package/dist/services/ClientSDK/fundingSource/index.d.ts +17 -0
  119. package/dist/services/ClientSDK/gamificationCampaign/index.d.ts +9 -0
  120. package/dist/services/ClientSDK/ib/index.d.ts +26 -0
  121. package/dist/services/ClientSDK/index.d.ts +60 -0
  122. package/dist/services/ClientSDK/kycs/index.d.ts +18 -0
  123. package/dist/services/ClientSDK/lead/index.d.ts +13 -0
  124. package/dist/services/ClientSDK/metric/index.d.ts +11 -0
  125. package/dist/services/ClientSDK/metric/type.d.ts +171 -0
  126. package/dist/services/ClientSDK/news/index.d.ts +14 -0
  127. package/dist/services/ClientSDK/note/index.d.ts +8 -0
  128. package/dist/services/ClientSDK/notificationCenter/NotificationCenter.types.d.ts +24 -0
  129. package/dist/services/ClientSDK/notificationCenter/index.d.ts +20 -0
  130. package/dist/services/ClientSDK/payment/index.d.ts +27 -0
  131. package/dist/services/ClientSDK/persona/index.d.ts +12 -0
  132. package/dist/services/ClientSDK/product/index.d.ts +12 -0
  133. package/dist/services/ClientSDK/productAttribute/index.d.ts +9 -0
  134. package/dist/services/ClientSDK/propAccount/index.d.ts +59 -0
  135. package/dist/services/ClientSDK/purchase/index.d.ts +13 -0
  136. package/dist/services/ClientSDK/purchase/type.d.ts +66 -0
  137. package/dist/services/ClientSDK/reportFilters/index.d.ts +9 -0
  138. package/dist/services/ClientSDK/request/index.d.ts +38 -0
  139. package/dist/services/ClientSDK/roleSet/index.d.ts +8 -0
  140. package/dist/services/ClientSDK/silt/index.d.ts +5 -0
  141. package/dist/services/ClientSDK/siteSetting/index.d.ts +16 -0
  142. package/dist/services/ClientSDK/sumsub/index.d.ts +6 -0
  143. package/dist/services/ClientSDK/support/index.d.ts +16 -0
  144. package/dist/services/ClientSDK/tradeBattle/index.d.ts +30 -0
  145. package/dist/services/ClientSDK/tradeBattle/tradeBattle.type.d.ts +119 -0
  146. package/dist/services/ClientSDK/tradeServer/index.d.ts +12 -0
  147. package/dist/services/ClientSDK/transaction/index.d.ts +9 -0
  148. package/dist/services/ClientSDK/user/index.d.ts +40 -0
  149. package/dist/services/ClientSDK/veriff/index.d.ts +7 -0
  150. package/dist/services/ClientSDK/voip/index.d.ts +5 -0
  151. package/dist/services/ClientSDK/wallet/index.d.ts +18 -0
  152. package/dist/services/EmailServiceTestSDK/index.d.ts +7 -0
  153. package/dist/services/EmailServiceTestSDK/message/index.d.ts +6 -0
  154. package/dist/services/PoolTradingSDK/index.d.ts +11 -0
  155. package/dist/services/PoolTradingSDK/investWallet/index.d.ts +16 -0
  156. package/dist/services/PoolTradingSDK/poolProfile/index.d.ts +46 -0
  157. package/dist/services/ReportSDK/index.d.ts +28 -0
  158. package/dist/services/base.d.ts +29 -0
  159. package/dist/stores/account.d.ts +191 -0
  160. package/dist/stores/activityLog.d.ts +7 -0
  161. package/dist/stores/addon.d.ts +11 -0
  162. package/dist/stores/advertising.d.ts +155 -0
  163. package/dist/stores/auth.d.ts +39 -0
  164. package/dist/stores/battleNotification.d.ts +6 -0
  165. package/dist/stores/captcha.d.ts +3 -0
  166. package/dist/stores/category.d.ts +15 -0
  167. package/dist/stores/client.d.ts +16 -0
  168. package/dist/stores/commissionProfile.d.ts +12 -0
  169. package/dist/stores/contact.d.ts +9 -0
  170. package/dist/stores/content.d.ts +222 -0
  171. package/dist/stores/contentType.d.ts +10 -0
  172. package/dist/stores/contentV2.d.ts +160 -0
  173. package/dist/stores/conversionRate.d.ts +9 -0
  174. package/dist/stores/coupon.d.ts +30 -0
  175. package/dist/stores/department.d.ts +7 -0
  176. package/dist/stores/devices.d.ts +8 -0
  177. package/dist/stores/employee.d.ts +12 -0
  178. package/dist/stores/folder.d.ts +15 -0
  179. package/dist/stores/fundingSource.d.ts +46 -0
  180. package/dist/stores/gamificationCampaign.d.ts +10 -0
  181. package/dist/stores/ib.d.ts +22 -0
  182. package/dist/stores/index.d.ts +1761 -0
  183. package/dist/stores/investWallet.d.ts +92 -0
  184. package/dist/stores/kycs.d.ts +16 -0
  185. package/dist/stores/lead.d.ts +13 -0
  186. package/dist/stores/liveNotification.d.ts +6 -0
  187. package/dist/stores/metric.d.ts +24 -0
  188. package/dist/stores/metricsV2.d.ts +28 -0
  189. package/dist/stores/news.d.ts +15 -0
  190. package/dist/stores/notes.d.ts +16 -0
  191. package/dist/stores/notification.d.ts +6 -0
  192. package/dist/stores/notificationCenter.d.ts +20 -0
  193. package/dist/stores/payment.d.ts +25 -0
  194. package/dist/stores/poolProfile.d.ts +117 -0
  195. package/dist/stores/poolTrading.d.ts +7 -0
  196. package/dist/stores/product.d.ts +31 -0
  197. package/dist/stores/productAttribute.d.ts +10 -0
  198. package/dist/stores/propAccount.d.ts +48 -0
  199. package/dist/stores/purchases.d.ts +23 -0
  200. package/dist/stores/report.d.ts +19 -0
  201. package/dist/stores/reportFilter.d.ts +9 -0
  202. package/dist/stores/request.d.ts +39 -0
  203. package/dist/stores/roleSet.d.ts +7 -0
  204. package/dist/stores/siteSetting.d.ts +103 -0
  205. package/dist/stores/support.d.ts +33 -0
  206. package/dist/stores/tradeBattle.d.ts +51 -0
  207. package/dist/stores/tradeServer.d.ts +12 -0
  208. package/dist/stores/transaction.d.ts +8 -0
  209. package/dist/stores/user.d.ts +30 -0
  210. package/dist/stores/wallet.d.ts +53 -0
  211. package/dist/utils/axiosTiming.d.ts +12 -0
  212. package/dist/utils/cookies.d.ts +1 -0
  213. package/dist/utils/index.d.ts +4 -0
  214. package/dist/utils/routeCompression.d.ts +19 -0
  215. package/dist/utils/store.d.ts +12 -0
  216. package/package.json +74 -0
@@ -0,0 +1,7 @@
1
+ import { EmailMaskOptions, FormatEmailType } from '../../types/email.type';
2
+
3
+ export declare const capitalizeFirstLetter: (string: string, sep?: string, joinSep?: string) => string;
4
+ export declare const kebabCase: (str?: string) => string;
5
+ export declare const snakeCase: (str?: string) => string;
6
+ export declare const snakeCaseToTitleCase: (str?: string) => string;
7
+ export declare const maskEmail: (email?: string | null, style?: FormatEmailType, option?: EmailMaskOptions) => string;
@@ -0,0 +1,38 @@
1
+ const $ = (e, r = " ", c = " ") => e ? e.split(r).map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join(c) : "", u = (e) => e ? e.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").toLowerCase() : "", p = (e) => e ? e.replace(/([A-Z])/g, (r) => `_${r.toLowerCase()}`).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") : "", f = (e) => e ? e.split("_").filter(Boolean).map((r) => r.charAt(0).toUpperCase() + r.slice(1).toLowerCase()).join(" ") : "", h = (e, r = "first-last", c) => {
2
+ if (!e) return "";
3
+ const [t, s] = e.split("@");
4
+ if (!t || !s) return e;
5
+ switch (r) {
6
+ case "first-last": {
7
+ if (t.length <= 2) return `${t[0]}*@${s}`;
8
+ const a = t[0], n = t[t.length - 1], o = "*".repeat(t.length - 2);
9
+ return `${a}${o}${n}@${s}`;
10
+ }
11
+ case "first2-last2": {
12
+ if (t.length <= 4) {
13
+ const l = t[0], i = t[t.length - 1];
14
+ return `${l}*${i}@${s}`;
15
+ }
16
+ const a = t.slice(0, 2), n = t.slice(-2), o = "*".repeat(t.length - 4);
17
+ return `${a}${o}${n}@${s}`;
18
+ }
19
+ case "keep-first-hide-rest": {
20
+ const a = t[0], n = "*".repeat(t.length - 1);
21
+ return `${a}${n}@${s}`;
22
+ }
23
+ case "optional": {
24
+ if (!c) return e;
25
+ const a = Math.max(0, Math.min(c.start, t.length)), n = Math.max(0, c.count);
26
+ return `${t.slice(0, a)}${"*".repeat(n)}@${s}`;
27
+ }
28
+ default:
29
+ return e;
30
+ }
31
+ };
32
+ export {
33
+ $ as capitalizeFirstLetter,
34
+ u as kebabCase,
35
+ h as maskEmail,
36
+ p as snakeCase,
37
+ f as snakeCaseToTitleCase
38
+ };
@@ -0,0 +1,8 @@
1
+ import { PspKey } from '../../constants/methods.constant';
2
+
3
+ export declare const filterTransactionRules: (rules: any[], filterConfig?: {
4
+ country?: string;
5
+ ibId?: string;
6
+ type?: "deposit" | "withdrawal";
7
+ }) => any[];
8
+ export declare const generateFundingId: (funding_data: Record<string, string>, current_method: PspKey) => string;
@@ -0,0 +1,44 @@
1
+ import { PSP as s } from "../../constants/methods.constant.js";
2
+ import { getKeyForFundingMethod as p } from "./schema.helpers.js";
3
+ const Y = (c, o) => o?.country ? c.filter((e) => {
4
+ if (!e.active) return !1;
5
+ const r = o.type, t = !!r && e[r] != null && "country_op" in e[r], A = t ? e[r].country_op : e.country_op, b = t ? e[r].countries : e.countries, I = !A || A === "all" || A === "include" && b?.includes(o.country) || A === "exclude" && !b?.includes(o.country), P = !e.ib_op || e.ib_op === "all" || e.ib_op === "include" && e.ibs?.includes(o.ibId) || e.ib_op === "exclude" && !e.ibs?.includes(o.ibId);
6
+ return I && P;
7
+ }) : [], T = (c, o) => {
8
+ const e = {
9
+ [s.CRYPTO_WALLET]: c.wallet_address,
10
+ [s.PESKA]: c.peska_email,
11
+ [s.UNLIMIT_CRYPTOCHILL]: c.address,
12
+ [s.ZOTAPAY]: c.account_number,
13
+ [s.UNIPAY]: c.address ?? c.account_number ?? c.iban,
14
+ [s.VISA_MASTER_CARD]: `${c.bank_name}${c.card_last_numbers}`,
15
+ [s.UNLIMIT]: c.address,
16
+ [s.TICKPAY_FIAT]: c.idNumber,
17
+ [s.TICKPAY_CRYPTO]: c.address,
18
+ [s.STICPAY]: c.sticpay_email,
19
+ [s.PAYPAL]: c.paypal_email,
20
+ [s.COINPAYMENTS]: c.wallet_address,
21
+ [s.COINSBUY]: c.wallet_address,
22
+ [s.CONFIRMO]: c.wallet_address,
23
+ [s.D24]: c.bank_account,
24
+ [s.DRAGONPAY]: c.account_number,
25
+ [s.HELP2PAY]: c.account_number,
26
+ [s.BANKWIRE]: c.bank_address,
27
+ [s.LIMEPAY]: c.bank_account,
28
+ [s.LOCAL_METHOD]: c.account_number,
29
+ [s.CHAINXPAY]: c.address,
30
+ [s.NOW_PAYMENTS]: c.wallet_address,
31
+ [s.B2BINPAY]: c.wallet_address,
32
+ [s.NOIFX]: c.bank_account_number,
33
+ [s.KEPG]: c.account_number,
34
+ [s.PAYRETAILERS]: c.account_number,
35
+ [s.BLOCKBEE]: c.crypto_address,
36
+ [s.RISE]: c.email,
37
+ [s.MATCH2PAY]: c.crypto_address
38
+ }, r = p(o);
39
+ return e[r] || "";
40
+ };
41
+ export {
42
+ Y as filterTransactionRules,
43
+ T as generateFundingId
44
+ };