/** * StrictDB Guardrails — Dangerous operation protection * * Prevents accidental destructive operations like: * - deleteMany with empty filter (deletes all documents) * - updateMany with empty filter (modifies all documents) * - queryMany without limit (unbounded result set) * - deleteOne with empty filter (deletes arbitrary document) */ import type { StrictDBEventEmitter } from './events.js'; export interface GuardrailContext { enabled: boolean; limitRequired: boolean; emptyFilter: boolean; emitter: StrictDBEventEmitter; } /** * Check if an operation is safe to execute. * Throws StrictDBError with code GUARDRAIL_BLOCKED if blocked. */ export declare function checkGuardrails(ctx: GuardrailContext, operation: string, collection: string, filter: Record, options?: { limit?: number; confirm?: string; }): void; /** * Check if an aggregate pipeline is safe to execute. * Blocks pipelines without $limit (unless they have $count, $group, $merge, $out). */ export declare function checkPipelineGuardrails(ctx: GuardrailContext, collection: string, pipeline: Record[]): void; /** * Check bulkWrite operations for dangerous patterns. */ export declare function checkBulkWriteGuardrails(ctx: GuardrailContext, collection: string, operations: Array>): void; //# sourceMappingURL=guardrails.d.ts.map