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;
        description: string | null;
        price: number;
        owner: {
            id: number;
            hideBranding: boolean;
        } | null;
        team: {
            name: string;
            id: number;
            parentId: number | null;
        } | null;
        workflows: {
            workflow: {
                name: string;
                id: number;
                time: number | null;
                trigger: import('../../../prisma-client').$Enums.WorkflowTriggerEvents;
                userId: number | null;
                teamId: number | null;
                steps: {
                    id: number;
                    template: import('../../../prisma-client').$Enums.WorkflowTemplates;
                    action: import('../../../prisma-client').$Enums.WorkflowActions;
                    sendTo: string | null;
                    reminderBody: string | null;
                    emailSubject: string | null;
                    numberRequired: boolean | null;
                    sender: string | null;
                    numberVerificationPending: boolean;
                    includeCalendarEvent: boolean;
                }[];
                timeUnit: import('../../../prisma-client').$Enums.TimeUnit | null;
            };
        }[];
        hosts: {
            user: {
                name: string | null;
                id: number;
                role: import('../../../prisma-client').$Enums.UserPermissionRole;
                metadata: Prisma.JsonValue;
                username: string | null;
                email: string;
                bio: string | null;
                theme: string | null;
                verified: boolean | null;
                locked: boolean;
                organizationId: number | null;
                locale: string | null;
                timeZone: string;
                startTime: number;
                endTime: number;
                creationSource: import('../../../prisma-client').$Enums.CreationSource | null;
                movedToProfileId: number | null;
                emailVerified: Date | null;
                avatarUrl: string | null;
                weekStart: string;
                bufferTime: number;
                hideBranding: boolean;
                appTheme: string | null;
                createdDate: Date;
                trialEndsAt: Date | null;
                lastActiveAt: Date | null;
                defaultScheduleId: number | null;
                completedOnboarding: boolean;
                timeFormat: number | null;
                twoFactorSecret: string | null;
                twoFactorEnabled: boolean;
                backupCodes: string | null;
                identityProvider: import('../../../prisma-client').$Enums.IdentityProvider;
                identityProviderId: string | null;
                invitedTo: number | null;
                brandColor: string | null;
                darkBrandColor: string | null;
                allowDynamicBooking: boolean | null;
                allowSEOIndexing: boolean | null;
                receiveMonthlyDigestEmail: boolean | null;
                disableImpersonation: boolean;
                isPlatformManaged: boolean;
                smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
                smsLockReviewedByAdmin: boolean;
                referralLinkId: string | null;
            };
        }[];
        currency: string;
        slug: string;
        userId: number | null;
        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;
        parent: {
            teamId: number | null;
        } | null;
    } | null;
    user: {
        name: string | null;
        id: number;
        username: string | null;
        email: string;
        timeZone: string;
        destinationCalendar: {
            id: number;
            userId: number | null;
            credentialId: number | null;
            eventTypeId: number | null;
            integration: string;
            externalId: string;
            primaryEmail: string | null;
            delegationCredentialId: string | null;
            domainWideDelegationCredentialId: string | null;
        } | null;
        timeFormat: number | null;
        credentials: {
            key: Prisma.JsonValue;
            user: {
                email: string;
            } | null;
            id: number;
            type: string;
            userId: number | null;
            teamId: number | null;
            appId: string | null;
            invalid: boolean | null;
        }[];
    } | null;
    id: number;
    title: string;
    metadata: Prisma.JsonValue;
    description: string | null;
    paid: boolean;
    payment: {
        success: boolean;
        data: Prisma.JsonValue;
        id: number;
        refunded: boolean;
        currency: string;
        uid: string;
        paymentOption: import('../../../prisma-client').$Enums.PaymentOption | null;
        bookingId: number;
        externalId: string;
        appId: string | null;
        amount: number;
        fee: number;
    }[];
    location: string | null;
    attendees: {
        name: string;
        id: number;
        email: string;
        locale: string | null;
        timeZone: string;
        bookingId: number | null;
        phoneNumber: string | null;
        noShow: boolean | null;
    }[];
    uid: string;
    userId: number | null;
    eventTypeId: number | null;
    destinationCalendar: {
        id: number;
        userId: number | null;
        credentialId: number | null;
        eventTypeId: number | null;
        integration: string;
        externalId: string;
        primaryEmail: string | null;
        delegationCredentialId: string | null;
        domainWideDelegationCredentialId: string | null;
    } | null;
    customInputs: Prisma.JsonValue;
    smsReminderNumber: string | null;
    recurringEventId: string | null;
    iCalUID: string | null;
    responses: Prisma.JsonValue;
    references: {
        type: string;
        uid: string;
        credentialId: number | null;
        thirdPartyRecurringEventId: string | null;
        delegationCredentialId: string | null;
        externalCalendarId: string | null;
    }[];
    workflowReminders: {
        method: import('../../../prisma-client').$Enums.WorkflowMethods;
        id: number;
        cancelled: boolean | null;
        bookingUid: string | null;
        referenceId: string | null;
        scheduledDate: Date;
        scheduled: boolean;
        workflowStepId: number | null;
        seatReferenceId: string | null;
        isMandatoryReminder: boolean | null;
        retryCount: number;
    }[];
    seatsReferences: {
        data: Prisma.JsonValue;
        id: number;
        metadata: Prisma.JsonValue;
        bookingId: number;
        referenceUid: string;
        attendeeId: number;
    }[];
    userPrimaryEmail: string | null;
    startTime: Date;
    endTime: Date;
    iCalSequence: number;
}>;
export type BookingToDelete = Awaited<ReturnType<typeof getBookingToDelete>>;
export type AppRouterRequest = {
    appDirRequestBody: unknown;
};
export type CustomRequest = (NextApiRequest | AppRouterRequest) & {
    userId?: number;
    bookingToDelete?: BookingToDelete;
    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