@jetthai/cuora 1.1.243 → 1.1.245

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,10 @@
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.245](https://github.com/jetthai/cuora-module/compare/v1.1.244...v1.1.245) (2024-04-11)
6
+
7
+ ### [1.1.244](https://github.com/jetthai/cuora-module/compare/v1.1.243...v1.1.244) (2024-04-09)
8
+
5
9
  ### [1.1.243](https://github.com/jetthai/cuora-module/compare/v1.1.242...v1.1.243) (2024-04-02)
6
10
 
7
11
  ### [1.1.242](https://github.com/jetthai/cuora-module/compare/v1.1.241...v1.1.242) (2024-04-02)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.243",
3
+ "version": "1.1.245",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/src/api/auth.js CHANGED
@@ -54,5 +54,10 @@ export default {
54
54
  method: 'post',
55
55
  params: { provider, countryCode, phone, email },
56
56
  }),
57
- checkAccount: ({ account, strategy }) => ({ url: 'checkAccount', method: 'post', params: { account, strategy }, isPublic: true }),
57
+ checkAccount: ({ account, nick_name, strategy }) => ({
58
+ url: 'checkAccount',
59
+ method: 'post',
60
+ params: { account, nick_name, strategy },
61
+ isPublic: true,
62
+ }),
58
63
  }
@@ -51,7 +51,7 @@ export default function (request) {
51
51
  src: 'fetchGamesByProvider',
52
52
  onDone: {
53
53
  target: 'idle',
54
- actions: 'setGames',
54
+ actions: 'setGamesByProvider',
55
55
  },
56
56
  onError: {
57
57
  target: 'fail',
@@ -228,6 +228,13 @@ export default function (request) {
228
228
  lang: event.data.lang,
229
229
  }
230
230
  }),
231
+ setGamesByProvider: assign((context, event) => {
232
+ const { gameList, tagList } = event.data
233
+ return {
234
+ tagList,
235
+ gameList,
236
+ }
237
+ }),
231
238
  clearKeyword: assign((context, event) => {
232
239
  return {
233
240
  keyword: '',
@@ -251,6 +258,8 @@ export default function (request) {
251
258
  setProviderName: assign((context, event) => {
252
259
  return {
253
260
  providerName: event.data.providerName,
261
+ keyword: event.data.keyword,
262
+ lang: event.data.lang,
254
263
  }
255
264
  }),
256
265
  },
@@ -300,13 +309,24 @@ export default function (request) {
300
309
  return { traceId, gameList: result }
301
310
  },
302
311
  fetchGamesByProvider: async (context, event) => {
303
- const { providerName } = context
304
- const { traceId, result } = await request.send(
305
- game.getGameSearchList({
306
- providerName: providerName,
307
- })
308
- )
309
- return { traceId, gameList: result }
312
+ const { providerName, keyword, lang } = context
313
+ const [games, tags] = await Promise.all([
314
+ request.send(
315
+ game.getGameSearchList({
316
+ providerName: providerName,
317
+ })
318
+ ),
319
+ request.send(
320
+ game.getGameTags({
321
+ q: keyword,
322
+ lang,
323
+ })
324
+ ),
325
+ ])
326
+ return {
327
+ gameList: games.result,
328
+ tagList: tags.result,
329
+ }
310
330
  },
311
331
  fetchGamesByKeyword: async (context, event) => {
312
332
  const { keyword, click, clickDefault, lang } = context
@@ -77,6 +77,7 @@ export default function (request) {
77
77
  setSignUpId: assign((context, event) => {
78
78
  const {
79
79
  username,
80
+ nick_name,
80
81
  password,
81
82
  countryCode,
82
83
  phone,
@@ -93,6 +94,7 @@ export default function (request) {
93
94
  signUpData: {
94
95
  provider: 'local',
95
96
  username,
97
+ nick_name,
96
98
  password,
97
99
  countryCode,
98
100
  phone,
@@ -108,13 +110,26 @@ export default function (request) {
108
110
  }
109
111
  }),
110
112
  setSignUpPhone: assign((context, event) => {
111
- const { countryCode, phone, password, channel, subchannel, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode } =
112
- event.data
113
+ const {
114
+ countryCode,
115
+ phone,
116
+ nick_name,
117
+ password,
118
+ channel,
119
+ subchannel,
120
+ bankCode,
121
+ bankAccount,
122
+ holderName,
123
+ branch,
124
+ branchCode,
125
+ affiliateCode,
126
+ } = event.data
113
127
  return {
114
128
  signUpData: {
115
129
  provider: 'phone',
116
130
  countryCode,
117
131
  phone,
132
+ nick_name,
118
133
  password,
119
134
  bankCode,
120
135
  bankAccount,
@@ -128,11 +143,12 @@ export default function (request) {
128
143
  }
129
144
  }),
130
145
  setSignUpEmail: assign((context, event) => {
131
- const { email, password, channel, subchannel, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode } = event.data
146
+ const { email, nick_name, password, channel, subchannel, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode } = event.data
132
147
  return {
133
148
  signUpData: {
134
149
  provider: 'email',
135
150
  email,
151
+ nick_name,
136
152
  password,
137
153
  bankCode,
138
154
  bankAccount,