import { Class, DeepPartial } from '../common'; import { AggregateQuery, AggregateResponse, Query } from '../interfaces'; import { Assembler } from './assembler'; /** * Base implementation for Assemblers that requires the implementation of. * * convertToDTO * * convertToEntity * * convertQuery * */ export declare abstract class AbstractAssembler, CE = DeepPartial, U = C, UE = CE> implements Assembler { readonly DTOClass: Class; readonly EntityClass: Class; /** * @param DTOClass - Optional class definition for the DTO. If not provided it will be looked up from the \@Assembler annotation. * @param EntityClass - Optional class definition for the entity. If not provided it will be looked up from the \@Assembler annotation. */ constructor(DTOClass?: Class, EntityClass?: Class); abstract convertToDTO(entity: Entity): Promise | DTO; abstract convertToEntity(dto: DTO): Promise | Entity; abstract convertQuery(query: Query): Query; abstract convertAggregateQuery(aggregate: AggregateQuery): AggregateQuery; abstract convertAggregateResponse(aggregate: AggregateResponse): AggregateResponse; abstract convertToCreateEntity(create: C): Promise | CE; abstract convertToUpdateEntity(update: U): Promise | UE; convertToDTOs(entities: Entity[]): Promise; convertToEntities(dtos: DTO[]): Promise; convertToCreateEntities(createDtos: C[]): Promise; }