import type { LogContext } from '@rocicorp/logger';
import type { JWTPayload } from 'jose';
import type { CRUDOp, UpsertOp } from '../../../zero-protocol/src/push.ts';
import type { DatabaseStorage } from '../../../zqlite/src/database-storage.ts';
import type { Database } from '../../../zqlite/src/db.ts';
import type { ZeroConfig } from '../config/zero-config.ts';
export interface WriteAuthorizer {
    canPreMutation(authData: JWTPayload | undefined, ops: Exclude<CRUDOp, UpsertOp>[]): Promise<boolean>;
    canPostMutation(authData: JWTPayload | undefined, ops: Exclude<CRUDOp, UpsertOp>[]): Promise<boolean>;
    reloadPermissions(): void;
    normalizeOps(ops: CRUDOp[]): Exclude<CRUDOp, UpsertOp>[];
    /**
     * Validates that all table names in the operations exist in the schema.
     * @throws Error if any table name is invalid
     */
    validateTableNames(ops: CRUDOp[]): void;
}
export declare class WriteAuthorizerImpl implements WriteAuthorizer {
    #private;
    constructor(lc: LogContext, config: ZeroConfig, replica: Database, appID: string, cgID: string, writeAuthzStorage: DatabaseStorage);
    reloadPermissions(): void;
    destroy(): void;
    canPreMutation(authData: JWTPayload | undefined, ops: Exclude<CRUDOp, UpsertOp>[]): Promise<boolean>;
    canPostMutation(authData: JWTPayload | undefined, ops: Exclude<CRUDOp, UpsertOp>[]): Promise<boolean>;
    normalizeOps(ops: CRUDOp[]): Exclude<CRUDOp, UpsertOp>[];
    validateTableNames(ops: CRUDOp[]): void;
}
//# sourceMappingURL=write-authorizer.d.ts.map