import { UniqueID } from "core/common/domain";
import { Collection, Result } from "core/common/helpers";
import { IInvoiceProps, Invoice } from "../aggregates";

export interface IInvoiceService {
  findInvoices(transaction?: any): Promise<Result<Collection<Invoice>, Error>>;
  findInvoiceById(invoiceId: UniqueID, transaction?: any): Promise<Result<Invoice>>;

  updateInvoiceById(
    invoiceId: UniqueID,
    data: Partial<IInvoiceProps>,
    transaction?: any
  ): Promise<Result<Invoice, Error>>;

  createInvoice(
    invoiceId: UniqueID,
    data: IInvoiceProps,
    transaction?: any
  ): Promise<Result<Invoice, Error>>;

  deleteInvoiceById(invoiceId: UniqueID, transaction?: any): Promise<Result<boolean, Error>>;
}
