import type { Prisma } from '../../../prisma-client';
import type { NextApiRequest } from "next";
declare function getBookingToDelete(id: number | undefined, uid: string | undefined): Promise<{
    eventType: {
        length: number;
        title: string;
        metadata: Prisma.JsonValue;
        parent: {
            teamId: number | null;
        } | null;
        price: number;
        currency: string;
        description: string | null;
        userId: number | null;
        slug: string;
        eventName: string | null;
        parentId: number | null;
        bookingFields: Prisma.JsonValue;
        requiresConfirmation: boolean;
        recurringEvent: Prisma.JsonValue;
        seatsPerTimeSlot: number | null;
        seatsShowAttendees: boolean | null;
        schedulingType: import('../../../prisma-client').$Enums.SchedulingType | null;
        hosts: {
            user: {
                metadata: Prisma.JsonValue;
                theme: string | null;
                id: number;
                name: string | null;
                email: string;
                organizationId: number | null;
                timeZone: string;
                username: string | null;
                locale: string | null;
                startTime: number;
                endTime: number;
                bio: string | null;
                hideBranding: boolean;
                brandColor: string | null;
                darkBrandColor: string | null;
                timeFormat: number | null;
                weekStart: string;
                smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
                smsLockReviewedByAdmin: boolean;
                emailVerified: Date | null;
                avatarUrl: string | null;
                bufferTime: number;
                appTheme: string | null;
                createdDate: Date;
                trialEndsAt: Date | null;
                defaultScheduleId: number | null;
                completedOnboarding: boolean;
                twoFactorSecret: string | null;
                twoFactorEnabled: boolean;
                backupCodes: string | null;
                identityProvider: import('../../../prisma-client').$Enums.IdentityProvider;
                identityProviderId: string | null;
                invitedTo: number | null;
                allowDynamicBooking: boolean | null;
                allowSEOIndexing: boolean | null;
                receiveMonthlyDigestEmail: boolean | null;
                verified: boolean | null;
                role: import('../../../prisma-client').$Enums.UserPermissionRole;
                disableImpersonation: boolean;
                locked: boolean;
                movedToProfileId: number | null;
                isPlatformManaged: boolean;
                referralLinkId: string | null;
            };
        }[];
        owner: {
            id: number;
            hideBranding: boolean;
        } | null;
        team: {
            id: number;
            name: string;
            parentId: number | null;
        } | null;
        workflows: {
            workflow: {
                time: number | null;
                id: number;
                name: string;
                userId: number | null;
                teamId: number | null;
                steps: {
                    template: import('../../../prisma-client').$Enums.WorkflowTemplates;
                    id: number;
                    action: import('../../../prisma-client').$Enums.WorkflowActions;
                    sender: string | null;
                    sendTo: string | null;
                    reminderBody: string | null;
                    emailSubject: string | null;
                    numberRequired: boolean | null;
                    numberVerificationPending: boolean;
                    includeCalendarEvent: boolean;
                }[];
                trigger: import('../../../prisma-client').$Enums.WorkflowTriggerEvents;
                timeUnit: import('../../../prisma-client').$Enums.TimeUnit | null;
            };
        }[];
    } | null;
    title: string;
    metadata: Prisma.JsonValue;
    id: number;
    location: string | null;
    description: string | null;
    eventTypeId: number | null;
    userId: number | null;
    user: {
        id: number;
        name: string | null;
        email: string;
        timeZone: string;
        destinationCalendar: {
            id: number;
            credentialId: number | null;
            eventTypeId: number | null;
            userId: number | null;
            integration: string;
            externalId: string;
            primaryEmail: string | null;
        } | null;
        username: string | null;
        timeFormat: number | null;
        credentials: {
            key: Prisma.JsonValue;
            invalid: boolean | null;
            type: string;
            id: number;
            userId: number | null;
            user: {
                email: string;
            } | null;
            teamId: number | null;
            appId: string | null;
        }[];
    } | null;
    payment: {
        success: boolean;
        data: Prisma.JsonValue;
        id: number;
        currency: string;
        paymentOption: import('../../../prisma-client').$Enums.PaymentOption | null;
        bookingId: number;
        uid: string;
        appId: string | null;
        externalId: string;
        refunded: boolean;
        amount: number;
        fee: number;
    }[];
    destinationCalendar: {
        id: number;
        credentialId: number | null;
        eventTypeId: number | null;
        userId: number | null;
        integration: string;
        externalId: string;
        primaryEmail: string | null;
    } | null;
    customInputs: Prisma.JsonValue;
    smsReminderNumber: string | null;
    recurringEventId: string | null;
    uid: string;
    iCalUID: string | null;
    responses: Prisma.JsonValue;
    references: {
        type: string;
        credentialId: number | null;
        uid: string;
        thirdPartyRecurringEventId: string | null;
        externalCalendarId: string | null;
    }[];
    attendees: {
        id: number;
        name: string;
        email: string;
        timeZone: string;
        bookingId: number | null;
        locale: string | null;
        phoneNumber: string | null;
        noShow: boolean | null;
    }[];
    workflowReminders: {
        method: import('../../../prisma-client').$Enums.WorkflowMethods;
        id: number;
        bookingUid: string | null;
        cancelled: boolean | null;
        referenceId: string | null;
        scheduled: boolean;
        workflowStepId: number | null;
        scheduledDate: Date;
        seatReferenceId: string | null;
        isMandatoryReminder: boolean | null;
        retryCount: number;
    }[];
    seatsReferences: {
        data: Prisma.JsonValue;
        id: number;
        bookingId: number;
        referenceUid: string;
        attendeeId: number;
    }[];
    userPrimaryEmail: string | null;
    startTime: Date;
    endTime: Date;
    paid: boolean;
    iCalSequence: number;
}>;
export type CustomRequest = NextApiRequest & {
    userId?: number;
    bookingToDelete?: Awaited<ReturnType<typeof getBookingToDelete>>;
    platformClientId?: string;
    platformRescheduleUrl?: string;
    platformCancelUrl?: string;
    platformBookingUrl?: string;
    arePlatformEmailsEnabled?: boolean;
};
export type HandleCancelBookingResponse = {
    success: boolean;
    message: string;
    onlyRemovedAttendee: boolean;
    bookingId: number;
    bookingUid: string;
};
declare function handler(req: CustomRequest): Promise<{
    success: true;
    onlyRemovedAttendee: true;
    bookingId: number;
    bookingUid: string;
    message: string;
} | {
    success: true;
    message: string;
    onlyRemovedAttendee: false;
    bookingId: number;
    bookingUid: string;
}>;
export default handler;
//# sourceMappingURL=handleCancelBooking.d.ts.map