2025-06-11 15:13:44 +00:00
|
|
|
import { Criteria } from "@repo/rdx-criteria/server";
|
|
|
|
|
import { UniqueID } from "@repo/rdx-ddd";
|
|
|
|
|
import { Collection, Result } from "@repo/rdx-utils";
|
2025-06-24 18:38:57 +00:00
|
|
|
import { CustomerInvoice, CustomerInvoiceProps } from "../aggregates";
|
2025-06-11 15:13:44 +00:00
|
|
|
|
|
|
|
|
export interface ICustomerInvoiceService {
|
2025-06-12 06:55:17 +00:00
|
|
|
findCustomerInvoices(
|
|
|
|
|
criteria: Criteria,
|
|
|
|
|
transaction?: any
|
|
|
|
|
): Promise<Result<Collection<CustomerInvoice>, Error>>;
|
|
|
|
|
findCustomerInvoiceById(
|
|
|
|
|
customerInvoiceId: UniqueID,
|
|
|
|
|
transaction?: any
|
|
|
|
|
): Promise<Result<CustomerInvoice>>;
|
2025-06-11 15:13:44 +00:00
|
|
|
|
|
|
|
|
updateCustomerInvoiceById(
|
2025-06-12 06:55:17 +00:00
|
|
|
customerInvoiceId: UniqueID,
|
2025-06-24 18:38:57 +00:00
|
|
|
data: Partial<CustomerInvoiceProps>,
|
2025-06-11 15:13:44 +00:00
|
|
|
transaction?: any
|
|
|
|
|
): Promise<Result<CustomerInvoice, Error>>;
|
|
|
|
|
|
|
|
|
|
createCustomerInvoice(
|
2025-06-12 06:55:17 +00:00
|
|
|
customerInvoiceId: UniqueID,
|
2025-06-24 18:38:57 +00:00
|
|
|
data: CustomerInvoiceProps,
|
2025-06-11 15:13:44 +00:00
|
|
|
transaction?: any
|
|
|
|
|
): Promise<Result<CustomerInvoice, Error>>;
|
|
|
|
|
|
2025-06-12 06:55:17 +00:00
|
|
|
deleteCustomerInvoiceById(
|
|
|
|
|
customerInvoiceId: UniqueID,
|
|
|
|
|
transaction?: any
|
|
|
|
|
): Promise<Result<boolean, Error>>;
|
2025-06-11 15:13:44 +00:00
|
|
|
}
|