@jetthai/cuora 1.0.302-sl-2 → 1.1.0
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.
- package/CHANGELOG.md +3 -848
- package/README.md +0 -6
- package/dist/bundle.mjs +18461 -0
- package/package.json +9 -6
- package/rollup.config.js +16 -0
- package/src/api/activity.js +2 -43
- package/src/api/auth.js +7 -22
- package/src/api/common.js +1 -3
- package/src/api/game.js +7 -20
- package/src/api/mailbox.js +5 -9
- package/src/api/payment.js +19 -167
- package/src/api/user.js +0 -7
- package/src/machine/activity/activity.js +26 -111
- package/src/machine/activity/{friend_invite_friends_activity.js → affiliate_invite_friends_activity.js} +41 -70
- package/src/machine/activity/continue_deposit_activity.js +2 -11
- package/src/machine/activity/deposit_activity.js +4 -13
- package/src/machine/activity/diamond_shop_activity_vn.js +89 -54
- package/src/machine/activity/fafafa_activity.js +19 -34
- package/src/machine/activity/index.js +4 -22
- package/src/machine/activity/invite_friends_activity.js +14 -14
- package/src/machine/activity/ranking_activity.js +2 -11
- package/src/machine/activity/sign_in_activity.js +14 -21
- package/src/machine/activity/specify_bets_activity.js +3 -25
- package/src/machine/activity/specify_turnover_activity.js +3 -25
- package/src/machine/activity/time_bomb_activity.js +2 -11
- package/src/machine/auth.js +21 -134
- package/src/machine/auth_otp.js +201 -0
- package/src/machine/auth_otp_v2.js +4 -10
- package/src/machine/auth_otp_v3.js +3 -11
- package/src/machine/bank_binding.js +12 -112
- package/src/machine/common.js +25 -113
- package/src/machine/deposit/crypto.js +29 -50
- package/src/machine/deposit/crypto_button.js +39 -174
- package/src/machine/deposit/deposit_fc.js +5 -8
- package/src/machine/deposit/direct.js +16 -111
- package/src/machine/deposit/index.js +2 -43
- package/src/machine/deposit/loadcard_vn.js +43 -191
- package/src/machine/deposit/manual_vn.js +60 -182
- package/src/machine/deposit/qrcode_v2.js +52 -285
- package/src/machine/deposit/qrcode_vn.js +206 -0
- package/src/machine/game.js +285 -0
- package/src/machine/game_favorite.js +123 -0
- package/src/machine/game_favorite_v2.js +28 -74
- package/src/machine/game_search.js +244 -0
- package/src/machine/game_search_v2.js +24 -64
- package/src/machine/game_v2.js +356 -0
- package/src/machine/inbox.js +34 -259
- package/src/machine/index.js +17 -24
- package/src/machine/leaderboard.js +8 -31
- package/src/machine/reward.js +7 -74
- package/src/machine/setting.js +2 -5
- package/src/machine/side_v2.js +28 -33
- package/src/machine/user_sign_up.js +17 -117
- package/src/machine/{withdraw/withdraw_crypto.js → withdraw_crypto.js} +69 -220
- package/src/machine/{withdraw/withdraw_fc.js → withdraw_fc.js} +2 -2
- package/src/machine/{withdraw/withdraw_amb.js → withdraw_vn.js} +78 -146
- package/src/request/request.js +5 -10
- package/src/util/constant.js +1 -19
- package/src/util/deviceToken.js +8 -18
- package/src/util/index.js +1 -2
- package/src/util/storage.js +22 -22
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -1
- package/src/lib/fingerprint.js +0 -9779
- package/src/machine/activity/activity_cash.js +0 -159
- package/src/machine/activity/cash_rain_activity.js +0 -153
- package/src/machine/activity/diamond_shop_activity_cash.js +0 -179
- package/src/machine/activity/instant_rebate_activity.js +0 -217
- package/src/machine/activity/jackpot.js +0 -74
- package/src/machine/activity/otp_verified_activity.js +0 -74
- package/src/machine/activity/roulette_activity_v2.js +0 -90
- package/src/machine/activity/sign_in_monthly_activity.js +0 -65
- package/src/machine/activity/vip_card_activity.js +0 -140
- package/src/machine/bank_binding_amb.js +0 -145
- package/src/machine/deposit/amb.js +0 -92
- package/src/machine/deposit/crypto_bank.js +0 -317
- package/src/machine/deposit/crypto_bank_cash.js +0 -287
- package/src/machine/deposit/crypto_cash.js +0 -255
- package/src/machine/deposit/crypto_qrcode.js +0 -148
- package/src/machine/deposit/crypto_qrcode_cash.js +0 -131
- package/src/machine/deposit/crypto_way.js +0 -239
- package/src/machine/deposit/crypto_way_cash.js +0 -256
- package/src/machine/deposit/direct_cash.js +0 -217
- package/src/machine/deposit/float.js +0 -366
- package/src/machine/deposit/krway.js +0 -151
- package/src/machine/deposit/loadcard_cash.js +0 -207
- package/src/machine/deposit/manual_cash.js +0 -356
- package/src/machine/deposit/qrcode_cash.js +0 -217
- package/src/machine/deposit/usdt.js +0 -144
- package/src/machine/deposit/usdt_cash.js +0 -138
- package/src/machine/deposit/vpay.js +0 -359
- package/src/machine/game_info.js +0 -57
- package/src/machine/game_search_cash.js +0 -390
- package/src/machine/game_v2_1.js +0 -662
- package/src/machine/honor_board_cash.js +0 -63
- package/src/machine/navbar.js +0 -57
- package/src/machine/promotions.js +0 -171
- package/src/machine/reward_cash.js +0 -219
- package/src/machine/roulette_v2.js +0 -276
- package/src/machine/side_cash.js +0 -110
- package/src/machine/user_photo.js +0 -65
- package/src/machine/withdraw/index.js +0 -23
- package/src/machine/withdraw/withdraw_crypto2.js +0 -540
- package/src/machine/withdraw/withdraw_crypto_cash.js +0 -319
- package/src/machine/withdraw/withdraw_krway.js +0 -207
- package/src/machine/withdraw/withdraw_manual.js +0 -595
- package/src/machine/withdraw/withdraw_manual_cash.js +0 -303
- package/src/machine/withdraw/withdraw_vn.js +0 -533
- package/src/machine/withdraw/withdraw_vn2.js +0 -548
- package/src/util/math.js +0 -4
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetthai/cuora",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"prepare": "husky install"
|
|
8
|
+
"build": "rollup --config rollup.config.js",
|
|
9
|
+
"release": "standard-version && git push --follow-tags origin master && npm publish"
|
|
11
10
|
},
|
|
12
11
|
"repository": {
|
|
13
12
|
"type": "git",
|
|
@@ -16,13 +15,17 @@
|
|
|
16
15
|
"author": "Neil",
|
|
17
16
|
"license": "ISC",
|
|
18
17
|
"devDependencies": {
|
|
19
|
-
"
|
|
18
|
+
"@rollup/plugin-commonjs": "^22.0.2",
|
|
19
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
20
|
+
"@rollup/plugin-replace": "^4.0.0",
|
|
20
21
|
"prettier": "^2.3.0",
|
|
22
|
+
"rollup": "^2.78.1",
|
|
21
23
|
"standard-version": "^9.3.1"
|
|
22
24
|
},
|
|
23
25
|
"dependencies": {
|
|
26
|
+
"@fingerprintjs/fingerprintjs-pro": "^3.8.0",
|
|
24
27
|
"lodash": "^4.17.21",
|
|
25
|
-
"ua-parser-js": "^0.7.
|
|
28
|
+
"ua-parser-js": "^0.7.28",
|
|
26
29
|
"universal-cookie": "^4.0.4",
|
|
27
30
|
"url-join": "^4.0.1",
|
|
28
31
|
"xstate": "^4.25.0"
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import replace from '@rollup/plugin-replace'
|
|
2
|
+
import common from '@rollup/plugin-commonjs'
|
|
3
|
+
import resolve from '@rollup/plugin-node-resolve'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
input: 'src/index.js',
|
|
7
|
+
output: {
|
|
8
|
+
file: 'dist/bundle.mjs',
|
|
9
|
+
format: 'es'
|
|
10
|
+
},
|
|
11
|
+
plugins: [
|
|
12
|
+
replace({'process.env.NODE_ENV': JSON.stringify('production')}),
|
|
13
|
+
common(),
|
|
14
|
+
resolve()
|
|
15
|
+
]
|
|
16
|
+
}
|
package/src/api/activity.js
CHANGED
|
@@ -4,30 +4,13 @@ export default {
|
|
|
4
4
|
url: 'activities/list',
|
|
5
5
|
method: 'get',
|
|
6
6
|
params: { appSecret, include },
|
|
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,
|
|
7
|
+
isPublic: true
|
|
20
8
|
}),
|
|
21
9
|
getActivityDetail: ({ activityNo, appSecret }) => ({
|
|
22
10
|
url: 'activities',
|
|
23
11
|
method: 'get',
|
|
24
12
|
params: { activityNo, appSecret },
|
|
25
13
|
}),
|
|
26
|
-
getActivityRanking: () => ({
|
|
27
|
-
url: 'activities/activity/ranking',
|
|
28
|
-
method: 'get',
|
|
29
|
-
isPublic: true,
|
|
30
|
-
}),
|
|
31
14
|
getAchievements: ({ limit, page, appSecret }) => ({
|
|
32
15
|
url: 'activities/achievements',
|
|
33
16
|
method: 'get',
|
|
@@ -63,32 +46,8 @@ export default {
|
|
|
63
46
|
method: 'get',
|
|
64
47
|
params: { rewardType },
|
|
65
48
|
}),
|
|
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 }),
|
|
49
|
+
getRewardList: ({ rewardType, count, appSecret }) => ({ url: 'activities/rewards', method: 'get', params: { rewardType, count, appSecret } }),
|
|
78
50
|
exchange: (data) => ({ url: 'activities/exchange', method: 'post', params: data }),
|
|
79
51
|
collect: (data) => ({ url: 'activities/collect', method: 'post', params: data }),
|
|
80
52
|
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' }),
|
|
94
53
|
}
|
package/src/api/auth.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import pickBy from 'lodash/pickBy'
|
|
2
1
|
export default {
|
|
3
2
|
guestLogin: () => ({
|
|
4
3
|
url: 'guestLogin',
|
|
@@ -31,21 +30,13 @@ export default {
|
|
|
31
30
|
},
|
|
32
31
|
isPublic: true,
|
|
33
32
|
}),
|
|
34
|
-
register: ({ channel, subchannel
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
url: `register?${qs}`,
|
|
43
|
-
method: 'post',
|
|
44
|
-
params: { dt, ...rest },
|
|
45
|
-
isPublic: true,
|
|
46
|
-
headers: { 'x-access-captcha': reCaptchaToken },
|
|
47
|
-
}
|
|
48
|
-
},
|
|
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
|
+
}),
|
|
49
40
|
logout: () => ({ url: 'logout', method: 'post' }),
|
|
50
41
|
// bindGet for 'google' | 'zalo' | 'facebook'
|
|
51
42
|
bindGet: ({ x, provider, redirectURI }) => ({ url: 'bind', method: 'get', params: { x, provider, redirectURI } }),
|
|
@@ -54,10 +45,4 @@ export default {
|
|
|
54
45
|
method: 'post',
|
|
55
46
|
params: { provider, countryCode, phone, email },
|
|
56
47
|
}),
|
|
57
|
-
checkAccount: ({ account, nick_name, strategy }) => ({
|
|
58
|
-
url: 'checkAccount',
|
|
59
|
-
method: 'post',
|
|
60
|
-
params: { account, nick_name, strategy },
|
|
61
|
-
isPublic: true,
|
|
62
|
-
}),
|
|
63
48
|
}
|
package/src/api/common.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
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 }),
|
|
4
3
|
feeds: ({ appSecret }) => ({ url: 'feeds', method: 'get', params: { appSecret }, isPublic: true }),
|
|
5
4
|
broadcast: () => ({ url: 'broadcast', method: 'get', isPublic: true }),
|
|
6
|
-
getAnnouncements: (
|
|
7
|
-
getNavbar: ({ appSecret } = {}) => ({ url: 'getNavbarSetting', params: { appSecret }, method: 'get', isPublic: true }),
|
|
5
|
+
getAnnouncements: () => ({ url: 'getAnnouncements', method: 'get', isPublic: true }),
|
|
8
6
|
}
|
package/src/api/game.js
CHANGED
|
@@ -9,26 +9,14 @@ 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
|
|
12
|
+
getGameTags: ({ q }) => ({ url: 'game/search', method: 'get', params: { q } }),
|
|
13
13
|
getGameSearchHome: () => ({ url: 'game/search/home', method: 'get' }),
|
|
14
|
-
getGameSearchList: ({ id, index, q, click, clickDefault
|
|
14
|
+
getGameSearchList: ({ id, index, q, click, clickDefault }) => ({
|
|
15
15
|
url: 'game/search/list',
|
|
16
16
|
method: 'get',
|
|
17
|
-
params: { id, index, q, click, clickDefault
|
|
17
|
+
params: { id, index, q, click, clickDefault },
|
|
18
18
|
}),
|
|
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
|
-
}) => ({
|
|
19
|
+
setGameSearchTrace: ({ traceId, tagId, tagIndex, gameCode, gameCodeIndex, query, click, clickDefault, isYouMayLike, isRecentlyGame, isRecentlySearch }) => ({
|
|
32
20
|
url: 'game/search/trace',
|
|
33
21
|
method: 'post',
|
|
34
22
|
params: {
|
|
@@ -42,13 +30,13 @@ export default {
|
|
|
42
30
|
clickDefault,
|
|
43
31
|
isYouMayLike,
|
|
44
32
|
isRecentlyGame,
|
|
45
|
-
isRecentlySearch
|
|
33
|
+
isRecentlySearch
|
|
46
34
|
},
|
|
47
35
|
}),
|
|
48
|
-
gameHistory: ({ requestTimestamp, lang, provider, type
|
|
36
|
+
gameHistory: ({ requestTimestamp, lang, provider, type }) => ({
|
|
49
37
|
url: 'game/history',
|
|
50
38
|
method: 'post',
|
|
51
|
-
params: { requestTimestamp, lang, provider, type
|
|
39
|
+
params: { requestTimestamp, lang, provider, type },
|
|
52
40
|
}),
|
|
53
41
|
gameHistoryDetail: ({ requestTimestamp, provider, gameId, lang, page, row }) => ({
|
|
54
42
|
url: 'game/history/detail',
|
|
@@ -91,5 +79,4 @@ export default {
|
|
|
91
79
|
}),
|
|
92
80
|
addListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/addMyFavorite', params: { games: [code] } }),
|
|
93
81
|
removeListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/removeMyFavorite', params: { games: [code] } }),
|
|
94
|
-
getGameInfo: ({ appSecret, gameCode }) => ({ method: 'get', url: 'game/info', params: { appSecret, gameCode } }),
|
|
95
82
|
}
|
package/src/api/mailbox.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
getMessageTypes: () => ({ url: 'mailbox/getMessageTypes', method: 'get' }),
|
|
3
|
-
getMessageList: ({ type, limit = 10, page
|
|
3
|
+
getMessageList: ({ type, limit = 10, page }) => ({
|
|
4
4
|
url: 'mailbox/getMessageList?include=cl',
|
|
5
5
|
method: 'post',
|
|
6
|
-
params: { type, limit, page
|
|
6
|
+
params: { type, limit, page },
|
|
7
7
|
}),
|
|
8
|
-
updateMessage: ({ groupId, isRead
|
|
8
|
+
updateMessage: ({ groupId, isRead }) => ({
|
|
9
9
|
url: 'mailbox/updateMessage',
|
|
10
10
|
method: 'post',
|
|
11
|
-
params: { groupId, isRead
|
|
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 },
|
|
11
|
+
params: { groupId, isRead },
|
|
17
12
|
}),
|
|
13
|
+
sendMessage: () => ({ url: 'mailbox/sendMessage', method: 'post' }),
|
|
18
14
|
getMessage: ({ groupId, limit = 10, pageIdx }) => ({
|
|
19
15
|
url: 'mailbox/getMessage',
|
|
20
16
|
method: 'post',
|
package/src/api/payment.js
CHANGED
|
@@ -1,61 +1,17 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
// getPaymentHistory: () => ({ url: 'payment/history', method: 'post' }),
|
|
2
3
|
getPaymentHistory: (returnDays) => ({ url: 'payment/v2/history', method: 'post', params: { returnDays } }),
|
|
3
4
|
getSpotMarket: () => ({ url: 'payment/spotmarket', method: 'get' }),
|
|
4
|
-
getTransactionHistory: (payload) => ({
|
|
5
|
-
url: 'payment/v2/transactionHistory',
|
|
6
|
-
method: 'post',
|
|
7
|
-
params: { ...payload },
|
|
8
|
-
}),
|
|
5
|
+
getTransactionHistory: (payload) => ({ url: 'payment/v2/transactionHistory', method: 'post', params: { ...payload } }),
|
|
9
6
|
getTransactionHistoryOptions: () => ({ url: 'payment/v2/category/options', method: 'get' }),
|
|
7
|
+
// getPaymentInfo: () => ({ url: `payment/paymentInfo`, method: 'get' }),
|
|
10
8
|
getPaymentInfo: () => ({ url: `payment/v2/paymentInfo`, method: 'get' }),
|
|
11
|
-
|
|
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
|
-
}) => ({
|
|
9
|
+
updatePaymentInfo: ({ bankCode, branch, holderName, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider }) => ({
|
|
32
10
|
url: 'payment/v2/updatePaymentInfo',
|
|
33
11
|
method: 'post',
|
|
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
|
-
},
|
|
12
|
+
params: { bankCode, branch, holderName, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider },
|
|
54
13
|
}),
|
|
55
14
|
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' }),
|
|
59
15
|
makeTransaction: ({ type, payload, paymentMethod }) => ({
|
|
60
16
|
url: `payment/v2/${paymentMethod}/transaction`,
|
|
61
17
|
method: 'post',
|
|
@@ -67,83 +23,47 @@ export default {
|
|
|
67
23
|
checkTransaction: (paymentMethod) => ({ url: `payment/${paymentMethod}/checkTransaction`, method: 'post' }),
|
|
68
24
|
setBonusSetting: ({ bonus }) => ({ url: 'payment/v2/setting', method: 'post', params: { bonus } }),
|
|
69
25
|
getCurrentWithdrawRule: () => ({ url: 'payment/v2/getCurrentWithdrawRule', method: 'get' }),
|
|
70
|
-
getDoubleWalletWithdrawRule: ({ walletType }) => ({
|
|
71
|
-
url: 'payment/v2/withdrawRule',
|
|
72
|
-
method: 'post',
|
|
73
|
-
params: { walletType },
|
|
74
|
-
}),
|
|
75
26
|
convertFreeCredit: ({ exchangeType, cryptoNetwork, targetAddress }) => ({
|
|
76
27
|
url: 'payment/v2/convertFreeCredit',
|
|
77
28
|
method: 'post',
|
|
78
29
|
params: { exchangeType, cryptoNetwork, targetAddress },
|
|
79
30
|
}),
|
|
80
31
|
mergeWallet: () => ({ url: 'payment/mergeWallet', method: 'post' }),
|
|
81
|
-
getPaymentDetail: ({ transferType }
|
|
32
|
+
getPaymentDetail: ({ transferType }) => ({
|
|
82
33
|
url: 'payment/v2/paymentDetail',
|
|
83
34
|
method: 'post',
|
|
84
35
|
params: { transferType },
|
|
85
36
|
}),
|
|
86
|
-
getDepositExpectedResult: ({ method, amount, cryptoCurrency
|
|
37
|
+
getDepositExpectedResult: ({ method, amount, cryptoCurrency }) => ({
|
|
87
38
|
url: `payment/v2/${method}/expected/result`,
|
|
88
39
|
method: 'post',
|
|
89
|
-
params: { transferType: 'DEPOSIT', amount, cryptoCurrency
|
|
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 },
|
|
40
|
+
params: { transferType: 'DEPOSIT', amount, cryptoCurrency },
|
|
100
41
|
}),
|
|
101
42
|
getWithdrawExpectedResult: ({ method, amount, cryptoNetwork }) => ({
|
|
102
43
|
url: `payment/v2/${method}/expected/result`,
|
|
103
44
|
method: 'post',
|
|
104
45
|
params: { transferType: 'WITHDRAW', amount, cryptoNetwork },
|
|
105
46
|
}),
|
|
106
|
-
|
|
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 }) => ({
|
|
47
|
+
submitDepositTransaction: ({ method, amount, cryptoCurrency, cryptoNetwork, sourceAddress }) => ({
|
|
112
48
|
url: `payment/v2/${method}/transaction`,
|
|
113
49
|
method: 'post',
|
|
114
|
-
params: {
|
|
115
|
-
transferType: 'DEPOSIT',
|
|
116
|
-
amount,
|
|
117
|
-
cryptoCurrency,
|
|
118
|
-
cryptoNetwork,
|
|
119
|
-
sourceAddress,
|
|
120
|
-
promotionsNo,
|
|
121
|
-
depositTime,
|
|
122
|
-
receipt,
|
|
123
|
-
},
|
|
50
|
+
params: { transferType: 'DEPOSIT', amount, cryptoCurrency, cryptoNetwork, sourceAddress },
|
|
124
51
|
}),
|
|
125
|
-
submitDepositTransactionLoadcard: ({ method, amount, card_type, card_code, card_seri
|
|
52
|
+
submitDepositTransactionLoadcard: ({ method, amount, card_type, card_code, card_seri }) => ({
|
|
126
53
|
url: `payment/v2/${method}/transaction`,
|
|
127
54
|
method: 'post',
|
|
128
|
-
params: { transferType: 'DEPOSIT', amount, card_type, card_code, card_seri
|
|
55
|
+
params: { transferType: 'DEPOSIT', amount, card_type, card_code, card_seri },
|
|
129
56
|
}),
|
|
130
57
|
submitDepositTransactionBank: ({
|
|
131
58
|
method,
|
|
132
59
|
amount,
|
|
133
60
|
applyerBankCode,
|
|
134
61
|
applyerAccountNumber,
|
|
135
|
-
applyerIfscCode,
|
|
136
62
|
applyerHolderName,
|
|
137
|
-
applyerBranch,
|
|
138
|
-
applyerBranchCode,
|
|
139
63
|
targetBankCode,
|
|
140
64
|
targetAccountNumber,
|
|
141
|
-
|
|
142
|
-
targetUpi,
|
|
143
|
-
transactionId,
|
|
144
|
-
depositTime,
|
|
65
|
+
depositTime = '1234567890',
|
|
145
66
|
receipt,
|
|
146
|
-
promotionsNo,
|
|
147
67
|
}) => ({
|
|
148
68
|
url: `payment/v2/${method}/transaction`,
|
|
149
69
|
method: 'post',
|
|
@@ -152,94 +72,26 @@ export default {
|
|
|
152
72
|
amount,
|
|
153
73
|
applyerBankCode,
|
|
154
74
|
applyerAccountNumber,
|
|
155
|
-
applyerIfscCode,
|
|
156
75
|
applyerHolderName,
|
|
157
|
-
applyerBranch,
|
|
158
|
-
applyerBranchCode,
|
|
159
76
|
targetBankCode,
|
|
160
77
|
targetAccountNumber,
|
|
161
|
-
targetIfscCode,
|
|
162
|
-
targetUpi,
|
|
163
|
-
transactionId,
|
|
164
78
|
depositTime,
|
|
165
79
|
receipt,
|
|
166
|
-
promotionsNo,
|
|
167
80
|
},
|
|
168
81
|
}),
|
|
169
|
-
|
|
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 }) => ({
|
|
82
|
+
submitDepositTransactionQrcode: ({ method, amount }) => ({
|
|
180
83
|
url: `payment/v2/${method}/transaction`,
|
|
181
84
|
method: 'post',
|
|
182
|
-
params: {
|
|
183
|
-
transferType: 'WITHDRAW',
|
|
184
|
-
amount,
|
|
185
|
-
applyerBankCode,
|
|
186
|
-
applyerAccountNumber,
|
|
187
|
-
applyerIfscCode,
|
|
188
|
-
branch,
|
|
189
|
-
applyerHolderName,
|
|
190
|
-
},
|
|
85
|
+
params: { transferType: 'DEPOSIT', amount },
|
|
191
86
|
}),
|
|
192
|
-
|
|
193
|
-
method,
|
|
194
|
-
amount,
|
|
195
|
-
applyerBankCode,
|
|
196
|
-
applyerAccountNumber,
|
|
197
|
-
applyerIfscCode,
|
|
198
|
-
branch,
|
|
199
|
-
holderName,
|
|
200
|
-
cryptoCurrency,
|
|
201
|
-
cryptoNetwork,
|
|
202
|
-
targetAddress,
|
|
203
|
-
}) => ({
|
|
87
|
+
submitWithdrawTransaction: ({ method, amount, cryptoCurrency, cryptoNetwork, targetAddress }) => ({
|
|
204
88
|
url: `payment/v2/${method}/transaction`,
|
|
205
89
|
method: 'post',
|
|
206
|
-
params: {
|
|
207
|
-
transferType: 'WITHDRAW',
|
|
208
|
-
amount,
|
|
209
|
-
applyerBankCode,
|
|
210
|
-
applyerAccountNumber,
|
|
211
|
-
applyerIfscCode,
|
|
212
|
-
branch,
|
|
213
|
-
holderName,
|
|
214
|
-
cryptoCurrency,
|
|
215
|
-
cryptoNetwork,
|
|
216
|
-
targetAddress,
|
|
217
|
-
},
|
|
90
|
+
params: { transferType: 'WITHDRAW', amount, cryptoCurrency, cryptoNetwork, targetAddress },
|
|
218
91
|
}),
|
|
219
|
-
|
|
92
|
+
submitWithdrawTransactionVN: ({ method, amount, applyerBankCode, applyerAccountNumber, branch, holderName }) => ({
|
|
220
93
|
url: `payment/v2/${method}/transaction`,
|
|
221
94
|
method: 'post',
|
|
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 },
|
|
95
|
+
params: { transferType: 'WITHDRAW', amount, applyerBankCode, applyerAccountNumber, branch, holderName },
|
|
241
96
|
}),
|
|
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 } }),
|
|
245
97
|
}
|
package/src/api/user.js
CHANGED
|
@@ -14,11 +14,6 @@ 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 } }),
|
|
22
17
|
passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
|
|
23
18
|
passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }),
|
|
24
19
|
passwordAcknowledge: (acknowledgeData) => ({ url: 'recovery/acknowledge', method: 'post', params: acknowledgeData, isPublic: true }),
|
|
@@ -57,6 +52,4 @@ export default {
|
|
|
57
52
|
isPublic: true,
|
|
58
53
|
}),
|
|
59
54
|
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 }),
|
|
62
55
|
}
|