import { EmailAddress, UniqueID } from "@/core/common/domain";
import { Collection, Result } from "@repo/rdx-utils";
import { Account } from "../aggregates";

export interface IAccountRepository {
  accountExists(id: UniqueID, transaction?: any): Promise<Result<boolean, Error>>;
  findAll(transaction?: any): Promise<Result<Collection<Account>, Error>>;
  findById(id: UniqueID, transaction?: any): Promise<Result<Account, Error>>;
  findByEmail(email: EmailAddress, transaction?: any): Promise<Result<Account, Error>>;

  create(account: Account, transaction?: any): Promise<void>;
  update(account: Account, transaction?: any): Promise<void>;
}
