import { SmrtCollection, SmrtObject } from '@happyvertical/smrt-core'; /** * Fail closed when an active tenant context requests a different tenant's rows. * * @param tenantId - The tenant id the caller asked for. * @param label - `Class.method` identifier for the error message. * @throws {TenantIsolationError} when a non-bypass tenant context is active and * does not match `tenantId`. */ export declare function assertTenantReadAllowed(tenantId: string, label: string): void; /** * Return all global (tenant-less) rows for a tenant-scoped collection. * * STI child collections are auto-scoped to their own `_meta_type` (via * `collection.getStiChildMetaType()`) so the shared table never returns sibling * subtypes; STI base / CTI collections are not scoped. * * @param collection - The tenant-scoped collection to query. */ export declare function queryGlobal(collection: SmrtCollection): Promise; /** * Return a tenant's rows plus all global rows for a tenant-scoped collection. * * Fails closed (`assertTenantReadAllowed`) before issuing the bypassed query. * STI child collections are auto-scoped to their own `_meta_type` (via * `collection.getStiChildMetaType()`); STI base / CTI collections are not. * * @param collection - The tenant-scoped collection to query. * @param tenantId - The tenant id to include alongside globals. * @param label - `Class.method` identifier for the isolation error message. */ export declare function queryWithGlobals(collection: SmrtCollection, tenantId: string, label: string): Promise; //# sourceMappingURL=tenant-global-queries.d.ts.map