@jetthai/cuora 1.1.330-dev-8 → 1.1.330

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,22 +2,6 @@
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.330-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.330-dev-7...v1.1.330-dev-8) (2024-12-25)
6
-
7
- ### [1.1.330-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.330-dev-6...v1.1.330-dev-7) (2024-12-24)
8
-
9
- ### [1.1.330-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.330-dev-5...v1.1.330-dev-6) (2024-12-23)
10
-
11
- ### [1.1.330-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.330-dev-4...v1.1.330-dev-5) (2024-12-23)
12
-
13
- ### [1.1.330-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.330-dev-3...v1.1.330-dev-4) (2024-12-19)
14
-
15
- ### [1.1.330-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.330-dev-2...v1.1.330-dev-3) (2024-12-19)
16
-
17
- ### [1.1.330-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.330-1...v1.1.330-dev-2) (2024-12-18)
18
-
19
- ### [1.1.330-1](https://github.com/jetthai/cuora-module/compare/v1.1.330...v1.1.330-1) (2024-12-18)
20
-
21
5
  ### [1.1.330](https://github.com/jetthai/cuora-module/compare/v1.1.329...v1.1.330) (2024-12-11)
22
6
 
23
7
  ### [1.1.329](https://github.com/jetthai/cuora-module/compare/v1.1.328...v1.1.329) (2024-12-10)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.330-dev-8",
3
+ "version": "1.1.330",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/src/api/game.js CHANGED
@@ -92,12 +92,4 @@ export default {
92
92
  addListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/addMyFavorite', params: { games: [code] } }),
93
93
  removeListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/removeMyFavorite', params: { games: [code] } }),
94
94
  getGameInfo: ({ appSecret, gameCode }) => ({ method: 'get', url: 'game/info', params: { appSecret, gameCode } }),
95
- getGameReplayInfo: ({ providerId, seqNo, lang }) => ({
96
- method: 'get',
97
- url: 'game/gameReplay',
98
- params: { providerId, seqNo, lang },
99
- isPublic: true,
100
- }),
101
- getFreeGameList: () => ({ method: 'get', url: 'activities/getFreeGameRewardList' }),
102
- getFreeGameReward: ({ activityNo, receiveNo }) => ({ method: 'post', url: 'activities/getFreeGameReward', params: { activityNo, receiveNo } }),
103
95
  }
@@ -50,21 +50,8 @@ export default function (request, context) {
50
50
  },
51
51
  },
52
52
  },
53
- received: {
54
- entry: 'setDuration',
55
- after: {
56
- 1000: {
57
- target: 'received',
58
- },
59
- },
60
- },
53
+ received: {},
61
54
  receivable: {
62
- entry: 'setDuration',
63
- after: {
64
- 1000: {
65
- target: 'receivable',
66
- },
67
- },
68
55
  on: {
69
56
  RECEIVE_REWARD: {
70
57
  target: 'receiving',
@@ -115,16 +102,8 @@ export default function (request, context) {
115
102
  context.callback(event.data.type)
116
103
  },
117
104
  setDuration: assign((context, event) => {
118
- let endTime = 0
119
- if (context?.activityDetail?.taskTimer) {
120
- const taskTimer = context?.activityDetail?.taskTimer * 60 * 60 * 1000
121
- const registerTime = context?.activityDetail?.registerTime
122
- endTime = (taskTimer + registerTime) / 1000
123
- } else {
124
- endTime = context?.activityDetail?.activityEndTime
125
- }
126
105
  return {
127
- duration: Math.max(endTime - new Date().getTime() / 1000, 0),
106
+ duration: Math.max(context?.activityDetail?.activityEndTime - new Date().getTime() / 1000, 0),
128
107
  }
129
108
  }),
130
109
  },
@@ -9,7 +9,6 @@ import game_search_cash from './game_search_cash.js'
9
9
  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
- import game_replay from './game_replay.js'
13
12
  import inbox from './inbox.js'
14
13
  import merge from './merge.js'
15
14
  import payment_data from './payment_data.js'
@@ -50,7 +49,6 @@ export default {
50
49
  game_search_v2,
51
50
  game_hot_new,
52
51
  game_info,
53
- game_replay,
54
52
  inbox,
55
53
  merge,
56
54
  payment_data,
@@ -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_replay',
10
- initial: 'fetching',
11
- context: {
12
- gameReplayInfo: {},
13
- },
14
- states: {
15
- fetching: {
16
- invoke: {
17
- src: 'fetchGameReplayInfo',
18
- onDone: {
19
- target: 'idle',
20
- actions: 'setGameReplayInfo',
21
- },
22
- onError: {
23
- target: 'idle',
24
- },
25
- },
26
- },
27
- idle: {},
28
- },
29
- },
30
- {
31
- actions: {
32
- setGameReplayInfo: assign((context, event) => {
33
- return {
34
- gameReplayInfo: event.data.data,
35
- }
36
- }),
37
- },
38
- services: {
39
- // 取得遊戲重播資訊
40
- fetchGameReplayInfo: async (context, event) => {
41
- return await request.send(game.getGameReplayInfo({ providerId, seqNo, lang }))
42
- },
43
- },
44
- }
45
- )
46
- }