* feat: report booking * refactor: improvements * test: add unit test * test: add unit test * chore * refactor: feedback * refactor: feedback * refactor: feedback * fix: use string * fix: schema * chore: improvements * refactor: create service * fix: udate test * fix: feedback * fix: schema * fix: type * fix: type * refactor: address feedback * refactor: move to new file * refactor: move to new file * chor: remove * fix UserRepository import * fix type of bookingUid * fix: import path * fix: remove cancellation * chore: duplicate * fix: tests * refactor: feedback * chore: remove table from here * fix: types * fix: types --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
26 lines
684 B
TypeScript
26 lines
684 B
TypeScript
import type { BookingReportReason } from "@calcom/prisma/enums";
|
|
|
|
export interface CreateBookingReportInput {
|
|
bookingUid: string;
|
|
bookerEmail: string;
|
|
reportedById: number;
|
|
reason: BookingReportReason;
|
|
description?: string;
|
|
cancelled: boolean;
|
|
organizationId?: number | null;
|
|
}
|
|
|
|
export interface BookingReportSummary {
|
|
id: string;
|
|
reportedById: number | null;
|
|
reason: BookingReportReason;
|
|
description: string | null;
|
|
createdAt: Date;
|
|
}
|
|
|
|
export interface IBookingReportRepository {
|
|
createReport(input: CreateBookingReportInput): Promise<{ id: string }>;
|
|
|
|
findAllReportedBookings(params: { skip?: number; take?: number }): Promise<BookingReportSummary[]>;
|
|
}
|