@jetthai/cuora 1.1.366-dev-4 → 1.1.366-dev-6

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,14 @@
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.366-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.366-dev-5...v1.1.366-dev-6) (2025-07-31)
6
+
7
+ ### [1.1.368](https://github.com/jetthai/cuora-module/compare/v1.1.366-dev-4...v1.1.368) (2025-07-28)
8
+
9
+ ### [1.1.367](https://github.com/jetthai/cuora-module/compare/v1.1.366-v2api-2...v1.1.367) (2025-07-22)
10
+
11
+ ### [1.1.366-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.366-dev-4...v1.1.366-dev-5) (2025-07-29)
12
+
5
13
  ### [1.1.366-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.366-v2api-2...v1.1.366-dev-4) (2025-07-25)
6
14
 
7
15
  ### [1.1.366-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.366-dev-2...v1.1.366-dev-3) (2025-07-18)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.366-dev-4",
3
+ "version": "1.1.366-dev-6",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -259,7 +259,7 @@ export default function (request) {
259
259
  },
260
260
  isEnd: (context, event) => {
261
261
  const { currentTab, inbox } = context
262
- if (!inbox[currentTab]) {
262
+ if (!inbox[currentTab] || currentTab === 'FREE_GAME') {
263
263
  return false
264
264
  } else {
265
265
  const { page, totalPage } = inbox[currentTab]
@@ -424,7 +424,7 @@ export default function (request) {
424
424
  fetchMessages: async (context, event) => {
425
425
  const lang = context.lang
426
426
  const { isRewardListEnable, currentTab, inbox } = JSON.parse(JSON.stringify(context))
427
- if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND')) {
427
+ if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND' || currentTab === 'FREE_GAME')) {
428
428
  const { data } = await request.send(activity.getRewardList({ count: 30, appSecret, lang }))
429
429
  inbox[currentTab] = { data, page: 0, totalPage: 1 }
430
430
  } else {
@@ -438,6 +438,9 @@ export default function (request) {
438
438
  },
439
439
  reFetchMessages: async (context, event) => {
440
440
  const { currentTab, inbox } = JSON.parse(JSON.stringify(context))
441
+
442
+ if (currentTab === 'FREE_GAME') return inbox
443
+
441
444
  const { data, ...rest } = await request.send(mailbox.getMessageList({ type: currentTab, page: 0 }))
442
445
  let formattedData = []
443
446
  formattedData = data?.map((item) => ({ ...item, isSelected: false }))
@@ -234,12 +234,15 @@ export default class Request {
234
234
  return supportedUrl === cleanUrl
235
235
  })
236
236
 
237
- if (isV2Supported) {
237
+ // 如果站點是ZAZA或ZAZAAPP,則不支援V2版本的API
238
+ const supportV2Toggle = ['ZAZA', 'ZAZAAPP'].includes(this.config?.clientId)
239
+
240
+ if (isV2Supported && !supportV2Toggle) {
238
241
  fullURL = fullURL.replace('/v1/', '/v2/')
239
242
  urlName = this._convertUrlToKebabCase(url)
240
- console.log(`*[DEV_ONLY]V2`, 'url:', urlName)
243
+ // console.log(`*[DEV_ONLY]V2`, 'url:', urlName)
241
244
  } else {
242
- console.log(`*[DEV_ONLY]V2-不支援:`, 'url:', urlName)
245
+ // console.log(`*[DEV_ONLY]V2-不支援:`, 'url:', urlName)
243
246
  }
244
247
 
245
248
  if (isFormData) {