Class GetAppointmentsUseCase
Constructors
Methods
execute
- execute(
input: {
barberId?: string;
customerId?: string;
endDate?: Date;
page: number;
pageSize: number;
serviceId?: string;
sortBy: "status" | "startTime" | "createdAt";
sortDirection: "asc" | "desc";
startDate?: Date;
status?: "pending" | "confirmed" | "cancelled" | "completed";
},
): Promise<IPagedResult<any>> Parameters
- input: {
barberId?: string;
customerId?: string;
endDate?: Date;
page: number;
pageSize: number;
serviceId?: string;
sortBy: "status" | "startTime" | "createdAt";
sortDirection: "asc" | "desc";
startDate?: Date;
status?: "pending" | "confirmed" | "cancelled" | "completed";
}
getBarberSchedule
- getBarberSchedule(
barberId: string,
date: Date,
options?: IQueryOptions,
): Promise<IPagedResult<any>>
getDashboardStats
- getDashboardStats(
barberId?: string,
): Promise<
{
cancelled: number;
completed: number;
todayAppointments: number;
upcoming: number;
},
> Returns Promise<
{
cancelled: number;
completed: number;
todayAppointments: number;
upcoming: number;
},
>
getPastAppointments
- getPastAppointments(
customerId: string,
options?: IQueryOptions,
): Promise<IPagedResult<any>>
getUpcomingAppointments
- getUpcomingAppointments(
customerId: string,
options?: IQueryOptions,
): Promise<IPagedResult<any>>