feat: IMVU imports on the hub: grants, requests and the importer's job queue
Creators grant a catalog leave to import their IMVU products (whole shop less exclusions, or listed products) from a linked IMVU account, agreeing to a versioned consent text; the catalog's team accepts or declines. Requests queue covered products (or add them to the library when imported already), suggest, or count. Importers claim jobs with the catalog's importer key, get t5de-import tokens, and the catalog registers imported revisions as published products owned by the creator. Narrowing or withdrawing a grant withdraws products; unlinking suspends grants; an hourly batch rechecks imported products with IMVU daily. Website: /imports and the console's catalog imports page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
eca1884918
commit
7d708aebdb
24 files changed
+6521
-153
No files matched your search
+28
-12
@@ -135,21 +135,37 @@ A Go program (its own repository) beside a `t5de-catalog`; it stores nothing las
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| `GET /api/v1/imports/catalogs` | approved catalogs with imports on, accepting grants |
|
||||
| `POST /api/v1/imports/grants` | `{catalog, imvuId, scope, products?, exclude?, listed, consentVersion}` → 201 `{grant}` (pending). With `onBehalf: {imvuId, evidence, proof?}` instead of a linked `imvuId`: an admin-recorded grant. |
|
||||
| `GET /api/v1/imports/grants` | the person's grants; with `catalog=`, a catalog's (its team) |
|
||||
| `PATCH /api/v1/imports/grants/:id` | `{scope?, products?, exclude?, listed?}` |
|
||||
| `POST /api/v1/imports/grants/:id/accept`, `.../decline` | the catalog's team |
|
||||
| `DELETE /api/v1/imports/grants/:id` | withdraw |
|
||||
| `POST /api/v1/imports/proofs` | (admins) `{imvuId}` → `{proof, code}`; `POST .../proofs/:id/check` |
|
||||
| `POST /api/v1/imports/requests` | `{imvuProduct}` or `{imvuCreator}` → `{status: "queued" \| "suggested" \| "counted", product?}` |
|
||||
| `GET /api/v1/imports/requests?imvuCreator=` | counts (the creator, admins) |
|
||||
| `GET /api/v1/imports/available?imvuProducts=a,b` | for the proxy's shop button: which can the person get (and the hub product ID), already have, or request |
|
||||
| `GET /api/v1/imports/jobs?catalog=&status=` | the catalog's team: the queue; `POST .../jobs/:id/retry` |
|
||||
| `POST /api/v1/imports/claim` | `{imvuId}`: claim an unclaimed creator's products for a linked account |
|
||||
| `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 |
|
||||
| `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. |
|
||||
| `GET /api/v1/imports/requests?imvuCreator=` | `{requests: [{imvuProduct (0: the whole shop), name, requests}]}` for a linked account of theirs (moderators: any); without `imvuCreator`, moderators get `{creators}`: the most asked-for IMVU creators |
|
||||
| `GET /api/v1/catalogs/:id/importer` | (`import:accept` or `import:pause`) `{importer, grants, jobs, counts, permissions}`; `?status=` filters jobs |
|
||||
| `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 |
|
||||
|
||||
For importers (`Authorization: Importer <catalog ID>:<key>`) in products.md.
|
||||
|
||||
Built (phase 4a, 2026-11-05): grants made by creators, accepting and declining, changing and withdrawing (withdrawn
|
||||
products are removed as moderation removes, their hosting dropped and their files in the catalogs' changes feed;
|
||||
only delisted from one catalog if another catalog's active grant still covers them), requests with library
|
||||
delivery, the job queue (claims time out after 30 minutes; failures back off 1 min, 10 min, 1 h, daily, then fail
|
||||
after 5), import tokens and registering imported revisions (`product.imvu_product`, `product_revision.imvu_revision`;
|
||||
a revision another catalog imported already is hosted here too, same files only), grants suspended when their IMVU
|
||||
account is unlinked or linked to someone else, an hourly batch of daily rechecks (`imvu_product_info` caches IMVU's
|
||||
answers a day), notifications (`import_grant_decided`, `import_grant_ended`), the website's `/imports` page (ask
|
||||
for a product; bring products; change or withdraw; what people asked for) and the console's
|
||||
`/console/catalogs/:id/imports` (importer on, off, paused, key; accept and decline; the queue with retries).
|
||||
IMVU's product fields (`product_name`, `creator_cid`, `creator_name`, `rating`, `is_purchasable`) were not checked
|
||||
against the live API from the dev machine (it can't reach api.imvu.com); check them with the spike.
|
||||
|
||||
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`.
|
||||
|
||||
## Spike (before building the importer)
|
||||
|
||||
1. Import one product by hand as a local pack (full-size textures, no `_contents.json`, parent kept). Does the
|
||||
|
||||
Reference in new issue
Block a user