import { default as mongoose } from 'mongoose'; import { AclAction, AppAbility } from './types'; type StoredAcl = { ability: AppAbility; action?: AclAction; }; type PipelineStageLike = Record; declare const mongooseAclPluginBrand: unique symbol; declare module "mongoose" { interface QueryOptions { rbAcl?: StoredAcl; [mongooseAclPluginBrand]?: DocType; } interface AggregateOptions { rbAcl?: StoredAcl; } interface Query> { [mongooseAclPluginBrand]?: [ResultType, DocType, THelpers, RawDocType, QueryOp, TDocOverrides]; acl: (ability: AppAbility, action?: AclAction) => this; } interface Aggregate { [mongooseAclPluginBrand]?: ResultType; acl: (ability: AppAbility, action?: AclAction) => this; } interface Model { [mongooseAclPluginBrand]?: [TRawDocType, TQueryHelpers, TInstanceMethods, TVirtuals, THydratedDocumentType, TSchema, TLeanResultType]; acl: (ability: AppAbility) => this; } } export declare const mongooseAclPlugin: (schema: mongoose.Schema) => void; export declare const _private: { createModelAclProxy: >(model: TModel, ability: AppAbility) => TModel; injectAggregateMatch: (pipeline: PipelineStageLike[], match: Record) => void; mergeMongoQuery: (left: unknown, right: Record) => Record; }; export {}; //# sourceMappingURL=mongooseAclPlugin.d.ts.map