import type { Tenant } from "~/types/tenancy.js"; import { RootTenantId } from "~/features/tenancy/TenantStorages/RootTenantId.js"; /** * A minimal in-memory root tenant used only before the system is installed, when the real root * tenant record doesn't exist yet. It keeps the request pipeline + GraphQL schema build functional * (nothing dereferences a null tenant) so the install mutation can run and create the real root. * Once installed, root's record is read instead and this is never used. */ export const createBootstrapRootTenant = (): Tenant => { const now = new Date().toISOString(); return { id: RootTenantId.VALUE, name: "Root", description: "", status: "enabled", isInstalled: false, settings: { name: { full: "Root", slug: "root" }, social: {}, favicon: {}, logo: {} } as any, tags: [], parent: null, path: RootTenantId.VALUE, createdOn: now, savedOn: now }; };