import { Class, DeepPartial } from '../common'; import { AggregateOptions, AggregateQuery, AggregateResponse, CountOptions, DeleteManyResponse, DeleteOneOptions, Filter, FindByIdOptions, FindRelationOptions, GetByIdOptions, ModifyRelationOptions, Query, QueryOptions, UpdateManyResponse, UpdateOneOptions } from '../interfaces'; import { QueryService } from './query.service'; export declare class ProxyQueryService, U = DeepPartial> implements QueryService { readonly proxied: QueryService; constructor(proxied: QueryService); addRelations(relationName: string, id: string | number, relationIds: (string | number)[], opts?: ModifyRelationOptions): Promise; removeRelation(relationName: string, id: string | number, relationId: string | number, opts?: ModifyRelationOptions): Promise; removeRelations(relationName: string, id: string | number, relationIds: (string | number)[], opts?: ModifyRelationOptions): Promise; setRelations(relationName: string, id: string | number, relationIds: (string | number)[], opts?: ModifyRelationOptions): Promise; setRelation(relationName: string, id: string | number, relationId: string | number, opts?: ModifyRelationOptions): Promise; /** * Query for relations for an array of DTOs. This method will return a map with the DTO as the key and the relations as the value. * @param RelationClass - The class of the relation. * @param relationName - The name of the relation to load. * @param dtos - the dtos to find relations for. * @param query - A query to use to filter, page, and sort relations. */ queryRelations(RelationClass: Class, relationName: string, dtos: DTO[], query: Query): Promise>; /** * Query for an array of relations. * @param RelationClass - The class to serialize the relations into. * @param dto - The dto to query relations for. * @param relationName - The name of relation to query for. * @param query - A query to filter, page and sort relations. */ queryRelations(RelationClass: Class, relationName: string, dto: DTO, query: Query): Promise; countRelations(RelationClass: Class, relationName: string, dtos: DTO[], filter: Filter): Promise>; countRelations(RelationClass: Class, relationName: string, dto: DTO, filter: Filter): Promise; /** * Find a relation for an array of DTOs. This will return a Map where the key is the DTO and the value is to relation or undefined if not found. * @param RelationClass - the class of the relation * @param relationName - the name of the relation to load. * @param dtos - the dtos to find the relation for. * @param filter - Additional filter to apply when finding relations */ findRelation(RelationClass: Class, relationName: string, dtos: DTO[], opts?: FindRelationOptions): Promise>; /** * Finds a single relation. * @param RelationClass - The class to serialize the relation into. * @param dto - The dto to find the relation for. * @param relationName - The name of the relation to query for. * @param filter - Additional filter to apply when finding relations */ findRelation(RelationClass: Class, relationName: string, dto: DTO, opts?: FindRelationOptions): Promise; createMany(items: C[]): Promise; createOne(item: C): Promise; deleteMany(filter: Filter): Promise; deleteOne(id: number | string, opts?: DeleteOneOptions): Promise; findById(id: string | number, opts?: FindByIdOptions): Promise; getById(id: string | number, opts?: GetByIdOptions): Promise; query(query: Query, opts?: QueryOptions): Promise; aggregate(filter: Filter, query: AggregateQuery, opts?: AggregateOptions): Promise[]>; count(filter: Filter, opts?: CountOptions): Promise; updateMany(update: U, filter: Filter): Promise; updateOne(id: string | number, update: U, opts?: UpdateOneOptions): Promise; aggregateRelations(RelationClass: Class, relationName: string, dto: DTO, filter: Filter, aggregate: AggregateQuery): Promise[]>; aggregateRelations(RelationClass: Class, relationName: string, dtos: DTO[], filter: Filter, aggregate: AggregateQuery): Promise[]>>; }