import { type Tenant, type TenantConfig } from "../schema";
/**
 * Creates a tenant. Returns null if the name is already taken (the unique
 * constraint on tenantTable.name would otherwise throw) so callers can turn
 * a duplicate into a 409 rather than a 500.
 */
export declare function createTenant(name: string): Promise<Tenant | null>;
export declare function getTenantById(id: string): Promise<Tenant | null>;
/** Unscoped by design -- only reachable behind sessionAuth("super_admin"), the one role
 * explicitly allowed to see across tenants. */
export declare function listAllTenants(): Promise<Tenant[]>;
export interface TenantWithConfig extends Tenant {
    config: Pick<TenantConfig, "monthlyTokenBudget" | "subscriptionPeriodStart" | "subscriptionPeriodEnd"> | null;
}
/**
 * Same unscoped-by-design exception as listAllTenants, extended with the config
 * columns the super-admin panel needs (token budget, subscription period) so the
 * tenants list can render status without one round trip per row. Left join +
 * config null check rather than inner join: a tenant whose config row hasn't been
 * created yet (shouldn't happen post-registration, but not guaranteed by a DB
 * constraint) should still show up, just with config: null.
 */
export declare function listAllTenantsWithConfig(): Promise<TenantWithConfig[]>;
