import { Kysely } from '../../../platform/atoms/kysely-types/index.ts';
import { TextFilterValue } from '../../data-table/lib/types';
import { DB } from '@calcom/kysely';
import { PrismaClient } from '../../../prisma';
type InputByStatus = "upcoming" | "recurring" | "past" | "cancelled" | "unconfirmed";
export type SortOptions = {
    sortStart?: "asc" | "desc";
    sortEnd?: "asc" | "desc";
    sortCreated?: "asc" | "desc";
    sortUpdated?: "asc" | "desc";
};
type GetOptions = {
    ctx: {
        user: {
            id: number;
            email: string;
            orgId?: number | null;
        };
        prisma: PrismaClient;
        kysely: Kysely<DB>;
    };
    bookingListingByStatus: InputByStatus[];
    take: number;
    skip: number;
    filters: {
        status?: InputByStatus;
        statuses?: InputByStatus[];
        teamIds?: number[] | undefined;
        userIds?: number[] | undefined;
        eventTypeIds?: number[] | undefined;
        attendeeEmail?: string | TextFilterValue;
        attendeeName?: string | TextFilterValue;
        bookingUid?: string | undefined;
    };
    sort?: SortOptions;
};
declare const getAllUserBookings: ({ ctx, filters, bookingListingByStatus, take, skip, sort }: GetOptions) => Promise<{
    bookings: (Omit<{
        rescheduler: string | null;
        eventType: {
            recurringEvent: import('@calcom/types/Calendar').RecurringEvent | null;
            eventTypeColor: {
                lightEventTypeColor: string;
                darkEventTypeColor: string;
            } | null;
            price: number;
            currency: string;
            metadata: {
                apps?: Record<string, any> | undefined;
                smartContractAddress?: string | undefined;
                blockchainId?: number | undefined;
                multipleDuration?: number[] | undefined;
                hideDurationSelectorInBookingPage?: boolean | undefined;
                giphyThankYouPage?: string | undefined;
                additionalNotesRequired?: boolean | undefined;
                disableSuccessPage?: boolean | undefined;
                disableStandardEmails?: {
                    confirmation?: {
                        attendee?: boolean | undefined;
                        host?: boolean | undefined;
                    } | undefined;
                    all?: {
                        attendee?: boolean | undefined;
                        host?: boolean | undefined;
                    } | undefined;
                } | undefined;
                managedEventConfig?: {
                    unlockedFields?: {
                        bookings?: true | undefined;
                        schedule?: true | undefined;
                        profile?: true | undefined;
                        price?: true | undefined;
                        webhooks?: true | undefined;
                        owner?: true | undefined;
                        title?: true | undefined;
                        description?: true | undefined;
                        hidden?: true | undefined;
                        team?: true | undefined;
                        availability?: true | undefined;
                        length?: true | undefined;
                        workflows?: true | undefined;
                        users?: true | undefined;
                        hosts?: true | undefined;
                        currency?: true | undefined;
                        slug?: true | undefined;
                        children?: true | undefined;
                        userId?: true | undefined;
                        metadata?: true | undefined;
                        scheduleId?: true | undefined;
                        createdAt?: true | undefined;
                        updatedAt?: true | undefined;
                        interfaceLanguage?: true | undefined;
                        position?: true | undefined;
                        locations?: true | undefined;
                        offsetStart?: true | undefined;
                        profileId?: true | undefined;
                        teamId?: true | undefined;
                        useEventLevelSelectedCalendars?: true | undefined;
                        eventName?: true | undefined;
                        parentId?: true | undefined;
                        bookingFields?: true | undefined;
                        timeZone?: true | undefined;
                        periodType?: true | undefined;
                        periodStartDate?: true | undefined;
                        periodEndDate?: true | undefined;
                        periodDays?: true | undefined;
                        periodCountCalendarDays?: true | undefined;
                        lockTimeZoneToggleOnBookingPage?: true | undefined;
                        lockedTimeZone?: true | undefined;
                        requiresConfirmation?: true | undefined;
                        requiresConfirmationWillBlockSlot?: true | undefined;
                        requiresConfirmationForFreeEmail?: true | undefined;
                        requiresBookerEmailVerification?: true | undefined;
                        canSendCalVideoTranscriptionEmails?: true | undefined;
                        autoTranslateDescriptionEnabled?: true | undefined;
                        autoTranslateInstantMeetingTitleEnabled?: true | undefined;
                        recurringEvent?: true | undefined;
                        disableGuests?: true | undefined;
                        hideCalendarNotes?: true | undefined;
                        hideCalendarEventDetails?: true | undefined;
                        minimumBookingNotice?: true | undefined;
                        beforeEventBuffer?: true | undefined;
                        afterEventBuffer?: true | undefined;
                        seatsPerTimeSlot?: true | undefined;
                        onlyShowFirstAvailableSlot?: true | undefined;
                        showOptimizedSlots?: true | undefined;
                        disableCancelling?: true | undefined;
                        disableRescheduling?: true | undefined;
                        minimumRescheduleNotice?: true | undefined;
                        seatsShowAttendees?: true | undefined;
                        seatsShowAvailabilityCount?: true | undefined;
                        schedulingType?: true | undefined;
                        allowReschedulingCancelledBookings?: true | undefined;
                        slotInterval?: true | undefined;
                        successRedirectUrl?: true | undefined;
                        forwardParamsSuccessRedirect?: true | undefined;
                        redirectUrlOnNoRoutingFormResponse?: true | undefined;
                        bookingLimits?: true | undefined;
                        durationLimits?: true | undefined;
                        isInstantEvent?: true | undefined;
                        instantMeetingExpiryTimeOffsetInSeconds?: true | undefined;
                        instantMeetingScheduleId?: true | undefined;
                        instantMeetingParameters?: true | undefined;
                        assignAllTeamMembers?: true | undefined;
                        assignRRMembersUsingSegment?: true | undefined;
                        rrSegmentQueryValue?: true | undefined;
                        useEventTypeDestinationCalendarEmail?: true | undefined;
                        isRRWeightsEnabled?: true | undefined;
                        maxLeadThreshold?: true | undefined;
                        includeNoShowInRRCalculation?: true | undefined;
                        allowReschedulingPastBookings?: true | undefined;
                        hideOrganizerEmail?: true | undefined;
                        maxActiveBookingsPerBooker?: true | undefined;
                        maxActiveBookingPerBookerOfferReschedule?: true | undefined;
                        customReplyToEmail?: true | undefined;
                        eventTypeColor?: true | undefined;
                        rescheduleWithSameRoundRobinHost?: true | undefined;
                        secondaryEmailId?: true | undefined;
                        useBookerTimezone?: true | undefined;
                        restrictionScheduleId?: true | undefined;
                        bookingRequiresAuthentication?: true | undefined;
                        rrHostSubsetEnabled?: true | undefined;
                        enablePerHostLocations?: true | undefined;
                        customInputs?: true | undefined;
                        hashedLink?: true | undefined;
                        destinationCalendar?: true | undefined;
                        parent?: true | undefined;
                        instantMeetingSchedule?: true | undefined;
                        aiPhoneCallConfig?: true | undefined;
                        fieldTranslations?: true | undefined;
                        selectedCalendars?: true | undefined;
                        calVideoSettings?: true | undefined;
                        secondaryEmail?: true | undefined;
                        restrictionSchedule?: true | undefined;
                        hostGroups?: true | undefined;
                        _count?: true | undefined;
                    } | undefined;
                } | undefined;
                requiresConfirmationThreshold?: {
                    time: number;
                    unit: import('dayjs').UnitTypeLongPlural;
                } | undefined;
                config?: {
                    useHostSchedulesForTeamEvent?: boolean | undefined;
                } | undefined;
                bookerLayouts?: {
                    enabledLayouts: import('../../../prisma/zod-utils').BookerLayouts[];
                    defaultLayout: import('../../../prisma/zod-utils').BookerLayouts;
                } | null | undefined;
            } | null;
            id?: number | undefined;
            title?: string | undefined;
            length?: number | undefined;
            slug?: string | undefined;
            teamId?: number | null | undefined;
            eventName?: string | null | undefined;
            parentId?: number | null | undefined;
            bookingFields?: unknown;
            disableGuests?: boolean | undefined;
            seatsPerTimeSlot?: number | null | undefined;
            disableCancelling?: boolean | null | undefined;
            disableRescheduling?: boolean | null | undefined;
            minimumRescheduleNotice?: number | null | undefined;
            seatsShowAttendees?: boolean | null | undefined;
            seatsShowAvailabilityCount?: boolean | null | undefined;
            allowReschedulingPastBookings?: boolean | undefined;
            hideOrganizerEmail?: boolean | undefined;
            customReplyToEmail?: string | null | undefined;
            schedulingType?: import('@calcom/platform-libraries').SchedulingType | null | undefined;
            hosts?: {
                userId: number;
                user: {
                    email: string;
                    id: number;
                } | null;
            }[] | undefined;
            team?: {
                id: number;
                name: string;
                slug: string | null;
            } | null | undefined;
            hostGroups?: {
                id: string;
                name: string;
            }[] | undefined;
        };
        startTime: string;
        endTime: string;
        id: number;
        paid: boolean;
        location: string | null;
        title: string;
        description: string | null;
        rescheduled: boolean | null;
        uid: string;
        metadata: unknown;
        createdAt: Date;
        updatedAt: Date | null;
        userPrimaryEmail: string | null;
        customInputs: unknown;
        cancellationReason: string | null;
        rejectionReason: string | null;
        fromReschedule: string | null;
        recurringEventId: string | null;
        isRecorded: boolean;
        cancelledBy: string | null;
        rescheduledBy: string | null;
        responses: import('@prisma/client/runtime/client').JsonValue;
        status: import('../../../prisma/enums').BookingStatus;
        routedFromRoutingFormReponse: {
            id: number;
        } | null;
        references: {
            paid: boolean;
            location: string | null;
            title: string;
            description: string | null;
            type: string;
            status: "cancelled" | "awaiting_host" | "pending" | "rejected" | "accepted";
            rescheduled: boolean | null;
            rating: number | null;
            uid: string;
            userId: number | null;
            metadata: unknown;
            id: number;
            eventTypeId: number | null;
            createdAt: Date;
            updatedAt: Date | null;
            credentialId: number | null;
            delegationCredentialId: string | null;
            domainWideDelegationCredentialId: string | null;
            creationSource: import('@calcom/kysely/types').CreationSource | null;
            bookingId: number | null;
            meetingId: string | null;
            thirdPartyRecurringEventId: string | null;
            meetingPassword: string | null;
            meetingUrl: string | null;
            externalCalendarId: string | null;
            deleted: boolean | null;
            idempotencyKey: string | null;
            userPrimaryEmail: string | null;
            customInputs: unknown;
            responses: unknown;
            startTime: Date;
            endTime: Date;
            destinationCalendarId: number | null;
            cancellationReason: string | null;
            rejectionReason: string | null;
            reassignReason: string | null;
            reassignById: number | null;
            dynamicEventSlugRef: string | null;
            dynamicGroupSlugRef: string | null;
            fromReschedule: string | null;
            recurringEventId: string | null;
            smsReminderNumber: string | null;
            scheduledJobs: string[];
            isRecorded: boolean;
            iCalUID: string | null;
            iCalSequence: number;
            ratingFeedback: string | null;
            noShowHost: boolean | null;
            oneTimePassword: string | null;
            cancelledBy: string | null;
            rescheduledBy: string | null;
        }[];
        payment: {
            paymentOption: "ON_BOOKING" | "HOLD" | null;
            success: boolean;
            refunded: boolean;
            currency: string;
            amount: number;
            appId: string | null;
        }[];
        user: {
            email: string;
            username: string | null;
            name: string | null;
            id: number;
            timeZone: string;
            avatarUrl: string | null;
        } | null;
        attendees: {
            paid: boolean;
            email: string;
            location: string | null;
            title: string;
            description: string | null;
            name: string;
            status: "cancelled" | "awaiting_host" | "pending" | "rejected" | "accepted";
            rescheduled: boolean | null;
            rating: number | null;
            uid: string;
            userId: number | null;
            locale: string | null;
            metadata: unknown;
            id: number;
            eventTypeId: number | null;
            createdAt: Date;
            updatedAt: Date | null;
            phoneNumber: string | null;
            timeZone: string;
            creationSource: import('@calcom/kysely/types').CreationSource | null;
            bookingId: number | null;
            noShow: boolean | null;
            idempotencyKey: string | null;
            userPrimaryEmail: string | null;
            customInputs: unknown;
            responses: unknown;
            startTime: Date;
            endTime: Date;
            destinationCalendarId: number | null;
            cancellationReason: string | null;
            rejectionReason: string | null;
            reassignReason: string | null;
            reassignById: number | null;
            dynamicEventSlugRef: string | null;
            dynamicGroupSlugRef: string | null;
            fromReschedule: string | null;
            recurringEventId: string | null;
            smsReminderNumber: string | null;
            scheduledJobs: string[];
            isRecorded: boolean;
            iCalUID: string | null;
            iCalSequence: number;
            ratingFeedback: string | null;
            noShowHost: boolean | null;
            oneTimePassword: string | null;
            cancelledBy: string | null;
            rescheduledBy: string | null;
        }[];
        seatsReferences: {
            referenceUid: string;
            attendee: {
                email: string;
            } | null;
        }[];
        assignmentReason: {
            paid: boolean;
            location: string | null;
            title: string;
            description: string | null;
            status: "cancelled" | "awaiting_host" | "pending" | "rejected" | "accepted";
            rescheduled: boolean | null;
            rating: number | null;
            uid: string;
            userId: number | null;
            metadata: unknown;
            id: number;
            eventTypeId: number | null;
            createdAt: Date;
            updatedAt: Date | null;
            creationSource: import('@calcom/kysely/types').CreationSource | null;
            bookingId: number;
            idempotencyKey: string | null;
            userPrimaryEmail: string | null;
            customInputs: unknown;
            responses: unknown;
            startTime: Date;
            endTime: Date;
            destinationCalendarId: number | null;
            cancellationReason: string | null;
            rejectionReason: string | null;
            reassignReason: string | null;
            reassignById: number | null;
            dynamicEventSlugRef: string | null;
            dynamicGroupSlugRef: string | null;
            fromReschedule: string | null;
            recurringEventId: string | null;
            smsReminderNumber: string | null;
            scheduledJobs: string[];
            isRecorded: boolean;
            iCalUID: string | null;
            iCalSequence: number;
            ratingFeedback: string | null;
            noShowHost: boolean | null;
            oneTimePassword: string | null;
            cancelledBy: string | null;
            rescheduledBy: string | null;
            reasonEnum: import('@calcom/kysely/types').AssignmentReasonEnum;
            reasonString: string;
        }[];
        report: {
            id: string;
            description: string | null;
            reason: import('@calcom/kysely/types').BookingReportReason;
            createdAt: Date;
            reportedById: number | null;
        } | null;
    }, "attendees"> & {
        attendees: ({
            paid: boolean;
            email: string;
            location: string | null;
            title: string;
            description: string | null;
            name: string;
            status: "cancelled" | "awaiting_host" | "pending" | "rejected" | "accepted";
            rescheduled: boolean | null;
            rating: number | null;
            uid: string;
            userId: number | null;
            locale: string | null;
            metadata: unknown;
            id: number;
            eventTypeId: number | null;
            createdAt: Date;
            updatedAt: Date | null;
            phoneNumber: string | null;
            timeZone: string;
            creationSource: import('@calcom/kysely/types').CreationSource | null;
            bookingId: number | null;
            noShow: boolean | null;
            idempotencyKey: string | null;
            userPrimaryEmail: string | null;
            customInputs: unknown;
            responses: unknown;
            startTime: Date;
            endTime: Date;
            destinationCalendarId: number | null;
            cancellationReason: string | null;
            rejectionReason: string | null;
            reassignReason: string | null;
            reassignById: number | null;
            dynamicEventSlugRef: string | null;
            dynamicGroupSlugRef: string | null;
            fromReschedule: string | null;
            recurringEventId: string | null;
            smsReminderNumber: string | null;
            scheduledJobs: string[];
            isRecorded: boolean;
            iCalUID: string | null;
            iCalSequence: number;
            ratingFeedback: string | null;
            noShowHost: boolean | null;
            oneTimePassword: string | null;
            cancelledBy: string | null;
            rescheduledBy: string | null;
        } & {
            user: {
                name: string | null;
                email: string;
                avatarUrl: string | null;
                username: string | null;
            } | null;
        })[];
    })[];
    recurringInfo: {
        recurringEventId: string | null;
        count: number;
        firstDate: Date | null;
        bookings: {
            [key: string]: Date[];
        };
    }[];
    totalCount: number;
}>;
export default getAllUserBookings;
//# sourceMappingURL=getAllUserBookings.d.ts.map