@jetthai/cuora 1.1.373-dev-7 → 1.1.373-dev-8
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 +2 -0
- package/package.json +1 -1
- package/src/api/user.js +14 -9
- package/src/machine/user_reset_password.js +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.373-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-7...v1.1.373-dev-8) (2025-08-25)
|
|
6
|
+
|
|
5
7
|
### [1.1.373-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-6...v1.1.373-dev-7) (2025-08-23)
|
|
6
8
|
|
|
7
9
|
### [1.1.373-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-5...v1.1.373-dev-6) (2025-08-22)
|
package/package.json
CHANGED
package/src/api/user.js
CHANGED
|
@@ -21,28 +21,33 @@ export default {
|
|
|
21
21
|
getFriendsList: ({ type, page, row }) => ({ url: 'friends/reward-list', method: 'post', params: { type, page, row } }),
|
|
22
22
|
postFriends: ({ friendCode }) => ({ url: 'friends', method: 'post', params: { friendCode } }),
|
|
23
23
|
passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
|
|
24
|
-
passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }),
|
|
25
|
-
passwordAcknowledge: (acknowledgeData) => ({ url: 'recovery/acknowledge', method: 'post', params: acknowledgeData, isPublic: true }),
|
|
24
|
+
// passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }), 平台版和現金網未使用
|
|
25
|
+
// passwordAcknowledge: (acknowledgeData) => ({ url: 'recovery/acknowledge', method: 'post', params: acknowledgeData, isPublic: true }), 平台版和現金網未使用
|
|
26
26
|
verify: () => ({ url: 'verify', method: 'post' }),
|
|
27
27
|
acknowledge: ({ requestId, code }) => ({ url: 'acknowledge', method: 'post', params: { requestId, code } }),
|
|
28
|
-
passwordV2RecoveryInit: ({ provider, username, countryCode, phone, email }) => ({
|
|
28
|
+
passwordV2RecoveryInit: ({ provider, username, countryCode, phone, email, appSecret }) => ({
|
|
29
29
|
url: 'recovery/v2/initiate',
|
|
30
30
|
method: 'post',
|
|
31
|
-
params: { provider, username, countryCode, phone, email },
|
|
31
|
+
params: { provider, username, countryCode, phone, email, appSecret },
|
|
32
32
|
isPublic: true,
|
|
33
33
|
}),
|
|
34
|
-
passwordV2Acknowledge: ({ requestId, target, code }) => ({
|
|
34
|
+
passwordV2Acknowledge: ({ requestId, target, code, appSecret }) => ({
|
|
35
35
|
url: 'recovery/v2/acknowledge',
|
|
36
36
|
method: 'post',
|
|
37
|
-
params: { requestId, target, code },
|
|
37
|
+
params: { requestId, target, code, appSecret },
|
|
38
|
+
isPublic: true,
|
|
39
|
+
}),
|
|
40
|
+
// passwordV2Abandon: ({ requestId, target }) => ({ url: 'recovery/v2/abandon', method: 'post', params: { requestId, target }, isPublic: true }), 平台版和現金網未使用
|
|
41
|
+
passwordV2ResetOtp: ({ requestId, target }) => ({
|
|
42
|
+
url: 'recovery/v2/reset',
|
|
43
|
+
method: 'post',
|
|
44
|
+
params: { requestId, target, appSecret },
|
|
38
45
|
isPublic: true,
|
|
39
46
|
}),
|
|
40
|
-
passwordV2Abandon: ({ requestId, target }) => ({ url: 'recovery/v2/abandon', method: 'post', params: { requestId, target }, isPublic: true }),
|
|
41
|
-
passwordV2ResetOtp: ({ requestId, target }) => ({ url: 'recovery/v2/reset', method: 'post', params: { requestId, target }, isPublic: true }),
|
|
42
47
|
passwordV2Change: ({ requestId, target, newPassword }) => ({
|
|
43
48
|
url: 'recovery/v2/changePassword',
|
|
44
49
|
method: 'post',
|
|
45
|
-
params: { requestId, target, newPassword },
|
|
50
|
+
params: { requestId, target, newPassword, appSecret },
|
|
46
51
|
isPublic: true,
|
|
47
52
|
}),
|
|
48
53
|
verifyV2Initiate: ({ strategy }) => ({
|
|
@@ -2,6 +2,7 @@ import { assign, createMachine } from 'xstate'
|
|
|
2
2
|
import user from '../api/user.js'
|
|
3
3
|
|
|
4
4
|
export default function (request) {
|
|
5
|
+
const { appSecret } = request.config
|
|
5
6
|
return createMachine(
|
|
6
7
|
{
|
|
7
8
|
id: 'user_reset_password',
|
|
@@ -207,20 +208,20 @@ export default function (request) {
|
|
|
207
208
|
services: {
|
|
208
209
|
sendOtp: async (context, event) => {
|
|
209
210
|
const { provider, username, countryCode, phone, email } = context.otpParams
|
|
210
|
-
return await request.send(user.passwordV2RecoveryInit({ provider, username, countryCode, phone, email }))
|
|
211
|
+
return await request.send(user.passwordV2RecoveryInit({ provider, username, countryCode, phone, email, appSecret }))
|
|
211
212
|
},
|
|
212
213
|
resetOtp: async (context, event) => {
|
|
213
214
|
const { requestId, target } = context
|
|
214
|
-
return await request.send(user.passwordV2ResetOtp({ requestId, target }))
|
|
215
|
+
return await request.send(user.passwordV2ResetOtp({ requestId, target, appSecret }))
|
|
215
216
|
},
|
|
216
217
|
acknowledge: async (context, event) => {
|
|
217
218
|
const { requestId, target } = context
|
|
218
219
|
const code = event.data
|
|
219
|
-
return await request.send(user.passwordV2Acknowledge({ requestId, target, code }))
|
|
220
|
+
return await request.send(user.passwordV2Acknowledge({ requestId, target, code, appSecret }))
|
|
220
221
|
},
|
|
221
222
|
change: async (context, event) => {
|
|
222
223
|
const { requestId, target, newPassword } = context
|
|
223
|
-
return await request.send(user.passwordV2Change({ requestId, target, newPassword }))
|
|
224
|
+
return await request.send(user.passwordV2Change({ requestId, target, newPassword, appSecret }))
|
|
224
225
|
},
|
|
225
226
|
},
|
|
226
227
|
}
|