feat(activate): allow retireDeviceId to free a device slot on migration

Supports client migration from per-user UUID to machine fingerprint without consuming an extra maxDevices slot.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-23 10:39:46 +08:00
parent ab86790feb
commit f19b50b2ad
3 changed files with 58 additions and 5 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ npm test
## API
- `POST /v1/activate``{ "productKey": "...", "deviceId": "..." }``{ token, sub }`.
- `POST /v1/activate``{ "productKey": "...", "deviceId": "...", "retireDeviceId?": "..." }``{ token, sub }`. `retireDeviceId` (опционально) удаляет старый слот устройства при миграции (не занимает лишний `maxDevices`).
- `GET /v1/status?sub=...``{ revoked: boolean }`.
- `POST /v1/track/download``{ "platform": "windows"|"macos"|"linux" }` → учёт скачиваний в `data.json``downloadStats.byMonth`.
- `POST /v1/admin/revoke``Authorization: Bearer <LICENSE_ADMIN_TOKEN>`, тело `{ "key": "TTRPG-..." }` или `{ "sub": "..." }`.