@jetthai/cuora 1.1.361-dev-9 → 1.1.361-dev-10

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,23 +2,13 @@
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.361-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-8...v1.1.361-dev-9) (2025-06-19)
5
+ ### [1.1.361-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev...v1.1.361-dev-10) (2025-06-20)
6
6
 
7
- ### [1.1.361-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-7...v1.1.361-dev-8) (2025-06-19)
7
+ ### [1.1.361-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev...v1.1.361-dev-2) (2025-06-20)
8
8
 
9
- ### [1.1.361-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-6...v1.1.361-dev-7) (2025-06-19)
9
+ ### [1.1.361-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev...v1.1.361-dev-1) (2025-06-20)
10
10
 
11
- ### [1.1.361-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-5...v1.1.361-dev-6) (2025-06-19)
12
-
13
- ### [1.1.361-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-4...v1.1.361-dev-5) (2025-06-17)
14
-
15
- ### [1.1.361-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-3...v1.1.361-dev-4) (2025-06-17)
16
-
17
- ### [1.1.361-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-2...v1.1.361-dev-3) (2025-06-16)
18
-
19
- ### [1.1.361-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-1...v1.1.361-dev-2) (2025-06-11)
20
-
21
- ### [1.1.361-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.361...v1.1.361-dev-1) (2025-06-09)
11
+ ### [1.1.361-dev](https://github.com/jetthai/cuora-module/compare/v1.1.361...v1.1.361-dev) (2025-06-20)
22
12
 
23
13
  ### [1.1.361](https://github.com/jetthai/cuora-module/compare/v1.1.360...v1.1.361) (2025-06-03)
24
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.361-dev-9",
3
+ "version": "1.1.361-dev-10",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -69,10 +69,10 @@ export default {
69
69
  method: 'get',
70
70
  params: { rewardType },
71
71
  }),
72
- getRewardList: ({ rewardType, count, appSecret, orderColum, lang }) => ({
72
+ getRewardList: ({ rewardType, count, appSecret, orderColumn }) => ({
73
73
  url: 'activities/rewards',
74
74
  method: 'get',
75
- params: { rewardType, count, appSecret, orderColum, lang },
75
+ params: { rewardType, count, appSecret, orderColumn },
76
76
  }),
77
77
  getCashRainReward: ({ activityNo, appSecret }) => ({
78
78
  url: `activities/cashRain`,
package/src/api/game.js CHANGED
@@ -7,7 +7,7 @@ export default {
7
7
  demoGame: (params) => ({ url: 'game/demo', method: 'get', params, isPublic: true }),
8
8
  logoutGame: ({ uid_site, provider_id }) => ({ url: 'game/logout', method: 'get', params: { uid_site, provider_id } }),
9
9
 
10
- getGameTags: ({ q, lang, limit = 20 }) => ({ url: 'game/search', method: 'get', params: { q, lang, limit } }),
10
+ getGameTags: ({ q, lang }) => ({ url: 'game/search', method: 'get', params: { q, lang } }),
11
11
  getGameSearchHome: () => ({ url: 'game/search/home', method: 'get' }),
12
12
  getGameSearchList: ({ id, index, q, click, clickDefault, providerName }) => ({
13
13
  url: 'game/search/list',
@@ -99,16 +99,4 @@ export default {
99
99
  getFreeGameList: () => ({ method: 'get', url: 'activities/getFreeGameRewardList' }),
100
100
  getFreeGameReward: ({ activityNo, receiveNo }) => ({ method: 'post', url: 'activities/getFreeGameReward', params: { activityNo, receiveNo } }),
101
101
  getV3GameInfo: ({ appSecret, gameCodes }) => ({ method: 'post', url: 'game/list/v3/gameInfo', params: { appSecret, gameCodes } }),
102
- getProvableResult: ({ providerId, seqNo, lang, uidSite, appSecret }) => ({
103
- method: 'get',
104
- url: 'game/provable-result',
105
- params: { providerId, seqNo, lang, uidSite, appSecret },
106
- isPublic: true,
107
- }),
108
- getBetslip: ({ providerId, seqNo, lang, appSecret }) => ({
109
- method: 'get',
110
- url: 'game/betslip',
111
- params: { providerId, seqNo, lang, appSecret },
112
- isPublic: true,
113
- }),
114
102
  }
@@ -172,8 +172,8 @@ export default function (request) {
172
172
  return {
173
173
  hasAnyAccount: bankInfo.length > 0,
174
174
  holderName: bankInfo[0]?.holderName,
175
- firstNameLocale: bankInfo[0]?.firstNameLocale,
176
- lastNameLocale: bankInfo[0]?.lastNameLocale,
175
+ firstNameLocale: bankInfo[0]?.firstNameLocale || null,
176
+ lastNameLocale: bankInfo[0]?.lastNameLocale || null,
177
177
  paymentList,
178
178
  bank: null, // 不預選銀行,玩家可能不知道這裡可以選 by Gordan
179
179
  }
@@ -247,9 +247,6 @@ export default function (request) {
247
247
  CLEAR: {
248
248
  actions: 'hideMessage',
249
249
  },
250
- SET_LANG: {
251
- actions: 'setLang',
252
- },
253
250
  },
254
251
  },
255
252
  {
@@ -279,10 +276,6 @@ export default function (request) {
279
276
  },
280
277
  },
281
278
  actions: {
282
- setLang: assign((context, event) => {
283
- const lang = event.data.locale || context.lang || 'en-US'
284
- return { lang }
285
- }),
286
279
  reset: assign((context, event) => {
287
280
  return {
288
281
  currentTab: null,
@@ -422,10 +415,9 @@ export default function (request) {
422
415
  return tabs
423
416
  },
424
417
  fetchMessages: async (context, event) => {
425
- const lang = context.lang
426
418
  const { isRewardListEnable, currentTab, inbox } = JSON.parse(JSON.stringify(context))
427
419
  if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND')) {
428
- const { data } = await request.send(activity.getRewardList({ count: 30, appSecret, lang }))
420
+ const { data } = await request.send(activity.getRewardList({ count: 30, appSecret }))
429
421
  inbox[currentTab] = { data, page: 0, totalPage: 1 }
430
422
  } else {
431
423
  const { page = -1 } = inbox[currentTab] || {}
@@ -10,7 +10,6 @@ import game_search_v2 from './game_search_v2.js'
10
10
  import game_hot_new from './game_hot_new.js'
11
11
  import game_info from './game_info.js'
12
12
  import game_replay from './game_replay.js'
13
- import game_betslip from './game_betslip.js'
14
13
  import inbox from './inbox.js'
15
14
  import merge from './merge.js'
16
15
  import payment_data from './payment_data.js'
@@ -54,7 +53,6 @@ export default {
54
53
  game_hot_new,
55
54
  game_info,
56
55
  game_replay,
57
- game_betslip,
58
56
  inbox,
59
57
  merge,
60
58
  payment_data,
@@ -2,7 +2,7 @@ import { createMachine, assign, send } from 'xstate'
2
2
  import activity from '../api/activity.js'
3
3
  import payment from '../api/payment.js'
4
4
 
5
- export default function (request, context) {
5
+ export default function (request) {
6
6
  const { appSecret } = request.config
7
7
  return createMachine(
8
8
  {
@@ -19,7 +19,6 @@ export default function (request, context) {
19
19
  isPlaying: false,
20
20
  callback: () => {},
21
21
  orderColumn: 'createTime',
22
- lang: context?.locale,
23
22
  },
24
23
  states: {
25
24
  timer: {
@@ -73,9 +72,6 @@ export default function (request, context) {
73
72
  SET_IS_PLAYING: {
74
73
  actions: 'setIsPlaying',
75
74
  },
76
- SET_LANG: {
77
- actions: 'setLang',
78
- },
79
75
  },
80
76
  },
81
77
  fetching: {
@@ -197,10 +193,6 @@ export default function (request, context) {
197
193
  isPlaying: event.data,
198
194
  }
199
195
  }),
200
- setLang: assign((context, event) => {
201
- const lang = event.data.locale || context.lang || 'en-US'
202
- return { lang }
203
- }),
204
196
  },
205
197
  guards: {
206
198
  isPrize: (context, event) => {
@@ -213,24 +205,22 @@ export default function (request, context) {
213
205
  },
214
206
  services: {
215
207
  fetchRewardList: async (context, event) => {
216
- const lang = context.lang
217
208
  const orderColumn = context.orderColumn
218
- const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret, lang }))
219
- const getPointsRewardAPI = request.send(activity.getRewardList({ rewardType: 'POINTS', count: 30, appSecret, lang }))
220
- const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret, orderColumn, lang }))
209
+ const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
210
+ const getPointsRewardAPI = request.send(activity.getRewardList({ rewardType: 'POINTS', count: 30, appSecret }))
211
+ const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret, orderColumn }))
221
212
  const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
222
213
  return [otherRewardList, pointsRewardList, rewardList]
223
214
  },
224
215
  fetchOtherRewardList: async (context, event) => {
225
216
  const orderColumn = context.orderColumn
226
- const lang = context.lang
217
+
227
218
  const getOtherRewardAPI = request.send(
228
219
  activity.getRewardList({
229
220
  rewardType: 'CASH,FREE,PRIZE',
230
221
  count: 30,
231
222
  appSecret,
232
223
  orderColumn,
233
- lang,
234
224
  })
235
225
  )
236
226
  const [otherRewardList] = await Promise.all([getOtherRewardAPI])
@@ -2,7 +2,7 @@ import { createMachine, assign, send } from 'xstate'
2
2
  import activity from '../api/activity.js'
3
3
  import payment from '../api/payment.js'
4
4
 
5
- export default function (request, context) {
5
+ export default function (request) {
6
6
  const { appSecret } = request.config
7
7
  return createMachine(
8
8
  {
@@ -18,7 +18,6 @@ export default function (request, context) {
18
18
  withdrawRule: {},
19
19
  callback: () => {},
20
20
  orderColumn: 'createTime',
21
- lang: context?.locale || 'en-US',
22
21
  },
23
22
  states: {
24
23
  timer: {
@@ -79,9 +78,6 @@ export default function (request, context) {
79
78
  target: 'allPointsReceiving',
80
79
  actions: 'setCallback',
81
80
  },
82
- SET_LANG: {
83
- actions: 'setLang',
84
- },
85
81
  },
86
82
  },
87
83
  fetching: {
@@ -205,22 +201,16 @@ export default function (request, context) {
205
201
  withdrawRule: event.data,
206
202
  }
207
203
  }),
208
- setLang: assign((context, event) => {
209
- const lang = event.data.locale || context.lang || 'en-US'
210
- return { lang }
211
- }),
212
204
  },
213
205
  services: {
214
206
  fetchRewardList: async (context, event) => {
215
- const lang = context.lang
216
- const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret, lang }))
207
+ const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
217
208
  const orderColumn = context.orderColumn
218
209
  const getPointsRewardAPI = request.send(
219
210
  activity.getRewardList({
220
211
  rewardType: 'POINTS',
221
212
  count: 30,
222
213
  appSecret,
223
- lang,
224
214
  })
225
215
  )
226
216
  const getOtherRewardAPI = request.send(
@@ -229,7 +219,6 @@ export default function (request, context) {
229
219
  count: 30,
230
220
  appSecret,
231
221
  orderColumn,
232
- lang,
233
222
  })
234
223
  )
235
224
  const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
@@ -244,7 +233,6 @@ export default function (request, context) {
244
233
  count: 30,
245
234
  appSecret,
246
235
  orderColumn,
247
- lang,
248
236
  })
249
237
  )
250
238
  const [otherRewardList] = await Promise.all([getOtherRewardAPI])
@@ -1,46 +0,0 @@
1
- import { assign, createMachine } from 'xstate'
2
- import game from '../api/game.js'
3
-
4
- export default function (request, context) {
5
- const { appSecret } = request.config
6
- const { providerId, seqNo, lang } = context
7
- return createMachine(
8
- {
9
- id: 'game_betslip',
10
- initial: 'fetching',
11
- context: {
12
- gameBetSlip: {},
13
- },
14
- states: {
15
- fetching: {
16
- invoke: {
17
- src: 'fetchBetslip',
18
- onDone: {
19
- target: 'idle',
20
- actions: 'setBetslip',
21
- },
22
- onError: {
23
- target: 'idle',
24
- },
25
- },
26
- },
27
- idle: {},
28
- },
29
- },
30
- {
31
- actions: {
32
- setBetslip: assign((context, event) => {
33
- return {
34
- gameBetSlip: event.data,
35
- }
36
- }),
37
- },
38
- services: {
39
- // 取得遊戲注單
40
- fetchBetslip: async (context, event) => {
41
- return await request.send(game.getBetslip({ providerId, seqNo, lang, appSecret }))
42
- },
43
- },
44
- }
45
- )
46
- }