feat(imports): Access Pass products through the importer's signed-in account (#20)
Co-authored-by: dhkatz <[email protected]>
This commit was merged in pull request #20.
This commit is contained in:
1 parent
56d25f7507
commit
cc6959082c
12 files changed
+4871
-51
No files matched your search
+38
-4
@@ -105,7 +105,7 @@ import_request(person, imvu_creator, imvu_product (0: the whole shop), created_a
|
||||
## Import jobs
|
||||
|
||||
```
|
||||
import_job(id, catalog, grant, imvu_product, kind ("import" | "recheck"), status ("queued" | "claimed" | "done" | "failed"),
|
||||
import_job(id, catalog, grant, imvu_product, kind ("import" | "recheck" | "list"), status ("queued" | "claimed" | "done" | "failed"),
|
||||
imvu_revision, reason, attempts, claimed_at, next_at, created_at, updated_at)
|
||||
```
|
||||
|
||||
@@ -188,9 +188,41 @@ passwords never reach the hub readable, and are kept only by the importer.
|
||||
(`catalog.importer_hello`).
|
||||
- Built (2026-11-07): all of the above on the hub and the console, except the importer's report of AP products' info
|
||||
(with the importer).
|
||||
- What the importer sees with an account (creator, name, rating of AP products) it reports to the hub with the job
|
||||
(`POST /api/v1/importer/jobs/:id {product: {creatorId, name, rating}}`), trusted from that catalog's importer
|
||||
only, for products IMVU hides from the hub.
|
||||
- What the importer sees with an account it reports to the hub ("Access Pass products" below), trusted from that
|
||||
catalog's importer only, for products IMVU hides from the hub.
|
||||
- IMVU shows an account's Access Pass publicly only if its member chooses to (verified 2026-11-08: an AP account's
|
||||
public profile said `is_ap: false`, its own signed-in view `true`). So the console's lookup shows "Access Pass not
|
||||
shown", and the importer reports the real answer when it signs in (`accessPass` with state `ok`).
|
||||
|
||||
### Access Pass products
|
||||
|
||||
Signed out, IMVU hides Access Pass products: the product API answers 401 (as for deleted products and made-up IDs)
|
||||
and shop listings leave them out (2026-11-08: NellLuna's shop lists 639 products signed out, 763 signed in with
|
||||
Access Pass; `product_rating=AP` lists the 124 others). The CDN serves their files to anyone. So the hub learns
|
||||
about them from the importer's account:
|
||||
|
||||
- **Signed-in shop listings**: when a whole-shop grant's shop is listed (accepted, daily, "List the shop again"), and
|
||||
the catalog's importer has an account that signed in with Access Pass (state `ok`, `accessPass`), the hub also
|
||||
queues a `list` job (one open per shop and catalog; also queued for every whole shop when such an account first
|
||||
reports in). The importer lists the shop signed in and reports every product it saw (`POST
|
||||
/api/v1/importer/jobs/:id/listing`); the hub keeps those of the grant's IMVU account (an importer can't vouch for
|
||||
another creator's products), records the count (`shopListedSignedIn`: "with Access Pass"), and queues those not
|
||||
imported yet. The job is then done.
|
||||
- **Single products** (a grant's chosen products, or a request the hub couldn't place): a claimed job whose
|
||||
`rating` is null is one IMVU hides from the hub. The importer looks it up signed in and reports what it saw (`POST
|
||||
/api/v1/importer/jobs/:id/info`); the hub keeps it (unless IMVU now shows the product publicly: that wins), and
|
||||
answers `{rating, covered}`. Not covered (another creator's): the importer fails the job with that reason.
|
||||
`found: false` (gone for the account too) is kept, so the daily recheck withdraws an imported product.
|
||||
- **Rechecks** keep what was last seen for a product IMVU hides (401), so imported Access Pass products aren't
|
||||
withdrawn for being hidden. Not built: noticing that a hidden product was deleted, except when a job's lookup says
|
||||
so.
|
||||
- IMVU's sign-in (`POST api.imvu.com/login`) works only with a desktop browser's User-Agent (2026-11-08: anything
|
||||
else, even with the importer's name added, gets 500 `OUTBOUND VALIDATION-004`, `sauce` null), so the importer's
|
||||
signed-in requests send one. IMVU limits sign-ins: the importer keeps its session and doesn't retry a refused
|
||||
password for an hour.
|
||||
- Built (2026-11-08) on the hub and in t5de-importer. Tried with a real Access Pass account: signed in, NellLuna's
|
||||
shop listed 763 products signed in (124 more than signed out), and the 124 were queued; Access Pass products
|
||||
imported rated adult.
|
||||
|
||||
## Hub routes
|
||||
|
||||
@@ -204,6 +236,8 @@ passwords never reach the hub readable, and are kept only by the importer.
|
||||
| `DELETE /api/v1/imports/grants/:id` | (its creator, or `import:withdraw` at the catalog) `{reason?}` → `{grant, withdrawn}` |
|
||||
| `POST /api/v1/imports/grants/:id/list` | (its creator, or `import:run` at the catalog) → `{grant, listed, queued}`: an active whole-shop grant's shop listed on IMVU now. 409 `not_shop`; 429 after 3 an hour. |
|
||||
| `GET /api/v1/imports/available?products=&creators=` | (anyone) up to 100 IMVU product IDs and 100 IMVU account IDs, comma-separated → `{products: [{imvuProduct, status, product, requested?}], shops: [{imvuCreator, shop, products}]}`. `status`: `imported` (`product` is the hub product), `adult` (imported, but the person can't see adult products), `queued`, `covered` (a grant covers it: asking queues it) or `none` (asking counts it). `requested` (signed in): they asked for it. `shop`: an active whole-shop grant; `products`: how many of the shop's are on T5DE. From what the hub knows only (it asks IMVU nothing), for the proxy's "Get on T5DE". |
|
||||
| `POST /api/v1/importer/jobs/:id/listing` | (the catalog's importer) a claimed `list` job: `{products: [{id, name, rating, creatorId, creatorName, purchasable}]}` (up to 10,000) → `{listed, queued}`: the grant's IMVU account's products are kept and queued; the job is done ("Access Pass products") |
|
||||
| `POST /api/v1/importer/jobs/:id/info` | (the catalog's importer) a claimed import or recheck job: `{found, name?, rating?, creatorId?, creatorName?, purchasable?}`, as its IMVU account sees the product → `{rating, covered}` |
|
||||
| `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 |
|
||||
|
||||
+4
-2
@@ -82,8 +82,10 @@ catalog's). Only approved catalogs with imports on and not paused.
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| `POST /api/v1/importer/jobs/claim` | `{limit}` (1-20) → `{jobs: [{id, kind, imvuProduct, lastRevision, rating}]}`; `rating` is IMVU's (`general`, `adult`, or null when the hub couldn't see it), for the importer to write into `index.xml` as `ProductRating` (GA, AP); claimed jobs not reported within 30 minutes go back to the queue |
|
||||
| `POST /api/v1/importer/jobs/:id/token` | `{imvuRevision}` → `{token, url}`: a `t5de-import` token and the catalog's upload URL |
|
||||
| `POST /api/v1/importer/jobs/claim` | `{limit}` (1-20) → `{jobs: [{id, kind, imvuProduct, lastRevision, rating}]}`; `kind` is `import`, `recheck` or `list`; `rating` is IMVU's (`general`, `adult`, or null when IMVU hides the product from the hub: the importer reports what its account sees first, `/info` below), for the importer to write into `index.xml` as `ProductRating` (GA, AP). A `list` job (a whole shop, signed in) has `imvuCreator` (the shop's IMVU account) and `imvuProduct` 0. Claimed jobs not reported within 30 minutes go back to the queue |
|
||||
| `POST /api/v1/importer/jobs/:id/token` | `{imvuRevision}` → `{token, url}`: a `t5de-import` token and the catalog's upload URL (not for `list` jobs: 409 `not_product`) |
|
||||
| `POST /api/v1/importer/jobs/:id/listing` | a `list` job's products, as the importer's IMVU account lists the shop: `{products: [{id, name, rating, creatorId, creatorName, purchasable}]}` → `{listed, queued}` (imports.md, "Access Pass products") |
|
||||
| `POST /api/v1/importer/jobs/:id/info` | an import or recheck job's product, as the importer's IMVU account sees it: `{found, name?, rating?, creatorId?, creatorName?, purchasable?}` → `{rating, covered}` |
|
||||
| `POST /api/v1/importer/jobs/:id` | `{status: "done" \| "failed" \| "unchanged", imvuRevision?, reason?}` |
|
||||
| `POST /api/v1/importer/hello` | `{version, publicKey}` (base64 SPKI, RSA 3072 to 4096 bits) → the config, as below. Sent at start. A new key means passwords sealed for the old one can't be read: the catalog's accounts then need their passwords again (imports.md "IMVU accounts"). |
|
||||
| `GET /api/v1/importer/config` | `{paused, settings: {rate, concurrency}, fingerprint, accounts: [{id, imvuId, username, sealed}]}`, accounts in the order to try them. `sealed` (or null): `{imvuId, password}` as JSON, RSA-OAEP (SHA-256) for the importer's key, base64; check `imvuId`. Polled every minute; accounts no longer listed are forgotten. |
|
||||
|
||||
Reference in new issue
Block a user