import { LogContext } from '@rocicorp/logger';
import type { JWTPayload } from 'jose';
import type { CRUDOp, UpsertOp } from '../../../zero-protocol/src/push.ts';
import { 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>[];
}
export declare class WriteAuthorizerImpl implements WriteAuthorizer {
    #private;
    constructor(lc: LogContext, config: ZeroConfig, replica: Database, appID: string, cgID: string);
    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>[];
}
//# sourceMappingURL=write-authorizer.d.ts.map