import type { TenantFilter, TenantScope } from '../agora/tenancy.js';
import type { ConsoleTenants } from '../console-authorize.js';
/** What the console may show a viewer, with tenancy on. */
export interface ConsoleTenantScope {
    /** The tenants the viewer may pick from: every one (`'*'`) or these ids (empty = none). */
    allowed: ConsoleTenants;
    /** What the reads are scoped to right now; `undefined` = every tenant, rows with none included. */
    scope: TenantScope | undefined;
    /** The organization the viewer picked (`?tenant=`), when it is one they may see. */
    selected: string | null;
    /** `?tenant=` named a tenant outside `allowed`: the reads are empty, and the attempt is logged. */
    forged: boolean;
}
/**
 * Resolve what a console viewer sees under tenancy:
 *
 * 1. `authorize` granted no `tenants` → the viewer's own active tenant (none → nothing, and the
 *    console asks to choose an organization).
 * 2. `tenants: [...]` → those; `'*'` → every tenant, plus rows with none.
 * 3. `?tenant=<id>` narrows to one of them; an id outside them reads as empty (`forged`).
 */
export declare function resolveConsoleTenantScope(input: {
    granted: ConsoleTenants | undefined;
    own: TenantFilter;
    selected?: string | undefined;
    nullRows?: 'tenantless' | 'shared';
}): ConsoleTenantScope;
//# sourceMappingURL=tenant-scope.d.ts.map