import { type WhiteLabel } from './white-label'; /** A signed-in principal, as IAM describes it. */ export interface IamAccount { readonly owner: string; readonly name: string; readonly displayName?: string; readonly email?: string; readonly avatar?: string; readonly isAdmin?: boolean; } /** An organization the principal can see. */ export interface IamOrg { readonly owner: string; readonly name: string; readonly displayName?: string; readonly logo?: string; } /** A project inside an organization (IAM's Org → Workspace → Project tier). */ export interface IamProject { readonly owner: string; readonly name: string; readonly displayName?: string; readonly organization?: string; readonly workspace?: string; readonly isDefault?: boolean; } /** * A refusal from IAM, carrying enough to tell "not signed in" apart from * "signed in, and the answer is genuinely empty" — the distinction a switcher * has to render honestly. */ export declare class IamError extends Error { readonly status: number; readonly unauthenticated: boolean; constructor(message: string, status: number, unauthenticated: boolean); } /** The IAM API root for a host — `lux.cloud` → `https://lux.id/v1/iam`. */ export declare function iamBase(host?: string | null | WhiteLabel): string; /** How a read reaches IAM: where, and with whose bearer. */ export interface IamCall { readonly base: string; readonly token?: string | null; readonly signal?: AbortSignal; } /** Rows per page for the org list — small first paint, more on demand. */ export declare const IAM_PAGE_SIZE = 20; export declare const iam: { /** The signed-in principal, or null when there is no session. */ account(call: IamCall): Promise; /** * One page of the orgs the principal can see. IAM scopes the read to the * caller's authority, so a normal member gets their own org and a super * admin gets the tenant list — the page never has to decide. */ organizations(call: IamCall, page?: number, query?: string, pageSize?: number): Promise>; /** One organization by name. */ organization(call: IamCall, name: string): Promise; /** Members of an organization. */ users(call: IamCall, org: string): Promise>; /** The organization's projects — IAM keys this read by `organization`. */ projects(call: IamCall, org: string): Promise>; }; //# sourceMappingURL=iam.d.ts.map