Files
calendar/packages/features/selectedSlots/repositories/ISelectedSlotRepository.ts
T
Benny JooandGitHub cb7844fd22 refactor: Migrate repositories/services from /lib to /features (#25925)
* 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
2025-12-17 14:14:50 +00:00

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 }>;
}