import type Database from 'better-sqlite3';
import type { RequestContext } from '../middleware/auth';
export type TenantTombstoneStatus = 'tombstoned' | 'purging' | 'purge_blocked' | 'purged';
export interface TenantTombstoneRecord {
    tenantId: string;
    requestedBy: string | null;
    requestedAt: number;
    purgeAfter: number;
    status: TenantTombstoneStatus;
    proofHash: string | null;
}
export interface TenantMutationDecision {
    allowed: boolean;
    httpStatus: number;
    code: string;
    status: string;
    message: string;
    details?: Record<string, unknown>;
}
export interface TenantPurgeProof {
    tenantId: string;
    requestedBy: string | null;
    purgedBy: string;
    requestedAt: number;
    purgeAfter: number;
    purgedAt: number;
    deletedCounts: Record<string, number>;
    dataPath: string;
    dataPathRemoved: boolean;
    proofHash: string;
}
interface BlockerRow {
    id: string;
    kind: 'analysis_run' | 'trace_processor_lease';
    status: string;
    workspace_id: string;
}
export declare class TenantPurgeBlockedError extends Error {
    readonly blockers: BlockerRow[];
    constructor(blockers: BlockerRow[]);
}
export declare class TenantPurgeWindowError extends Error {
    readonly purgeAfter: number;
    constructor(purgeAfter: number);
}
export declare function getTenantTombstone(db: Database.Database, tenantId: string): TenantTombstoneRecord | null;
export declare function createTenantTombstone(db: Database.Database, context: RequestContext, reason?: string, now?: number): TenantTombstoneRecord;
export declare function evaluateTenantMutationPolicy(context: RequestContext): TenantMutationDecision;
export declare function sendTenantMutationDeniedPayload(decision: TenantMutationDecision): Record<string, unknown>;
export declare function purgeTenantNow(db: Database.Database, context: RequestContext, now?: number): Promise<TenantPurgeProof>;
export {};
//# sourceMappingURL=enterpriseTenantLifecycleService.d.ts.map