@jetthai/cuora 1.1.483 → 1.1.485-dev.0

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.
Files changed (108) hide show
  1. package/.claude/commands/sync-ai-prompts.md +88 -1
  2. package/.claude/settings.local.json +3 -1
  3. package/.github/copilot-instructions.md +19 -10
  4. package/.husky/post-checkout +3 -3
  5. package/.husky/pre-push +1 -1
  6. package/.prettierignore +2 -1
  7. package/AGENTS.md +19 -10
  8. package/AI_PROMPT_SOURCE.md +19 -10
  9. package/CHANGELOG.md +386 -23
  10. package/CLAUDE.md +19 -10
  11. package/GEMINI.md +19 -10
  12. package/docs/my-claude/feat-sharon-JT-1790247240-socket/branch-transfer.md +14 -0
  13. package/docs/my-claude/feat-sharon-JT-1790247240-socket/cash-module-preparation.json +40 -0
  14. package/docs/my-claude/feat-sharon-JT-1790247240-socket/cash-module-verification.md +41 -0
  15. package/docs/my-claude/feat-sharon-JT-1790247240-socket/implementation-ledger.md +87 -0
  16. package/docs/my-claude/feat-sharon-JT-1790247240-socket/module-report.md +73 -0
  17. package/docs/my-claude/feat-sharon-JT-1790247240-socket/plan.md +309 -0
  18. package/docs/my-claude/feat-sharon-JT-1790247240-socket/test-cases.md +245 -0
  19. package/docs/my-claude/feat-sharon-JT-1791180540-onesignal/transfer.md +9 -0
  20. package/e2e/feature-map.md +61 -0
  21. package/package.json +1 -1
  22. package/prepare-for-pr/JT-1776243420.md +85 -0
  23. package/prepare-for-pr/TI-16026/STATE.md +17 -0
  24. package/prepare-for-pr/TI-16026/after-prepare-authorization.md +3 -0
  25. package/prepare-for-pr/TI-16026/analysis.md +38 -0
  26. package/prepare-for-pr/TI-16026/answer-analyze-01.md +1 -0
  27. package/prepare-for-pr/TI-16026/answer-commit-01.md +2 -0
  28. package/prepare-for-pr/TI-16026/answer-commit-02.md +1 -0
  29. package/prepare-for-pr/TI-16026/bundle.json +18 -0
  30. package/prepare-for-pr/TI-16026/checklist.md +39 -0
  31. package/prepare-for-pr/TI-16026/claude-after-model +1 -0
  32. package/prepare-for-pr/TI-16026/claude-commit-session +1 -0
  33. package/prepare-for-pr/TI-16026/claude-harvest-session +1 -0
  34. package/prepare-for-pr/TI-16026/claude-hops/01-analyze.err +1 -0
  35. package/prepare-for-pr/TI-16026/claude-hops/01-analyze.out +2 -0
  36. package/prepare-for-pr/TI-16026/claude-hops/02-analyze.err +1 -0
  37. package/prepare-for-pr/TI-16026/claude-hops/02-analyze.out +4 -0
  38. package/prepare-for-pr/TI-16026/claude-hops/03-dev.err +1 -0
  39. package/prepare-for-pr/TI-16026/claude-hops/03-dev.out +4 -0
  40. package/prepare-for-pr/TI-16026/claude-hops/04-dev.err +1 -0
  41. package/prepare-for-pr/TI-16026/claude-hops/04-dev.out +4 -0
  42. package/prepare-for-pr/TI-16026/claude-hops/05-dev.err +1 -0
  43. package/prepare-for-pr/TI-16026/claude-hops/05-dev.out +3 -0
  44. package/prepare-for-pr/TI-16026/claude-hops/06-after.err +1 -0
  45. package/prepare-for-pr/TI-16026/claude-hops/06-after.out +2 -0
  46. package/prepare-for-pr/TI-16026/claude-hops/07-commit.err +1 -0
  47. package/prepare-for-pr/TI-16026/claude-hops/07-commit.out +2 -0
  48. package/prepare-for-pr/TI-16026/claude-hops/08-commit.err +1 -0
  49. package/prepare-for-pr/TI-16026/claude-hops/08-commit.out +2 -0
  50. package/prepare-for-pr/TI-16026/claude-hops/09-commit.err +1 -0
  51. package/prepare-for-pr/TI-16026/claude-hops/09-commit.out +8 -0
  52. package/prepare-for-pr/TI-16026/claude-hops/10-harvest.err +1 -0
  53. package/prepare-for-pr/TI-16026/claude-hops/10-harvest.out +3 -0
  54. package/prepare-for-pr/TI-16026/commit-note.md +5 -0
  55. package/prepare-for-pr/TI-16026/feature-map.before.md +61 -0
  56. package/prepare-for-pr/TI-16026/harvest-redaction.out +1 -0
  57. package/prepare-for-pr/TI-16026/harvest.md +37 -0
  58. package/prepare-for-pr/TI-16026/lessons.md +5 -0
  59. package/prepare-for-pr/TI-16026/open-questions.md +6 -0
  60. package/prepare-for-pr/TI-16026/publish.md +28 -0
  61. package/prepare-for-pr/TI-16026/review-convergence-response.md +3 -0
  62. package/prepare-for-pr/TI-16026/review-input/scope.md +18 -0
  63. package/prepare-for-pr/TI-16026/review-log.md +57 -0
  64. package/prepare-for-pr/TI-16026/review-notes.md +97 -0
  65. package/prepare-for-pr/TI-16026/review-response-r1.md +7 -0
  66. package/prepare-for-pr/TI-16026/spec-proposal.md +34 -0
  67. package/prepare-for-pr/TI-16026/spec-snapshot.md +291 -0
  68. package/prepare-for-pr/TI-16026/state-log.md +35 -0
  69. package/prepare-for-pr/TI-16026/user-messages/01.md +12 -0
  70. package/prepare-for-pr/TI-16026/user-messages/02.md +20 -0
  71. package/prepare-for-pr/TI-16026/user-messages/03.md +1 -0
  72. package/prepare-for-pr/TI-16026/user-messages/04.md +1 -0
  73. package/prepare-for-pr/TI-16026/user-messages/05.md +1 -0
  74. package/prepare-for-pr/TI-16026/user-messages/06.md +1 -0
  75. package/prepare-for-pr/TI-16026/user-messages/07.md +1 -0
  76. package/prepare-for-pr/TI-16026/user-messages/08.md +1 -0
  77. package/prepare-for-pr/TI-16026/user-messages/09.md +1 -0
  78. package/prepare-for-pr/TI-16026/user-messages/10.md +1 -0
  79. package/prepare-for-pr/TI-16026/user-messages/11.md +1 -0
  80. package/prepare-for-pr/TI-16026/user-messages/12.md +1 -0
  81. package/prepare-for-pr/TI-16026/user-messages/13.md +1 -0
  82. package/prepare-for-pr/TI-16026/user-messages/14.md +1 -0
  83. package/prepare-for-pr/TI-16026/user-messages/15.md +1 -0
  84. package/prepare-for-pr/TI-16026/user-messages/16.md +1 -0
  85. package/prepare-for-pr/TI-16026/user-messages/17.md +1 -0
  86. package/prepare-for-pr/TI-16026/user-messages/18.md +10 -0
  87. package/prepare-for-pr/TI-16026/user-messages/19.md +1 -0
  88. package/prepare-for-pr/TI-16026/user-messages/20.md +1 -0
  89. package/prepare-for-pr/TI-16026/user-messages/21.md +1 -0
  90. package/prepare-for-pr/TI-16026/user-messages/22.md +1 -0
  91. package/prepare-for-pr/TI-16026/user-messages/23.md +8 -0
  92. package/prepare-for-pr/TI-16026/user-question.md +24 -0
  93. package/prepare-for-pr/TI-16026/verify-after.md +15 -0
  94. package/prepare-for-pr/TI-16026.md +408 -0
  95. package/scripts/auto-version.js +1 -0
  96. package/scripts/branch-auto-npm-publish.js +9 -2
  97. package/src/api/payment.js +1 -0
  98. package/src/machine/auth_otp_v3.js +59 -20
  99. package/src/machine/honor_board_cash.js +15 -18
  100. package/src/machine/reward_cash.js +2 -2
  101. package/src/machine/user_sign_up.js +3 -0
  102. package/src/machine/websocket.js +380 -311
  103. package/src/machine/withdraw/withdraw_manual_cash.js +7 -4
  104. package/src/util/constant.js +4 -0
  105. package/src/util/socketPolicy.js +57 -0
  106. package/test/auth_otp_v3.test.js +323 -0
  107. package/test/withdraw_manual_cash.test.js +149 -0
  108. package/tests/websocket.test.mjs +779 -0
package/CHANGELOG.md CHANGED
@@ -2,52 +2,147 @@
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.485-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.485...v1.1.485-dev.0) (2026-11-17)
6
+
7
+ ### [1.1.483-dev.4](https://github.com/jetthai/cuora-module/compare/v1.1.483...v1.1.483-dev.4) (2026-11-16)
8
+
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+
12
+ * 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
13
+ BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
14
+
15
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16
+
17
+ ### Features
18
+
19
+ * **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
20
+ * **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
26
+ * **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
27
+ * **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
28
+ * **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
29
+ * **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
30
+ * **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
31
+ * **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
32
+
33
+
34
+ * [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
35
+
36
+ ### [1.1.485](https://github.com/jetthai/cuora-module/compare/v1.1.484...v1.1.485) (2026-11-16)
37
+
38
+ ### Features
39
+
40
+ - **websocket:** migrate socket lifecycle and shared recovery policy ([092b5af](https://github.com/jetthai/cuora-module/commit/092b5afd7ca52cd1dbad53b45896dde0a7b3c022))
41
+
42
+ ### Bug Fixes
43
+
44
+ - **otp:** confirm auto verification from user status ([6adee39](https://github.com/jetthai/cuora-module/commit/6adee399a61ec5ac81c89a30036f89b222cf3920))
45
+ - **otp:** require contact data before provider completion ([03b2ee3](https://github.com/jetthai/cuora-module/commit/03b2ee306b4380103133d3709892341aca7db393))
46
+
47
+ ### [1.1.484](https://github.com/jetthai/cuora-module/compare/v1.1.483...v1.1.484) (2026-11-16)
48
+
5
49
  ### [1.1.483](https://github.com/jetthai/cuora-module/compare/v1.1.482...v1.1.483) (2026-11-09)
6
50
 
7
- ### [1.1.482](https://github.com/jetthai/cuora-module/compare/v1.1.481...v1.1.482) (2026-11-02)
51
+ ### [1.1.482](https://github.com/jetthai/cuora-module/compare/v1.1.481-dev.1...v1.1.482) (2026-11-02)
52
+
53
+
54
+ ### Bug Fixes
55
+
56
+ * **activity:** getRewardList 參數 orderColum 修正為 orderColumn ([4bcecf8](https://github.com/jetthai/cuora-module/commit/4bcecf843f36c32fc57d909619c437c709131d88))
57
+
58
+ ### [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)
59
+
60
+ ### [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)
61
+
8
62
 
9
63
  ### Bug Fixes
10
64
 
11
- - **activity:** getRewardList 參數 orderColum 修正為 orderColumn ([4bcecf8](https://github.com/jetthai/cuora-module/commit/4bcecf843f36c32fc57d909619c437c709131d88))
65
+ * **otp:** confirm auto verification from user status ([6adee39](https://github.com/jetthai/cuora-module/commit/6adee399a61ec5ac81c89a30036f89b222cf3920))
66
+ * **otp:** require contact data before provider completion ([03b2ee3](https://github.com/jetthai/cuora-module/commit/03b2ee306b4380103133d3709892341aca7db393))
67
+
68
+ ### [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)
69
+
70
+ ### [1.1.481-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.481...v1.1.481-dev.0) (2026-10-28)
71
+
72
+ ### [1.1.477-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.477...v1.1.477-dev.1) (2026-10-16)
12
73
 
13
- ### [1.1.481](https://github.com/jetthai/cuora-module/compare/v1.1.480...v1.1.481) (2026-10-20)
14
74
 
15
75
  ### ⚠ BREAKING CHANGES
16
76
 
17
- - 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
18
- BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
77
+ * 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
78
+ BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
19
79
 
20
80
  Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21
81
 
22
- - [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([c9b5210](https://github.com/jetthai/cuora-module/commit/c9b5210b8f1abb9adca7c79207e89d66191daf8f))
82
+ ### Features
83
+
84
+ * **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
85
+ * **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
86
+
87
+
88
+ ### Bug Fixes
89
+
90
+ * **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
91
+ * **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
92
+ * **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
93
+ * **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
94
+ * **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
95
+ * **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
96
+ * **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
97
+
98
+
99
+ * [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
100
+
101
+ ### [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)
102
+
103
+ ### [1.1.477-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.477...v1.1.477-dev.0) (2026-10-16)
104
+
105
+ ### [1.1.476-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.476...v1.1.476-dev.1) (2026-10-14)
23
106
 
24
- ### [1.1.480](https://github.com/jetthai/cuora-module/compare/v1.1.479...v1.1.480) (2026-10-19)
25
107
 
26
108
  ### ⚠ BREAKING CHANGES
27
109
 
28
- - **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
110
+ * 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
111
+ BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
112
+
113
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
114
+ * **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
29
115
 
30
116
  Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
117
+ * **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
31
118
 
32
- - **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
119
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
120
+ * **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
33
121
 
34
122
  Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
35
123
 
36
- - **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
124
+ ### Features
37
125
 
38
- Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
126
+ * **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
127
+ * **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
39
128
 
40
- ### Bug Fixes
41
129
 
42
- - **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
130
+ ### Bug Fixes
43
131
 
44
- - **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
45
- - **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
46
- - **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
132
+ * **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
133
+ * **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
134
+ * **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
135
+ * **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
136
+ * **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
137
+ * **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
138
+ * **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
139
+ * **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
47
140
 
48
- ### [1.1.479](https://github.com/jetthai/cuora-module/compare/v1.1.478...v1.1.479) (2026-10-19)
49
141
 
50
- ### [1.1.478](https://github.com/jetthai/cuora-module/compare/v1.1.477...v1.1.478) (2026-10-16)
142
+ * [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
143
+ * **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
144
+ * **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
145
+ * **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
51
146
 
52
147
  ### [1.1.477](https://github.com/jetthai/cuora-module/compare/v1.1.476...v1.1.477) (2026-10-16)
53
148
 
@@ -55,6 +150,69 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
55
150
 
56
151
  - **activity:** activity_cash 明細略過(resolve null)時 setProgressSummary 不再拋錯卡死 machine ([67cd813](https://github.com/jetthai/cuora-module/commit/67cd8137f1cbb310d43d02c068ed0a896e2c6623))
57
152
 
153
+ ### [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)
154
+
155
+
156
+ ### Bug Fixes
157
+
158
+ * **activity:** activity_cash 明細略過(resolve null)時 setProgressSummary 不再拋錯卡死 machine ([67cd813](https://github.com/jetthai/cuora-module/commit/67cd8137f1cbb310d43d02c068ed0a896e2c6623))
159
+
160
+ ### [1.1.476](https://github.com/jetthai/cuora-module/compare/v1.1.475...v1.1.476) (2026-10-13)
161
+
162
+ ### [1.1.475](https://github.com/jetthai/cuora-module/compare/v1.1.473...v1.1.475) (2026-10-12)
163
+
164
+ ### [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)
165
+
166
+
167
+ ### ⚠ BREAKING CHANGES
168
+
169
+ * 下游在 OTP 關卡送出 OTP_VERIFIED / OTP_SKIP 後,必須在 bindBankChecking 送出
170
+ BIND_BANK_DONE 或 BIND_BANK_SKIP,否則會停在此關卡。目前僅 client-pwa-cash 使用本套件。
171
+
172
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
173
+
174
+ * [JT-1784011020] feat(auth): 新增 bindBankChecking 關卡,綁銀行完成前不進入 loginSuccess ([2b26e99](https://github.com/jetthai/cuora-module/commit/2b26e99eba3d37e8f954724b53da8ee3f75bec18))
175
+
176
+ ### [1.1.473-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.473...v1.1.473-dev.0) (2026-10-07)
177
+
178
+ ### [1.1.472-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.472...v1.1.472-dev.2) (2026-10-01)
179
+
180
+
181
+ ### ⚠ BREAKING CHANGES
182
+
183
+ * **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
184
+
185
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
186
+ * **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
187
+
188
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
189
+ * **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
190
+
191
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
192
+
193
+ ### Features
194
+
195
+ * **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
196
+ * **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
197
+
198
+
199
+ ### Bug Fixes
200
+
201
+ * **activity:** activity_cash 列表與明細回應格式異常時改走 onError,避免 machine 卡死 ([fea8494](https://github.com/jetthai/cuora-module/commit/fea8494d8c0ff084f8994cb58b8f1f7e3800024a))
202
+ * **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
203
+ * **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
204
+ * **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
205
+ * **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
206
+ * **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
207
+ * **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
208
+ * **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
209
+ * **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
210
+
211
+
212
+ * **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
213
+ * **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
214
+ * **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
215
+
58
216
  ### [1.1.476](https://github.com/jetthai/cuora-module/compare/v1.1.475...v1.1.476) (2026-10-13)
59
217
 
60
218
  ### Bug Fixes
@@ -67,27 +225,135 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
67
225
 
68
226
  ### [1.1.473](https://github.com/jetthai/cuora-module/compare/v1.1.472...v1.1.473) (2026-10-05)
69
227
 
228
+ ### [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)
229
+
230
+
231
+ ### Bug Fixes
232
+
233
+ * **otp:** confirm auto verification from user status ([b3b40d8](https://github.com/jetthai/cuora-module/commit/b3b40d8dd42d438486a2110f85564ab3d839ea72))
234
+ * **otp:** require contact data before provider completion ([f70058b](https://github.com/jetthai/cuora-module/commit/f70058b6bcbbc6d048049326700a79249d043a03))
235
+
236
+ ### [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)
237
+
238
+
239
+ ### Bug Fixes
240
+
241
+ * **activity:** activity_cash 列表與明細回應格式異常時改走 onError,避免 machine 卡死 ([fea8494](https://github.com/jetthai/cuora-module/commit/fea8494d8c0ff084f8994cb58b8f1f7e3800024a))
242
+
70
243
  ### [1.1.472](https://github.com/jetthai/cuora-module/compare/v1.1.471...v1.1.472) (2026-09-24)
71
244
 
72
245
  ### [1.1.471](https://github.com/jetthai/cuora-module/compare/v1.1.470...v1.1.471) (2026-09-23)
73
246
 
247
+ ### [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)
248
+
249
+ ### [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)
250
+
251
+ ### [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)
252
+
74
253
  ### [1.1.470](https://github.com/jetthai/cuora-module/compare/v1.1.469...v1.1.470) (2026-09-14)
75
254
 
255
+ ### [1.1.469](https://github.com/jetthai/cuora-module/compare/v1.1.468...v1.1.469) (2026-09-13)
256
+
257
+ ### [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)
258
+
259
+ ### [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)
260
+
261
+ ### Features
262
+
263
+ * **payment:** 恢復 setBonusSetting API ([ba1118d](https://github.com/jetthai/cuora-module/commit/ba1118dabbdd6ae5ca2b68ddf281c8dd6d67a59d))
264
+
265
+ ### [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)
266
+
267
+ ### [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)
268
+
269
+ ### [1.1.468-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.468...v1.1.468-dev.0) (2026-09-12)
270
+
271
+ ### [1.1.467-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.467...v1.1.467-dev.2) (2026-09-10)
272
+
273
+
274
+ ### ⚠ BREAKING CHANGES
275
+
276
+ * **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
277
+
278
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
279
+ * **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
280
+
281
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
282
+ * **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
283
+
284
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
285
+
286
+ ### Features
287
+
288
+ * **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
289
+
290
+
76
291
  ### Bug Fixes
77
292
 
78
- - **machine:** user_sign_up 的 registrationData 補上 agentId ([833e8c9](https://github.com/jetthai/cuora-module/commit/833e8c90c0ff554cff651bdb7045ed514d42035e))
293
+ * **auth:** 清除站台已停用登入方式殘留的記住帳號 ([2c6b965](https://github.com/jetthai/cuora-module/commit/2c6b96572108cfc977d7dc99635adebbee01db46))
294
+ * **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
295
+ * **machine:** user_sign_up 的 registrationData 補上 agentId ([833e8c9](https://github.com/jetthai/cuora-module/commit/833e8c90c0ff554cff651bdb7045ed514d42035e))
296
+ * **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
297
+ * **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
298
+ * **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
299
+ * **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
300
+ * **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
79
301
 
80
- ### [1.1.469](https://github.com/jetthai/cuora-module/compare/v1.1.468...v1.1.469) (2026-09-13)
302
+
303
+ * **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
304
+ * **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
305
+ * **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
306
+
307
+ ### [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)
308
+
309
+
310
+ ### Bug Fixes
311
+
312
+ * **machine:** user_sign_up 的 registrationData 補上 agentId ([833e8c9](https://github.com/jetthai/cuora-module/commit/833e8c90c0ff554cff651bdb7045ed514d42035e))
313
+
314
+ ### [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)
315
+
316
+
317
+ ### ⚠ BREAKING CHANGES
318
+
319
+ * **export:** 移除頂層 export util 與 Request.sourceUpdate/sourceGenerate
320
+
321
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
322
+ * **api,machine:** 移除 39 個 api 方法、2 個常數與 14 個 machine 事件
323
+
324
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
325
+ * **machine:** 移除公開 export machine.bonus、machine.vip_table 與 util 的 max
326
+
327
+ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
81
328
 
82
329
  ### Bug Fixes
83
330
 
84
- - **auth:** 清除站台已停用登入方式殘留的記住帳號 ([2c6b965](https://github.com/jetthai/cuora-module/commit/2c6b96572108cfc977d7dc99635adebbee01db46))
331
+ * **machine:** 移除三處幽靈 action 引用 ([49009da](https://github.com/jetthai/cuora-module/commit/49009dae604088b819134e0d40f7719fb8e8874d))
332
+
333
+
334
+ * **api,machine:** 移除 39 個零呼叫端 API 與 14 個無觸發來源的 machine 事件 ([14fa754](https://github.com/jetthai/cuora-module/commit/14fa75459aba9558cde1a3485d64cbdf2f8294b2))
335
+ * **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
336
+ * **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
337
+
338
+ ### [1.1.467-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.467...v1.1.467-dev.0) (2026-09-09)
339
+
340
+ ### [1.1.466-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.466...v1.1.466-dev.0) (2026-09-06)
85
341
 
86
- ### [1.1.468](https://github.com/jetthai/cuora-module/compare/v1.1.467...v1.1.468) (2026-09-11)
87
342
 
88
343
  ### Features
89
344
 
90
- - **payment:** 新增 getPaymentPromotions API 描述符 ([0319692](https://github.com/jetthai/cuora-module/commit/03196925d989333e4bdb11cd933c18b6ace65d83))
345
+ * **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
346
+ * **payment:** 新增 getPaymentPromotions API 描述符 ([0319692](https://github.com/jetthai/cuora-module/commit/03196925d989333e4bdb11cd933c18b6ace65d83))
347
+
348
+
349
+ ### Bug Fixes
350
+
351
+ * **auth:** 清除站台已停用登入方式殘留的記住帳號 ([2c6b965](https://github.com/jetthai/cuora-module/commit/2c6b96572108cfc977d7dc99635adebbee01db46))
352
+ * **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
353
+ * **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
354
+ * **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
355
+ * **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
356
+ * **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
91
357
 
92
358
  ### [1.1.467](https://github.com/jetthai/cuora-module/compare/v1.1.466...v1.1.467) (2026-09-06)
93
359
 
@@ -97,15 +363,74 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
97
363
 
98
364
  ### [1.1.466](https://github.com/jetthai/cuora-module/compare/v1.1.465...v1.1.466) (2026-08-31)
99
365
 
366
+ ### [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)
367
+
368
+
369
+ ### Bug Fixes
370
+
371
+ * **auth:** 清除站台已停用登入方式殘留的記住帳號 ([2c6b965](https://github.com/jetthai/cuora-module/commit/2c6b96572108cfc977d7dc99635adebbee01db46))
372
+
373
+ ### [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)
374
+
375
+
376
+ ### Bug Fixes
377
+
378
+ * **release:** 拆分 branch/tag push 避免 tag 衝突導致 npm publish 被跳過 ([f2c4baa](https://github.com/jetthai/cuora-module/commit/f2c4baa7de0bfe50b6b0c70c5a2ed8749116d72a))
379
+
380
+ ### [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)
381
+
382
+ ### [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)
383
+
384
+
385
+ ### Features
386
+
387
+ * **payment:** 新增 getPaymentPromotions API 描述符 ([0319692](https://github.com/jetthai/cuora-module/commit/03196925d989333e4bdb11cd933c18b6ace65d83))
388
+
100
389
  ### [1.1.465](https://github.com/jetthai/cuora-module/compare/v1.1.464...v1.1.465) (2026-08-17)
101
390
 
102
391
  ### [1.1.464](https://github.com/jetthai/cuora-module/compare/v1.1.463...v1.1.464) (2026-08-16)
103
392
 
393
+ ### [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)
394
+
395
+ ### [1.1.465](https://github.com/jetthai/cuora-module/compare/v1.1.464...v1.1.465) (2026-08-17)
396
+
397
+ ### [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)
398
+
399
+ ### [1.1.464](https://github.com/jetthai/cuora-module/compare/v1.1.463...v1.1.464) (2026-08-16)
400
+
401
+
104
402
  ### Bug Fixes
105
403
 
106
404
  - **deposit:** 切換存款活動不再重設使用者已選的通道 ([b9c1de2](https://github.com/jetthai/cuora-module/commit/b9c1de2f3665c56f52d7b074e892837e836d02fa))
107
405
  - **user_sign_up:** 明確輸入判定改用 !== undefined,修復三層解析成為死碼 ([770450e](https://github.com/jetthai/cuora-module/commit/770450e6065d42d497504d2f8630c6740ec1e7c4))
108
406
 
407
+ ### [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)
408
+
409
+
410
+ ### Bug Fixes
411
+
412
+ * **deposit:** 切換存款活動不再重設使用者已選的通道 ([b9c1de2](https://github.com/jetthai/cuora-module/commit/b9c1de2f3665c56f52d7b074e892837e836d02fa))
413
+
414
+ ### [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)
415
+
416
+ ### [1.1.463-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.463...v1.1.463-dev.0) (2026-08-13)
417
+
418
+ ### [1.1.455-dev.8](https://github.com/jetthai/cuora-module/compare/v1.1.455...v1.1.455-dev.8) (2026-08-09)
419
+
420
+
421
+ ### Features
422
+
423
+ * **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
424
+
425
+
426
+ ### Bug Fixes
427
+
428
+ * **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
429
+ * **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
430
+ * **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
431
+ * **user_sign_up:** 明確輸入判定改用 !== undefined,修復三層解析成為死碼 ([770450e](https://github.com/jetthai/cuora-module/commit/770450e6065d42d497504d2f8630c6740ec1e7c4))
432
+ * **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
433
+
109
434
  ### [1.1.463](https://github.com/jetthai/cuora-module/compare/v1.1.462...v1.1.463) (2026-08-12)
110
435
 
111
436
  ### [1.1.462](https://github.com/jetthai/cuora-module/compare/v1.1.461...v1.1.462) (2026-08-10)
@@ -122,6 +447,44 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
122
447
 
123
448
  ### [1.1.456](https://github.com/jetthai/cuora-module/compare/v1.1.455...v1.1.456) (2026-08-09)
124
449
 
450
+ ### [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)
451
+
452
+ ### [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)
453
+
454
+ ### [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)
455
+
456
+ ### [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)
457
+
458
+ ### [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)
459
+
460
+ ### [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)
461
+
462
+ ### [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)
463
+
464
+ ### [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)
465
+
466
+
467
+ ### Bug Fixes
468
+
469
+ - **user_sign_up:** 明確輸入判定改用 !== undefined,修復三層解析成為死碼 ([770450e](https://github.com/jetthai/cuora-module/commit/770450e6065d42d497504d2f8630c6740ec1e7c4))
470
+
471
+ ### [1.1.455-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.455...v1.1.455-dev.0) (2026-08-04)
472
+
473
+ ### [1.1.454-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.453...v1.1.454-dev.0) (2026-07-29)
474
+
475
+
476
+ ### Features
477
+
478
+ - **api:** add GeeMee click-id & front-event fields to sendPixel builder ([d33e488](https://github.com/jetthai/cuora-module/commit/d33e488062f81976cff35ea43ea0f2c366a2a615))
479
+
480
+
481
+ ### Bug Fixes
482
+
483
+ - **error:** 讓新錯誤可覆寫舊狀態避免 SET_ERROR 鎖死 ([4113751](https://github.com/jetthai/cuora-module/commit/4113751ee6cb4ced8fe1dc2fda0ce9fbac21ec06))
484
+ - **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([065095e](https://github.com/jetthai/cuora-module/commit/065095e31ffe1cb640f9aaf6c76bbd5c6892355c))
485
+ - **request:** 非 public 請求缺少 token 時改為 reject ERR_A103,觸發登出流程 ([e46281f](https://github.com/jetthai/cuora-module/commit/e46281f3ea16679404160366e4532969c3bf02ff))
486
+ - **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
487
+
125
488
  ### [1.1.455](https://github.com/jetthai/cuora-module/compare/v1.1.453...v1.1.455) (2026-08-03)
126
489
 
127
490
  ### Bug Fixes
package/CLAUDE.md CHANGED
@@ -148,7 +148,7 @@ State machines **do not directly reference each other**; they communicate indire
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 |
151
- | `ERR_800` | Cancelled request (handled silently) |
151
+ | `ERR_800` | Cancelled request (never forwarded to errorHandler, but still rejects to the caller's `onError`) |
152
152
  | `ERR_998` | Network error / 404 (reported to Sentry) |
153
153
 
154
154
  When `error.extend` contains `unfinished_` → unfinished game; the gameCode is everything after the first underscore, taken via `error.extend.split(/_(.+)/)[1]`.
@@ -172,6 +172,13 @@ Token 5min TTL → fetchUserInfo success → extendToken resets TTL → poll aga
172
172
  - **Injection**: the request interceptor automatically adds `Authorization: Bearer {token}`
173
173
  - **TTL**: token 300 seconds, account info 31 days, cookie data 7 days
174
174
 
175
+ **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
+
177
+ - **Only the current identity can be revoked**: `revokeToken` only takes effect when `token === getToken()`, so a late error from a previous identity cannot revoke a newly logged-in token. Once in effect, it cancels in-flight requests carrying that token (for the scope, see item 11 of 2.9), and any later non-public `send()` still carrying it rejects `ERR_800` immediately without hitting the network; public requests are unaffected (the token stays in storage while revoked, and `getConfig` around autoLogin must not be wrongly rejected). There is no "un-revoke" API — logging in again changes the token, which lifts the revocation naturally.
178
+ - **The token to revoke comes from the error object**: when a token-carrying request fails, `send()` attaches a **non-enumerable** `error.requestToken` (the Bearer token at send time). It is non-enumerable so it doesn't leak through `JSON.stringify` / Sentry serialization — **never make it enumerable, and never copy it into enumerable fields, logs, or Sentry extra**. Cancellation `ERR_800` errors and the missing-token `ERR_A103` don't carry this field.
179
+ - **While a gate is active**: non-public requests first wait for the probe promise to settle (success and failure both release it) or for the timeout; once released, they re-check whether the token has been revoked and whether it still exists (missing → `ERR_A103`).
180
+ - **Hard-coded `'self'` coupling**: `send()` decides which request skips the gate by checking whether the descriptor's raw `url` (query stripped, before V2 conversion) is `'self'`, which corresponds to `getUserInfo` in `api/user.js` (`updateUserInfo`, sharing the same url, skips it too). Changing `getUserInfo`'s url (adding a leading slash, changing the path) requires updating this check in lockstep, otherwise `/self` gets blocked by the gate as well — a probe sent after the gate is created would then wait on its own gate until the timeout.
181
+
175
182
  **inline vs login states** (the most central concept in `auth.js`):
176
183
 
177
184
  - `inline`: authenticated but `rank < 0` (the account has not finished ranking/activation); polling continues until rank takes effect
@@ -327,19 +334,20 @@ io(`${socketURL}/frontend`, {
327
334
  ```
328
335
  1. A state machine service calls request.send(api.xxx(params))
329
336
  2. api.xxx(params) returns a descriptor object
330
- 3. _checkToken(req): non-public endpoints check the token; if missing, throw ERR_A103
331
- 4. isBlocked check: under maintenance and not a config request → silently blocked
337
+ 3. Identity pre-checks (non-public only): no token → reject ERR_A103; token revoked via revokeToken → reject ERR_800; gate active and url is not 'self' → wait for the gate, then re-check (see 2.1)
338
+ 4. Token-carrying request without customToken → attach a one-time CancelToken source and register it in activeRequests, removed in finally (see item 11 of 2.9)
332
339
  5. _createConfig(req):
333
340
  a. Strip the query string from the URL
334
341
  b. Match against supportVersion2List (supports :param dynamic-path regex matching)
335
342
  c. If matched → _convertUrlToKebabCase() (look up the specifyingPath mapping first, otherwise auto-convert)
336
343
  d. GET → params goes in the params field; POST → params goes in the data field
337
344
  e. pickBy filters out null/undefined values
338
- 6. Request interceptor: injects X-TH1GAMES-VERSION, X-TH1GAMES-PLATFORM, Authorization
339
- 7. Custom paramsSerializer: special encoding for the q parameter (avoids double-encoding)
340
- 8. axios.request(config)
341
- 9. Response interceptor: response.data.error present → reject; Network Error / 404 → ERR_998 + Sentry
342
- 10. Error handling: ERR_F108 → isBlocked + errorHandler; ERR_998 → thrown directly; ERR_800 (cancelled) → silent; everything else → errorHandler (skipped when the descriptor carries silent: true, still thrown)
345
+ 6. isBlocked check: under maintenance and not a config request → no request is sent, resolves undefined
346
+ 7. Request interceptor: injects X-TH1GAMES-VERSION, X-TH1GAMES-PLATFORM, Authorization
347
+ 8. Custom paramsSerializer: special encoding for the q parameter (avoids double-encoding)
348
+ 9. axios.request(config)
349
+ 10. Response interceptor: response.data.error present → reject; Network Error / 404 → ERR_998 + Sentry
350
+ 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
343
351
  ```
344
352
 
345
353
  **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.**
@@ -356,9 +364,10 @@ io(`${socketURL}/frontend`, {
356
364
  8. **`appSecret` marks public endpoints**: nearly all `isPublic: true` endpoints require an `appSecret` parameter, **but the auth endpoints do not**.
357
365
  9. **Unfinished-game infinite retry**: the `unfinishedGame` state in `error.js` returns to itself on `onError`, with **no backoff strategy and no retry cap** (a known issue, see "Known Technical Debt").
358
366
  10. **`isMobile` is a string, not a boolean**: in `common.js`, `isMobile = userAgent?.device?.type` returns `'mobile'`/`'tablet'`/`undefined`, so comparisons must be string-based (e.g. `isMobile === 'mobile' ? 'y' : null`).
359
- 11. **Requests carry no CancelToken by default**: the cancellation feature of `send(req, customToken)` is **opt-in**. In axios <0.22 the cancel handler is never unsubscribed — a shared long-lived token accumulates one handler per request, causing overnight OOM when left running (TI-15555). **Do not "helpfully" add the CancelToken back onto the shared path.**
367
+ 11. **CancelTokens must be one-time, never shared**: a token-carrying non-public request that passes no `customToken` gets its own **one-time** `CancelToken.source()` (registered in `activeRequests`, removed in `finally`, collected along with the request) so that `revokeToken` can cancel in-flight requests; when `customToken` is passed, it is used instead, the caller manages its lifecycle, and it is not registered (`revokeToken` cannot cancel it). In axios <0.22 the cancel handler is never unsubscribed — a shared long-lived token accumulates one handler per request, causing overnight OOM when left running (TI-15555). **Do not turn the one-time source into a shared token.** The one-time source is only created when the injected `axios` exposes `CancelToken` (axios's default export and `@nuxtjs/axios`'s `$axios` do; instances produced by `axios.create()` don't); without it, `revokeToken` cannot abort in-flight requests and only blocks subsequent `send()` calls.
360
368
  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.
361
- 13. **`send()` does not guarantee an object, and `assign()` must never throw**: non-config requests during maintenance (`isBlocked`) and `ERR_800` cancellations make `send()` **resolve `undefined`** (they never reach `onError`); a 200 response with a non-JSON body resolves a string, so destructuring `{ data }` yields `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.
369
+ 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.
370
+ 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.
362
371
 
363
372
  ---
364
373