import { ApplyBasicCreateCasting, DeepPartial, Model, PopulateOptions, QueryFilter, Require_id, UpdateQuery } from 'mongoose'; import { BaseEntity } from '../models/entity.model'; export declare class EntitiesPathParams { tenantId: string; } export declare class OptionalEntityPathParams { tenantId: string; uuid?: string; } export declare class EntityPathParams { tenantId: string; uuid: string; } export declare class GlobalEntityPathParams { uuid: string; } export declare class OptionalGlobalEntityPathParams { uuid?: string; } export declare class ListParams { active?: string; direction?: 'asc' | 'desc'; pageIndex?: number; pageSize?: number; filter?: string; select?: string; } export declare class ListResponse { items: T[]; count: number; } export declare const OpenApiPaginationResponse: (model: Function) => ((target: object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor) => void); export declare class ChangeContext { email: string; } export declare function created(changeContext: ChangeContext, entity: Partial): DeepPartial>>; export declare function changed(changeContext: ChangeContext, entity: Partial): UpdateQuery; export declare function list, PopulatedEntity = Entity>(model: Model, pathParams: EntitiesPath, { active, direction, pageIndex, pageSize, filter, select }: ListParams, populate?: PopulateOptions | PopulateOptions[]): Promise>; export declare class EntityService = EntitiesPathParams, EntityPath extends QueryFilter = EntityPathParams, OptionalEntityPath extends QueryFilter = OptionalEntityPathParams, PopulatedEntity = Entity> { private model; protected options: { listSelect?: string; populate?: PopulateOptions | PopulateOptions[]; defaultSortKey?: string; defaultSortDirection?: 'asc' | 'desc'; technicalKeys: (keyof Entity)[]; }; constructor(model: Model, options: { listSelect?: string; populate?: PopulateOptions | PopulateOptions[]; defaultSortKey?: string; defaultSortDirection?: 'asc' | 'desc'; technicalKeys: (keyof Entity)[]; }); create(changeContext: ChangeContext, pathParams: EntitiesPath, createRequest: Partial): Promise; list(pathParams: EntitiesPath, { active, direction, pageIndex, pageSize, filter, select }: ListParams): Promise>; read(params: EntityPath): Promise; update(changeContext: ChangeContext, entityPath: EntityPath, createRequest: Partial): Promise; upsert(changeContext: ChangeContext, entityPath: OptionalEntityPath, createRequest: Partial): Promise; delete(changeContext: ChangeContext, params: EntityPath): Promise; inUse(params: EntityPath): Promise | boolean; }