import { ICollection, IListResponse_DTO } from "@shared/contexts";

interface IGenericMapper<S, D, M, N> {
  map?: (source: S) => D;
  mapArray?: (sourceArray: M) => N;
}

export interface IMapper<S, D>
  extends IGenericMapper<S, D, ICollection<S>, ICollection<D>> {}

export interface IDTOMapper<S, D> {
  map: (source: S) => D;
  mapArray: (
    sourceArray: ICollection<S>,
    params: {
      page: number;
      limit: number;
    }
  ) => IListResponse_DTO<D>;
}

export interface IDomainMapper<S, D> {
  map: (source: S) => D;
}
