Skip to main content
zerotal

Documentation


Documentation / @zerotal/tenancy / Tenant

Variable: Tenant

const Tenant: Tenancy

Defined in: tenancy/src/facades/Tenant.ts:25

Tenant facade — the primary entry point to tenancy.

Example

import { Tenant } from "@zerotal/tenancy";

Tenant.current();           // the active tenant (or null)
Tenant.check();             // is there an active, enabled tenant?
await Tenant.members();     // hydrated User models
await Tenant.update({ name }); // admin-gated

(The `Tenant` *type* — the tenant record shape — is exported separately and
coexists with this value, so `Tenant.current(): Tenant` reads naturally.)