@jetthai/cuora 1.1.487 → 1.1.488-dev.1
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/.claude/commands/sync-ai-prompts.md +88 -1
- package/.claude/settings.local.json +3 -1
- package/.github/copilot-instructions.md +17 -6
- package/.husky/post-checkout +3 -3
- package/.husky/pre-push +1 -1
- package/.prettierignore +2 -1
- package/AGENTS.md +17 -6
- package/AI_PROMPT_SOURCE.md +17 -6
- package/CHANGELOG.md +422 -23
- package/CLAUDE.md +17 -6
- package/GEMINI.md +17 -6
- package/e2e/feature-map.md +19 -0
- package/package.json +1 -1
- package/prepare-for-pr/JT-1776243420.md +85 -0
- package/prepare-for-pr/TI-16026/STATE.md +18 -0
- package/prepare-for-pr/TI-16026/after-prepare-authorization.md +3 -0
- package/prepare-for-pr/TI-16026/analysis.md +38 -0
- package/prepare-for-pr/TI-16026/answer-analyze-01.md +1 -0
- package/prepare-for-pr/TI-16026/answer-commit-01.md +2 -0
- package/prepare-for-pr/TI-16026/answer-commit-02.md +1 -0
- package/prepare-for-pr/TI-16026/bundle.json +18 -0
- package/prepare-for-pr/TI-16026/checklist.md +196 -0
- package/prepare-for-pr/TI-16026/checklist.unit-test-original.md +39 -0
- package/prepare-for-pr/TI-16026/claude-after-model +1 -0
- package/prepare-for-pr/TI-16026/claude-commit-session +1 -0
- package/prepare-for-pr/TI-16026/claude-harvest-session +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/01-analyze.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/01-analyze.out +2 -0
- package/prepare-for-pr/TI-16026/claude-hops/02-analyze.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/02-analyze.out +4 -0
- package/prepare-for-pr/TI-16026/claude-hops/03-dev.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/03-dev.out +4 -0
- package/prepare-for-pr/TI-16026/claude-hops/04-dev.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/04-dev.out +4 -0
- package/prepare-for-pr/TI-16026/claude-hops/05-dev.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/05-dev.out +3 -0
- package/prepare-for-pr/TI-16026/claude-hops/06-after.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/06-after.out +2 -0
- package/prepare-for-pr/TI-16026/claude-hops/07-commit.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/07-commit.out +2 -0
- package/prepare-for-pr/TI-16026/claude-hops/08-commit.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/08-commit.out +2 -0
- package/prepare-for-pr/TI-16026/claude-hops/09-commit.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/09-commit.out +8 -0
- package/prepare-for-pr/TI-16026/claude-hops/10-harvest.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/10-harvest.out +3 -0
- package/prepare-for-pr/TI-16026/claude-hops/11-harvest.err +1 -0
- package/prepare-for-pr/TI-16026/claude-hops/11-harvest.out +3 -0
- package/prepare-for-pr/TI-16026/commit-note.md +5 -0
- package/prepare-for-pr/TI-16026/evidence-index.json +215 -0
- package/prepare-for-pr/TI-16026/feature-map.before.md +61 -0
- package/prepare-for-pr/TI-16026/harvest-redaction.json +34 -0
- package/prepare-for-pr/TI-16026/harvest-redaction.out +37 -0
- package/prepare-for-pr/TI-16026/harvest.md +46 -0
- package/prepare-for-pr/TI-16026/lessons.md +5 -0
- package/prepare-for-pr/TI-16026/note-harvest-redaction.md +1 -0
- package/prepare-for-pr/TI-16026/open-questions.md +6 -0
- package/prepare-for-pr/TI-16026/publish.md +32 -0
- package/prepare-for-pr/TI-16026/review-convergence-response.md +3 -0
- package/prepare-for-pr/TI-16026/review-input/scope.md +18 -0
- package/prepare-for-pr/TI-16026/review-log.md +57 -0
- package/prepare-for-pr/TI-16026/review-notes.md +97 -0
- package/prepare-for-pr/TI-16026/review-response-r1.md +7 -0
- package/prepare-for-pr/TI-16026/self-test-report.md +67 -0
- package/prepare-for-pr/TI-16026/spec-proposal.md +34 -0
- package/prepare-for-pr/TI-16026/spec-snapshot.md +291 -0
- package/prepare-for-pr/TI-16026/state-log.md +57 -0
- package/prepare-for-pr/TI-16026/user-messages/01.md +12 -0
- package/prepare-for-pr/TI-16026/user-messages/02.md +20 -0
- package/prepare-for-pr/TI-16026/user-messages/03.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/04.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/05.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/06.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/07.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/08.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/09.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/10.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/11.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/12.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/13.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/14.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/15.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/16.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/17.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/18.md +10 -0
- package/prepare-for-pr/TI-16026/user-messages/19.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/20.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/21.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/22.md +1 -0
- package/prepare-for-pr/TI-16026/user-messages/23.md +8 -0
- package/prepare-for-pr/TI-16026/user-messages/24.md +24 -0
- package/prepare-for-pr/TI-16026/user-question.md +24 -0
- package/prepare-for-pr/TI-16026/verify/metrics-check.json +13 -0
- package/prepare-for-pr/TI-16026/verify/redaction.json +38 -0
- package/prepare-for-pr/TI-16026/verify/row-closure.json +45 -0
- package/prepare-for-pr/TI-16026/verify/s04-ws-capture.md +23 -0
- package/prepare-for-pr/TI-16026/verify-after.md +23 -0
- package/prepare-for-pr/TI-16026/verify.json +80 -0
- package/prepare-for-pr/TI-16026.md +408 -0
- package/scripts/auto-version.js +1 -0
- package/scripts/branch-auto-npm-publish.js +9 -2
- package/src/api/payment.js +1 -0
- package/src/machine/auth.js +36 -33
- package/src/machine/game_v2_1.js +15 -0
- package/src/machine/reward_cash.js +2 -2
- package/src/machine/user_sign_up.js +3 -0
- package/src/machine/withdraw/withdraw_manual_cash.js +17 -7
- package/src/request/request.js +103 -4
- package/src/util/constant.js +6 -0
- package/src/util/tokenStore.js +44 -0
- package/test/auth_self_timeout.test.js +171 -0
- package/test/request_self.test.js +288 -0
- package/test/withdraw_manual_cash.test.js +149 -0
- package/tests/session.test.mjs +177 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,86 @@
|
|
|
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.488-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.488-dev.0...v1.1.488-dev.1) (2026-11-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **withdraw:** keep OTP open on ERR_M129 ([884205e](https://github.com/jetthai/cuora-module/commit/884205e1ec6effb2dbbc8129b29bac13a17312af))
|
|
11
|
+
|
|
12
|
+
### [1.1.488-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.488...v1.1.488-dev.0) (2026-11-25)
|
|
13
|
+
|
|
14
|
+
### [1.1.485-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.485...v1.1.485-dev.2) (2026-11-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### ⚠ BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
|
|
20
|
+
BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
|
|
21
|
+
|
|
22
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
27
|
+
* **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
33
|
+
* **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
|
|
34
|
+
* **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
|
|
35
|
+
* **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
|
|
36
|
+
* **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
37
|
+
* **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
38
|
+
* **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
* [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
|
|
42
|
+
|
|
43
|
+
### [1.1.485-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.485-dev.1...v1.1.485-dev.2) (2026-11-19)
|
|
44
|
+
|
|
45
|
+
### [1.1.485-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.485-dev.0...v1.1.485-dev.1) (2026-11-18)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* **constant:** 新增 Prediction 遊戲類別取代 Ball(gameTypeMappingId 12) ([6f861e2](https://github.com/jetthai/cuora-module/commit/6f861e28afd9fdd8a39c286420b4d328aab56f7b))
|
|
51
|
+
|
|
52
|
+
### [1.1.485-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.485...v1.1.485-dev.0) (2026-11-17)
|
|
53
|
+
|
|
54
|
+
### [1.1.483-dev.4](https://github.com/jetthai/cuora-module/compare/v1.1.483...v1.1.483-dev.4) (2026-11-16)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### ⚠ BREAKING CHANGES
|
|
58
|
+
|
|
59
|
+
* 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
|
|
60
|
+
BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
|
|
61
|
+
|
|
62
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
63
|
+
|
|
64
|
+
### Features
|
|
65
|
+
|
|
66
|
+
* **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
67
|
+
* **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Bug Fixes
|
|
71
|
+
|
|
72
|
+
* **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
73
|
+
* **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
|
|
74
|
+
* **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
|
|
75
|
+
* **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
|
|
76
|
+
* **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
77
|
+
* **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
78
|
+
* **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
* [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
|
|
82
|
+
|
|
83
|
+
### [1.1.488](https://github.com/jetthai/cuora-module/compare/v1.1.487...v1.1.488) (2026-11-23)
|
|
84
|
+
|
|
5
85
|
### [1.1.487](https://github.com/jetthai/cuora-module/compare/v1.1.486...v1.1.487) (2026-11-22)
|
|
6
86
|
|
|
7
87
|
### [1.1.486](https://github.com/jetthai/cuora-module/compare/v1.1.485...v1.1.486) (2026-11-22)
|
|
@@ -25,50 +105,101 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
25
105
|
|
|
26
106
|
### [1.1.483](https://github.com/jetthai/cuora-module/compare/v1.1.482...v1.1.483) (2026-11-09)
|
|
27
107
|
|
|
28
|
-
### [1.1.482](https://github.com/jetthai/cuora-module/compare/v1.1.481...v1.1.482) (2026-11-02)
|
|
108
|
+
### [1.1.482](https://github.com/jetthai/cuora-module/compare/v1.1.481-dev.1...v1.1.482) (2026-11-02)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### Bug Fixes
|
|
112
|
+
|
|
113
|
+
* **activity:** getRewardList 參數 orderColum 修正為 orderColumn ([4bcecf8](https://github.com/jetthai/cuora-module/commit/4bcecf843f36c32fc57d909619c437c709131d88))
|
|
114
|
+
|
|
115
|
+
### [1.1.483-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.483-dev.0...v1.1.483-dev.1) (2026-11-12)
|
|
116
|
+
|
|
117
|
+
### [1.1.483-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.481-dev.1...v1.1.483-dev.0) (2026-11-11)
|
|
118
|
+
|
|
29
119
|
|
|
30
120
|
### Bug Fixes
|
|
31
121
|
|
|
32
|
-
|
|
122
|
+
* **otp:** confirm auto verification from user status ([6adee39](https://github.com/jetthai/cuora-module/commit/6adee399a61ec5ac81c89a30036f89b222cf3920))
|
|
123
|
+
* **otp:** require contact data before provider completion ([03b2ee3](https://github.com/jetthai/cuora-module/commit/03b2ee306b4380103133d3709892341aca7db393))
|
|
124
|
+
|
|
125
|
+
### [1.1.481-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.481-dev.0...v1.1.481-dev.1) (2026-10-28)
|
|
126
|
+
|
|
127
|
+
### [1.1.481-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.481...v1.1.481-dev.0) (2026-10-28)
|
|
128
|
+
|
|
129
|
+
### [1.1.477-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.477...v1.1.477-dev.1) (2026-10-16)
|
|
33
130
|
|
|
34
|
-
### [1.1.481](https://github.com/jetthai/cuora-module/compare/v1.1.480...v1.1.481) (2026-10-20)
|
|
35
131
|
|
|
36
132
|
### ⚠ BREAKING CHANGES
|
|
37
133
|
|
|
38
|
-
|
|
39
|
-
|
|
134
|
+
* 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
|
|
135
|
+
BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
|
|
40
136
|
|
|
41
137
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
42
138
|
|
|
43
|
-
|
|
139
|
+
### Features
|
|
140
|
+
|
|
141
|
+
* **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
142
|
+
* **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Bug Fixes
|
|
146
|
+
|
|
147
|
+
* **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
148
|
+
* **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
|
|
149
|
+
* **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
|
|
150
|
+
* **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
|
|
151
|
+
* **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
152
|
+
* **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
153
|
+
* **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
* [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
|
|
157
|
+
|
|
158
|
+
### [1.1.477-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.477-dev.0...v1.1.477-dev.1) (2026-10-16)
|
|
159
|
+
|
|
160
|
+
### [1.1.477-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.477...v1.1.477-dev.0) (2026-10-16)
|
|
161
|
+
|
|
162
|
+
### [1.1.476-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.476...v1.1.476-dev.1) (2026-10-14)
|
|
44
163
|
|
|
45
|
-
### [1.1.480](https://github.com/jetthai/cuora-module/compare/v1.1.479...v1.1.480) (2026-10-19)
|
|
46
164
|
|
|
47
165
|
### ⚠ BREAKING CHANGES
|
|
48
166
|
|
|
49
|
-
|
|
167
|
+
* 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
|
|
168
|
+
BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
|
|
169
|
+
|
|
170
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
171
|
+
* **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
|
|
50
172
|
|
|
51
173
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
174
|
+
* **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
|
|
52
175
|
|
|
53
|
-
-
|
|
176
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
177
|
+
* **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
|
|
54
178
|
|
|
55
179
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
56
180
|
|
|
57
|
-
|
|
181
|
+
### Features
|
|
58
182
|
|
|
59
|
-
|
|
183
|
+
* **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
184
|
+
* **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
|
|
60
185
|
|
|
61
|
-
### Bug Fixes
|
|
62
186
|
|
|
63
|
-
|
|
187
|
+
### Bug Fixes
|
|
64
188
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
189
|
+
* **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
190
|
+
* **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
|
|
191
|
+
* **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
|
|
192
|
+
* **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
|
|
193
|
+
* **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
|
|
194
|
+
* **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
195
|
+
* **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
196
|
+
* **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
68
197
|
|
|
69
|
-
### [1.1.479](https://github.com/jetthai/cuora-module/compare/v1.1.478...v1.1.479) (2026-10-19)
|
|
70
198
|
|
|
71
|
-
|
|
199
|
+
* [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
|
|
200
|
+
* **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
|
|
201
|
+
* **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
|
|
202
|
+
* **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
|
|
72
203
|
|
|
73
204
|
### [1.1.477](https://github.com/jetthai/cuora-module/compare/v1.1.476...v1.1.477) (2026-10-16)
|
|
74
205
|
|
|
@@ -76,6 +207,69 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
|
76
207
|
|
|
77
208
|
- **activity:** activity_cash 明細略過(resolve null)時 setProgressSummary 不再拋錯卡死 machine ([67cd813](https://github.com/jetthai/cuora-module/commit/67cd8137f1cbb310d43d02c068ed0a896e2c6623))
|
|
78
209
|
|
|
210
|
+
### [1.1.476-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.476-dev.0...v1.1.476-dev.1) (2026-10-14)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
### Bug Fixes
|
|
214
|
+
|
|
215
|
+
* **activity:** activity_cash 明細略過(resolve null)時 setProgressSummary 不再拋錯卡死 machine ([67cd813](https://github.com/jetthai/cuora-module/commit/67cd8137f1cbb310d43d02c068ed0a896e2c6623))
|
|
216
|
+
|
|
217
|
+
### [1.1.476](https://github.com/jetthai/cuora-module/compare/v1.1.475...v1.1.476) (2026-10-13)
|
|
218
|
+
|
|
219
|
+
### [1.1.475](https://github.com/jetthai/cuora-module/compare/v1.1.473...v1.1.475) (2026-10-12)
|
|
220
|
+
|
|
221
|
+
### [1.1.476-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.473-dev.0...v1.1.476-dev.0) (2026-10-13)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### ⚠ BREAKING CHANGES
|
|
225
|
+
|
|
226
|
+
* 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
|
|
227
|
+
BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
|
|
228
|
+
|
|
229
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
230
|
+
|
|
231
|
+
* [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
|
|
232
|
+
|
|
233
|
+
### [1.1.473-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.473...v1.1.473-dev.0) (2026-10-07)
|
|
234
|
+
|
|
235
|
+
### [1.1.472-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.472...v1.1.472-dev.2) (2026-10-01)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
### ⚠ BREAKING CHANGES
|
|
239
|
+
|
|
240
|
+
* **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
|
|
241
|
+
|
|
242
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
243
|
+
* **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
|
|
244
|
+
|
|
245
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
246
|
+
* **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
|
|
247
|
+
|
|
248
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
249
|
+
|
|
250
|
+
### Features
|
|
251
|
+
|
|
252
|
+
* **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
253
|
+
* **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
### Bug Fixes
|
|
257
|
+
|
|
258
|
+
* **activity:** activity_cash 列表與明細回應格式異常時改走 onError,避免 machine 卡死 ([fea8494](https://github.com/jetthai/cuora-module/commit/fea8494d8c0ff084f8994cb58b8f1f7e3800024a))
|
|
259
|
+
* **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
260
|
+
* **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
|
|
261
|
+
* **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
|
|
262
|
+
* **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
|
|
263
|
+
* **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
|
|
264
|
+
* **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
265
|
+
* **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
266
|
+
* **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
* **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
|
|
270
|
+
* **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
|
|
271
|
+
* **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
|
|
272
|
+
|
|
79
273
|
### [1.1.476](https://github.com/jetthai/cuora-module/compare/v1.1.475...v1.1.476) (2026-10-13)
|
|
80
274
|
|
|
81
275
|
### Bug Fixes
|
|
@@ -88,27 +282,135 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
|
88
282
|
|
|
89
283
|
### [1.1.473](https://github.com/jetthai/cuora-module/compare/v1.1.472...v1.1.473) (2026-10-05)
|
|
90
284
|
|
|
285
|
+
### [1.1.472-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.472-dev.1...v1.1.472-dev.2) (2026-10-01)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
### Bug Fixes
|
|
289
|
+
|
|
290
|
+
* **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
|
|
291
|
+
* **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
|
|
292
|
+
|
|
293
|
+
### [1.1.472-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.472-dev.0...v1.1.472-dev.1) (2026-10-01)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
### Bug Fixes
|
|
297
|
+
|
|
298
|
+
* **activity:** activity_cash 列表與明細回應格式異常時改走 onError,避免 machine 卡死 ([fea8494](https://github.com/jetthai/cuora-module/commit/fea8494d8c0ff084f8994cb58b8f1f7e3800024a))
|
|
299
|
+
|
|
91
300
|
### [1.1.472](https://github.com/jetthai/cuora-module/compare/v1.1.471...v1.1.472) (2026-09-24)
|
|
92
301
|
|
|
93
302
|
### [1.1.471](https://github.com/jetthai/cuora-module/compare/v1.1.470...v1.1.471) (2026-09-23)
|
|
94
303
|
|
|
304
|
+
### [1.1.472-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.471-dev.1...v1.1.472-dev.0) (2026-09-29)
|
|
305
|
+
|
|
306
|
+
### [1.1.471-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.471-dev.0...v1.1.471-dev.1) (2026-09-24)
|
|
307
|
+
|
|
308
|
+
### [1.1.471-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.470-dev.2...v1.1.471-dev.0) (2026-09-23)
|
|
309
|
+
|
|
95
310
|
### [1.1.470](https://github.com/jetthai/cuora-module/compare/v1.1.469...v1.1.470) (2026-09-14)
|
|
96
311
|
|
|
312
|
+
### [1.1.469](https://github.com/jetthai/cuora-module/compare/v1.1.468...v1.1.469) (2026-09-13)
|
|
313
|
+
|
|
314
|
+
### [1.1.470-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.470-dev.1...v1.1.470-dev.2) (2026-09-17)
|
|
315
|
+
|
|
316
|
+
### [1.1.470-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.470-dev.0...v1.1.470-dev.1) (2026-09-17)
|
|
317
|
+
|
|
318
|
+
### Features
|
|
319
|
+
|
|
320
|
+
* **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
|
|
321
|
+
|
|
322
|
+
### [1.1.470-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.468-dev.1...v1.1.470-dev.0) (2026-09-14)
|
|
323
|
+
|
|
324
|
+
### [1.1.468-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.468-dev.0...v1.1.468-dev.1) (2026-09-13)
|
|
325
|
+
|
|
326
|
+
### [1.1.468-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.468...v1.1.468-dev.0) (2026-09-12)
|
|
327
|
+
|
|
328
|
+
### [1.1.467-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.467...v1.1.467-dev.2) (2026-09-10)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
### ⚠ BREAKING CHANGES
|
|
332
|
+
|
|
333
|
+
* **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
|
|
334
|
+
|
|
335
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
336
|
+
* **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
|
|
337
|
+
|
|
338
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
339
|
+
* **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
|
|
340
|
+
|
|
341
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
342
|
+
|
|
343
|
+
### Features
|
|
344
|
+
|
|
345
|
+
* **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
346
|
+
|
|
347
|
+
|
|
97
348
|
### Bug Fixes
|
|
98
349
|
|
|
99
|
-
|
|
350
|
+
* **auth:** 清除站台已停用登入方式殘留的記住帳號 ([2c6b965](https://github.com/jetthai/cuora-module/commit/2c6b96572108cfc977d7dc99635adebbee01db46))
|
|
351
|
+
* **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
352
|
+
* **machine:** user_sign_up 的 registrationData 補上 agentId ([833e8c9](https://github.com/jetthai/cuora-module/commit/833e8c90c0ff554cff651bdb7045ed514d42035e))
|
|
353
|
+
* **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
|
|
354
|
+
* **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
|
|
355
|
+
* **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
356
|
+
* **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
357
|
+
* **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
* **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
|
|
361
|
+
* **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
|
|
362
|
+
* **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
|
|
363
|
+
|
|
364
|
+
### [1.1.467-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.467-dev.1...v1.1.467-dev.2) (2026-09-10)
|
|
100
365
|
|
|
101
|
-
### [1.1.469](https://github.com/jetthai/cuora-module/compare/v1.1.468...v1.1.469) (2026-09-13)
|
|
102
366
|
|
|
103
367
|
### Bug Fixes
|
|
104
368
|
|
|
105
|
-
|
|
369
|
+
* **machine:** user_sign_up 的 registrationData 補上 agentId ([833e8c9](https://github.com/jetthai/cuora-module/commit/833e8c90c0ff554cff651bdb7045ed514d42035e))
|
|
370
|
+
|
|
371
|
+
### [1.1.467-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.467-dev.0...v1.1.467-dev.1) (2026-09-09)
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
### ⚠ BREAKING CHANGES
|
|
375
|
+
|
|
376
|
+
* **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
|
|
377
|
+
|
|
378
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
379
|
+
* **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
|
|
380
|
+
|
|
381
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
382
|
+
* **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
|
|
383
|
+
|
|
384
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
385
|
+
|
|
386
|
+
### Bug Fixes
|
|
387
|
+
|
|
388
|
+
* **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
* **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
|
|
392
|
+
* **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
|
|
393
|
+
* **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
|
|
394
|
+
|
|
395
|
+
### [1.1.467-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.467...v1.1.467-dev.0) (2026-09-09)
|
|
396
|
+
|
|
397
|
+
### [1.1.466-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.466...v1.1.466-dev.0) (2026-09-06)
|
|
106
398
|
|
|
107
|
-
### [1.1.468](https://github.com/jetthai/cuora-module/compare/v1.1.467...v1.1.468) (2026-09-11)
|
|
108
399
|
|
|
109
400
|
### Features
|
|
110
401
|
|
|
111
|
-
|
|
402
|
+
* **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
403
|
+
* **payment:** 新增 getPaymentPromotions API 描述符 ([0319692](https://github.com/jetthai/cuora-module/commit/03196925d989333e4bdb11cd933c18b6ace65d83))
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
### Bug Fixes
|
|
407
|
+
|
|
408
|
+
* **auth:** 清除站台已停用登入方式殘留的記住帳號 ([2c6b965](https://github.com/jetthai/cuora-module/commit/2c6b96572108cfc977d7dc99635adebbee01db46))
|
|
409
|
+
* **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
410
|
+
* **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
|
|
411
|
+
* **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
412
|
+
* **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
413
|
+
* **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
112
414
|
|
|
113
415
|
### [1.1.467](https://github.com/jetthai/cuora-module/compare/v1.1.466...v1.1.467) (2026-09-06)
|
|
114
416
|
|
|
@@ -118,15 +420,74 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
|
118
420
|
|
|
119
421
|
### [1.1.466](https://github.com/jetthai/cuora-module/compare/v1.1.465...v1.1.466) (2026-08-31)
|
|
120
422
|
|
|
423
|
+
### [1.1.465-dev.4](https://github.com/jetthai/cuora-module/compare/v1.1.465-dev.3...v1.1.465-dev.4) (2026-08-24)
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
### Bug Fixes
|
|
427
|
+
|
|
428
|
+
* **auth:** 清除站台已停用登入方式殘留的記住帳號 ([2c6b965](https://github.com/jetthai/cuora-module/commit/2c6b96572108cfc977d7dc99635adebbee01db46))
|
|
429
|
+
|
|
430
|
+
### [1.1.465-dev.3](https://github.com/jetthai/cuora-module/compare/v1.1.465-dev.2...v1.1.465-dev.3) (2026-08-19)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
### Bug Fixes
|
|
434
|
+
|
|
435
|
+
* **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
|
|
436
|
+
|
|
437
|
+
### [1.1.465-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.465-dev.1...v1.1.465-dev.2) (2026-08-19)
|
|
438
|
+
|
|
439
|
+
### [1.1.465-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.465-dev.0...v1.1.465-dev.1) (2026-08-19)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
### Features
|
|
443
|
+
|
|
444
|
+
* **payment:** 新增 getPaymentPromotions API 描述符 ([0319692](https://github.com/jetthai/cuora-module/commit/03196925d989333e4bdb11cd933c18b6ace65d83))
|
|
445
|
+
|
|
446
|
+
### [1.1.465](https://github.com/jetthai/cuora-module/compare/v1.1.464...v1.1.465) (2026-08-17)
|
|
447
|
+
|
|
448
|
+
### [1.1.464](https://github.com/jetthai/cuora-module/compare/v1.1.463...v1.1.464) (2026-08-16)
|
|
449
|
+
|
|
450
|
+
### [1.1.465-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.463-dev.3...v1.1.465-dev.0) (2026-08-17)
|
|
451
|
+
|
|
121
452
|
### [1.1.465](https://github.com/jetthai/cuora-module/compare/v1.1.464...v1.1.465) (2026-08-17)
|
|
122
453
|
|
|
454
|
+
### [1.1.463-dev.3](https://github.com/jetthai/cuora-module/compare/v1.1.463-dev.2...v1.1.463-dev.3) (2026-08-17)
|
|
455
|
+
|
|
123
456
|
### [1.1.464](https://github.com/jetthai/cuora-module/compare/v1.1.463...v1.1.464) (2026-08-16)
|
|
124
457
|
|
|
458
|
+
|
|
125
459
|
### Bug Fixes
|
|
126
460
|
|
|
127
461
|
- **deposit:** 切換存款活動不再重設使用者已選的通道 ([b9c1de2](https://github.com/jetthai/cuora-module/commit/b9c1de2f3665c56f52d7b074e892837e836d02fa))
|
|
128
462
|
- **user_sign_up:** 明確輸入判定改用 !== undefined,修復三層解析成為死碼 ([770450e](https://github.com/jetthai/cuora-module/commit/770450e6065d42d497504d2f8630c6740ec1e7c4))
|
|
129
463
|
|
|
464
|
+
### [1.1.463-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.463-dev.1...v1.1.463-dev.2) (2026-08-16)
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
### Bug Fixes
|
|
468
|
+
|
|
469
|
+
* **deposit:** 切換存款活動不再重設使用者已選的通道 ([b9c1de2](https://github.com/jetthai/cuora-module/commit/b9c1de2f3665c56f52d7b074e892837e836d02fa))
|
|
470
|
+
|
|
471
|
+
### [1.1.463-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.463-dev.0...v1.1.463-dev.1) (2026-08-13)
|
|
472
|
+
|
|
473
|
+
### [1.1.463-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.463...v1.1.463-dev.0) (2026-08-13)
|
|
474
|
+
|
|
475
|
+
### [1.1.455-dev.8](https://github.com/jetthai/cuora-module/compare/v1.1.455...v1.1.455-dev.8) (2026-08-09)
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
### Features
|
|
479
|
+
|
|
480
|
+
* **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
### Bug Fixes
|
|
484
|
+
|
|
485
|
+
* **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
486
|
+
* **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
487
|
+
* **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
488
|
+
* **user_sign_up:** 明確輸入判定改用 !== undefined,修復三層解析成為死碼 ([770450e](https://github.com/jetthai/cuora-module/commit/770450e6065d42d497504d2f8630c6740ec1e7c4))
|
|
489
|
+
* **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
490
|
+
|
|
130
491
|
### [1.1.463](https://github.com/jetthai/cuora-module/compare/v1.1.462...v1.1.463) (2026-08-12)
|
|
131
492
|
|
|
132
493
|
### [1.1.462](https://github.com/jetthai/cuora-module/compare/v1.1.461...v1.1.462) (2026-08-10)
|
|
@@ -143,6 +504,44 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
|
143
504
|
|
|
144
505
|
### [1.1.456](https://github.com/jetthai/cuora-module/compare/v1.1.455...v1.1.456) (2026-08-09)
|
|
145
506
|
|
|
507
|
+
### [1.1.455-dev.8](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.7...v1.1.455-dev.8) (2026-08-09)
|
|
508
|
+
|
|
509
|
+
### [1.1.455-dev.7](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.6...v1.1.455-dev.7) (2026-08-07)
|
|
510
|
+
|
|
511
|
+
### [1.1.455-dev.6](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.5...v1.1.455-dev.6) (2026-08-07)
|
|
512
|
+
|
|
513
|
+
### [1.1.455-dev.5](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.4...v1.1.455-dev.5) (2026-08-07)
|
|
514
|
+
|
|
515
|
+
### [1.1.455-dev.4](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.3...v1.1.455-dev.4) (2026-08-07)
|
|
516
|
+
|
|
517
|
+
### [1.1.455-dev.3](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.2...v1.1.455-dev.3) (2026-08-07)
|
|
518
|
+
|
|
519
|
+
### [1.1.455-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.1...v1.1.455-dev.2) (2026-08-06)
|
|
520
|
+
|
|
521
|
+
### [1.1.455-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.0...v1.1.455-dev.1) (2026-08-04)
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
### Bug Fixes
|
|
525
|
+
|
|
526
|
+
- **user_sign_up:** 明確輸入判定改用 !== undefined,修復三層解析成為死碼 ([770450e](https://github.com/jetthai/cuora-module/commit/770450e6065d42d497504d2f8630c6740ec1e7c4))
|
|
527
|
+
|
|
528
|
+
### [1.1.455-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.455...v1.1.455-dev.0) (2026-08-04)
|
|
529
|
+
|
|
530
|
+
### [1.1.454-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.453...v1.1.454-dev.0) (2026-07-29)
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
### Features
|
|
534
|
+
|
|
535
|
+
- **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
### Bug Fixes
|
|
539
|
+
|
|
540
|
+
- **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
|
|
541
|
+
- **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
|
|
542
|
+
- **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
|
|
543
|
+
- **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
|
|
544
|
+
|
|
146
545
|
### [1.1.455](https://github.com/jetthai/cuora-module/compare/v1.1.453...v1.1.455) (2026-08-03)
|
|
147
546
|
|
|
148
547
|
### Bug Fixes
|
package/CLAUDE.md
CHANGED
|
@@ -144,7 +144,7 @@ State machines **do not directly reference each other**; they communicate indire
|
|
|
144
144
|
| `ERR_F108` | System under maintenance (**dual interception**: `request.js` sets `isBlocked` to block subsequent non-config requests; `error.js` routes to logout) |
|
|
145
145
|
| `ERR_A103` | Missing auth token |
|
|
146
146
|
| `ERR_A104` / `ERR_A113` / `ERR_A201` / `ERR_A204` | Auth invalidation / logout class |
|
|
147
|
-
| `ERR_A108` |
|
|
147
|
+
| `ERR_A108` | Token expired (`send()` renews via `/self` first, and only on success resends the original request once; see item 15 of 2.9) |
|
|
148
148
|
| `ERR_F106` | OTP verification failed |
|
|
149
149
|
| `ERR_G106` | Insufficient balance (→ deposit state) |
|
|
150
150
|
| `ERR_G124` / `ERR_G125` | Free game settlement / forfeit |
|
|
@@ -161,16 +161,25 @@ This section explains how each module actually operates, its non-obvious behavio
|
|
|
161
161
|
|
|
162
162
|
### 2.1 Authentication & Token Lifecycle
|
|
163
163
|
|
|
164
|
-
**Token survival strategy**: the token TTL is only 5 minutes (`maxAge: 300`), kept alive by continuous `fetchUserInfo` polling. On each successful poll, `extendToken` rewrites
|
|
164
|
+
**Token survival strategy**: the token TTL is only 5 minutes (`maxAge: 300`), kept alive by continuous `fetchUserInfo` polling. On each successful poll, `extendToken` rewrites the cookie and resets the TTL. **Tokens are never auto-renewed** — if `fetchUserInfo` fails, the token expires naturally and the session terminates on its own.
|
|
165
165
|
|
|
166
166
|
```
|
|
167
167
|
Token 5min TTL → fetchUserInfo success → extendToken resets TTL → poll again
|
|
168
168
|
fetchUserInfo failure → leaving state → logout
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
- **
|
|
171
|
+
**`/self` single-flight and its dedicated timeout** (`request.js`, TI-16263): for `GET self` (`_isSelfRead`: non-public, url is `'self'` after stripping the query) `send()` shares one in-flight promise keyed by `[channel, token, url, params, headers, silent]` — shared only when all of them are identical; a different identity or different params each get their own request. `channel` is a classification field on the descriptor (never sent to the backend): `polling` (`pollUserInfo` in `auth.js`, used by `inline.fetching` / `login.fetching`), `freeGame` (the downstream wait after claiming a free game), and `standalone` by default (every other entry); the three channels each send their own request and never share or skip one another; calls passing their own `customToken` are not shared. Every `/self` read has a `SELF_REQUEST_TIMEOUT_MS` deadline (15 seconds, `util/constant.js`); when it expires the request is cancelled and rejects with `{ code: 'ERR_998', endpoint, isTimeout: true }`.
|
|
172
|
+
|
|
173
|
+
- **Single-flight must be paired with a timeout**: without one, a `/self` that never answers permanently stops the polling that shares it. Do the same when adding single-flight to another endpoint.
|
|
174
|
+
- **The read timeout must not be switched to axios's `timeout`**: `ECONNABORTED` gets re-sent by the downstream axios-retry; a cancelled error carries no `config` and is not retried. `POST self` (`_isSelfWrite`) is deliberately the opposite: each attempt gets 15 seconds and is retried per the downstream's existing settings, so it uses axios's `timeout` plus `'axios-retry': { shouldResetTimeout: true }`; when the retries are exhausted and it still times out, the error becomes `{ code: 'ERR_998', isTimeout: true }` and does not reach `errorHandler`.
|
|
175
|
+
- **A successful `GET /self` extends the token**: on a successful read (all three channels count), `_extendToken` resets the token's TTL to 5 minutes (only while the token sent is still the current one). While the main polling keeps timing out, a single successful read from another channel keeps the TTL from logging the user out. A successful `POST self` does **not** extend it: the backend renews the token only on `GET /self`.
|
|
176
|
+
- **A `/self` timeout never logs out**: the `isSelfTimeout` guard in `auth.js` only accepts `event.data.isTimeout === true`, and a timeout re-sends instead — `authenticated` → `userInfoRetrying`, `tokenAuthenticated` re-enters itself, `inline.fetching` / `login.checkDeviceTokenDone` / `login.fetching` → `pending` (wait for the next tick). A plain `ERR_998` (a network error that fails immediately) and authentication failures still go to `leaving`. Only once the token's 5-minute TTL has expired does `send()` return `ERR_A103` and the flow naturally reaches `leaving`.
|
|
177
|
+
- **`userInfoRetrying` is an externally visible state**: when the first `/self` after login times out, the machine stays here re-sending and moves to `otpChecking` on success. It deliberately does not re-enter `authenticated` — downstream fires one-off side effects on `state.matches('authenticated')` (saving credentials, registration conversion tracking), and re-entering would fire them again. Downstream code that enumerates auth states (loading checks, etc.) must treat it as a continuation of `authenticated`.
|
|
178
|
+
|
|
179
|
+
- **Storage location**: a cookie named `cuora_{clientId}`, with no `Domain` attribute (not shared across subdomains), `SameSite=Lax`, plus `Secure` under https. It is read and written only through `Request`'s `getToken()` / `setToken()` / `extendToken()` / `removeToken()` (implemented in `util/tokenStore.js`); **downstream frontends must not read or write this cookie themselves, and must no longer use `storage.get('cuora_{clientId}')` to determine login state** — `storage` is still localStorage, and the token no longer lives there. When `Request` is constructed, it clears any leftover same-named value from localStorage rather than reusing the old token
|
|
180
|
+
- **Unreadable in cross-site iframes**: a `SameSite=Lax` cookie cannot be read or written inside a cross-site iframe (e.g. a Mini App embedded in Telegram Web), so login state cannot be maintained in that context; this is an accepted limitation
|
|
172
181
|
- **Injection**: the request interceptor automatically adds `Authorization: Bearer {token}`
|
|
173
|
-
- **TTL**: token 300 seconds, account info 31 days, cookie data 7 days
|
|
182
|
+
- **TTL**: token 300 seconds (`TOKEN_MAX_AGE`; on expiry the browser removes the cookie), account info 31 days, cookie data 7 days
|
|
174
183
|
|
|
175
184
|
**Token revocation & foreground gate** (`request.js`): `revokeToken(token)` and `beginTokenGate(promise, timeoutMs = 3000)` are public `Request` methods with **no caller inside this package** — the downstream frontends call them on logout-class errors and when the app returns to the foreground; changing their signatures or semantics is a public-interface change.
|
|
176
185
|
|
|
@@ -281,6 +290,7 @@ There are only 4 guards: `hasNoBank` (`REFRESH` only reloads when no account is
|
|
|
281
290
|
- **Parallel architecture** (`game_v2_1.js`): `flow` (UI interaction and game loading) and `timer` (auto-update every 20 seconds) run simultaneously
|
|
282
291
|
- **Static-data fallback**: when logged out, `staticData` is used, slicing 20 entries per page from cache with **no API call**
|
|
283
292
|
- **Game-switching mechanism**: when switching to another game while in one, `connectSwitching` disconnects the old game first, then `connecting` connects to the new one
|
|
293
|
+
- **Two ways to leave a game**: `EXIT_GAME` goes through `disconnect`, which calls `game/logout`; `ABANDON_GAME` returns straight to `idle` and clears the game URL, **without calling `game/logout`**. The latter is only for when "the session has been replaced (re-login) and the game page must be left" — logging the old session out of the game no longer serves any purpose. Once `ABANDON_GAME` has been sent, the `EXIT_GAME` that is still sent as usual when the page unloads is not handled in `idle`
|
|
284
294
|
- **Provider-specific behavior**: some providers use `${origin}${base}return` as the returnURL, while the rest use `window.location.href` (with the query string stripped). The allowlist is `returnProviders` in `game_v2_1.js`
|
|
285
295
|
- **Response mapping**: backend `redirect_url` → `gameURL`, `wallet_type` → `gameWalletType`; some games return embedded `gameHtml` instead of a URL
|
|
286
296
|
|
|
@@ -382,14 +392,14 @@ A `CONNECT_ERROR` / `DISCONNECT` sent in by downstream itself, without `internal
|
|
|
382
392
|
8. Custom paramsSerializer: special encoding for the q parameter (avoids double-encoding)
|
|
383
393
|
9. axios.request(config)
|
|
384
394
|
10. Response interceptor: response.data.error present → reject; Network Error / 404 → ERR_998 + Sentry
|
|
385
|
-
11. Error handling (in order): cancellation → reject ERR_800 (never reaches errorHandler); token-carrying requests get a non-enumerable requestToken attached to the error; ERR_F108 → isBlocked + errorHandler; stale-identity error → thrown directly (see item 14 of 2.9); ERR_998 → thrown directly; everything else → errorHandler (skipped when the descriptor carries silent: true, still thrown); non-cancellation error whose code is already ERR_800 → resolves undefined
|
|
395
|
+
11. Error handling (in order): cancellation → reject ERR_800 (never reaches errorHandler); ERR_A108 → renew via /self first, and only on success resend the original request once (see item 15 of 2.9); token-carrying requests get a non-enumerable requestToken attached to the error; ERR_F108 → isBlocked + errorHandler; stale-identity error → thrown directly (see item 14 of 2.9); ERR_998 → thrown directly; everything else → errorHandler (skipped when the descriptor carries silent: true, still thrown); non-cancellation error whose code is already ERR_800 → resolves undefined
|
|
386
396
|
```
|
|
387
397
|
|
|
388
398
|
**V1→V2 conversion**: `supportVersion2List` supports dynamic paths (e.g. `payment/v2/:paymentType/transaction`, where `:param` is replaced by `[^/]+`); special paths are hard-coded in `specifyingPath`, and the rest are auto-converted via `/([a-z])([A-Z])/g`. **When adding an endpoint that needs V2 conversion, it must be added to the list manually.**
|
|
389
399
|
|
|
390
400
|
### 2.9 Critical Design Constraints & Gotchas
|
|
391
401
|
|
|
392
|
-
1. **Token extension only happens when `
|
|
402
|
+
1. **Token extension only happens when `/self` succeeds**: tokens are never auto-renewed and depend on a successful `/self` (polling, a read from any other entry, or `POST self`). API failure → the session terminates. The only exception is the 15-second `/self` timeout — no logout, it re-sends instead (see 2.1).
|
|
393
403
|
2. **A leading slash changes routing**: `/payment/v2/...` (the withdrawal OTP endpoints) **deliberately** bypasses `url-join`'s baseURL composition and starts from the API root. Regular endpoints should not have a leading slash.
|
|
394
404
|
3. **`register` mixes parameter passing**: `channel`/`subchannel`/`ac`/`fc` are appended to the URL query string while the rest go in the body. **This is the only endpoint using this pattern.**
|
|
395
405
|
4. **OTP endpoints marked `isPublic`**: the withdrawal OTP `acknowledge`/`reset` endpoints are `isPublic: true` even though the operations are sensitive — this is because the token may already have expired during the OTP flow, and is **not a security oversight**.
|
|
@@ -403,6 +413,7 @@ A `CONNECT_ERROR` / `DISCONNECT` sent in by downstream itself, without `internal
|
|
|
403
413
|
12. **`silent: true` only skips errorHandler**: the error is still thrown to the caller's `onError`, and `ERR_F108` is still routed as usual; but every other error code — **including logout-class codes such as `ERR_A104`, and `ERR_G106` insufficient balance** — never reaches the error machine. Use it only for background requests whose session invalidation is already covered by `fetchUserInfo` polling; never add it to user-initiated requests.
|
|
404
414
|
13. **`send()` does not guarantee an object, and `assign()` must never throw**: non-config requests during maintenance (`isBlocked`) and non-cancellation errors that already carry `code: 'ERR_800'` make `send()` **resolve `undefined`** (they never reach `onError`); a 200 response with a non-JSON body resolves a string, so destructuring `{ data }` yields `undefined`. Cancellations (`customToken` cancellation, `revokeToken` revocation), by contrast, reject with `ERR_800` and **do reach `onError`** — they never resolve `undefined`. When an `assign()` throws, XState v4 clears the event queue and the state is not updated — the machine stays in the current invoke state and `after`-based polling stops until an external event (e.g. `REFRESH`) moves it out. **Validate response shapes inside the service and `throw` there (reject → `onError`)**; every assign in `onDone` must handle every value the service can resolve, including deliberate `return null` early exits.
|
|
405
415
|
14. **Late errors from a stale identity never reach errorHandler**: when the token a request was sent with differs from the current token (and a current token exists), the error is only thrown to the caller's `onError` and not forwarded to errorHandler — so a late logout-class error from an old session can't log out a newly logged-in identity. When there is no current token (TTL expired or already cleared), routing is unchanged so that `ERR_A204`-style popups aren't swallowed; the `ERR_F108` check comes before this one and still routes as usual.
|
|
416
|
+
15. **`ERR_A108` is resent only once, and only after asking `/self`**: when a token-carrying non-public request receives `ERR_A108`, `send()` first sends a single `silent` `/self`; only if that succeeds and the token has not changed is the original request resent, once. `/self` itself, an already-resent request, and a request whose identity changed during the renewal are never resent; if the renewal fails or the resent request still gets `ERR_A108`, the original error follows the existing routing into errorHandler. **Never turn this into a retry loop** — a failed `/self` means the session has really ended, and downstream relies on this error to log out.
|
|
406
417
|
|
|
407
418
|
---
|
|
408
419
|
|