soft-delete-plugin-mongoose
Version:
a mongoose plugin that allows you to soft delete documents and restore them (for JS & TS)
8 lines (7 loc) • 339 B
TypeScript
import { PipelineStage } from "mongoose";
/**
* Overwrites aggregation pipeline to handle soft deleted documents
* - Adds filtering for soft deleted documents in $lookup results
* - Ensures $match stages exclude soft deleted documents
*/
export declare const overwriteAggregatePipeline: (pipeline: PipelineStage[]) => PipelineStage[];