feat: recorded import grants, unclaimed creators and claiming
Pull request / title (pull_request) Successful in 1s
CI / test (pull_request) Successful in 1m19s
CI / image (apps/api/Dockerfile, t5de-hub-api) (pull_request) Skipped
CI / image (apps/web/Dockerfile, t5de-hub-web) (pull_request) Skipped

Admins record consent for IMVU creators without an account; their products
belong to a placeholder (imvu_<ID>) until they link the account and claim
them. Proof by a tagline code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-11-07 11:12:26 -08:00
1 parent e6a97be894
commit 64b9658bad
18 files changed
+5222 -26

No files matched your search

@@ -0,0 +1,4 @@
ALTER TABLE "import_grant" ADD COLUMN "proof_code" text;--> statement-breakpoint
ALTER TABLE "import_grant" ADD COLUMN "proof_checked_at" timestamp with time zone;--> statement-breakpoint
ALTER TABLE "user" ADD COLUMN "unclaimed_imvu_id" bigint;--> statement-breakpoint
ALTER TABLE "user" ADD CONSTRAINT "user_unclaimed_imvu_id_unique" UNIQUE("unclaimed_imvu_id");
File diff suppressed because it is too large. Load diff
+7
View File
@@ -127,6 +127,13 @@
"when": 1794073227716,
"tag": "0017_importer_accounts",
"breakpoints": true
},
{
"idx": 18,
"version": "7",
"when": 1794078168609,
"tag": "0018_recorded_grants",
"breakpoints": true
}
]
}
+6
View File
@@ -47,6 +47,9 @@ export const user = pgTable(
approved: boolean("approved").notNull().default(true),
// Two-factor sign-in (an authenticator app), required for sensitive permissions (docs/console.md).
twoFactorEnabled: boolean("two_factor_enabled").notNull().default(false),
// An unclaimed creator (docs/imports.md): a placeholder without credentials for an IMVU creator whose consent an
// admin recorded; its IMVU account. Whoever links that account can claim what it has.
unclaimedImvuId: bigint("unclaimed_imvu_id", { mode: "number" }).unique(),
},
(t) => [uniqueIndex("user_username_lower").on(sql`lower(${t.username})`)],
);
@@ -747,6 +750,9 @@ export const importGrant = pgTable(
consentKind: text("consent_kind").notNull().default("verified"), // "verified" (the creator), "recorded" (an admin)
evidence: text("evidence").notNull().default(""), // recorded: how they agreed
recordedBy: text("recorded_by").references(() => user.id, { onDelete: "set null" }),
// Recorded: proof without an account, a code the creator put in their IMVU tagline, and when the hub saw it.
proofCode: text("proof_code"),
proofCheckedAt: timestamp("proof_checked_at", { withTimezone: true }),
// "pending" (the catalog's team hasn't accepted), "active", "declined", "suspended", "withdrawn".
status: text("status").notNull().default("pending"),
statusReason: text("status_reason").notNull().default(""),