import { Prisma } from '../../../prisma-client';
import type { Booking } from '../../../prisma/client';
import { RRTimestampBasis } from '../../../prisma/enums';
type TeamBookingsParamsBase = {
    user: {
        id: number;
        email: string;
    };
    teamId: number;
    startDate: Date;
    endDate: Date;
    excludedUid?: string | null;
    includeManagedEvents: boolean;
    shouldReturnCount?: boolean;
};
type TeamBookingsMultipleUsersParamsBase = {
    users: {
        id: number;
        email: string;
    }[];
    teamId: number;
    startDate: Date;
    endDate: Date;
    excludedUid?: string | null;
    includeManagedEvents: boolean;
    shouldReturnCount?: boolean;
};
type TeamBookingsMultipleUsersParamsWithCount = TeamBookingsMultipleUsersParamsBase & {
    shouldReturnCount: true;
};
type TeamBookingsMultipleUsersParamsWithoutCount = TeamBookingsMultipleUsersParamsBase;
type TeamBookingsParamsWithCount = TeamBookingsParamsBase & {
    shouldReturnCount: true;
};
type TeamBookingsParamsWithoutCount = TeamBookingsParamsBase;
export declare class BookingRepository {
    static getBookingAttendees(bookingId: number): Promise<{
        name: string;
        id: number;
        email: string;
        locale: string | null;
        timeZone: string;
        bookingId: number | null;
        phoneNumber: string | null;
        noShow: boolean | null;
    }[]>;
    /** Determines if the user is the organizer, team admin, or org admin that the booking was created under */
    static doesUserIdHaveAccessToBooking({ userId, bookingId }: {
        userId: number;
        bookingId: number;
    }): Promise<boolean>;
    static findFirstBookingByReschedule({ originalBookingUid }: {
        originalBookingUid: string;
    }): Promise<{
        uid: string;
    } | null>;
    static findReschedulerByUid({ uid }: {
        uid: string;
    }): Promise<{
        uid: string;
        rescheduledBy: string | null;
    } | null>;
    private static _findAllExistingBookingsForEventTypeBetween;
    static findAllExistingBookingsForEventTypeBetween: (args_0: {
        startDate: Date;
        endDate: Date;
        eventTypeId?: number | null;
        seatedEvent?: boolean;
        userIdAndEmailMap: Map<number, string>;
    }) => Promise<{
        eventType: {
            id: number;
            requiresConfirmation: boolean;
            requiresConfirmationWillBlockSlot: boolean;
            beforeEventBuffer: number;
            afterEventBuffer: number;
            seatsPerTimeSlot: number | null;
            onlyShowFirstAvailableSlot: boolean;
            allowReschedulingPastBookings: boolean;
            hideOrganizerEmail: boolean;
        } | null;
        id: number;
        title: string;
        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;
        _count: {
            user: number;
            references: number;
            eventType: number;
            attendees: number;
            payment: number;
            destinationCalendar: number;
            reassignBy: number;
            workflowReminders: number;
            seatsReferences: number;
            instantMeetingToken: number;
            scheduledTriggers: number;
            routedFromRoutingFormReponse: number;
            assignmentReason: number;
            internalNote: number;
            tracking: number;
            routingFormResponses: number;
            expenseLogs: number;
        };
        startTime: Date;
        endTime: Date;
    }[]>;
    static getAllBookingsForRoundRobin({ users, eventTypeId, startDate, endDate, virtualQueuesData, includeNoShowInRRCalculation, rrTimestampBasis, }: {
        users: {
            id: number;
            email: string;
        }[];
        eventTypeId: number;
        startDate?: Date;
        endDate?: Date;
        virtualQueuesData: {
            chosenRouteId: string;
            fieldOptionData: {
                fieldId: string;
                selectedOptionIds: string | number | string[];
            };
        } | null;
        includeNoShowInRRCalculation: boolean;
        rrTimestampBasis: RRTimestampBasis;
    }): Promise<{
        id: number;
        status: import('../../../prisma-client').$Enums.BookingStatus;
        attendees: {
            name: string;
            id: number;
            email: string;
            locale: string | null;
            timeZone: string;
            bookingId: number | null;
            phoneNumber: string | null;
            noShow: boolean | null;
        }[];
        userId: number | null;
        startTime: Date;
        routedFromRoutingFormReponse: {
            id: number;
            response: Prisma.JsonValue;
            createdAt: Date;
            updatedAt: Date | null;
            uuid: string | null;
            formFillerId: string;
            formId: string;
            routedToBookingUid: string | null;
            chosenRouteId: string | null;
        } | null;
        createdAt: Date;
    }[]>;
    static findBookingByUid({ bookingUid }: {
        bookingUid: string;
    }): Promise<{
        id: number;
        title: string;
        metadata: Prisma.JsonValue;
        description: string | null;
        attendees: {
            name: string;
            id: number;
            email: string;
            locale: string | null;
            timeZone: string;
            bookingId: number | null;
            phoneNumber: string | null;
            noShow: boolean | null;
        }[];
        customInputs: Prisma.JsonValue;
        startTime: Date;
        endTime: Date;
        userPrimaryEmail: string | null;
    } | null>;
    static findBookingForMeetingPage({ bookingUid }: {
        bookingUid: string;
    }): Promise<{
        eventType: {
            id: number;
            hideOrganizerEmail: boolean;
            calVideoSettings: {
                disableRecordingForOrganizer: boolean;
                disableRecordingForGuests: boolean;
                enableAutomaticTranscription: boolean;
                redirectUrlOnExit: string | null;
                disableTranscriptionForGuests: boolean;
                disableTranscriptionForOrganizer: boolean;
            } | null;
        } | null;
        user: {
            name: string | null;
            id: number;
            username: string | null;
            email: string;
            timeZone: string;
        } | null;
        id: number;
        title: string;
        metadata: Prisma.JsonValue;
        description: 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;
        customInputs: Prisma.JsonValue;
        startTime: Date;
        endTime: Date;
        references: {
            id: number;
            type: string;
            uid: string;
            meetingPassword: string | null;
            meetingUrl: string | null;
        }[];
        userPrimaryEmail: string | null;
        isRecorded: boolean;
    } | null>;
    static findBookingForMeetingEndedPage({ bookingUid }: {
        bookingUid: string;
    }): Promise<{
        user: {
            credentials: {
                key: Prisma.JsonValue;
                id: number;
                type: string;
                userId: number | null;
                teamId: number | null;
                subscriptionId: string | null;
                delegationCredentialId: string | null;
                billingCycleStart: number | null;
                appId: string | null;
                paymentStatus: string | null;
                invalid: boolean | null;
            }[];
        } | null;
        id: number;
        title: string;
        metadata: Prisma.JsonValue;
        description: 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;
        customInputs: Prisma.JsonValue;
        startTime: Date;
        endTime: Date;
        references: {
            type: string;
            uid: string;
            meetingUrl: string | null;
        }[];
        userPrimaryEmail: string | null;
    } | null>;
    static findBookingByUidAndUserId({ bookingUid, userId }: {
        bookingUid: string;
        userId: number;
    }): Promise<{
        id: number;
        title: string;
        metadata: Prisma.JsonValue;
        status: import('../../../prisma-client').$Enums.BookingStatus;
        description: string | null;
        paid: boolean;
        location: string | null;
        rescheduled: boolean | null;
        rating: number | null;
        uid: string;
        userId: number | null;
        eventTypeId: number | null;
        customInputs: Prisma.JsonValue;
        smsReminderNumber: string | null;
        recurringEventId: string | null;
        cancellationReason: string | null;
        cancelledBy: string | null;
        iCalUID: string | null;
        responses: Prisma.JsonValue;
        startTime: Date;
        endTime: Date;
        idempotencyKey: string | null;
        userPrimaryEmail: string | null;
        createdAt: Date;
        updatedAt: Date | null;
        destinationCalendarId: number | null;
        rejectionReason: string | null;
        reassignReason: string | null;
        reassignById: number | null;
        dynamicEventSlugRef: string | null;
        dynamicGroupSlugRef: string | null;
        fromReschedule: string | null;
        scheduledJobs: string[];
        isRecorded: boolean;
        iCalSequence: number;
        ratingFeedback: string | null;
        noShowHost: boolean | null;
        oneTimePassword: string | null;
        rescheduledBy: string | null;
        creationSource: import('../../../prisma-client').$Enums.CreationSource | null;
    } | null>;
    static updateLocationById({ where: { id }, data: { location, metadata, referencesToCreate }, }: {
        where: {
            id: number;
        };
        data: {
            location: string;
            metadata: Record<string, unknown>;
            referencesToCreate: Prisma.BookingReferenceCreateInput[];
        };
    }): Promise<void>;
    static getAllAcceptedTeamBookingsOfUser(params: TeamBookingsParamsWithCount): Promise<number>;
    static getAllAcceptedTeamBookingsOfUser(params: TeamBookingsParamsWithoutCount): Promise<Array<Booking>>;
    static findOriginalRescheduledBooking(uid: string, seatsEventType?: boolean): Promise<({
        user: {
            name: string | null;
            id: number;
            email: string;
            locale: string | 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;
            }[];
            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;
        } | null;
        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;
        }[];
        attendees: {
            name: string;
            id: number;
            email: string;
            locale: string | null;
            timeZone: string;
            bookingSeat: {
                data: Prisma.JsonValue;
                id: number;
                metadata: Prisma.JsonValue;
                bookingId: number;
                referenceUid: string;
                attendeeId: number;
            } | null;
            phoneNumber: string | 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;
        references: {
            id: number;
            type: string;
            uid: string;
            credentialId: number | null;
            deleted: boolean | null;
            bookingId: number | null;
            thirdPartyRecurringEventId: string | null;
            delegationCredentialId: string | null;
            domainWideDelegationCredentialId: string | null;
            meetingId: string | null;
            meetingPassword: string | null;
            meetingUrl: string | null;
            externalCalendarId: string | null;
        }[];
        workflowReminders: {
            method: import('../../../prisma-client').$Enums.WorkflowMethods;
            id: number;
            cancelled: boolean | null;
            bookingUid: string | null;
            uuid: string | null;
            scheduledDate: Date;
            referenceId: string | null;
            scheduled: boolean;
            workflowStepId: number | null;
            seatReferenceId: string | null;
            isMandatoryReminder: boolean | null;
            retryCount: number;
        }[];
    } & {
        id: number;
        title: string;
        metadata: Prisma.JsonValue;
        status: import('../../../prisma-client').$Enums.BookingStatus;
        description: string | null;
        paid: boolean;
        location: string | null;
        rescheduled: boolean | null;
        rating: number | null;
        uid: string;
        userId: number | null;
        eventTypeId: number | null;
        customInputs: Prisma.JsonValue;
        smsReminderNumber: string | null;
        recurringEventId: string | null;
        cancellationReason: string | null;
        cancelledBy: string | null;
        iCalUID: string | null;
        responses: Prisma.JsonValue;
        startTime: Date;
        endTime: Date;
        idempotencyKey: string | null;
        userPrimaryEmail: string | null;
        createdAt: Date;
        updatedAt: Date | null;
        destinationCalendarId: number | null;
        rejectionReason: string | null;
        reassignReason: string | null;
        reassignById: number | null;
        dynamicEventSlugRef: string | null;
        dynamicGroupSlugRef: string | null;
        fromReschedule: string | null;
        scheduledJobs: string[];
        isRecorded: boolean;
        iCalSequence: number;
        ratingFeedback: string | null;
        noShowHost: boolean | null;
        oneTimePassword: string | null;
        rescheduledBy: string | null;
        creationSource: import('../../../prisma-client').$Enums.CreationSource | null;
    }) | null>;
    static getAllAcceptedTeamBookingsOfUsers(params: TeamBookingsMultipleUsersParamsWithCount): Promise<number>;
    static getAllAcceptedTeamBookingsOfUsers(params: TeamBookingsMultipleUsersParamsWithoutCount): Promise<Array<Booking>>;
    static getValidBookingFromEventTypeForAttendee({ eventTypeId, bookerEmail, bookerPhoneNumber, startTime, filterForUnconfirmed, }: {
        eventTypeId: number;
        bookerEmail?: string;
        bookerPhoneNumber?: string;
        startTime: Date;
        filterForUnconfirmed?: boolean;
    }): Promise<({
        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;
            whitelistWorkflows: boolean;
        } | null;
        attendees: {
            name: string;
            id: number;
            email: string;
            locale: string | null;
            timeZone: string;
            bookingId: number | null;
            phoneNumber: string | null;
            noShow: boolean | null;
        }[];
        references: {
            id: number;
            type: string;
            uid: string;
            credentialId: number | null;
            deleted: boolean | null;
            bookingId: number | null;
            thirdPartyRecurringEventId: string | null;
            delegationCredentialId: string | null;
            domainWideDelegationCredentialId: string | null;
            meetingId: string | null;
            meetingPassword: string | null;
            meetingUrl: string | null;
            externalCalendarId: string | null;
        }[];
    } & {
        id: number;
        title: string;
        metadata: Prisma.JsonValue;
        status: import('../../../prisma-client').$Enums.BookingStatus;
        description: string | null;
        paid: boolean;
        location: string | null;
        rescheduled: boolean | null;
        rating: number | null;
        uid: string;
        userId: number | null;
        eventTypeId: number | null;
        customInputs: Prisma.JsonValue;
        smsReminderNumber: string | null;
        recurringEventId: string | null;
        cancellationReason: string | null;
        cancelledBy: string | null;
        iCalUID: string | null;
        responses: Prisma.JsonValue;
        startTime: Date;
        endTime: Date;
        idempotencyKey: string | null;
        userPrimaryEmail: string | null;
        createdAt: Date;
        updatedAt: Date | null;
        destinationCalendarId: number | null;
        rejectionReason: string | null;
        reassignReason: string | null;
        reassignById: number | null;
        dynamicEventSlugRef: string | null;
        dynamicGroupSlugRef: string | null;
        fromReschedule: string | null;
        scheduledJobs: string[];
        isRecorded: boolean;
        iCalSequence: number;
        ratingFeedback: string | null;
        noShowHost: boolean | null;
        oneTimePassword: string | null;
        rescheduledBy: string | null;
        creationSource: import('../../../prisma-client').$Enums.CreationSource | null;
    }) | null>;
}
export {};
//# sourceMappingURL=booking.d.ts.map