@jetthai/cuora 1.0.205 → 1.0.302-sl-1

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 (109) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/.prettierignore +1 -0
  3. package/CHANGELOG.md +846 -0
  4. package/README.md +6 -0
  5. package/package.json +6 -9
  6. package/src/api/activity.js +43 -2
  7. package/src/api/auth.js +22 -7
  8. package/src/api/common.js +2 -1
  9. package/src/api/game.js +20 -7
  10. package/src/api/mailbox.js +9 -5
  11. package/src/api/payment.js +167 -19
  12. package/src/api/user.js +7 -0
  13. package/src/lib/fingerprint.js +9779 -0
  14. package/src/machine/activity/activity.js +111 -26
  15. package/src/machine/activity/activity_cash.js +159 -0
  16. package/src/machine/activity/cash_rain_activity.js +153 -0
  17. package/src/machine/activity/continue_deposit_activity.js +11 -2
  18. package/src/machine/activity/deposit_activity.js +13 -4
  19. package/src/machine/activity/diamond_shop_activity_cash.js +179 -0
  20. package/src/machine/activity/diamond_shop_activity_vn.js +54 -89
  21. package/src/machine/activity/fafafa_activity.js +34 -19
  22. package/src/machine/activity/{affiliate_invite_friends_activity.js → friend_invite_friends_activity.js} +70 -41
  23. package/src/machine/activity/index.js +22 -4
  24. package/src/machine/activity/instant_rebate_activity.js +217 -0
  25. package/src/machine/activity/invite_friends_activity.js +14 -14
  26. package/src/machine/activity/jackpot.js +74 -0
  27. package/src/machine/activity/otp_verified_activity.js +74 -0
  28. package/src/machine/activity/ranking_activity.js +11 -2
  29. package/src/machine/activity/roulette_activity_v2.js +90 -0
  30. package/src/machine/activity/sign_in_activity.js +21 -14
  31. package/src/machine/activity/sign_in_monthly_activity.js +65 -0
  32. package/src/machine/activity/specify_bets_activity.js +25 -3
  33. package/src/machine/activity/specify_turnover_activity.js +25 -3
  34. package/src/machine/activity/time_bomb_activity.js +11 -2
  35. package/src/machine/activity/vip_card_activity.js +140 -0
  36. package/src/machine/auth.js +141 -27
  37. package/src/machine/auth_otp_v2.js +10 -4
  38. package/src/machine/auth_otp_v3.js +11 -3
  39. package/src/machine/bank_binding.js +112 -12
  40. package/src/machine/bank_binding_amb.js +145 -0
  41. package/src/machine/common.js +113 -25
  42. package/src/machine/deposit/amb.js +92 -0
  43. package/src/machine/deposit/crypto.js +50 -29
  44. package/src/machine/deposit/crypto_bank.js +317 -0
  45. package/src/machine/deposit/crypto_bank_cash.js +287 -0
  46. package/src/machine/deposit/crypto_button.js +174 -39
  47. package/src/machine/deposit/crypto_cash.js +255 -0
  48. package/src/machine/deposit/crypto_qrcode.js +148 -0
  49. package/src/machine/deposit/crypto_qrcode_cash.js +131 -0
  50. package/src/machine/deposit/crypto_way.js +239 -0
  51. package/src/machine/deposit/crypto_way_cash.js +256 -0
  52. package/src/machine/deposit/deposit_fc.js +8 -5
  53. package/src/machine/deposit/direct.js +111 -16
  54. package/src/machine/deposit/direct_cash.js +217 -0
  55. package/src/machine/deposit/float.js +366 -0
  56. package/src/machine/deposit/index.js +43 -2
  57. package/src/machine/deposit/krway.js +151 -0
  58. package/src/machine/deposit/loadcard_cash.js +207 -0
  59. package/src/machine/deposit/loadcard_vn.js +191 -43
  60. package/src/machine/deposit/manual_cash.js +356 -0
  61. package/src/machine/deposit/manual_vn.js +182 -60
  62. package/src/machine/deposit/qrcode_cash.js +217 -0
  63. package/src/machine/deposit/qrcode_v2.js +285 -52
  64. package/src/machine/deposit/usdt.js +144 -0
  65. package/src/machine/deposit/usdt_cash.js +138 -0
  66. package/src/machine/deposit/vpay.js +359 -0
  67. package/src/machine/game_favorite_v2.js +74 -28
  68. package/src/machine/game_info.js +57 -0
  69. package/src/machine/game_search_cash.js +390 -0
  70. package/src/machine/game_search_v2.js +64 -24
  71. package/src/machine/game_v2_1.js +662 -0
  72. package/src/machine/honor_board_cash.js +63 -0
  73. package/src/machine/inbox.js +259 -34
  74. package/src/machine/index.js +22 -17
  75. package/src/machine/leaderboard.js +31 -8
  76. package/src/machine/promotions.js +171 -0
  77. package/src/machine/reward.js +74 -7
  78. package/src/machine/reward_cash.js +219 -0
  79. package/src/machine/roulette_v2.js +276 -0
  80. package/src/machine/setting.js +5 -2
  81. package/src/machine/side_cash.js +110 -0
  82. package/src/machine/side_v2.js +33 -28
  83. package/src/machine/user_photo.js +65 -0
  84. package/src/machine/user_sign_up.js +101 -17
  85. package/src/machine/withdraw/index.js +23 -0
  86. package/src/machine/{withdraw_vn.js → withdraw/withdraw_amb.js} +146 -78
  87. package/src/machine/{withdraw_crypto.js → withdraw/withdraw_crypto.js} +220 -69
  88. package/src/machine/withdraw/withdraw_crypto2.js +540 -0
  89. package/src/machine/withdraw/withdraw_crypto_cash.js +319 -0
  90. package/src/machine/{withdraw_fc.js → withdraw/withdraw_fc.js} +2 -2
  91. package/src/machine/withdraw/withdraw_krway.js +207 -0
  92. package/src/machine/withdraw/withdraw_manual.js +595 -0
  93. package/src/machine/withdraw/withdraw_manual_cash.js +303 -0
  94. package/src/machine/withdraw/withdraw_vn.js +533 -0
  95. package/src/machine/withdraw/withdraw_vn2.js +548 -0
  96. package/src/request/request.js +10 -5
  97. package/src/util/constant.js +19 -1
  98. package/src/util/deviceToken.js +18 -8
  99. package/src/util/index.js +2 -1
  100. package/src/util/math.js +4 -0
  101. package/src/util/storage.js +22 -22
  102. package/dist/bundle.mjs +0 -18462
  103. package/rollup.config.js +0 -16
  104. package/src/machine/auth_otp.js +0 -201
  105. package/src/machine/deposit/qrcode_vn.js +0 -206
  106. package/src/machine/game.js +0 -285
  107. package/src/machine/game_favorite.js +0 -123
  108. package/src/machine/game_search.js +0 -244
  109. package/src/machine/game_v2.js +0 -356
package/README.md CHANGED
@@ -1,20 +1,26 @@
1
1
  # cuora
2
+
2
3
  Integrate API and logic by xstate.
3
4
 
4
5
  ## Installation
6
+
5
7
  Add @jetthai/cuora dependency to your project:
8
+
6
9
  ```bash
7
10
  npm install --save @jetthai/cuora
8
11
  ```
9
12
 
10
13
  ## Setup
14
+
11
15
  Add config in `nuxt.config.js` to support latest ECMAScript.
16
+
12
17
  ```js
13
18
  // nuxt.config.js
14
19
  {
15
20
  ssr: false
16
21
  }
17
22
  ```
23
+
18
24
  ```js
19
25
  // nuxt.config.js
20
26
  {
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.205",
3
+ "version": "1.0.302-sl-1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
- "build": "rollup --config rollup.config.js",
9
- "release": "standard-version && git push --follow-tags origin master && npm publish"
8
+ "release": "standard-version && git push --follow-tags origin master && npm publish",
9
+ "format": "prettier --write .",
10
+ "prepare": "husky install"
10
11
  },
11
12
  "repository": {
12
13
  "type": "git",
@@ -15,17 +16,13 @@
15
16
  "author": "Neil",
16
17
  "license": "ISC",
17
18
  "devDependencies": {
18
- "@rollup/plugin-commonjs": "^22.0.2",
19
- "@rollup/plugin-node-resolve": "^13.3.0",
20
- "@rollup/plugin-replace": "^4.0.0",
19
+ "husky": "^8.0.3",
21
20
  "prettier": "^2.3.0",
22
- "rollup": "^2.78.1",
23
21
  "standard-version": "^9.3.1"
24
22
  },
25
23
  "dependencies": {
26
- "@fingerprintjs/fingerprintjs-pro": "^3.8.0",
27
24
  "lodash": "^4.17.21",
28
- "ua-parser-js": "^0.7.28",
25
+ "ua-parser-js": "^0.7.34",
29
26
  "universal-cookie": "^4.0.4",
30
27
  "url-join": "^4.0.1",
31
28
  "xstate": "^4.25.0"
@@ -4,13 +4,30 @@ export default {
4
4
  url: 'activities/list',
5
5
  method: 'get',
6
6
  params: { appSecret, include },
7
- isPublic: true
7
+ isPublic: true,
8
+ }),
9
+ getJackpotList: ({ appSecret }) => ({
10
+ url: 'activities/jackpot/list',
11
+ method: 'get',
12
+ params: { appSecret },
13
+ isPublic: true,
14
+ }),
15
+ getTournamentDetail: ({ activityNo, appSecret }) => ({
16
+ url: 'tournament/detail',
17
+ method: 'get',
18
+ params: { activityNo, appSecret },
19
+ isPublic: true,
8
20
  }),
9
21
  getActivityDetail: ({ activityNo, appSecret }) => ({
10
22
  url: 'activities',
11
23
  method: 'get',
12
24
  params: { activityNo, appSecret },
13
25
  }),
26
+ getActivityRanking: () => ({
27
+ url: 'activities/activity/ranking',
28
+ method: 'get',
29
+ isPublic: true,
30
+ }),
14
31
  getAchievements: ({ limit, page, appSecret }) => ({
15
32
  url: 'activities/achievements',
16
33
  method: 'get',
@@ -46,8 +63,32 @@ export default {
46
63
  method: 'get',
47
64
  params: { rewardType },
48
65
  }),
49
- getRewardList: ({ rewardType, count, appSecret }) => ({ url: 'activities/rewards', method: 'get', params: { rewardType, count, appSecret } }),
66
+ getRewardList: ({ rewardType, count, appSecret }) => ({
67
+ url: 'activities/rewards',
68
+ method: 'get',
69
+ params: { rewardType, count, appSecret },
70
+ }),
71
+ getCashRainReward: ({ activityNo, appSecret }) => ({
72
+ url: `activities/cashRain`,
73
+ method: 'post',
74
+ params: { activityNo, appSecret },
75
+ }),
76
+ getMaxExchangeAmount: (data) => ({ url: 'activities/exchange/diamond/max-amount', method: 'post', params: data }),
77
+ settleAmount: (data) => ({ url: 'activities/exchange/diamond/settle', method: 'post', params: data }),
50
78
  exchange: (data) => ({ url: 'activities/exchange', method: 'post', params: data }),
51
79
  collect: (data) => ({ url: 'activities/collect', method: 'post', params: data }),
52
80
  getVipTable: () => ({ url: 'activities/viptable', method: 'get' }),
81
+ getRankingList: () => ({ url: 'activities/ranking', method: 'get' }),
82
+ exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
83
+ url: 'activities/exchange/diamond',
84
+ method: 'post',
85
+ params: {
86
+ activityNo,
87
+ exchangeAward,
88
+ },
89
+ }),
90
+ getHonorBoard: (appSecret) => ({ url: 'activities/honorBoard', method: 'get', params: { appSecret }, isPublic: true }),
91
+ getInstantRebateCollectTime: () => ({ url: 'activities/rebate/collectTime', method: 'get' }),
92
+ instantRebateEstimate: () => ({ url: 'activities/rebate/estimate', method: 'get' }),
93
+ instantRebateCollect: () => ({ url: 'activities/rebate/collect', method: 'get' }),
53
94
  }
package/src/api/auth.js CHANGED
@@ -1,3 +1,4 @@
1
+ import pickBy from 'lodash/pickBy'
1
2
  export default {
2
3
  guestLogin: () => ({
3
4
  url: 'guestLogin',
@@ -30,13 +31,21 @@ export default {
30
31
  },
31
32
  isPublic: true,
32
33
  }),
33
- register: ({ channel = 'official', subchannel = 'pwa', affiliate = null, reCaptchaToken, dt, ...rest }) => ({
34
- url: `register?channel=${channel}&subchannel=${subchannel}${affiliate ? `&affiliate=${affiliate}` : ''}`,
35
- method: 'post',
36
- params: { dt, ...rest },
37
- isPublic: true,
38
- headers: { 'x-access-captcha': reCaptchaToken },
39
- }),
34
+ register: ({ channel, subchannel, ac, fc = null, reCaptchaToken, dt, ...rest }) => {
35
+ const params = pickBy({ channel, subchannel, ac, fc }, (value) => {
36
+ return value !== undefined && value !== null
37
+ })
38
+ const qs = Object.keys(params)
39
+ .map((key) => `${key}=${params[key]}`)
40
+ .join('&')
41
+ return {
42
+ url: `register?${qs}`,
43
+ method: 'post',
44
+ params: { dt, ...rest },
45
+ isPublic: true,
46
+ headers: { 'x-access-captcha': reCaptchaToken },
47
+ }
48
+ },
40
49
  logout: () => ({ url: 'logout', method: 'post' }),
41
50
  // bindGet for 'google' | 'zalo' | 'facebook'
42
51
  bindGet: ({ x, provider, redirectURI }) => ({ url: 'bind', method: 'get', params: { x, provider, redirectURI } }),
@@ -45,4 +54,10 @@ export default {
45
54
  method: 'post',
46
55
  params: { provider, countryCode, phone, email },
47
56
  }),
57
+ checkAccount: ({ account, nick_name, strategy }) => ({
58
+ url: 'checkAccount',
59
+ method: 'post',
60
+ params: { account, nick_name, strategy },
61
+ isPublic: true,
62
+ }),
48
63
  }
package/src/api/common.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export default {
2
2
  getConfig: ({ appSecret }) => ({ url: 'getConfig', method: 'get', params: { appSecret }, isPublic: true }),
3
+ getLayoutConfig: ({ appSecret }) => ({ url: 'getQuickLayout', method: 'get', params: { appSecret }, isPublic: true }),
3
4
  feeds: ({ appSecret }) => ({ url: 'feeds', method: 'get', params: { appSecret }, isPublic: true }),
4
5
  broadcast: () => ({ url: 'broadcast', method: 'get', isPublic: true }),
5
- getAnnouncements: () => ({ url: 'getAnnouncements', method: 'get', isPublic: true }),
6
+ getAnnouncements: ({ appSecret }) => ({ url: 'getAnnouncements', params: { appSecret }, method: 'get', isPublic: true }),
6
7
  }
package/src/api/game.js CHANGED
@@ -9,14 +9,26 @@ export default {
9
9
  playGame: (params) => ({ url: 'game/play', method: 'get', params }),
10
10
  logoutGame: ({ uid_site, provider_id }) => ({ url: 'game/logout', method: 'get', params: { uid_site, provider_id } }),
11
11
 
12
- getGameTags: ({ q }) => ({ url: 'game/search', method: 'get', params: { q } }),
12
+ getGameTags: ({ q, lang }) => ({ url: 'game/search', method: 'get', params: { q, lang } }),
13
13
  getGameSearchHome: () => ({ url: 'game/search/home', method: 'get' }),
14
- getGameSearchList: ({ id, index, q, click, clickDefault }) => ({
14
+ getGameSearchList: ({ id, index, q, click, clickDefault, providerName }) => ({
15
15
  url: 'game/search/list',
16
16
  method: 'get',
17
- params: { id, index, q, click, clickDefault },
17
+ params: { id, index, q, click, clickDefault, providerName },
18
18
  }),
19
- setGameSearchTrace: ({ traceId, tagId, tagIndex, gameCode, gameCodeIndex, query, click, clickDefault, isYouMayLike, isRecentlyGame, isRecentlySearch }) => ({
19
+ setGameSearchTrace: ({
20
+ traceId,
21
+ tagId,
22
+ tagIndex,
23
+ gameCode,
24
+ gameCodeIndex,
25
+ query,
26
+ click,
27
+ clickDefault,
28
+ isYouMayLike,
29
+ isRecentlyGame,
30
+ isRecentlySearch,
31
+ }) => ({
20
32
  url: 'game/search/trace',
21
33
  method: 'post',
22
34
  params: {
@@ -30,13 +42,13 @@ export default {
30
42
  clickDefault,
31
43
  isYouMayLike,
32
44
  isRecentlyGame,
33
- isRecentlySearch
45
+ isRecentlySearch,
34
46
  },
35
47
  }),
36
- gameHistory: ({ requestTimestamp, lang, provider, type }) => ({
48
+ gameHistory: ({ requestTimestamp, lang, provider, type, seqStatus }) => ({
37
49
  url: 'game/history',
38
50
  method: 'post',
39
- params: { requestTimestamp, lang, provider, type },
51
+ params: { requestTimestamp, lang, provider, type, seqStatus },
40
52
  }),
41
53
  gameHistoryDetail: ({ requestTimestamp, provider, gameId, lang, page, row }) => ({
42
54
  url: 'game/history/detail',
@@ -79,4 +91,5 @@ export default {
79
91
  }),
80
92
  addListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/addMyFavorite', params: { games: [code] } }),
81
93
  removeListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/removeMyFavorite', params: { games: [code] } }),
94
+ getGameInfo: ({ appSecret, gameCode }) => ({ method: 'get', url: 'game/info', params: { appSecret, gameCode } }),
82
95
  }
@@ -1,16 +1,20 @@
1
1
  export default {
2
2
  getMessageTypes: () => ({ url: 'mailbox/getMessageTypes', method: 'get' }),
3
- getMessageList: ({ type, limit = 10, page }) => ({
3
+ getMessageList: ({ type, limit = 10, page, category }) => ({
4
4
  url: 'mailbox/getMessageList?include=cl',
5
5
  method: 'post',
6
- params: { type, limit, page },
6
+ params: { type, limit, page, category },
7
7
  }),
8
- updateMessage: ({ groupId, isRead }) => ({
8
+ updateMessage: ({ groupId, isRead, isDelete }) => ({
9
9
  url: 'mailbox/updateMessage',
10
10
  method: 'post',
11
- params: { groupId, isRead },
11
+ params: { groupId, isRead, isDelete },
12
+ }),
13
+ sendMessage: ({ groupId, type, category, from, to, title, content }) => ({
14
+ url: 'mailbox/sendMessage',
15
+ method: 'post',
16
+ params: { groupId, type, category, from, to, title, content },
12
17
  }),
13
- sendMessage: () => ({ url: 'mailbox/sendMessage', method: 'post' }),
14
18
  getMessage: ({ groupId, limit = 10, pageIdx }) => ({
15
19
  url: 'mailbox/getMessage',
16
20
  method: 'post',
@@ -1,17 +1,61 @@
1
1
  export default {
2
- // getPaymentHistory: () => ({ url: 'payment/history', method: 'post' }),
3
2
  getPaymentHistory: (returnDays) => ({ url: 'payment/v2/history', method: 'post', params: { returnDays } }),
4
3
  getSpotMarket: () => ({ url: 'payment/spotmarket', method: 'get' }),
5
- getTransactionHistory: (payload) => ({ url: 'payment/v2/transactionHistory', method: 'post', params: { ...payload } }),
4
+ getTransactionHistory: (payload) => ({
5
+ url: 'payment/v2/transactionHistory',
6
+ method: 'post',
7
+ params: { ...payload },
8
+ }),
6
9
  getTransactionHistoryOptions: () => ({ url: 'payment/v2/category/options', method: 'get' }),
7
- // getPaymentInfo: () => ({ url: `payment/paymentInfo`, method: 'get' }),
8
10
  getPaymentInfo: () => ({ url: `payment/v2/paymentInfo`, method: 'get' }),
9
- updatePaymentInfo: ({ bankCode, branch, holderName, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider }) => ({
11
+ getBindingPaymentInfo: () => ({ url: `payment/getBindingPaymentInfo`, method: 'get' }),
12
+ updatePaymentInfo: ({
13
+ bankCode,
14
+ branch,
15
+ branchCode,
16
+ holderName,
17
+ bankAccount,
18
+ firstNameTh,
19
+ lastNameTh,
20
+ firstNameEn,
21
+ lastNameEn,
22
+ bonus,
23
+ paymentProvider,
24
+ pixType,
25
+ bindingType,
26
+ cryptoCurrency,
27
+ cryptoNetwork,
28
+ cryptoAddress,
29
+ walletCode,
30
+ ifscCode,
31
+ }) => ({
10
32
  url: 'payment/v2/updatePaymentInfo',
11
33
  method: 'post',
12
- params: { bankCode, branch, holderName, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider },
34
+ params: {
35
+ bankCode,
36
+ branch,
37
+ branchCode,
38
+ holderName,
39
+ bankAccount,
40
+ firstNameTh,
41
+ lastNameTh,
42
+ firstNameEn,
43
+ lastNameEn,
44
+ bonus,
45
+ paymentProvider,
46
+ pixType,
47
+ bindingType,
48
+ cryptoCurrency,
49
+ cryptoNetwork,
50
+ cryptoAddress,
51
+ walletCode,
52
+ ifscCode,
53
+ },
13
54
  }),
14
55
  getBankList: (paymentMethod) => ({ url: `payment/v2/${paymentMethod}/getBankList`, method: 'get' }),
56
+ getBindingBankList: ({ appSecret }) => ({ url: 'payment/v2/getBindingBankList', method: 'get', params: { appSecret }, isPublic: true }),
57
+ getBindingPaymentList: ({ appSecret }) => ({ url: 'payment/getBindingPaymentList', method: 'get', params: { appSecret }, isPublic: true }),
58
+ getWithdrawBankList: () => ({ url: 'payment/v2/getWithdrawBankList', method: 'get' }),
15
59
  makeTransaction: ({ type, payload, paymentMethod }) => ({
16
60
  url: `payment/v2/${paymentMethod}/transaction`,
17
61
  method: 'post',
@@ -23,47 +67,83 @@ export default {
23
67
  checkTransaction: (paymentMethod) => ({ url: `payment/${paymentMethod}/checkTransaction`, method: 'post' }),
24
68
  setBonusSetting: ({ bonus }) => ({ url: 'payment/v2/setting', method: 'post', params: { bonus } }),
25
69
  getCurrentWithdrawRule: () => ({ url: 'payment/v2/getCurrentWithdrawRule', method: 'get' }),
70
+ getDoubleWalletWithdrawRule: ({ walletType }) => ({
71
+ url: 'payment/v2/withdrawRule',
72
+ method: 'post',
73
+ params: { walletType },
74
+ }),
26
75
  convertFreeCredit: ({ exchangeType, cryptoNetwork, targetAddress }) => ({
27
76
  url: 'payment/v2/convertFreeCredit',
28
77
  method: 'post',
29
78
  params: { exchangeType, cryptoNetwork, targetAddress },
30
79
  }),
31
80
  mergeWallet: () => ({ url: 'payment/mergeWallet', method: 'post' }),
32
- getPaymentDetail: ({ transferType }) => ({
81
+ getPaymentDetail: ({ transferType } = {}) => ({
33
82
  url: 'payment/v2/paymentDetail',
34
83
  method: 'post',
35
84
  params: { transferType },
36
85
  }),
37
- getDepositExpectedResult: ({ method, amount, cryptoCurrency }) => ({
86
+ getDepositExpectedResult: ({ method, amount, cryptoCurrency, promotionsNo }) => ({
38
87
  url: `payment/v2/${method}/expected/result`,
39
88
  method: 'post',
40
- params: { transferType: 'DEPOSIT', amount, cryptoCurrency },
89
+ params: { transferType: 'DEPOSIT', amount, cryptoCurrency, promotionsNo },
90
+ }),
91
+ getCryptoDepositExpectedResult: ({ method, amount, cryptoCurrency, promotionsNo }) => ({
92
+ url: `payment/v2/${method}/crypto/expected/result`,
93
+ method: 'post',
94
+ params: { transferType: 'DEPOSIT', amount, cryptoCurrency, promotionsNo },
95
+ }),
96
+ getCryptoWithdrawExpectedResult: ({ method, amount, cryptoCurrency, promotionsNo }) => ({
97
+ url: `payment/v2/${method}/crypto/expected/result`,
98
+ method: 'post',
99
+ params: { transferType: 'WITHDRAW', amount, cryptoCurrency, promotionsNo },
41
100
  }),
42
101
  getWithdrawExpectedResult: ({ method, amount, cryptoNetwork }) => ({
43
102
  url: `payment/v2/${method}/expected/result`,
44
103
  method: 'post',
45
104
  params: { transferType: 'WITHDRAW', amount, cryptoNetwork },
46
105
  }),
47
- submitDepositTransaction: ({ method, amount, cryptoCurrency, cryptoNetwork, sourceAddress }) => ({
106
+ submitDepositTransactionCrypto: ({ method, amount, cryptoCurrency, cryptoNetwork, sourceAddress, promotionsNo, receipt }) => ({
107
+ url: `payment/v2/${method}/transaction`,
108
+ method: 'post',
109
+ params: { transferType: 'DEPOSIT', amount, cryptoCurrency, cryptoNetwork, sourceAddress, promotionsNo, receipt },
110
+ }),
111
+ submitDepositTransactionCryptoBank: ({ method, amount, cryptoCurrency, cryptoNetwork, sourceAddress, promotionsNo, depositTime, receipt }) => ({
48
112
  url: `payment/v2/${method}/transaction`,
49
113
  method: 'post',
50
- params: { transferType: 'DEPOSIT', amount, cryptoCurrency, cryptoNetwork, sourceAddress },
114
+ params: {
115
+ transferType: 'DEPOSIT',
116
+ amount,
117
+ cryptoCurrency,
118
+ cryptoNetwork,
119
+ sourceAddress,
120
+ promotionsNo,
121
+ depositTime,
122
+ receipt,
123
+ },
51
124
  }),
52
- submitDepositTransactionLoadcard: ({ method, amount, card_type, card_code, card_seri }) => ({
125
+ submitDepositTransactionLoadcard: ({ method, amount, card_type, card_code, card_seri, promotionsNo }) => ({
53
126
  url: `payment/v2/${method}/transaction`,
54
127
  method: 'post',
55
- params: { transferType: 'DEPOSIT', amount, card_type, card_code, card_seri },
128
+ params: { transferType: 'DEPOSIT', amount, card_type, card_code, card_seri, promotionsNo },
56
129
  }),
57
130
  submitDepositTransactionBank: ({
58
131
  method,
59
132
  amount,
60
133
  applyerBankCode,
61
134
  applyerAccountNumber,
135
+ applyerIfscCode,
62
136
  applyerHolderName,
137
+ applyerBranch,
138
+ applyerBranchCode,
63
139
  targetBankCode,
64
140
  targetAccountNumber,
65
- depositTime = '1234567890',
141
+ targetIfscCode,
142
+ targetUpi,
143
+ transactionId,
144
+ depositTime,
66
145
  receipt,
146
+ promotionsNo,
67
147
  }) => ({
68
148
  url: `payment/v2/${method}/transaction`,
69
149
  method: 'post',
@@ -72,26 +152,94 @@ export default {
72
152
  amount,
73
153
  applyerBankCode,
74
154
  applyerAccountNumber,
155
+ applyerIfscCode,
75
156
  applyerHolderName,
157
+ applyerBranch,
158
+ applyerBranchCode,
76
159
  targetBankCode,
77
160
  targetAccountNumber,
161
+ targetIfscCode,
162
+ targetUpi,
163
+ transactionId,
78
164
  depositTime,
79
165
  receipt,
166
+ promotionsNo,
80
167
  },
81
168
  }),
82
- submitDepositTransactionQrcode: ({ method, amount }) => ({
169
+ submitDepositTransaction: ({ method, amount, promotionsNo }) => ({
170
+ url: `payment/v2/${method}/transaction`,
171
+ method: 'post',
172
+ params: { transferType: 'DEPOSIT', amount, promotionsNo },
173
+ }),
174
+ submitWithdrawTransactionCrypto: ({ method, amount, cryptoCurrency, cryptoNetwork, targetAddress, applyerHolderName }) => ({
175
+ url: `payment/v2/${method}/transaction`,
176
+ method: 'post',
177
+ params: { transferType: 'WITHDRAW', amount, cryptoCurrency, cryptoNetwork, targetAddress, applyerHolderName },
178
+ }),
179
+ submitWithdrawTransactionVN: ({ method, amount, applyerBankCode, applyerAccountNumber, applyerIfscCode, branch, applyerHolderName }) => ({
83
180
  url: `payment/v2/${method}/transaction`,
84
181
  method: 'post',
85
- params: { transferType: 'DEPOSIT', amount },
182
+ params: {
183
+ transferType: 'WITHDRAW',
184
+ amount,
185
+ applyerBankCode,
186
+ applyerAccountNumber,
187
+ applyerIfscCode,
188
+ branch,
189
+ applyerHolderName,
190
+ },
86
191
  }),
87
- submitWithdrawTransaction: ({ method, amount, cryptoCurrency, cryptoNetwork, targetAddress }) => ({
192
+ submitWithdrawTransactionManual: ({
193
+ method,
194
+ amount,
195
+ applyerBankCode,
196
+ applyerAccountNumber,
197
+ applyerIfscCode,
198
+ branch,
199
+ holderName,
200
+ cryptoCurrency,
201
+ cryptoNetwork,
202
+ targetAddress,
203
+ }) => ({
88
204
  url: `payment/v2/${method}/transaction`,
89
205
  method: 'post',
90
- params: { transferType: 'WITHDRAW', amount, cryptoCurrency, cryptoNetwork, targetAddress },
206
+ params: {
207
+ transferType: 'WITHDRAW',
208
+ amount,
209
+ applyerBankCode,
210
+ applyerAccountNumber,
211
+ applyerIfscCode,
212
+ branch,
213
+ holderName,
214
+ cryptoCurrency,
215
+ cryptoNetwork,
216
+ targetAddress,
217
+ },
91
218
  }),
92
- submitWithdrawTransactionVN: ({ method, amount, applyerBankCode, applyerAccountNumber, branch, holderName }) => ({
219
+ submitWithdrawTransactionAmb: ({ method, amount }) => ({
93
220
  url: `payment/v2/${method}/transaction`,
94
221
  method: 'post',
95
- params: { transferType: 'WITHDRAW', amount, applyerBankCode, applyerAccountNumber, branch, holderName },
222
+ params: { transferType: 'WITHDRAW', amount },
223
+ }),
224
+ getPromotionsList: () => ({ url: `payment/v2/bankWallet/promotions`, method: 'get' }),
225
+ getWithdrawRulePreview: ({ applyType, applyNo, amount }) => ({
226
+ url: `payment/v2/bankWallet/promotion/preview`,
227
+ method: 'post',
228
+ params: { applyType, applyNo, amount },
229
+ }),
230
+ applyPromotions: ({ promotionsNo, amount }) => ({
231
+ url: `payment/v2/bankWallet/promotion/apply`,
232
+ method: 'post',
233
+ params: { promotionsNo, amount },
234
+ }),
235
+ giveUp: () => ({ url: 'payment/v2/bankWallet/promotion/giveUp', method: 'post' }),
236
+ restore: ({ amount }) => ({ url: 'payment/v2/bankWallet/restore', method: 'post', params: { amount } }),
237
+ getBonusPreview: ({ method, promotionsNo }) => ({
238
+ url: `payment/v2/${method}/bonus/preview`,
239
+ method: 'post',
240
+ params: { promotionsNo },
96
241
  }),
242
+ getPendingOrder: ({ transferType }) => ({ url: 'payment/v2/pendingOrder', method: 'post', params: { transferType } }),
243
+ withdrawCheck: () => ({ url: `payment/v2/withdrawCheck`, method: 'post' }),
244
+ updateUtr: ({ applyId, utr }) => ({ url: 'payment/v2/updateUtr', method: 'post', params: { applyId, utr } }),
97
245
  }
package/src/api/user.js CHANGED
@@ -14,6 +14,11 @@ export default {
14
14
  getAffiliateDashboard: () => ({ url: 'affiliate/dashboard', method: 'get' }),
15
15
  getAffiliateDashboardList: ({ level, page, row }) => ({ url: 'affiliate/dashboard/list', method: 'post', params: { level, page, row } }),
16
16
  postAffiliate: ({ affiliateCode }) => ({ url: 'affiliate', method: 'post', params: { affiliateCode } }),
17
+ getFriends: () => ({ url: 'friends', method: 'get' }),
18
+ getFriendsHome: () => ({ url: 'friends/home', method: 'get' }),
19
+ getFriendsDashboard: () => ({ url: 'friends/dashboard', method: 'get' }),
20
+ getFriendsDashboardList: ({ level, page, row }) => ({ url: 'friends/dashboard/list', method: 'post', params: { level, page, row } }),
21
+ postFriends: ({ friendCode }) => ({ url: 'friends', method: 'post', params: { friendCode } }),
17
22
  passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
18
23
  passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }),
19
24
  passwordAcknowledge: (acknowledgeData) => ({ url: 'recovery/acknowledge', method: 'post', params: acknowledgeData, isPublic: true }),
@@ -52,4 +57,6 @@ export default {
52
57
  isPublic: true,
53
58
  }),
54
59
  otpReset: ({ requestId, target }) => ({ url: '/otpsso/reset', method: 'post', params: { requestId, target }, isPublic: true }),
60
+ getUserPhotoList: () => ({ url: 'getAllAvatar', method: 'get' }),
61
+ updateUserPhoto: (data) => ({ url: 'updateUserAvatar', method: 'post', params: data }),
55
62
  }