import type { Booking, Prisma, OutOfOfficeEntry, OutOfOfficeReason, User, EventType as PrismaEventType } from '../prisma-client';
import type { Dayjs } from '../dayjs';
import dayjs from '../dayjs';
import { SchedulingType } from '../prisma/enums';
import type { EventBusyDetails, IntervalLimitUnit } from "@calcom/types/Calendar";
import type { TimeRange } from "@calcom/types/schedule";
declare const getEventType: (id: number) => Promise<ReturnType<typeof _getEventType>>;
declare const _getEventType: (id: number) => Promise<{
    metadata: {
        config?: {
            useHostSchedulesForTeamEvent?: boolean | undefined;
        } | undefined;
        smartContractAddress?: string | undefined;
        blockchainId?: number | undefined;
        multipleDuration?: number[] | undefined;
        giphyThankYouPage?: string | undefined;
        additionalNotesRequired?: boolean | undefined;
        disableSuccessPage?: boolean | undefined;
        disableStandardEmails?: {
            all?: {
                host?: boolean | undefined;
                attendee?: boolean | undefined;
            } | undefined;
            confirmation?: {
                host?: boolean | undefined;
                attendee?: boolean | undefined;
            } | undefined;
        } | undefined;
        managedEventConfig?: {
            unlockedFields?: {
                schedule?: true | undefined;
                profile?: true | undefined;
                bookings?: true | undefined;
                users?: true | undefined;
                children?: true | undefined;
                length?: true | undefined;
                title?: true | undefined;
                metadata?: true | undefined;
                description?: true | undefined;
                price?: true | undefined;
                webhooks?: true | undefined;
                owner?: true | undefined;
                hidden?: true | undefined;
                team?: true | undefined;
                availability?: true | undefined;
                workflows?: true | undefined;
                hosts?: true | undefined;
                currency?: true | undefined;
                slug?: true | undefined;
                userId?: 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;
                requiresConfirmation?: true | undefined;
                requiresConfirmationWillBlockSlot?: true | undefined;
                requiresConfirmationForFreeEmail?: true | undefined;
                requiresBookerEmailVerification?: true | undefined;
                canSendCalVideoTranscriptionEmails?: true | undefined;
                autoTranslateDescriptionEnabled?: 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;
                seatsShowAttendees?: true | undefined;
                seatsShowAvailabilityCount?: true | undefined;
                schedulingType?: true | undefined;
                scheduleId?: true | undefined;
                slotInterval?: true | undefined;
                successRedirectUrl?: true | undefined;
                forwardParamsSuccessRedirect?: 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;
                allowReschedulingPastBookings?: true | undefined;
                eventTypeColor?: true | undefined;
                rescheduleWithSameRoundRobinHost?: true | undefined;
                secondaryEmailId?: true | undefined;
                hashedLink?: true | undefined;
                destinationCalendar?: true | undefined;
                customInputs?: true | undefined;
                parent?: true | undefined;
                instantMeetingSchedule?: true | undefined;
                aiPhoneCallConfig?: true | undefined;
                fieldTranslations?: true | undefined;
                selectedCalendars?: true | undefined;
                secondaryEmail?: true | undefined;
                _count?: true | undefined;
            } | undefined;
        } | undefined;
        requiresConfirmationThreshold?: {
            time: number;
            unit: "months" | "years" | "days" | "hours" | "minutes" | "milliseconds" | "seconds" | "dates";
        } | undefined;
        bookerLayouts?: {
            enabledLayouts: import('../prisma/zod-utils').BookerLayouts[];
            defaultLayout: import('../prisma/zod-utils').BookerLayouts;
        } | null | undefined;
        apps?: unknown;
    } | null;
    schedule: {
        id: number;
        availability: {
            days: number[];
            date: Date | null;
            startTime: Date;
            endTime: Date;
        }[];
        timeZone: string | null;
    } | null;
    id: number;
    length: number;
    team: {
        id: number;
        bookingLimits: Prisma.JsonValue;
        includeManagedEventsInLimits: boolean;
    } | null;
    availability: {
        days: number[];
        date: Date | null;
        startTime: Date;
        endTime: Date;
    }[];
    hosts: {
        schedule: {
            id: number;
            availability: {
                days: number[];
                date: Date | null;
                startTime: Date;
                endTime: Date;
            }[];
            timeZone: string | null;
        } | null;
        user: {
            id: number;
            email: string;
        };
    }[];
    useEventLevelSelectedCalendars: boolean;
    timeZone: string | null;
    seatsPerTimeSlot: number | null;
    schedulingType: import('../prisma-client').$Enums.SchedulingType | null;
    bookingLimits: Prisma.JsonValue;
    durationLimits: Prisma.JsonValue;
    assignAllTeamMembers: boolean;
    parent: {
        team: {
            id: number;
            bookingLimits: Prisma.JsonValue;
            includeManagedEventsInLimits: boolean;
        } | null;
    } | null;
} | null>;
export type EventType = Awaited<ReturnType<typeof getEventType>>;
declare const getUser: (where: Prisma.UserWhereInput) => Promise<ReturnType<typeof _getUser>>;
declare const _getUser: (where: Prisma.UserWhereInput) => Promise<(Omit<Omit<{
    schedules: {
        id: number;
        availability: {
            days: number[];
            date: Date | null;
            startTime: Date;
            endTime: Date;
        }[];
        timeZone: string | null;
    }[];
    id: number;
    username: string | null;
    email: string;
    availability: {
        id: number;
        days: number[];
        date: Date | null;
        userId: number | null;
        eventTypeId: number | null;
        scheduleId: number | null;
        startTime: Date;
        endTime: Date;
    }[];
    timeZone: string;
    selectedCalendars: {
        error: string | null;
        id: string;
        userId: number;
        credentialId: number | null;
        eventTypeId: number | null;
        integration: string;
        externalId: string;
        delegationCredentialId: string | null;
        domainWideDelegationCredentialId: string | null;
        googleChannelId: string | null;
        googleChannelKind: string | null;
        googleChannelResourceId: string | null;
        googleChannelResourceUri: string | null;
        googleChannelExpiration: string | null;
    }[];
    startTime: number;
    endTime: number;
    bufferTime: number;
    defaultScheduleId: number | null;
    timeFormat: number | null;
    travelSchedules: {
        id: number;
        userId: number;
        timeZone: string;
        startDate: Date;
        endDate: Date | null;
        prevTimeZone: 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;
    }[];
}, "selectedCalendars"> & {
    allSelectedCalendars: {
        error: string | null;
        id: string;
        userId: number;
        credentialId: number | null;
        eventTypeId: number | null;
        integration: string;
        externalId: string;
        delegationCredentialId: string | null;
        domainWideDelegationCredentialId: string | null;
        googleChannelId: string | null;
        googleChannelKind: string | null;
        googleChannelResourceId: string | null;
        googleChannelResourceUri: string | null;
        googleChannelExpiration: string | null;
    }[];
    userLevelSelectedCalendars: {
        error: string | null;
        id: string;
        userId: number;
        credentialId: number | null;
        eventTypeId: number | null;
        integration: string;
        externalId: string;
        delegationCredentialId: string | null;
        domainWideDelegationCredentialId: string | null;
        googleChannelId: string | null;
        googleChannelKind: string | null;
        googleChannelResourceId: string | null;
        googleChannelResourceUri: string | null;
        googleChannelExpiration: string | null;
    }[];
}, "credentials"> & {
    credentials: import("@calcom/types/Credential").CredentialForCalendarService[];
}) | null>;
type GetUser = Awaited<ReturnType<typeof getUser>>;
export type GetUserAvailabilityInitialData = {
    user?: GetUser;
    eventType?: EventType;
    currentSeats?: CurrentSeats;
    rescheduleUid?: string | null;
    currentBookings?: (Pick<Booking, "id" | "uid" | "userId" | "startTime" | "endTime" | "title"> & {
        eventType: Pick<PrismaEventType, "id" | "beforeEventBuffer" | "afterEventBuffer" | "seatsPerTimeSlot"> | null;
        _count?: {
            seatsReferences: number;
        };
    })[];
    outOfOfficeDays?: (Pick<OutOfOfficeEntry, "id" | "start" | "end"> & {
        user: Pick<User, "id" | "name">;
        toUser: Pick<User, "id" | "username" | "name"> | null;
        reason: Pick<OutOfOfficeReason, "id" | "emoji" | "reason"> | null;
    })[];
    busyTimesFromLimitsBookings: EventBusyDetails[];
};
export type GetAvailabilityUser = NonNullable<GetUserAvailabilityInitialData["user"]>;
type GetUserAvailabilityQuery = {
    withSource?: boolean;
    username?: string;
    userId?: number;
    dateFrom: string;
    dateTo: string;
    eventTypeId?: number;
    afterEventBuffer?: number;
    beforeEventBuffer?: number;
    duration?: number;
    returnDateOverrides: boolean;
    bypassBusyCalendarTimes: boolean;
    shouldServeCache?: boolean;
};
export declare const getCurrentSeats: (eventType: {
    id?: number;
    schedulingType?: SchedulingType | null;
    hosts?: {
        user: {
            email: string;
        };
    }[];
}, dateFrom: dayjs.Dayjs, dateTo: dayjs.Dayjs) => Promise<ReturnType<typeof _getCurrentSeats>>;
declare const _getCurrentSeats: (eventType: {
    id?: number;
    schedulingType?: SchedulingType | null;
    hosts?: {
        user: {
            email: string;
        };
    }[];
}, dateFrom: Dayjs, dateTo: Dayjs) => Promise<{
    uid: string;
    startTime: Date;
    _count: {
        attendees: number;
    };
}[]>;
export type CurrentSeats = Awaited<ReturnType<typeof getCurrentSeats>>;
export declare const getUserAvailability: (query: GetUserAvailabilityQuery, initialData?: GetUserAvailabilityInitialData | undefined) => Promise<GetUserAvailabilityResult>;
type GetUserAvailabilityResult = ReturnType<typeof _getUserAvailability>;
/** This should be called getUsersWorkingHoursAndBusySlots (...and remaining seats, and final timezone) */
declare const _getUserAvailability: (query: GetUserAvailabilityQuery, initialData?: GetUserAvailabilityInitialData) => Promise<{
    busy: EventBusyDetails[];
    timeZone: string;
    dateRanges: import('./date-ranges').DateRange[];
    oooExcludedDateRanges: import('./date-ranges').DateRange[];
    workingHours: import("@calcom/types/schedule").WorkingHours[];
    dateOverrides: TimeRange[];
    currentSeats: {
        uid: string;
        startTime: Date;
        _count: {
            attendees: number;
        };
    }[] | null;
    datesOutOfOffice: IOutOfOfficeData;
}>;
export declare const getPeriodStartDatesBetween: (dateFrom: dayjs.Dayjs, dateTo: dayjs.Dayjs, period: IntervalLimitUnit) => ReturnType<typeof _getPeriodStartDatesBetween>;
declare const _getPeriodStartDatesBetween: (dateFrom: Dayjs, dateTo: Dayjs, period: IntervalLimitUnit) => dayjs.Dayjs[];
export interface IFromUser {
    id: number;
    displayName: string | null;
}
export interface IToUser {
    id: number;
    username: string | null;
    displayName: string | null;
}
export interface IOutOfOfficeData {
    [key: string]: {
        fromUser: IFromUser | null;
        toUser?: IToUser | null;
        reason?: string | null;
        emoji?: string | null;
    };
}
type GetUsersAvailabilityProps = {
    users: (GetAvailabilityUser & {
        currentBookings?: GetUserAvailabilityInitialData["currentBookings"];
        outOfOfficeDays?: GetUserAvailabilityInitialData["outOfOfficeDays"];
    })[];
    query: Omit<GetUserAvailabilityQuery, "userId" | "username">;
    initialData?: Omit<GetUserAvailabilityInitialData, "user">;
};
export declare const getUsersAvailability: (args_0: GetUsersAvailabilityProps) => Promise<Awaited<GetUserAvailabilityResult>[]>;
export {};
//# sourceMappingURL=getUserAvailability.d.ts.map