21 lines
631 B
TypeScript
21 lines
631 B
TypeScript
import { UniqueID } from "@/core/common/domain";
|
|
import { Collection, Result } from "@repo/rdx-utils";
|
|
import { Account, IAccountProps } from "../aggregates";
|
|
|
|
export interface IAccountService {
|
|
findAccounts(transaction?: any): Promise<Result<Collection<Account>, Error>>;
|
|
findAccountById(accountId: UniqueID, transaction?: any): Promise<Result<Account>>;
|
|
|
|
updateAccountById(
|
|
accountId: UniqueID,
|
|
data: Partial<IAccountProps>,
|
|
transaction?: any
|
|
): Promise<Result<Account, Error>>;
|
|
|
|
createAccount(
|
|
accountId: UniqueID,
|
|
data: IAccountProps,
|
|
transaction?: any
|
|
): Promise<Result<Account, Error>>;
|
|
}
|