@jetthai/cuora 1.0.65 → 1.0.66-sabai-2
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/.husky/pre-commit +4 -0
- package/.prettierignore +1 -0
- package/CHANGELOG.md +642 -0
- package/README.md +6 -0
- package/dist/bundle.mjs +27623 -0
- package/package.json +13 -11
- package/rollup.config.js +12 -0
- package/src/api/activity.js +10 -3
- package/src/api/auth.js +47 -5
- package/src/api/game.js +64 -2
- package/src/api/index.js +9 -9
- package/src/api/payment.js +91 -7
- package/src/api/user.js +18 -0
- package/src/index.js +7 -5
- package/src/lib/fingerprint.js +5779 -0
- package/src/machine/activity/activity.js +97 -10
- package/src/machine/activity/affiliate_invite_friends_activity.js +216 -0
- package/src/machine/activity/continue_deposit_activity.js +1 -1
- package/src/machine/activity/deposit_activity.js +1 -1
- package/src/machine/activity/{diamond_shop_activity.js → diamond_shop_activity_fc.js} +33 -5
- package/src/machine/activity/{diamond_shop_activity_single_exchange.js → diamond_shop_activity_vn.js} +66 -21
- package/src/machine/activity/fafafa_activity.js +4 -2
- package/src/machine/activity/index.js +24 -10
- package/src/machine/activity/invite_friends_activity.js +3 -8
- package/src/machine/activity/mini_game_activity.js +68 -0
- package/src/machine/activity/ranking_activity.js +40 -46
- package/src/machine/activity/return_bonus_activity.js +5 -3
- package/src/machine/activity/roulette_activity_v2.js +81 -0
- package/src/machine/activity/sign_in_activity.js +149 -0
- package/src/machine/activity/specify_bets_activity.js +1 -1
- package/src/machine/activity/specify_turnover_activity.js +113 -0
- package/src/machine/activity/time_bomb_activity.js +80 -0
- package/src/machine/auth.js +234 -79
- package/src/machine/auth_otp_v2.js +177 -0
- package/src/machine/{auth_otp.js → auth_otp_v3.js} +80 -17
- package/src/machine/bank_binding.js +120 -0
- package/src/machine/bank_binding_amb.js +140 -0
- package/src/machine/bonus.js +75 -0
- package/src/machine/common.js +80 -17
- package/src/machine/deposit/amb.js +90 -0
- package/src/machine/deposit/crypto.js +267 -0
- package/src/machine/deposit/crypto_button.js +449 -0
- package/src/machine/{deposit.js → deposit/deposit_fc.js} +27 -15
- package/src/machine/deposit/direct.js +246 -0
- package/src/machine/deposit/float.js +295 -0
- package/src/machine/deposit/index.js +25 -0
- package/src/machine/deposit/loadcard_vn.js +390 -0
- package/src/machine/deposit/manual_vn.js +382 -0
- package/src/machine/deposit/qrcode_v2.js +451 -0
- package/src/machine/deposit/usdt.js +144 -0
- package/src/machine/deposit/vpay.js +292 -0
- package/src/machine/error.js +1 -1
- package/src/machine/game.js +17 -10
- package/src/machine/game_favorite.js +2 -2
- package/src/machine/game_favorite_v2.js +119 -0
- package/src/machine/game_hot_new.js +1 -1
- package/src/machine/game_search.js +3 -7
- package/src/machine/game_search_v2.js +379 -0
- package/src/machine/game_v2.js +381 -0
- package/src/machine/game_v2_1.js +442 -0
- package/src/machine/inbox.js +5 -6
- package/src/machine/index.js +58 -23
- package/src/machine/leaderboard.js +108 -0
- package/src/machine/merge.js +2 -2
- package/src/machine/payment_data.js +6 -5
- package/src/machine/promotions.js +170 -0
- package/src/machine/reward.js +84 -3
- package/src/machine/reward_fc.js +97 -0
- package/src/machine/roulette_v2.js +271 -0
- package/src/machine/setting.js +5 -2
- package/src/machine/side.js +34 -27
- package/src/machine/side_v2.js +200 -0
- package/src/machine/user_info.js +1 -1
- package/src/machine/user_reset_password.js +2 -2
- package/src/machine/user_sign_up.js +111 -56
- package/src/machine/vip_table.js +50 -0
- package/src/machine/welcome.js +6 -8
- package/src/machine/withdraw_amb.js +373 -0
- package/src/machine/withdraw_crypto.js +560 -0
- package/src/machine/withdraw_fc.js +251 -0
- package/src/machine/withdraw_vn.js +495 -0
- package/src/request/config.js +7 -1
- package/src/request/request.js +11 -15
- package/src/util/constant.js +2 -0
- package/src/util/deviceToken.js +33 -0
- package/src/util/index.js +6 -0
- package/src/util/storage.js +28 -0
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -30
- package/src/machine/withdraw.js +0 -380
- package/src/request/cookie.js +0 -52
- package/webpack.config.js +0 -33
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetthai/cuora",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66-sabai-2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"build": "
|
|
8
|
-
"release": "standard-version && git push --follow-tags origin master && npm publish"
|
|
8
|
+
"build": "rollup --config rollup.config.js",
|
|
9
|
+
"release": "standard-version && git push --follow-tags origin master && npm publish",
|
|
10
|
+
"format": "prettier --write .",
|
|
11
|
+
"prepare": "husky install"
|
|
9
12
|
},
|
|
10
13
|
"repository": {
|
|
11
14
|
"type": "git",
|
|
@@ -14,18 +17,17 @@
|
|
|
14
17
|
"author": "Neil",
|
|
15
18
|
"license": "ISC",
|
|
16
19
|
"devDependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"@
|
|
19
|
-
"
|
|
20
|
+
"@rollup/plugin-commonjs": "^22.0.2",
|
|
21
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
22
|
+
"@rollup/plugin-replace": "^4.0.0",
|
|
23
|
+
"husky": "^8.0.0",
|
|
20
24
|
"prettier": "^2.3.0",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"webpack-cli": "^4.9.0"
|
|
25
|
+
"rollup": "^2.79.1",
|
|
26
|
+
"standard-version": "^9.3.1"
|
|
24
27
|
},
|
|
25
28
|
"dependencies": {
|
|
26
29
|
"lodash": "^4.17.21",
|
|
27
|
-
"
|
|
28
|
-
"ua-parser-js": "^0.7.28",
|
|
30
|
+
"ua-parser-js": "^0.7.34",
|
|
29
31
|
"universal-cookie": "^4.0.4",
|
|
30
32
|
"url-join": "^4.0.1",
|
|
31
33
|
"xstate": "^4.25.0"
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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: [replace({ 'process.env.NODE_ENV': JSON.stringify('production') }), common(), resolve()],
|
|
12
|
+
}
|
package/src/api/activity.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
getActivityTypes: ({ appSecret }) => ({ url: 'activities/types', method: 'get', params: { appSecret } }),
|
|
3
|
-
getActivityList: ({ appSecret, include }) => ({
|
|
3
|
+
getActivityList: ({ appSecret, include = 'cl' }) => ({
|
|
4
4
|
url: 'activities/list',
|
|
5
5
|
method: 'get',
|
|
6
6
|
params: { appSecret, include },
|
|
7
|
+
isPublic: true,
|
|
7
8
|
}),
|
|
8
9
|
getActivityDetail: ({ activityNo, appSecret }) => ({
|
|
9
10
|
url: 'activities',
|
|
@@ -40,7 +41,13 @@ export default {
|
|
|
40
41
|
method: 'post',
|
|
41
42
|
params: { activityNo, receiveNo, appSecret, attended },
|
|
42
43
|
}),
|
|
43
|
-
|
|
44
|
+
getTotalReward: ({ rewardType }) => ({
|
|
45
|
+
url: 'activities/rewardAmount',
|
|
46
|
+
method: 'get',
|
|
47
|
+
params: { rewardType },
|
|
48
|
+
}),
|
|
49
|
+
getRewardList: ({ rewardType, count, appSecret }) => ({ url: 'activities/rewards', method: 'get', params: { rewardType, count, appSecret } }),
|
|
44
50
|
exchange: (data) => ({ url: 'activities/exchange', method: 'post', params: data }),
|
|
45
|
-
collect: (
|
|
51
|
+
collect: (data) => ({ url: 'activities/collect', method: 'post', params: data }),
|
|
52
|
+
getVipTable: () => ({ url: 'activities/viptable', method: 'get' }),
|
|
46
53
|
}
|
package/src/api/auth.js
CHANGED
|
@@ -1,15 +1,57 @@
|
|
|
1
|
+
import pickBy from 'lodash/pickBy'
|
|
1
2
|
export default {
|
|
2
|
-
|
|
3
|
+
guestLogin: () => ({
|
|
4
|
+
url: 'guestLogin',
|
|
5
|
+
method: 'post',
|
|
6
|
+
isPublic: true,
|
|
7
|
+
}),
|
|
8
|
+
login: ({ username, password, provider, countryCode, phone, email, dt, reCaptchaToken }) => ({
|
|
3
9
|
url: 'login',
|
|
4
10
|
method: 'post',
|
|
5
|
-
params: { username, password, provider, countryCode, phone, email },
|
|
11
|
+
params: { username, password, provider, countryCode, phone, email, dt },
|
|
6
12
|
isPublic: true,
|
|
13
|
+
headers: { 'x-access-captcha': reCaptchaToken },
|
|
7
14
|
}),
|
|
8
|
-
|
|
9
|
-
url:
|
|
15
|
+
loginApp: ({ provider, accessToken, channel, subchannel, dt, from, id, name, picture }) => ({
|
|
16
|
+
url: 'appLogin',
|
|
10
17
|
method: 'post',
|
|
11
|
-
params:
|
|
18
|
+
params: {
|
|
19
|
+
provider,
|
|
20
|
+
data: {
|
|
21
|
+
accessToken,
|
|
22
|
+
channel,
|
|
23
|
+
subchannel,
|
|
24
|
+
dt,
|
|
25
|
+
from,
|
|
26
|
+
id,
|
|
27
|
+
name,
|
|
28
|
+
picture,
|
|
29
|
+
provider,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
12
32
|
isPublic: true,
|
|
13
33
|
}),
|
|
34
|
+
register: ({ channel, subchannel, referralCode, affiliate = null, reCaptchaToken, dt, ...rest }) => {
|
|
35
|
+
const params = pickBy({ channel, subchannel, referralCode, affiliate }, (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
|
+
},
|
|
14
49
|
logout: () => ({ url: 'logout', method: 'post' }),
|
|
50
|
+
// bindGet for 'google' | 'zalo' | 'facebook'
|
|
51
|
+
bindGet: ({ x, provider, redirectURI }) => ({ url: 'bind', method: 'get', params: { x, provider, redirectURI } }),
|
|
52
|
+
bindPost: ({ provider, countryCode, phone, email }) => ({
|
|
53
|
+
url: 'bind',
|
|
54
|
+
method: 'post',
|
|
55
|
+
params: { provider, countryCode, phone, email },
|
|
56
|
+
}),
|
|
15
57
|
}
|
package/src/api/game.js
CHANGED
|
@@ -2,7 +2,7 @@ export default {
|
|
|
2
2
|
getGameSHA: () => ({ method: 'get', url: 'game/list/v2/sha' }),
|
|
3
3
|
getOptionMap: (code) => ({ method: 'get', url: 'game/list/v2/options', params: { code } }),
|
|
4
4
|
getGameStatus: () => ({ method: 'get', url: 'game/list/v2/status' }),
|
|
5
|
-
getGameCategory: ({ id, first }) => ({ method: 'get', url: 'game/list/v2/category', params: { id, first } }),
|
|
5
|
+
getGameCategory: ({ id, first } = {}) => ({ method: 'get', url: 'game/list/v2/category', params: { id, first } }),
|
|
6
6
|
addFavoriteGame: (code) => ({ method: 'post', url: 'game/myfavorite/add', params: { games: [code] } }),
|
|
7
7
|
removeFavoriteGame: (code) => ({ method: 'post', url: 'game/myfavorite/remove', params: { games: [code] } }),
|
|
8
8
|
getStatements: () => ({ url: 'game/statements', method: 'get' }),
|
|
@@ -10,12 +10,25 @@ export default {
|
|
|
10
10
|
logoutGame: ({ uid_site, provider_id }) => ({ url: 'game/logout', method: 'get', params: { uid_site, provider_id } }),
|
|
11
11
|
|
|
12
12
|
getGameTags: ({ q }) => ({ url: 'game/search', method: 'get', params: { q } }),
|
|
13
|
+
getGameSearchHome: () => ({ url: 'game/search/home', method: 'get' }),
|
|
13
14
|
getGameSearchList: ({ id, index, q, click, clickDefault }) => ({
|
|
14
15
|
url: 'game/search/list',
|
|
15
16
|
method: 'get',
|
|
16
17
|
params: { id, index, q, click, clickDefault },
|
|
17
18
|
}),
|
|
18
|
-
setGameSearchTrace: ({
|
|
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
32
|
url: 'game/search/trace',
|
|
20
33
|
method: 'post',
|
|
21
34
|
params: {
|
|
@@ -27,6 +40,55 @@ export default {
|
|
|
27
40
|
query,
|
|
28
41
|
click,
|
|
29
42
|
clickDefault,
|
|
43
|
+
isYouMayLike,
|
|
44
|
+
isRecentlyGame,
|
|
45
|
+
isRecentlySearch,
|
|
30
46
|
},
|
|
31
47
|
}),
|
|
48
|
+
gameHistory: ({ requestTimestamp, lang, provider, type }) => ({
|
|
49
|
+
url: 'game/history',
|
|
50
|
+
method: 'post',
|
|
51
|
+
params: { requestTimestamp, lang, provider, type },
|
|
52
|
+
}),
|
|
53
|
+
gameHistoryDetail: ({ requestTimestamp, provider, gameId, lang, page, row }) => ({
|
|
54
|
+
url: 'game/history/detail',
|
|
55
|
+
method: 'post',
|
|
56
|
+
params: { requestTimestamp, provider, gameId, lang, page, row },
|
|
57
|
+
}),
|
|
58
|
+
gameHistoryOptions: () => ({
|
|
59
|
+
url: 'game/history/options',
|
|
60
|
+
method: 'get',
|
|
61
|
+
}),
|
|
62
|
+
getListRoot: ({ timestamp } = {}) => ({
|
|
63
|
+
url: 'game/list/v3/root',
|
|
64
|
+
method: 'get',
|
|
65
|
+
params: { timestamp },
|
|
66
|
+
}),
|
|
67
|
+
getListCategory: ({ categoryId, timestamp, index }) => ({
|
|
68
|
+
url: 'game/list/v3/category',
|
|
69
|
+
method: 'get',
|
|
70
|
+
params: { categoryId, timestamp, index },
|
|
71
|
+
}),
|
|
72
|
+
getListAddition: ({ categoryId, timestamp, index }) => ({
|
|
73
|
+
url: 'game/list/v3/addition',
|
|
74
|
+
method: 'get',
|
|
75
|
+
params: { categoryId, timestamp, index },
|
|
76
|
+
}),
|
|
77
|
+
getListCategoryByRange: ({ categoryId, timestamp, end }) => ({
|
|
78
|
+
url: 'game/list/v3/categoryByRange',
|
|
79
|
+
method: 'get',
|
|
80
|
+
params: { categoryId, timestamp, end },
|
|
81
|
+
}),
|
|
82
|
+
getListAdditionByRange: ({ categoryId, timestamp, end }) => ({
|
|
83
|
+
url: 'game/list/v3/additionByRange',
|
|
84
|
+
method: 'get',
|
|
85
|
+
params: { categoryId, timestamp, end },
|
|
86
|
+
}),
|
|
87
|
+
getListMyFavorite: ({ timestamp } = {}) => ({
|
|
88
|
+
url: 'game/list/v3/myFavorite',
|
|
89
|
+
method: 'get',
|
|
90
|
+
params: { timestamp },
|
|
91
|
+
}),
|
|
92
|
+
addListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/addMyFavorite', params: { games: [code] } }),
|
|
93
|
+
removeListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/removeMyFavorite', params: { games: [code] } }),
|
|
32
94
|
}
|
package/src/api/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import activity from './activity'
|
|
2
|
-
import auth from './auth'
|
|
3
|
-
import
|
|
4
|
-
import game from './game'
|
|
5
|
-
import mailbox from './mailbox'
|
|
6
|
-
import payment from './payment'
|
|
7
|
-
import user from './user'
|
|
8
|
-
import form from './form'
|
|
1
|
+
import activity from './activity.js'
|
|
2
|
+
import auth from './auth.js'
|
|
3
|
+
import common from './common.js'
|
|
4
|
+
import game from './game.js'
|
|
5
|
+
import mailbox from './mailbox.js'
|
|
6
|
+
import payment from './payment.js'
|
|
7
|
+
import user from './user.js'
|
|
8
|
+
import form from './form.js'
|
|
9
9
|
|
|
10
|
-
export default { activity, auth,
|
|
10
|
+
export default { activity, auth, common, game, mailbox, payment, user, form }
|
package/src/api/payment.js
CHANGED
|
@@ -2,12 +2,29 @@ export default {
|
|
|
2
2
|
// getPaymentHistory: () => ({ url: 'payment/history', method: 'post' }),
|
|
3
3
|
getPaymentHistory: (returnDays) => ({ url: 'payment/v2/history', method: 'post', params: { returnDays } }),
|
|
4
4
|
getSpotMarket: () => ({ url: 'payment/spotmarket', method: 'get' }),
|
|
5
|
+
getTransactionHistory: (payload) => ({
|
|
6
|
+
url: 'payment/v2/transactionHistory',
|
|
7
|
+
method: 'post',
|
|
8
|
+
params: { ...payload },
|
|
9
|
+
}),
|
|
10
|
+
getTransactionHistoryOptions: () => ({ url: 'payment/v2/category/options', method: 'get' }),
|
|
5
11
|
// getPaymentInfo: () => ({ url: `payment/paymentInfo`, method: 'get' }),
|
|
6
12
|
getPaymentInfo: () => ({ url: `payment/v2/paymentInfo`, method: 'get' }),
|
|
7
|
-
updatePaymentInfo: ({ bankCode, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider }) => ({
|
|
13
|
+
updatePaymentInfo: ({ bankCode, branch, holderName, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider }) => ({
|
|
8
14
|
url: 'payment/v2/updatePaymentInfo',
|
|
9
15
|
method: 'post',
|
|
10
|
-
params: {
|
|
16
|
+
params: {
|
|
17
|
+
bankCode,
|
|
18
|
+
branch,
|
|
19
|
+
holderName,
|
|
20
|
+
bankAccount,
|
|
21
|
+
firstNameTh,
|
|
22
|
+
lastNameTh,
|
|
23
|
+
firstNameEn,
|
|
24
|
+
lastNameEn,
|
|
25
|
+
bonus,
|
|
26
|
+
paymentProvider,
|
|
27
|
+
},
|
|
11
28
|
}),
|
|
12
29
|
getBankList: (paymentMethod) => ({ url: `payment/v2/${paymentMethod}/getBankList`, method: 'get' }),
|
|
13
30
|
makeTransaction: ({ type, payload, paymentMethod }) => ({
|
|
@@ -32,24 +49,91 @@ export default {
|
|
|
32
49
|
method: 'post',
|
|
33
50
|
params: { transferType },
|
|
34
51
|
}),
|
|
35
|
-
getDepositExpectedResult: ({ method, amount, cryptoCurrency }) => ({
|
|
52
|
+
getDepositExpectedResult: ({ method, amount, cryptoCurrency, promotionsNo }) => ({
|
|
36
53
|
url: `payment/v2/${method}/expected/result`,
|
|
37
54
|
method: 'post',
|
|
38
|
-
params: { transferType: 'DEPOSIT', amount, cryptoCurrency },
|
|
55
|
+
params: { transferType: 'DEPOSIT', amount, cryptoCurrency, promotionsNo },
|
|
39
56
|
}),
|
|
40
57
|
getWithdrawExpectedResult: ({ method, amount, cryptoNetwork }) => ({
|
|
41
58
|
url: `payment/v2/${method}/expected/result`,
|
|
42
59
|
method: 'post',
|
|
43
60
|
params: { transferType: 'WITHDRAW', amount, cryptoNetwork },
|
|
44
61
|
}),
|
|
45
|
-
|
|
62
|
+
submitDepositTransactionCrypto: ({ method, amount, cryptoCurrency, cryptoNetwork, sourceAddress, promotionsNo }) => ({
|
|
63
|
+
url: `payment/v2/${method}/transaction`,
|
|
64
|
+
method: 'post',
|
|
65
|
+
params: { transferType: 'DEPOSIT', amount, cryptoCurrency, cryptoNetwork, sourceAddress, promotionsNo },
|
|
66
|
+
}),
|
|
67
|
+
submitDepositTransactionLoadcard: ({ method, amount, card_type, card_code, card_seri, promotionsNo }) => ({
|
|
46
68
|
url: `payment/v2/${method}/transaction`,
|
|
47
69
|
method: 'post',
|
|
48
|
-
params: { transferType: 'DEPOSIT', amount,
|
|
70
|
+
params: { transferType: 'DEPOSIT', amount, card_type, card_code, card_seri, promotionsNo },
|
|
49
71
|
}),
|
|
50
|
-
|
|
72
|
+
submitDepositTransactionBank: ({
|
|
73
|
+
method,
|
|
74
|
+
amount,
|
|
75
|
+
applyerBankCode,
|
|
76
|
+
applyerAccountNumber,
|
|
77
|
+
applyerHolderName,
|
|
78
|
+
targetBankCode,
|
|
79
|
+
targetAccountNumber,
|
|
80
|
+
depositTime = '1234567890',
|
|
81
|
+
receipt,
|
|
82
|
+
promotionsNo,
|
|
83
|
+
}) => ({
|
|
84
|
+
url: `payment/v2/${method}/transaction`,
|
|
85
|
+
method: 'post',
|
|
86
|
+
params: {
|
|
87
|
+
transferType: 'DEPOSIT',
|
|
88
|
+
amount,
|
|
89
|
+
applyerBankCode,
|
|
90
|
+
applyerAccountNumber,
|
|
91
|
+
applyerHolderName,
|
|
92
|
+
targetBankCode,
|
|
93
|
+
targetAccountNumber,
|
|
94
|
+
depositTime,
|
|
95
|
+
receipt,
|
|
96
|
+
promotionsNo,
|
|
97
|
+
},
|
|
98
|
+
}),
|
|
99
|
+
submitDepositTransaction: ({ method, amount, promotionsNo }) => ({
|
|
100
|
+
url: `payment/v2/${method}/transaction`,
|
|
101
|
+
method: 'post',
|
|
102
|
+
params: { transferType: 'DEPOSIT', amount, promotionsNo },
|
|
103
|
+
}),
|
|
104
|
+
submitWithdrawTransactionCrypto: ({ method, amount, cryptoCurrency, cryptoNetwork, targetAddress }) => ({
|
|
51
105
|
url: `payment/v2/${method}/transaction`,
|
|
52
106
|
method: 'post',
|
|
53
107
|
params: { transferType: 'WITHDRAW', amount, cryptoCurrency, cryptoNetwork, targetAddress },
|
|
54
108
|
}),
|
|
109
|
+
submitWithdrawTransactionVN: ({ method, amount, applyerBankCode, applyerAccountNumber, branch, holderName }) => ({
|
|
110
|
+
url: `payment/v2/${method}/transaction`,
|
|
111
|
+
method: 'post',
|
|
112
|
+
params: {
|
|
113
|
+
transferType: 'WITHDRAW',
|
|
114
|
+
amount,
|
|
115
|
+
applyerBankCode,
|
|
116
|
+
applyerAccountNumber,
|
|
117
|
+
branch,
|
|
118
|
+
holderName,
|
|
119
|
+
},
|
|
120
|
+
}),
|
|
121
|
+
submitWithdrawTransactionAmb: ({ method, amount }) => ({
|
|
122
|
+
url: `payment/v2/${method}/transaction`,
|
|
123
|
+
method: 'post',
|
|
124
|
+
params: { transferType: 'WITHDRAW', amount },
|
|
125
|
+
}),
|
|
126
|
+
getPromotionsList: () => ({ url: `payment/v2/bankWallet/promotions`, method: 'get' }),
|
|
127
|
+
getWithdrawRulePreview: ({ applyType, applyNo, amount }) => ({
|
|
128
|
+
url: `payment/v2/bankWallet/promotion/preview`,
|
|
129
|
+
method: 'post',
|
|
130
|
+
params: { applyType, applyNo, amount },
|
|
131
|
+
}),
|
|
132
|
+
applyPromotions: ({ promotionsNo, amount }) => ({
|
|
133
|
+
url: `payment/v2/bankWallet/promotion/apply`,
|
|
134
|
+
method: 'post',
|
|
135
|
+
params: { promotionsNo, amount },
|
|
136
|
+
}),
|
|
137
|
+
giveUp: () => ({ url: 'payment/v2/bankWallet/promotion/giveUp', method: 'post' }),
|
|
138
|
+
restore: ({ amount }) => ({ url: 'payment/v2/bankWallet/restore', method: 'post', params: { amount } }),
|
|
55
139
|
}
|
package/src/api/user.js
CHANGED
|
@@ -2,12 +2,17 @@ export const PASSWORD_RESET_INIT = 'otp-verifying'
|
|
|
2
2
|
export const PASSWORD_RESET_ALLOW = 'allow-change-password'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
+
checkDt: () => ({ url: 'checkDt', method: 'get' }),
|
|
6
|
+
updateDt: (data) => ({ url: 'updateDt', method: 'post', params: data }),
|
|
5
7
|
getUserInfo: () => ({ url: 'self', method: 'get' }),
|
|
6
8
|
updateUserInfo: (data) => ({ url: 'self', method: 'post', params: data }),
|
|
7
9
|
changePassword: (data) => ({ url: 'settings/password', method: 'post', params: data }),
|
|
8
10
|
setPreference: ({ defaultCategory }) => ({ url: 'settings/preference', method: 'post', params: { defaultCategory } }),
|
|
9
11
|
resetOtp: ({ requestId, number }) => ({ url: 'reset', method: 'post', params: { requestId, number } }),
|
|
10
12
|
getAffiliate: () => ({ url: 'affiliate', method: 'get' }),
|
|
13
|
+
getAffiliateHome: () => ({ url: 'affiliate/home', method: 'get' }),
|
|
14
|
+
getAffiliateDashboard: () => ({ url: 'affiliate/dashboard', method: 'get' }),
|
|
15
|
+
getAffiliateDashboardList: ({ level, page, row }) => ({ url: 'affiliate/dashboard/list', method: 'post', params: { level, page, row } }),
|
|
11
16
|
postAffiliate: ({ affiliateCode }) => ({ url: 'affiliate', method: 'post', params: { affiliateCode } }),
|
|
12
17
|
passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
|
|
13
18
|
passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }),
|
|
@@ -34,4 +39,17 @@ export default {
|
|
|
34
39
|
params: { requestId, target, newPassword },
|
|
35
40
|
isPublic: true,
|
|
36
41
|
}),
|
|
42
|
+
verifyV2Initiate: ({ strategy }) => ({
|
|
43
|
+
// strategy: 'phone' | 'email'
|
|
44
|
+
url: '/verify/v2/initiate',
|
|
45
|
+
method: 'post',
|
|
46
|
+
params: { strategy },
|
|
47
|
+
}),
|
|
48
|
+
otpAcknowledge: ({ requestId, target, code }) => ({
|
|
49
|
+
url: '/otpsso/acknowledge',
|
|
50
|
+
method: 'post',
|
|
51
|
+
params: { requestId, target, code },
|
|
52
|
+
isPublic: true,
|
|
53
|
+
}),
|
|
54
|
+
otpReset: ({ requestId, target }) => ({ url: '/otpsso/reset', method: 'post', params: { requestId, target }, isPublic: true }),
|
|
37
55
|
}
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import api from './api'
|
|
2
|
-
import machine from './machine'
|
|
3
|
-
import Request from './request/request'
|
|
4
|
-
import Config from './request/config'
|
|
5
|
-
|
|
1
|
+
import api from './api/index.js'
|
|
2
|
+
import machine from './machine/index.js'
|
|
3
|
+
import Request from './request/request.js'
|
|
4
|
+
import Config from './request/config.js'
|
|
5
|
+
import util, { constant, storage } from './util/index.js'
|
|
6
|
+
|
|
7
|
+
export { api, machine, Request, Config, util, constant, storage }
|