* deployment * update imports * booking report * update import paths * watch list * watch list * api key * api key * selected slots * wip * event type translation * work flow step * booking reference * fix tests * fix * fix * migrate * wip * address * fix
25 lines
728 B
TypeScript
25 lines
728 B
TypeScript
import type { SelectedSlot } from "./dto/SelectedSlot";
|
|
|
|
export type TimeSlot = {
|
|
utcStartIso: string;
|
|
utcEndIso: string;
|
|
};
|
|
|
|
export interface ISelectedSlotRepository {
|
|
findReservedByOthers(args: {
|
|
slot: TimeSlot;
|
|
eventTypeId: number;
|
|
uid: string;
|
|
}): Promise<SelectedSlot | null>;
|
|
findManyReservedByOthers(
|
|
slots: TimeSlot[],
|
|
eventTypeId: number,
|
|
uid: string
|
|
): Promise<Array<Pick<SelectedSlot, "slotUtcEndDate" | "slotUtcStartDate">>>;
|
|
findManyUnexpiredSlots(args: {
|
|
userIds: number[];
|
|
currentTimeInUtc: string;
|
|
}): Promise<Array<Omit<SelectedSlot, "releaseAt">>>;
|
|
deleteManyExpiredSlots(args: { eventTypeId: number; currentTimeInUtc: string }): Promise<{ count: number }>;
|
|
}
|