import { type Condition } from "fumadb/query";
import type { AnyTable } from "fumadb/schema";
export declare const executorScopePolicyName = "executor.scope";
export declare const executorUnscopedPolicyName = "executor.unscoped";
export interface ExecutorScopePolicyContext {
    readonly allowedScopeIds: ReadonlySet<string>;
}
export type ExecutorScopePolicyAccess = "read" | "write" | "delete";
export type ExecutorScopeValue = string | null | undefined;
export type ExecutorScopeTargetColumn = "scope_id" | "source_scope_id";
export interface ExecutorScopeTarget {
    readonly column: ExecutorScopeTargetColumn;
    readonly value: string;
}
export declare const hasExecutorScopePolicy: (table: AnyTable) => boolean;
export declare function assertExecutorScopePolicyTable(table: AnyTable, tableKey?: string): void;
export declare const isExecutorScopeAllowed: (tableName: string, access: ExecutorScopePolicyAccess, value: ExecutorScopeValue, context: ExecutorScopePolicyContext | undefined) => boolean;
export declare const executorScopeIds: (tableName: string, access: ExecutorScopePolicyAccess, context: ExecutorScopePolicyContext | undefined) => string[];
export declare const requireExecutorScopeTarget: (tableName: string, access: Extract<ExecutorScopePolicyAccess, "write" | "delete">, where: Condition | undefined, context: ExecutorScopePolicyContext | undefined, columns?: readonly ExecutorScopeTargetColumn[]) => ExecutorScopeTarget;
export declare const assertExecutorScopeAllowed: (tableName: string, access: ExecutorScopePolicyAccess, value: ExecutorScopeValue, context: ExecutorScopePolicyContext | undefined) => void;
export declare const assertExecutorScopeTargetValue: (tableName: string, access: Extract<ExecutorScopePolicyAccess, "write" | "delete">, value: ExecutorScopeValue, target: ExecutorScopeTarget, context: ExecutorScopePolicyContext | undefined) => void;
export declare const assertAnyExecutorScopeAllowed: (tableName: string, access: ExecutorScopePolicyAccess, values: readonly ExecutorScopeValue[], context: ExecutorScopePolicyContext | undefined) => void;
//# sourceMappingURL=scope-policy.d.ts.map