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
+18
-2
@@ -26,11 +26,16 @@ export type ImvuRoom = {
|
||||
expired: boolean;
|
||||
};
|
||||
|
||||
/** An IMVU product's public info, as T5 products derived from it show it. */
|
||||
/** An IMVU product's public info: as T5 products derived from it show it, and as imports need it. */
|
||||
export type ImvuProduct = {
|
||||
image: string | null; // https, on *.imvu.com
|
||||
categories: { id: number; name: string }[]; // outermost first, e.g. Clothing / Clothing for Female / Tops
|
||||
gender: string; // "female", "male", or "" (either)
|
||||
name: string;
|
||||
creatorId: number; // the creator's IMVU account (0 if IMVU didn't say)
|
||||
creatorName: string;
|
||||
adult: boolean; // rated AP
|
||||
purchasable: boolean; // false once retired
|
||||
};
|
||||
|
||||
export class NoSuchImvuUser extends Error {
|
||||
@@ -165,7 +170,18 @@ export function parseProduct(answer: unknown, id: number): ImvuProduct | null {
|
||||
return [{ id: n, name: name.trim().slice(0, 100) }];
|
||||
});
|
||||
const gender = d.gender === "female" || d.gender === "male" ? d.gender : "";
|
||||
return { image: imvuImage(d.product_image), categories, gender };
|
||||
const creatorId = Number(d.creator_cid);
|
||||
const text = (v: unknown, max: number) => (typeof v === "string" ? v.trim().slice(0, max) : "");
|
||||
return {
|
||||
image: imvuImage(d.product_image),
|
||||
categories,
|
||||
gender,
|
||||
name: text(d.product_name, 200),
|
||||
creatorId: Number.isSafeInteger(creatorId) && creatorId > 0 ? creatorId : 0,
|
||||
creatorName: text(d.creator_name, 64),
|
||||
adult: d.rating === "AP" || d.is_ap === true,
|
||||
purchasable: d.is_purchasable !== false,
|
||||
};
|
||||
}
|
||||
|
||||
// IMVU's "denormalized" answers: the user is the one /user/user-<id> entry.
|
||||
|
||||
Reference in new issue
Block a user