import { Prisma } from '../../../prisma/client';
import type { User as UserType } from '../../../prisma/client';
import type { UpId, UserProfile } from "@calcom/types/UserProfile";
export type UserAdminTeams = number[];
export declare const ORGANIZATION_ID_UNKNOWN = "ORGANIZATION_ID_UNKNOWN";
export declare class UserRepository {
    static findTeamsByUserId({ userId }: {
        userId: UserType["id"];
    }): Promise<{
        teams: {
            metadata: Prisma.JsonValue;
            id: number;
            name: string;
            slug: string | null;
            organizationSettings: {
                id: number;
                organizationId: number;
                isOrganizationVerified: boolean;
                isOrganizationConfigured: boolean;
                isAdminReviewed: boolean;
                orgAutoAcceptEmail: string;
                isAdminAPIEnabled: boolean;
                lockEventTypeCreationForUsers: boolean;
                adminGetsNoSlotsNotification: boolean;
            } | null;
            logoUrl: string | null;
            isOrganization: boolean;
            isPlatform: boolean;
        }[];
        memberships: ({
            team: {
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                organizationSettings: {
                    id: number;
                    organizationId: number;
                    isOrganizationVerified: boolean;
                    isOrganizationConfigured: boolean;
                    isAdminReviewed: boolean;
                    orgAutoAcceptEmail: string;
                    isAdminAPIEnabled: boolean;
                    lockEventTypeCreationForUsers: boolean;
                    adminGetsNoSlotsNotification: boolean;
                } | null;
                logoUrl: string | null;
                isOrganization: boolean;
                isPlatform: boolean;
            };
        } & {
            id: number;
            userId: number;
            teamId: number;
            role: import('../../../prisma-client').$Enums.MembershipRole;
            disableImpersonation: boolean;
            accepted: boolean;
        })[];
        acceptedTeamMemberships: ({
            team: {
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                organizationSettings: {
                    id: number;
                    organizationId: number;
                    isOrganizationVerified: boolean;
                    isOrganizationConfigured: boolean;
                    isAdminReviewed: boolean;
                    orgAutoAcceptEmail: string;
                    isAdminAPIEnabled: boolean;
                    lockEventTypeCreationForUsers: boolean;
                    adminGetsNoSlotsNotification: boolean;
                } | null;
                logoUrl: string | null;
                isOrganization: boolean;
                isPlatform: boolean;
            };
        } & {
            id: number;
            userId: number;
            teamId: number;
            role: import('../../../prisma-client').$Enums.MembershipRole;
            disableImpersonation: boolean;
            accepted: boolean;
        })[];
        pendingTeamMemberships: ({
            team: {
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                organizationSettings: {
                    id: number;
                    organizationId: number;
                    isOrganizationVerified: boolean;
                    isOrganizationConfigured: boolean;
                    isAdminReviewed: boolean;
                    orgAutoAcceptEmail: string;
                    isAdminAPIEnabled: boolean;
                    lockEventTypeCreationForUsers: boolean;
                    adminGetsNoSlotsNotification: boolean;
                } | null;
                logoUrl: string | null;
                isOrganization: boolean;
                isPlatform: boolean;
            };
        } & {
            id: number;
            userId: number;
            teamId: number;
            role: import('../../../prisma-client').$Enums.MembershipRole;
            disableImpersonation: boolean;
            accepted: boolean;
        })[];
    }>;
    static findOrganizations({ userId }: {
        userId: UserType["id"];
    }): Promise<{
        organizations: {
            metadata: Prisma.JsonValue;
            id: number;
            name: string;
            slug: string | null;
            organizationSettings: {
                id: number;
                organizationId: number;
                isOrganizationVerified: boolean;
                isOrganizationConfigured: boolean;
                isAdminReviewed: boolean;
                orgAutoAcceptEmail: string;
                isAdminAPIEnabled: boolean;
                lockEventTypeCreationForUsers: boolean;
                adminGetsNoSlotsNotification: boolean;
            } | null;
            logoUrl: string | null;
            isOrganization: boolean;
            isPlatform: boolean;
        }[];
    }>;
    /**
     * It is aware of the fact that a user can be part of multiple organizations.
     */
    static findUsersByUsername({ orgSlug, usernameList, }: {
        orgSlug: string | null;
        usernameList: string[];
    }): Promise<({
        profile: import("@calcom/types/UserProfile").UserAsPersonalProfile;
        metadata: Prisma.JsonValue;
        theme: string | null;
        id: number;
        name: string | null;
        email: string;
        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;
        emailVerified: Date | null;
        avatarUrl: string | null;
        bufferTime: number;
        createdDate: Date;
        trialEndsAt: Date | null;
        completedOnboarding: boolean;
        twoFactorSecret: string | null;
        twoFactorEnabled: boolean;
        backupCodes: string | null;
        identityProviderId: string | null;
        invitedTo: number | null;
        allowDynamicBooking: boolean | null;
        allowSEOIndexing: boolean | null;
        receiveMonthlyDigestEmail: boolean | null;
        verified: boolean | null;
        disableImpersonation: boolean;
        locked: boolean;
        movedToProfileId: number | null;
        isPlatformManaged: boolean;
    } | {
        profile: {
            organization: Omit<{
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                logoUrl: string | null;
                calVideoLogo: string | null;
                bannerUrl: string | null;
                isPlatform: boolean;
            } & Omit<Pick<{
                id: number;
                name: string;
                slug: string | null;
                logoUrl: string | null;
                calVideoLogo: string | null;
                appLogo: string | null;
                appIconLogo: string | null;
                bio: string | null;
                hideBranding: boolean;
                isPrivate: boolean;
                hideBookATeamMember: boolean;
                createdAt: Date;
                metadata: Prisma.JsonValue | null;
                theme: string | null;
                brandColor: string | null;
                darkBrandColor: string | null;
                bannerUrl: string | null;
                parentId: number | null;
                timeFormat: number | null;
                timeZone: string;
                weekStart: string;
                isOrganization: boolean;
                pendingPayment: boolean;
                isPlatform: boolean;
                createdByOAuthClientId: string | null;
                smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
                smsLockReviewedByAdmin: boolean;
                bookingLimits: Prisma.JsonValue | null;
                includeManagedEventsInLimits: boolean;
            }, "metadata" | "id" | "name" | "slug" | "logoUrl" | "calVideoLogo" | "bannerUrl" | "isPlatform">, "metadata"> & {
                requestedSlug: string | null;
                metadata: {
                    requestedSlug: string | null;
                    paymentId?: string | undefined;
                    subscriptionId?: string | null | undefined;
                    subscriptionItemId?: string | null | undefined;
                    orgSeats?: number | null | undefined;
                    orgPricePerSeat?: number | null | undefined;
                    migratedToOrgFrom?: {
                        teamSlug?: string | null | undefined;
                        lastMigrationTime?: string | undefined;
                        reverted?: boolean | undefined;
                        lastRevertTime?: string | undefined;
                    } | undefined;
                    billingPeriod?: import('../../../prisma/zod-utils').BillingPeriod | undefined;
                };
            }, "metadata"> & {
                requestedSlug: string | null;
                metadata: {
                    requestedSlug: string | null;
                    paymentId?: string | undefined;
                    subscriptionId?: string | null | undefined;
                    subscriptionItemId?: string | null | undefined;
                    orgSeats?: number | null | undefined;
                    orgPricePerSeat?: number | null | undefined;
                    migratedToOrgFrom?: {
                        teamSlug?: string | null | undefined;
                        lastMigrationTime?: string | undefined;
                        reverted?: boolean | undefined;
                        lastRevertTime?: string | undefined;
                    } | undefined;
                    billingPeriod?: import('../../../prisma/zod-utils').BillingPeriod | undefined;
                };
            };
            id: number;
            organizationId: number;
            userId: number;
            uid: string;
            username: string;
            createdAt: Date & string;
            updatedAt: Date & string;
            upId: string;
        };
        metadata: Prisma.JsonValue;
        theme: string | null;
        id: number;
        name: string | null;
        email: string;
        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;
        emailVerified: Date | null;
        avatarUrl: string | null;
        bufferTime: number;
        createdDate: Date;
        trialEndsAt: Date | null;
        completedOnboarding: boolean;
        twoFactorSecret: string | null;
        twoFactorEnabled: boolean;
        backupCodes: string | null;
        identityProviderId: string | null;
        invitedTo: number | null;
        allowDynamicBooking: boolean | null;
        allowSEOIndexing: boolean | null;
        receiveMonthlyDigestEmail: boolean | null;
        verified: boolean | null;
        disableImpersonation: boolean;
        locked: boolean;
        movedToProfileId: number | null;
        isPlatformManaged: boolean;
    })[]>;
    static _getWhereClauseForFindingUsersByUsername({ orgSlug, usernameList, }: {
        orgSlug: string | null;
        usernameList: string[];
    }): Promise<{
        where: {
            id: {
                in: number[];
            };
        } | {
            organization: {
                OR: ({
                    slug: string;
                    metadata?: undefined;
                } | {
                    metadata: {
                        path: string[];
                        equals: string;
                    };
                    slug?: undefined;
                })[];
                isOrganization: true;
            };
            username: {
                in: string[];
            };
            id?: undefined;
        } | {
            organization: null;
            username: {
                in: string[];
            };
            id?: undefined;
        };
        profiles: {
            organization: Omit<{
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                logoUrl: string | null;
                calVideoLogo: string | null;
                bannerUrl: string | null;
                isPlatform: boolean;
            } & Omit<Pick<{
                id: number;
                name: string;
                slug: string | null;
                logoUrl: string | null;
                calVideoLogo: string | null;
                appLogo: string | null;
                appIconLogo: string | null;
                bio: string | null;
                hideBranding: boolean;
                isPrivate: boolean;
                hideBookATeamMember: boolean;
                createdAt: Date;
                metadata: Prisma.JsonValue | null;
                theme: string | null;
                brandColor: string | null;
                darkBrandColor: string | null;
                bannerUrl: string | null;
                parentId: number | null;
                timeFormat: number | null;
                timeZone: string;
                weekStart: string;
                isOrganization: boolean;
                pendingPayment: boolean;
                isPlatform: boolean;
                createdByOAuthClientId: string | null;
                smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
                smsLockReviewedByAdmin: boolean;
                bookingLimits: Prisma.JsonValue | null;
                includeManagedEventsInLimits: boolean;
            }, "metadata" | "id" | "name" | "slug" | "logoUrl" | "calVideoLogo" | "bannerUrl" | "isPlatform">, "metadata"> & {
                requestedSlug: string | null;
                metadata: {
                    requestedSlug: string | null;
                    paymentId?: string | undefined;
                    subscriptionId?: string | null | undefined;
                    subscriptionItemId?: string | null | undefined;
                    orgSeats?: number | null | undefined;
                    orgPricePerSeat?: number | null | undefined;
                    migratedToOrgFrom?: {
                        teamSlug?: string | null | undefined;
                        lastMigrationTime?: string | undefined;
                        reverted?: boolean | undefined;
                        lastRevertTime?: string | undefined;
                    } | undefined;
                    billingPeriod?: import('../../../prisma/zod-utils').BillingPeriod | undefined;
                };
            }, "metadata"> & {
                requestedSlug: string | null;
                metadata: {
                    requestedSlug: string | null;
                    paymentId?: string | undefined;
                    subscriptionId?: string | null | undefined;
                    subscriptionItemId?: string | null | undefined;
                    orgSeats?: number | null | undefined;
                    orgPricePerSeat?: number | null | undefined;
                    migratedToOrgFrom?: {
                        teamSlug?: string | null | undefined;
                        lastMigrationTime?: string | undefined;
                        reverted?: boolean | undefined;
                        lastRevertTime?: string | undefined;
                    } | undefined;
                    billingPeriod?: import('../../../prisma/zod-utils').BillingPeriod | undefined;
                };
            };
            user: {
                id: number;
                name: string | null;
                email: string;
                username: string | null;
                locale: string | null;
                startTime: number;
                endTime: number;
                avatarUrl: string | null;
                bufferTime: number;
                defaultScheduleId: number | null;
                isPlatformManaged: boolean;
            };
            id: number;
            organizationId: number;
            userId: number;
            uid: string;
            username: string;
            createdAt: Date & string;
            updatedAt: Date & string;
            upId: string;
        }[] | null;
    }>;
    static findByEmailAndIncludeProfilesAndPassword({ email }: {
        email: string;
    }): Promise<{
        allProfiles: UserProfile[];
        metadata: Prisma.JsonValue;
        id: number;
        name: string | null;
        email: string;
        password: {
            userId: number;
            hash: string;
        } | null;
        username: string | null;
        locale: string | null;
        teams: ({
            team: {
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                organizationSettings: {
                    id: number;
                    organizationId: number;
                    isOrganizationVerified: boolean;
                    isOrganizationConfigured: boolean;
                    isAdminReviewed: boolean;
                    orgAutoAcceptEmail: string;
                    isAdminAPIEnabled: boolean;
                    lockEventTypeCreationForUsers: boolean;
                    adminGetsNoSlotsNotification: boolean;
                } | null;
                logoUrl: string | null;
                isOrganization: boolean;
                isPlatform: boolean;
            };
        } & {
            id: number;
            userId: number;
            teamId: number;
            role: import('../../../prisma-client').$Enums.MembershipRole;
            disableImpersonation: boolean;
            accepted: boolean;
        })[];
        createdDate: Date;
        twoFactorSecret: string | null;
        twoFactorEnabled: boolean;
        backupCodes: string | null;
        identityProvider: import('../../../prisma-client').$Enums.IdentityProvider;
        role: import('../../../prisma-client').$Enums.UserPermissionRole;
        locked: boolean;
    } | null>;
    static findById({ id }: {
        id: number;
    }): Promise<{
        metadata: {
            proPaidForByTeamId?: number | undefined;
            stripeCustomerId?: string | undefined;
            vitalSettings?: {
                connected?: boolean | undefined;
                selectedParam?: string | undefined;
                sleepValue?: number | undefined;
            } | undefined;
            isPremium?: boolean | undefined;
            sessionTimeout?: number | undefined;
            defaultConferencingApp?: {
                appSlug?: string | undefined;
                appLink?: string | undefined;
            } | undefined;
            defaultBookerLayouts?: {
                enabledLayouts: import('../../../prisma/zod-utils').BookerLayouts[];
                defaultLayout: import('../../../prisma/zod-utils').BookerLayouts;
            } | null | undefined;
            emailChangeWaitingForVerification?: string | undefined;
            migratedToOrgFrom?: {
                username?: string | null | undefined;
                lastMigrationTime?: string | undefined;
                reverted?: boolean | undefined;
                revertTime?: string | undefined;
            } | undefined;
        } | null;
        theme: string | null;
        id: number;
        name: string | null;
        email: string;
        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;
        emailVerified: Date | null;
        avatarUrl: string | null;
        bufferTime: number;
        createdDate: Date;
        trialEndsAt: Date | null;
        completedOnboarding: boolean;
        twoFactorSecret: string | null;
        twoFactorEnabled: boolean;
        backupCodes: string | null;
        identityProviderId: string | null;
        invitedTo: number | null;
        allowDynamicBooking: boolean | null;
        allowSEOIndexing: boolean | null;
        receiveMonthlyDigestEmail: boolean | null;
        verified: boolean | null;
        disableImpersonation: boolean;
        locked: boolean;
        movedToProfileId: number | null;
        isPlatformManaged: boolean;
    } | null>;
    static findByIds({ ids }: {
        ids: number[];
    }): Promise<{
        metadata: Prisma.JsonValue;
        theme: string | null;
        id: number;
        name: string | null;
        email: string;
        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;
        emailVerified: Date | null;
        avatarUrl: string | null;
        bufferTime: number;
        createdDate: Date;
        trialEndsAt: Date | null;
        completedOnboarding: boolean;
        twoFactorSecret: string | null;
        twoFactorEnabled: boolean;
        backupCodes: string | null;
        identityProviderId: string | null;
        invitedTo: number | null;
        allowDynamicBooking: boolean | null;
        allowSEOIndexing: boolean | null;
        receiveMonthlyDigestEmail: boolean | null;
        verified: boolean | null;
        disableImpersonation: boolean;
        locked: boolean;
        movedToProfileId: number | null;
        isPlatformManaged: boolean;
    }[]>;
    static findByIdOrThrow({ id }: {
        id: number;
    }): Promise<{
        metadata: {
            proPaidForByTeamId?: number | undefined;
            stripeCustomerId?: string | undefined;
            vitalSettings?: {
                connected?: boolean | undefined;
                selectedParam?: string | undefined;
                sleepValue?: number | undefined;
            } | undefined;
            isPremium?: boolean | undefined;
            sessionTimeout?: number | undefined;
            defaultConferencingApp?: {
                appSlug?: string | undefined;
                appLink?: string | undefined;
            } | undefined;
            defaultBookerLayouts?: {
                enabledLayouts: import('../../../prisma/zod-utils').BookerLayouts[];
                defaultLayout: import('../../../prisma/zod-utils').BookerLayouts;
            } | null | undefined;
            emailChangeWaitingForVerification?: string | undefined;
            migratedToOrgFrom?: {
                username?: string | null | undefined;
                lastMigrationTime?: string | undefined;
                reverted?: boolean | undefined;
                revertTime?: string | undefined;
            } | undefined;
        } | null;
        theme: string | null;
        id: number;
        name: string | null;
        email: string;
        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;
        emailVerified: Date | null;
        avatarUrl: string | null;
        bufferTime: number;
        createdDate: Date;
        trialEndsAt: Date | null;
        completedOnboarding: boolean;
        twoFactorSecret: string | null;
        twoFactorEnabled: boolean;
        backupCodes: string | null;
        identityProviderId: string | null;
        invitedTo: number | null;
        allowDynamicBooking: boolean | null;
        allowSEOIndexing: boolean | null;
        receiveMonthlyDigestEmail: boolean | null;
        verified: boolean | null;
        disableImpersonation: boolean;
        locked: boolean;
        movedToProfileId: number | null;
        isPlatformManaged: boolean;
    }>;
    static findManyByOrganization({ organizationId }: {
        organizationId: number;
    }): Promise<{
        id: number;
        name: string | null;
        email: string;
        username: string | null;
        locale: string | null;
        startTime: number;
        endTime: number;
        avatarUrl: string | null;
        bufferTime: number;
        defaultScheduleId: number | null;
        isPlatformManaged: boolean;
    }[]>;
    static isAMemberOfOrganization({ user, organizationId, }: {
        user: {
            profiles: {
                organizationId: number;
            }[];
        };
        organizationId: number;
    }): boolean;
    static findIfAMemberOfSomeOrganization({ user }: {
        user: {
            id: number;
        };
    }): Promise<boolean>;
    static isMigratedToOrganization({ user, }: {
        user: {
            metadata?: {
                migratedToOrgFrom?: unknown;
            } | null;
        };
    }): boolean;
    static isMovedToAProfile({ user }: {
        user: Pick<UserType, "movedToProfileId">;
    }): Promise<boolean>;
    static enrichUserWithTheProfile<T extends {
        username: string | null;
        id: number;
    }>({ user, upId, }: {
        user: T;
        upId: UpId;
    }): Promise<(T & {
        profile: import("@calcom/types/UserProfile").UserAsPersonalProfile;
    }) | (T & {
        profile: {
            name: string | null;
            avatarUrl: string | null;
            startTime: number;
            endTime: number;
            bufferTime: number;
            username: string | null;
            upId: string;
            id: null;
            organizationId: null;
            organization: null;
        } | {
            name: string | null;
            avatarUrl: string | null;
            startTime: number;
            endTime: number;
            bufferTime: number;
            user: {
                id: number;
                name: string | null;
                email: string;
                username: string | null;
                locale: string | null;
                startTime: number;
                endTime: number;
                avatarUrl: string | null;
                bufferTime: number;
                defaultScheduleId: number | null;
                isPlatformManaged: boolean;
            };
            organization: {
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                organizationSettings: {
                    lockEventTypeCreationForUsers: boolean;
                } | null;
                logoUrl: string | null;
                calVideoLogo: string | null;
                isPrivate: boolean;
                bannerUrl: string | null;
                isPlatform: boolean;
                members: {
                    id: number;
                    userId: number;
                    teamId: number;
                    role: import('../../../prisma-client').$Enums.MembershipRole;
                    disableImpersonation: boolean;
                    accepted: boolean;
                }[];
            } & Omit<Pick<{
                id: number;
                name: string;
                slug: string | null;
                logoUrl: string | null;
                calVideoLogo: string | null;
                appLogo: string | null;
                appIconLogo: string | null;
                bio: string | null;
                hideBranding: boolean;
                isPrivate: boolean;
                hideBookATeamMember: boolean;
                createdAt: Date;
                metadata: Prisma.JsonValue | null;
                theme: string | null;
                brandColor: string | null;
                darkBrandColor: string | null;
                bannerUrl: string | null;
                parentId: number | null;
                timeFormat: number | null;
                timeZone: string;
                weekStart: string;
                isOrganization: boolean;
                pendingPayment: boolean;
                isPlatform: boolean;
                createdByOAuthClientId: string | null;
                smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
                smsLockReviewedByAdmin: boolean;
                bookingLimits: Prisma.JsonValue | null;
                includeManagedEventsInLimits: boolean;
            }, "metadata" | "id" | "name" | "slug" | "logoUrl" | "calVideoLogo" | "bannerUrl" | "isPlatform">, "metadata"> & {
                requestedSlug: string | null;
                metadata: {
                    requestedSlug: string | null;
                    paymentId?: string | undefined;
                    subscriptionId?: string | null | undefined;
                    subscriptionItemId?: string | null | undefined;
                    orgSeats?: number | null | undefined;
                    orgPricePerSeat?: number | null | undefined;
                    migratedToOrgFrom?: {
                        teamSlug?: string | null | undefined;
                        lastMigrationTime?: string | undefined;
                        reverted?: boolean | undefined;
                        lastRevertTime?: string | undefined;
                    } | undefined;
                    billingPeriod?: import('../../../prisma/zod-utils').BillingPeriod | undefined;
                };
            };
            movedFromUser: {
                id: number;
            } | null;
            id: number;
            organizationId: number;
            userId: number;
            uid: string;
            username: string;
            createdAt: Date & string;
            updatedAt: Date & string;
            upId: string;
        };
    })>;
    /**
     * Use this method instead of `enrichUserWithTheProfile` if you don't directly have the profileId.
     * It can happen in following cases:
     * 1. While dealing with a User that hasn't been added to any organization yet and thus have no Profile entries.
     * 2. While dealing with a User that has been moved to a Profile i.e. he was invited to an organization when he was an existing user.
     * 3. We haven't added profileId to all the entities, so they aren't aware of which profile they belong to. So, we still mostly use this function to enrich the user with its profile.
     */
    static enrichUserWithItsProfile<T extends {
        id: number;
        username: string | null;
    }>({ user, }: {
        user: T;
    }): Promise<T & {
        nonProfileUsername: string | null;
        profile: UserProfile;
    }>;
    static enrichUsersWithTheirProfiles<T extends {
        id: number;
        username: string | null;
    }>(users: T[]): Promise<Array<T & {
        nonProfileUsername: string | null;
        profile: UserProfile;
    }>>;
    static enrichUserWithItsProfileBuiltFromUser<T extends {
        id: number;
        username: string | null;
    }>({ user, }: {
        user: T;
    }): T & {
        nonProfileUsername: string | null;
        profile: UserProfile;
    };
    static enrichEntityWithProfile<T extends {
        profile: {
            id: number;
            username: string | null;
            organizationId: number | null;
            organization?: {
                id: number;
                name: string;
                calVideoLogo: string | null;
                bannerUrl: string | null;
                slug: string | null;
                metadata: Prisma.JsonValue;
            };
        };
    } | {
        user: {
            username: string | null;
            id: number;
        };
    }>(entity: T): Promise<(Omit<T & Record<"profile", unknown>, "profile"> & {
        profile: {
            organization: Omit<{
                id: number;
                name: string;
                calVideoLogo: string | null;
                bannerUrl: string | null;
                slug: string | null;
                metadata: Prisma.JsonValue;
            }, "metadata"> & {
                requestedSlug: string | null;
                metadata: {
                    requestedSlug: string | null;
                    paymentId?: string | undefined;
                    subscriptionId?: string | null | undefined;
                    subscriptionItemId?: string | null | undefined;
                    orgSeats?: number | null | undefined;
                    orgPricePerSeat?: number | null | undefined;
                    migratedToOrgFrom?: {
                        teamSlug?: string | null | undefined;
                        lastMigrationTime?: string | undefined;
                        reverted?: boolean | undefined;
                        lastRevertTime?: string | undefined;
                    } | undefined;
                    billingPeriod?: import('../../../prisma/zod-utils').BillingPeriod | undefined;
                };
            };
            id: number;
            username: string | null;
            organizationId: number | null;
        } | {
            organization: null;
            id: number;
            username: string | null;
            organizationId: number | null;
        };
    }) | (T & {
        profile: import("@calcom/types/UserProfile").UserAsPersonalProfile;
    })>;
    static updateWhereId({ whereId, data, }: {
        whereId: number;
        data: {
            movedToProfileId?: number | null;
        };
    }): Promise<{
        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;
    }>;
    static create({ email, username, organizationId, }: {
        email: string;
        username: string;
        organizationId: number | null;
    }): Promise<{
        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;
    }>;
    static getUserAdminTeams(userId: number): Promise<{
        id: number;
        name: string | null;
        username: string | null;
        teams: {
            team: {
                id: number;
                name: string;
                parent: {
                    id: number;
                    name: string;
                    logoUrl: string | null;
                } | null;
                logoUrl: string | null;
                isOrganization: boolean;
            };
        }[];
        avatarUrl: string | null;
    } | null>;
    static isAdminOfTeamOrParentOrg({ userId, teamId }: {
        userId: number;
        teamId: number;
    }): Promise<boolean>;
    static isAdminOrOwnerOfTeam({ userId, teamId }: {
        userId: number;
        teamId: number;
    }): Promise<boolean>;
    static getTimeZoneAndDefaultScheduleId({ userId }: {
        userId: number;
    }): Promise<{
        timeZone: string;
        defaultScheduleId: number | null;
    } | null>;
    static adminFindById(userId: number): Promise<{
        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;
    }>;
    static findUserTeams({ id }: {
        id: number;
    }): Promise<{
        teams: {
            team: {
                id: number;
                name: string;
                logoUrl: string | null;
            };
            accepted: boolean;
        }[];
        completedOnboarding: boolean;
    } | null>;
}
//# sourceMappingURL=user.d.ts.map