@jetthai/cuora 1.1.373-qa-1 → 1.1.373-qa-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/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-qa-2](https://github.com/jetthai/cuora-module/compare/v1.1.373-qa-1...v1.1.373-qa-2) (2025-08-25)
6
+
5
7
  ### [1.1.373-qa-1](https://github.com/jetthai/cuora-module/compare/v1.1.373...v1.1.373-qa-1) (2025-08-22)
6
8
 
7
9
  ### [1.1.373](https://github.com/jetthai/cuora-module/compare/v1.1.372...v1.1.373) (2025-08-13)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.373-qa-1",
3
+ "version": "1.1.373-qa-2",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -29,9 +29,10 @@ export default {
29
29
  method: 'get',
30
30
  params: { activityNo, appSecret },
31
31
  }),
32
- getActivityRanking: () => ({
32
+ getActivityRanking: ({ appSecret }) => ({
33
33
  url: 'activities/activity/ranking',
34
34
  method: 'get',
35
+ params: { appSecret },
35
36
  isPublic: true,
36
37
  }),
37
38
  getAchievements: ({ limit, page, appSecret }) => ({
package/src/api/game.js CHANGED
@@ -57,25 +57,25 @@ export default {
57
57
  url: 'game/history/options',
58
58
  method: 'get',
59
59
  }),
60
- getListRoot: ({ timestamp } = {}) => ({
60
+ getListRoot: ({ timestamp, appSecret } = {}) => ({
61
61
  url: 'game/list/v3/root',
62
62
  method: 'get',
63
- params: { timestamp },
63
+ params: { timestamp, appSecret },
64
64
  }),
65
- getListCategory: ({ categoryId, timestamp, index }) => ({
65
+ getListCategory: ({ categoryId, timestamp, index, appSecret }) => ({
66
66
  url: 'game/list/v3/category',
67
67
  method: 'get',
68
- params: { categoryId, timestamp, index },
68
+ params: { categoryId, timestamp, index, appSecret },
69
69
  }),
70
70
  getListAddition: ({ categoryId, timestamp, index, appSecret }) => ({
71
71
  url: 'game/list/v3/addition',
72
72
  method: 'get',
73
73
  params: { categoryId, timestamp, index, appSecret },
74
74
  }),
75
- getListCategoryByRange: ({ categoryId, timestamp, end }) => ({
75
+ getListCategoryByRange: ({ categoryId, timestamp, end, appSecret }) => ({
76
76
  url: 'game/list/v3/categoryByRange',
77
77
  method: 'get',
78
- params: { categoryId, timestamp, end },
78
+ params: { categoryId, timestamp, end, appSecret },
79
79
  }),
80
80
  getListAdditionByRange: ({ categoryId, timestamp, end, appSecret }) => ({
81
81
  url: 'game/list/v3/additionByRange',
@@ -1,9 +1,9 @@
1
1
  export default {
2
2
  // 未登入排名資料
3
- getTournament: ({ activityNo, cycle, round, site }) => ({
3
+ getTournament: ({ activityNo, cycle, round, site, appSecret }) => ({
4
4
  url: 'tournament/detail',
5
5
  method: 'post',
6
- params: { activityNo, cycle, round, site },
6
+ params: { activityNo, cycle, round, site, appSecret },
7
7
  isPublic: true,
8
8
  }),
9
9
  // 登入後排名預設期數資料
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 }) => ({
@@ -63,7 +63,7 @@ export default function (request) {
63
63
  houseAccountName: houseAccount.accountName,
64
64
  houseAccountNumber: houseAccount.accountNumber,
65
65
  houseBankName: houseAccount.bankName,
66
- bankList,
66
+ bankList: bankList?.data ? bankList.data : bankList,
67
67
  }
68
68
  }),
69
69
  },
@@ -197,7 +197,7 @@ export default function (request) {
197
197
  }
198
198
  }),
199
199
  setBanks: assign((context, event) => {
200
- const banks = event.data
200
+ const banks = event.data?.data ? event.data.data : event.data
201
201
  return {
202
202
  banks,
203
203
  selectedBank: banks[0],
@@ -119,7 +119,7 @@ export default function (request, context) {
119
119
  }),
120
120
  setBanks: assign((context, event) => {
121
121
  const { selectedDirect, bankMap } = context
122
- const userBanks = event.data
122
+ const userBanks = event.data?.data ? event.data.data : event.data
123
123
 
124
124
  if (selectedDirect)
125
125
  return {
@@ -276,7 +276,7 @@ export default function (request) {
276
276
  options: optional,
277
277
  minimum,
278
278
  maximum,
279
- bankList,
279
+ bankList: bankList?.data ? bankList.data : bankList,
280
280
  grandTotalEnable,
281
281
  }
282
282
  }),
@@ -150,7 +150,7 @@ export default function (request, context) {
150
150
  setInitData: assign((context, event) => {
151
151
  const { currentPayment, bankList, bindingPaymentInfo, processing } = event.data
152
152
  const userBankLsit = bindingPaymentInfo.bankList || []
153
- const allBankList = bankList || []
153
+ const allBankList = bankList?.data ? bankList.data : bankList
154
154
 
155
155
  const houseBanks = currentPayment.banks.map((bank) => {
156
156
  const foundBank = allBankList.find((item) => item.bankCode === bank.bankName)
@@ -267,7 +267,7 @@ export default function (request) {
267
267
  options: optional,
268
268
  minimum,
269
269
  maximum,
270
- bankList,
270
+ bankList: bankList?.data ? bankList.data : bankList,
271
271
  grandTotalEnable,
272
272
  }
273
273
  }),
@@ -27,9 +27,9 @@ export default function (request) {
27
27
  recentlyGame: [],
28
28
  youMayLike: [],
29
29
  selectedType: null,
30
- isYouMayLike: null,
31
- isRecentlyGame: null,
32
- isRecentlySearch: null,
30
+ isYouMayLike: false,
31
+ isRecentlyGame: false,
32
+ isRecentlySearch: false,
33
33
  },
34
34
  states: {
35
35
  init: {
@@ -388,7 +388,7 @@ export default function (request) {
388
388
  sendMayLikeTrace: async (context, event) => {
389
389
  return await request.send(
390
390
  game.setGameSearchTrace({
391
- isYouMayLike: 1,
391
+ isYouMayLike: true,
392
392
  })
393
393
  )
394
394
  },
@@ -21,9 +21,9 @@ export default function (request) {
21
21
  click: null,
22
22
  clickDefault: null,
23
23
  traceId: null,
24
- isYouMayLike: null,
25
- isRecentlyGame: null,
26
- isRecentlySearch: null,
24
+ isYouMayLike: false,
25
+ isRecentlyGame: false,
26
+ isRecentlySearch: false,
27
27
  gameCode: null,
28
28
  lang: 'en-US',
29
29
  },
@@ -119,9 +119,9 @@ export default function (request) {
119
119
  data: {
120
120
  tagId: context.tagList[0]?.id,
121
121
  traceData: {
122
- isYouMayLike: null,
123
- isRecentlyGame: null,
124
- isRecentlySearch: null,
122
+ isYouMayLike: false,
123
+ isRecentlyGame: false,
124
+ isRecentlySearch: false,
125
125
  },
126
126
  },
127
127
  })),
@@ -319,9 +319,9 @@ export default function (request) {
319
319
  tagIndex: null,
320
320
  gameCode: null,
321
321
  gameCodeIndex: null,
322
- isYouMayLike: null,
323
- isRecentlyGame: null,
324
- isRecentlySearch: null,
322
+ isYouMayLike: false,
323
+ isRecentlyGame: false,
324
+ isRecentlySearch: false,
325
325
  query: context.keyword,
326
326
  click: null,
327
327
  clickDefault: null,
@@ -523,6 +523,7 @@ export default function (request) {
523
523
  api.getListCategory({
524
524
  categoryId: category.id,
525
525
  index: 0,
526
+ appSecret,
526
527
  })
527
528
  )
528
529
  .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
@@ -536,6 +537,7 @@ export default function (request) {
536
537
  api.getListCategory({
537
538
  categoryId: category.id,
538
539
  index: 0,
540
+ appSecret,
539
541
  })
540
542
  )
541
543
  .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
@@ -579,6 +581,7 @@ export default function (request) {
579
581
  categoryId: room.categoryId,
580
582
  end: index,
581
583
  timestamp: content.timestamp,
584
+ appSecret,
582
585
  })
583
586
  ),
584
587
  request.send(
@@ -195,7 +195,7 @@ export default function (request) {
195
195
  services: {
196
196
  fetchTournament: async (context) => {
197
197
  const { activityNo, cycle, round, site } = context
198
- const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round, site }))
198
+ const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round, site, appSecret }))
199
199
  return data
200
200
  },
201
201
  fetchRankingOptions: async (context) => {
@@ -2,6 +2,7 @@ import { assign, createMachine } from 'xstate'
2
2
  import game from '../api/game.js'
3
3
 
4
4
  export default function (request) {
5
+ const { appSecret } = request.config
5
6
  return createMachine(
6
7
  {
7
8
  id: 'side',
@@ -78,10 +79,10 @@ export default function (request) {
78
79
  },
79
80
  services: {
80
81
  getMenu: async (context, event) => {
81
- return await request.send(game.getListRoot())
82
+ return await request.send(game.getListRoot({ appSecret }))
82
83
  },
83
84
  fetchUpdateMenu: async (context, event) => {
84
- return await request.send(game.getListRoot({ timestamp: context.menu.timestamp }))
85
+ return await request.send(game.getListRoot({ timestamp: context.menu.timestamp, appSecret }))
85
86
  },
86
87
  },
87
88
  }
@@ -2,6 +2,7 @@ import { assign, createMachine } from 'xstate'
2
2
  import game from '../api/game.js'
3
3
 
4
4
  export default function (request) {
5
+ const { appSecret } = request.config
5
6
  return createMachine(
6
7
  {
7
8
  id: 'side',
@@ -160,10 +161,10 @@ export default function (request) {
160
161
  },
161
162
  services: {
162
163
  getMenu: async (context, event) => {
163
- return await request.send(game.getListRoot())
164
+ return await request.send(game.getListRoot({ appSecret }))
164
165
  },
165
166
  fetchUpdateMenu: async (context, event) => {
166
- return await request.send(game.getListRoot({ timestamp: context.menu.timestamp }))
167
+ return await request.send(game.getListRoot({ timestamp: context.menu.timestamp, appSecret }))
167
168
  },
168
169
  },
169
170
  }
@@ -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
  }