@jetthai/cuora 1.1.393-dev-6 → 1.1.393
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 +0 -12
- package/package.json +1 -1
- package/src/api/common.js +0 -5
- package/src/api/index.js +1 -2
- package/src/machine/auth.js +2 -2
- package/src/machine/auth_otp_v3.js +10 -19
- package/src/machine/bank_binding.js +1 -0
- package/src/machine/common.js +1 -13
- package/src/machine/game_search_cash.js +3 -62
- package/src/request/request.js +0 -9
- package/src/api/account.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
### [1.1.393-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.393-dev-5...v1.1.393-dev-6) (2025-10-31)
|
|
6
|
-
|
|
7
|
-
### [1.1.393-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.393-dev-4...v1.1.393-dev-5) (2025-10-31)
|
|
8
|
-
|
|
9
|
-
### [1.1.393-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.393-dev-3...v1.1.393-dev-4) (2025-10-31)
|
|
10
|
-
|
|
11
|
-
### [1.1.393-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.393-dev-2...v1.1.393-dev-3) (2025-10-31)
|
|
12
|
-
|
|
13
|
-
### [1.1.393-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.393-dev-1...v1.1.393-dev-2) (2025-10-30)
|
|
14
|
-
|
|
15
|
-
### [1.1.393-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.393...v1.1.393-dev-1) (2025-10-23)
|
|
16
|
-
|
|
17
5
|
### [1.1.393](https://github.com/jetthai/cuora-module/compare/v1.1.392...v1.1.393) (2025-10-17)
|
|
18
6
|
|
|
19
7
|
### [1.1.392](https://github.com/jetthai/cuora-module/compare/v1.1.391...v1.1.392) (2025-10-17)
|
package/package.json
CHANGED
package/src/api/common.js
CHANGED
|
@@ -7,9 +7,4 @@ export default {
|
|
|
7
7
|
getNavbar: ({ appSecret } = {}) => ({ url: 'getNavbarSetting', params: { appSecret }, method: 'get', isPublic: true }),
|
|
8
8
|
getDefaultAffiliateCode: ({ appSecret }) => ({ url: 'getAffiliateCode', params: { appSecret }, method: 'get', isPublic: true }),
|
|
9
9
|
getSiteInfoConfig: ({ appSecret, config }) => ({ url: 'get-site-config', method: 'get', params: { appSecret, config }, isPublic: true }),
|
|
10
|
-
sendPixel: ({ appSecret, eventId, fbc, fbp, event }) => ({
|
|
11
|
-
url: 'pixel',
|
|
12
|
-
method: 'post',
|
|
13
|
-
params: { appSecret, eventId, fbc, fbp, event },
|
|
14
|
-
}),
|
|
15
10
|
}
|
package/src/api/index.js
CHANGED
|
@@ -7,6 +7,5 @@ import payment from './payment.js'
|
|
|
7
7
|
import user from './user.js'
|
|
8
8
|
import form from './form.js'
|
|
9
9
|
import ranking from './ranking.js'
|
|
10
|
-
import account from './account.js'
|
|
11
10
|
|
|
12
|
-
export default { activity, auth, common, game, mailbox, payment, user, form, ranking
|
|
11
|
+
export default { activity, auth, common, game, mailbox, payment, user, form, ranking }
|
package/src/machine/auth.js
CHANGED
|
@@ -451,7 +451,7 @@ export default function (request) {
|
|
|
451
451
|
affiliateCode,
|
|
452
452
|
nickname,
|
|
453
453
|
}
|
|
454
|
-
sentry
|
|
454
|
+
sentry.captureMessage(JSON.stringify(messages))
|
|
455
455
|
|
|
456
456
|
const referralObj = {}
|
|
457
457
|
if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
|
|
@@ -481,7 +481,7 @@ export default function (request) {
|
|
|
481
481
|
window.location.href = redirectURL
|
|
482
482
|
},
|
|
483
483
|
setUserInfo: assign((context, event) => {
|
|
484
|
-
sentry
|
|
484
|
+
sentry.setUser({ id: event.data.uid_site })
|
|
485
485
|
return {
|
|
486
486
|
userInfo: event.data,
|
|
487
487
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { assign, createMachine } from 'xstate'
|
|
2
2
|
import user from '../api/user.js'
|
|
3
3
|
import auth from '../api/auth.js'
|
|
4
|
-
import account from '../api/account.js'
|
|
5
4
|
|
|
6
5
|
export default function (request) {
|
|
7
6
|
return createMachine(
|
|
@@ -179,16 +178,12 @@ export default function (request) {
|
|
|
179
178
|
}
|
|
180
179
|
}),
|
|
181
180
|
setVerificationData: assign((context, event) => {
|
|
182
|
-
const {
|
|
181
|
+
const { requestId, ttl, target, status } = event.data
|
|
183
182
|
return {
|
|
184
|
-
requestId
|
|
185
|
-
ttl: ttl
|
|
186
|
-
target
|
|
187
|
-
|
|
188
|
-
email: email,
|
|
189
|
-
countryCode: countryCode,
|
|
190
|
-
phone: phone,
|
|
191
|
-
},
|
|
183
|
+
requestId,
|
|
184
|
+
ttl: ttl * 1000,
|
|
185
|
+
target,
|
|
186
|
+
status,
|
|
192
187
|
}
|
|
193
188
|
}),
|
|
194
189
|
decreaseTtl: assign((context, evnet) => {
|
|
@@ -244,28 +239,24 @@ export default function (request) {
|
|
|
244
239
|
return await request.send(user.getUserInfo())
|
|
245
240
|
},
|
|
246
241
|
verify: async (context, event) => {
|
|
247
|
-
return await request.send(
|
|
242
|
+
return await request.send(user.verifyV2Initiate({ strategy: context.strategy }))
|
|
248
243
|
},
|
|
249
244
|
sendPhone: async (context, event) => {
|
|
250
245
|
const { countryCode, phone } = context
|
|
251
|
-
return await request.send(
|
|
246
|
+
return await request.send(auth.bindPost({ provider: 'phone', countryCode, phone }))
|
|
252
247
|
},
|
|
253
248
|
sendEmail: async (context, event) => {
|
|
254
249
|
const { email } = context
|
|
255
|
-
return await request.send(
|
|
250
|
+
return await request.send(auth.bindPost({ provider: 'email', email }))
|
|
256
251
|
},
|
|
257
252
|
resetOtp: async (context, event) => {
|
|
258
253
|
const { requestId, target } = context
|
|
259
|
-
return await request.send(
|
|
260
|
-
account.resetOtp({
|
|
261
|
-
request_id: requestId,
|
|
262
|
-
})
|
|
263
|
-
)
|
|
254
|
+
return await request.send(user.otpReset({ requestId, target }))
|
|
264
255
|
},
|
|
265
256
|
acknowledge: async (context, event) => {
|
|
266
257
|
const { requestId, target } = context
|
|
267
258
|
const code = event.data
|
|
268
|
-
return await request.send(
|
|
259
|
+
return await request.send(user.otpAcknowledge({ requestId, target, code }))
|
|
269
260
|
},
|
|
270
261
|
},
|
|
271
262
|
}
|
package/src/machine/common.js
CHANGED
|
@@ -55,7 +55,7 @@ export default function (request) {
|
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
57
|
fetching: {
|
|
58
|
-
entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'
|
|
58
|
+
entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'],
|
|
59
59
|
invoke: {
|
|
60
60
|
src: 'fetchConfig',
|
|
61
61
|
onDone: [
|
|
@@ -237,18 +237,6 @@ export default function (request) {
|
|
|
237
237
|
isMobile: userAgent?.device?.type,
|
|
238
238
|
}
|
|
239
239
|
}),
|
|
240
|
-
setFbclid: assign(() => {
|
|
241
|
-
const urlParams = new URLSearchParams(window.location.search)
|
|
242
|
-
const fbclid = urlParams.get('fbclid') || ''
|
|
243
|
-
if (fbclid !== '') {
|
|
244
|
-
const timestamp = Date.now()
|
|
245
|
-
const cookieRecord = 'fb.1.' + timestamp + '.' + fbclid
|
|
246
|
-
document.cookie = `_fbc=${cookieRecord}; path=/; max-age=${60 * 60 * 24 * 7}`
|
|
247
|
-
}
|
|
248
|
-
return {
|
|
249
|
-
fbclid,
|
|
250
|
-
}
|
|
251
|
-
}),
|
|
252
240
|
setPixel: assign(() => {
|
|
253
241
|
let urlParams = new URLSearchParams(window.location.search)
|
|
254
242
|
const pix = urlParams.get('pix') || storage.get('pix') || ''
|
|
@@ -66,21 +66,14 @@ export default function (request) {
|
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
|
-
resetDebounce: {
|
|
70
|
-
entry: 'logResetDebounce',
|
|
71
|
-
always: 'debouncing',
|
|
72
|
-
},
|
|
73
69
|
debouncing: {
|
|
74
|
-
entry: 'logEnterDebouncing',
|
|
75
|
-
exit: 'logExitDebouncing',
|
|
76
70
|
after: {
|
|
77
|
-
|
|
71
|
+
500: {
|
|
78
72
|
target: 'fetchingTagsByKeyword',
|
|
79
73
|
},
|
|
80
74
|
},
|
|
81
75
|
},
|
|
82
76
|
fetchingTagsByKeyword: {
|
|
83
|
-
entry: 'logFetchingTagsByKeyword',
|
|
84
77
|
invoke: {
|
|
85
78
|
src: 'fetchTags',
|
|
86
79
|
onDone: {
|
|
@@ -142,12 +135,12 @@ export default function (request) {
|
|
|
142
135
|
},
|
|
143
136
|
on: {
|
|
144
137
|
SET_KEYWORD: {
|
|
145
|
-
target: '.
|
|
138
|
+
target: '.debouncing',
|
|
146
139
|
actions: ['setKeyword', 'setLang'],
|
|
147
140
|
cond: 'isInitialized',
|
|
148
141
|
},
|
|
149
142
|
CLEAR_KEYWORD: {
|
|
150
|
-
target: '.
|
|
143
|
+
target: '.debouncing',
|
|
151
144
|
actions: 'clearKeyword',
|
|
152
145
|
},
|
|
153
146
|
SET_TAG_ID: [
|
|
@@ -284,58 +277,6 @@ export default function (request) {
|
|
|
284
277
|
lang: event.data.lang,
|
|
285
278
|
}
|
|
286
279
|
}),
|
|
287
|
-
logResetDebounce: (context, event) => {
|
|
288
|
-
const now = new Date()
|
|
289
|
-
console.log('[Debounce] Reset triggered', {
|
|
290
|
-
keyword: context.keyword,
|
|
291
|
-
time:
|
|
292
|
-
now.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' }) +
|
|
293
|
-
'.' +
|
|
294
|
-
now.getMilliseconds().toString().padStart(3, '0'),
|
|
295
|
-
message: '🔄 Timer will be reset',
|
|
296
|
-
})
|
|
297
|
-
},
|
|
298
|
-
logEnterDebouncing: (context, event) => {
|
|
299
|
-
const now = new Date()
|
|
300
|
-
const futureTime = new Date(Date.now() + 500)
|
|
301
|
-
console.log('[Debounce] Enter debouncing state - timer started', {
|
|
302
|
-
keyword: context.keyword,
|
|
303
|
-
time:
|
|
304
|
-
now.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' }) +
|
|
305
|
-
'.' +
|
|
306
|
-
now.getMilliseconds().toString().padStart(3, '0'),
|
|
307
|
-
timer: '⏱️ 500ms countdown started',
|
|
308
|
-
willFetchAt:
|
|
309
|
-
futureTime.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' }) +
|
|
310
|
-
'.' +
|
|
311
|
-
futureTime.getMilliseconds().toString().padStart(3, '0'),
|
|
312
|
-
})
|
|
313
|
-
},
|
|
314
|
-
logExitDebouncing: (context, event) => {
|
|
315
|
-
const now = new Date()
|
|
316
|
-
console.log('[Debounce] Exit debouncing state', {
|
|
317
|
-
keyword: context.keyword,
|
|
318
|
-
time:
|
|
319
|
-
now.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' }) +
|
|
320
|
-
'.' +
|
|
321
|
-
now.getMilliseconds().toString().padStart(3, '0'),
|
|
322
|
-
reason:
|
|
323
|
-
event.type === 'xstate.after(500)#game_search_cash.debouncing'
|
|
324
|
-
? '✅ Timer completed (500ms elapsed)'
|
|
325
|
-
: '❌ Timer interrupted by new input',
|
|
326
|
-
})
|
|
327
|
-
},
|
|
328
|
-
logFetchingTagsByKeyword: (context, event) => {
|
|
329
|
-
const now = new Date()
|
|
330
|
-
console.log('[Debounce] Fetching tags by keyword', {
|
|
331
|
-
keyword: context.keyword,
|
|
332
|
-
time:
|
|
333
|
-
now.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' }) +
|
|
334
|
-
'.' +
|
|
335
|
-
now.getMilliseconds().toString().padStart(3, '0'),
|
|
336
|
-
action: '🔍 Fetching tags for the current keyword',
|
|
337
|
-
})
|
|
338
|
-
},
|
|
339
280
|
},
|
|
340
281
|
guards: {
|
|
341
282
|
hasMainTags: (context, event) => {
|
package/src/request/request.js
CHANGED
|
@@ -140,15 +140,6 @@ const supportVersion2List = [
|
|
|
140
140
|
'game/list/v3/gameInfo',
|
|
141
141
|
'payment/v2/uploadCommonSlip',
|
|
142
142
|
'game/history/options',
|
|
143
|
-
// 09/30
|
|
144
|
-
'pixel',
|
|
145
|
-
// 10/09
|
|
146
|
-
'account-binding/status',
|
|
147
|
-
'account-binding/bind',
|
|
148
|
-
'account-binding/acknowledge',
|
|
149
|
-
'account-binding/bind-third-party',
|
|
150
|
-
'account-binding/bind-password',
|
|
151
|
-
'account-binding/reset-otp',
|
|
152
143
|
]
|
|
153
144
|
|
|
154
145
|
function isValid(value) {
|
package/src/api/account.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
bindingStatus: () => ({ url: 'account-binding/status', method: 'GET' }),
|
|
3
|
-
applyBinding: (data) => ({ url: 'account-binding/bind', method: 'POST', params: data }),
|
|
4
|
-
bindingVerification: (data) => ({ url: 'account-binding/acknowledge', method: 'POST', params: data }),
|
|
5
|
-
bindThirdParty: (data) => ({ url: 'account-binding/bind-third-party', method: 'GET', params: data }),
|
|
6
|
-
bindPassword: (data) => ({ url: 'account-binding/bind-password', method: 'POST', params: data }),
|
|
7
|
-
resetOtp: (data) => ({ url: 'account-binding/reset-otp', method: 'POST', params: data }),
|
|
8
|
-
}
|