import { PaginatedResponse } from '@edr/types';
import { FindManyOptions } from 'typeorm';
import { ListRuleEngineQueryDto } from '../dto/list-rule-engine-query.dto';
import { ShippingLine } from '../entities/shipping-line.entity';

export interface IShippingLinesRepository {
  findById(id: string): Promise<ShippingLine | null>;
  findByCode(code: string): Promise<ShippingLine | null>;
  findAll(options?: FindManyOptions<ShippingLine>): Promise<ShippingLine[]>;
  findAndCount(options?: FindManyOptions<ShippingLine>): Promise<[ShippingLine[], number]>;
  findPaged(query: ListRuleEngineQueryDto): Promise<PaginatedResponse<ShippingLine>>;
  create(data: Partial<ShippingLine>): Promise<ShippingLine>;
  update(id: string, data: Partial<ShippingLine>): Promise<ShippingLine | null>;
  softDelete(id: string): Promise<void>;
}

export const SHIPPING_LINES_REPOSITORY = Symbol('SHIPPING_LINES_REPOSITORY');
