feat: recorded import grants, unclaimed creators and claiming (#15)
Release / release (push) Successful in 3s
CI / test (push) Successful in 1m24s
CI / image (apps/api/Dockerfile, t5de-hub-api) (push) Successful in 7s
CI / image (apps/web/Dockerfile, t5de-hub-web) (push) Successful in 13s

Co-authored-by: dhkatz <[email protected]>
This commit was merged in pull request #15.
This commit is contained in:
dhkatz authored and dhkatz committed 2026-11-07 22:49:06 +00:00
1 parent e6a97be894
commit 8f6dacba10
18 files changed
+5222 -26

No files matched your search

+19 -3
View File
@@ -76,6 +76,16 @@ IMVU"), marked unclaimed. When someone links that IMVU account, the hub offers t
requests and stats move to them, and the placeholder is deleted. Until then, withdrawal goes through admins
(contacting T5DE, or the catalog's takedown contact).
Built (2026-11-07): `user.unclaimed_imvu_id` marks the placeholder (username `imvu_<IMVU ID>`, a prefix nobody can
sign up with; display name the IMVU name; an `.invalid` email and no password). Admins with `import:grant-on-behalf`
(two-factor sign-in) record grants on the console's Imports page (evidence required; not for IMVU accounts linked to
someone, who grant themselves), make a tagline code and check it (`import_grant.proof_code`, `proof_checked_at`:
"proven"), and change or withdraw them until claimed. The catalog's team accepts them as any grant. Linking or
unlinking the IMVU account doesn't suspend an unclaimed creator's grants (they stand on the recorded consent). Whoever
links the account sees the claim on their account page; claiming moves the products (and their revisions' uploader)
and grants to them and deletes the placeholder. Requests aren't the creator's (they're keyed by IMVU account), so
nothing moves for them. Not built: a screenshot with the evidence.
## Requests
```
@@ -169,7 +179,7 @@ passwords never reach the hub readable, and are kept only by the importer.
| `GET /api/v1/imports/catalogs` | (anyone) `{catalogs: [{id, name, url, contact, maxRating}], consent: {version, text}}`: approved catalogs with imports on |
| `POST /api/v1/imports/grants` | `{catalog, imvuId, scope ("shop" \| "products"), products?, exclude?, listed?, consentVersion}` → 201 `{grant}` (pending). The IMVU account must be the person's linked one (403 `not_linked`); an older consent version is 409 `consent_changed`; one open grant per catalog and account (409 `exists`). |
| `GET /api/v1/imports/grants` | the person's grants (as their creator) |
| `PATCH /api/v1/imports/grants/:id` | (its creator) `{products?, exclude?, listed?}` → `{grant, withdrawn}`: products no longer covered are withdrawn; newly covered ones people asked for are queued |
| `PATCH /api/v1/imports/grants/:id` | (its creator; for an unclaimed creator, `import:grant-on-behalf`) `{products?, exclude?, listed?}` → `{grant, withdrawn}`: products no longer covered are withdrawn; newly covered ones people asked for are queued |
| `POST /api/v1/imports/grants/:id/accept`, `.../decline` | (`import:accept` at the catalog) `{reason?}` → `{grant, queued}`. The creator is notified. |
| `DELETE /api/v1/imports/grants/:id` | (its creator, or `import:withdraw` at the catalog) `{reason?}` → `{grant, withdrawn}` |
| `POST /api/v1/imports/requests` | `{imvuProduct}` or `{imvuCreator}` → `{status: "added" \| "queued" \| "suggested" \| "counted", product?}` (`added`: imported already, now in their library). At most 50 a day. |
@@ -178,6 +188,12 @@ passwords never reach the hub readable, and are kept only by the importer.
| `POST /api/v1/catalogs/:id/importer` | `{enabled?}` (`import:run`; turning on returns the importer `key`, shown once) and `{paused?}` (`import:pause`) |
| `POST /api/v1/catalogs/:id/importer/key` | (`import:run`) → `{key}`: a new importer key |
| `POST /api/v1/catalogs/:id/importer/jobs/:job/retry` | (`import:run`) a failed or done job queued again |
| `GET /api/v1/console/imports` | (`import:grant-on-behalf`) `{grants: [grant + {evidence, recordedBy, proofCode, proofCheckedAt, claimed}], creators: [{imvuCreator, name, people, products}], catalogs, consent}`: recorded grants, and the most asked-for IMVU creators |
| `POST /api/v1/console/imports/grants` | (`import:grant-on-behalf`) `{catalog, imvu (username or ID), scope, products?, exclude?, listed?, evidence}` → 201 `{grant}` (pending, `consentKind: "recorded"`). 409 `linked` if someone linked that IMVU account, 409 `exists` as for creators' grants. |
| `POST /api/v1/console/imports/grants/:id/proof` | (`import:grant-on-behalf`) → `{code}`: for the creator's IMVU tagline (made once) |
| `POST /api/v1/console/imports/grants/:id/proof/check` | (`import:grant-on-behalf`) → `{grant}` with `consentProven`; 409 `not_found` if the tagline lacks the code |
| `GET /api/v1/account` | also `claims: [{imvuId, username, products, grants}]`: unclaimed creators for the person's linked IMVU accounts |
| `POST /api/v1/account/claims/:imvu` | → `{products, grants}`: claimed (the IMVU account must be linked to them) |
| `GET /api/v1/catalogs/:id/importer/imvu-account?username=` | (`import:run`) `{imvuId, username, picture, accessPass, ageVerified}`: IMVU's public info, for the confirmation dialog |
| `POST /api/v1/catalogs/:id/importer/accounts` | (`import:run`) `{imvuId, sealed, fingerprint}` → 201 `{account}`. `fingerprint` must be the importer's key's (409 `importer_key_changed`; 409 `no_importer` before it has said hello); one per IMVU account (409 `exists`), at most 10. |
| `PUT /api/v1/catalogs/:id/importer/accounts/:account/password` | (`import:run`) `{sealed, fingerprint}`: a new password |
@@ -215,8 +231,8 @@ hub ("IMVU accounts" above). Also signed out: `client-dynamic.imvu.com/api/shop/
`product_rating` other than `0,5`), but `api.imvu.com/product?creator=<username>` lists a shop's other products
(100 a page, `next` relation), which whole-shop grants use.
Still to do: admin-recorded grants, proofs and unclaimed creators (and claiming); `GET /imports/available` for the
proxy's shop button; t5de-catalog accepting `t5de-import` tokens on uploads; the spike and `t5de-importer`.
Still to do: `GET /imports/available` for the proxy's shop button; listing whole-shop grants' products
(`api.imvu.com/product?creator=`); t5de-catalog accepting `t5de-import` tokens on uploads; the spike and `t5de-importer`.
## Spike (before building the importer)