import type { z } from "zod";
import type { CreationSource } from '../../../prisma/enums';
import { teamMetadataSchema } from '../../../prisma/zod-utils';
export declare class OrganizationRepository {
    static createWithExistingUserAsOwner({ orgData, owner, }: {
        orgData: {
            name: string;
            slug: string | null;
            isOrganizationConfigured: boolean;
            isOrganizationAdminReviewed: boolean;
            autoAcceptEmail: string;
            seats: number | null;
            pricePerSeat: number | null;
            isPlatform: boolean;
            billingPeriod?: "MONTHLY" | "ANNUALLY";
            logoUrl: string | null;
            bio: string | null;
            requestedSlug?: string | null;
        };
        owner: {
            id: number;
            email: string;
            nonOrgUsername: string;
        };
    }): Promise<{
        organization: {
            name: string;
            id: number;
            metadata: import('../../../prisma-client').Prisma.JsonValue;
            bio: string | null;
            theme: string | null;
            slug: string | null;
            parentId: number | null;
            timeZone: string;
            bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
            createdAt: Date;
            weekStart: string;
            hideBranding: boolean;
            timeFormat: number | null;
            brandColor: string | null;
            darkBrandColor: string | null;
            smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
            smsLockReviewedByAdmin: boolean;
            logoUrl: string | null;
            calVideoLogo: string | null;
            appLogo: string | null;
            appIconLogo: string | null;
            isPrivate: boolean;
            hideBookATeamMember: boolean;
            rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
            bannerUrl: string | null;
            isOrganization: boolean;
            pendingPayment: boolean;
            isPlatform: boolean;
            createdByOAuthClientId: string | null;
            includeManagedEventsInLimits: boolean;
        };
        ownerProfile: {
            id: number;
            username: string;
            uid: string;
            organizationId: number;
            userId: number;
            createdAt: Date;
            updatedAt: Date;
        };
    }>;
    static createWithNonExistentOwner({ orgData, owner, creationSource, }: {
        orgData: {
            name: string;
            slug: string;
            isOrganizationConfigured: boolean;
            isOrganizationAdminReviewed: boolean;
            autoAcceptEmail: string;
            seats: number | null;
            billingPeriod?: "MONTHLY" | "ANNUALLY";
            pricePerSeat: number | null;
            isPlatform: boolean;
            logoUrl: string | null;
            bio: string | null;
        };
        owner: {
            email: string;
        };
        creationSource: CreationSource;
    }): Promise<{
        orgOwner: {
            name: string | null;
            id: number;
            role: import('../../../prisma-client').$Enums.UserPermissionRole;
            metadata: import('../../../prisma-client').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;
        };
        organization: {
            name: string;
            id: number;
            metadata: import('../../../prisma-client').Prisma.JsonValue;
            bio: string | null;
            theme: string | null;
            slug: string | null;
            parentId: number | null;
            timeZone: string;
            bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
            createdAt: Date;
            weekStart: string;
            hideBranding: boolean;
            timeFormat: number | null;
            brandColor: string | null;
            darkBrandColor: string | null;
            smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
            smsLockReviewedByAdmin: boolean;
            logoUrl: string | null;
            calVideoLogo: string | null;
            appLogo: string | null;
            appIconLogo: string | null;
            isPrivate: boolean;
            hideBookATeamMember: boolean;
            rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
            bannerUrl: string | null;
            isOrganization: boolean;
            pendingPayment: boolean;
            isPlatform: boolean;
            createdByOAuthClientId: string | null;
            includeManagedEventsInLimits: boolean;
        };
        ownerProfile: {
            username: string;
        };
    }>;
    static create(orgData: {
        name: string;
        slug: string | null;
        isOrganizationConfigured: boolean;
        isOrganizationAdminReviewed: boolean;
        autoAcceptEmail: string;
        seats: number | null;
        billingPeriod?: "MONTHLY" | "ANNUALLY";
        pricePerSeat: number | null;
        isPlatform: boolean;
        logoUrl: string | null;
        bio: string | null;
        requestedSlug?: string | null;
    }): Promise<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    }>;
    static findById({ id }: {
        id: number;
    }): Promise<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    } | null>;
    static findBySlug({ slug }: {
        slug: string;
    }): Promise<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    } | null>;
    static findBySlugIncludeOnboarding({ slug }: {
        slug: string;
    }): Promise<({
        organizationOnboarding: {
            id: string;
            teams: import('../../../prisma-client').Prisma.JsonValue;
            slug: string;
            isPlatform: boolean;
            isDomainConfigured: boolean;
            invitedMembers: import('../../../prisma-client').Prisma.JsonValue;
        } | null;
    } & {
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    }) | null>;
    static findByIdIncludeOrganizationSettings({ id }: {
        id: number;
    }): Promise<{
        name: string;
        id: number;
        slug: string | null;
        organizationSettings: {
            id: number;
            organizationId: number;
            isOrganizationVerified: boolean;
            isOrganizationConfigured: boolean;
            isAdminReviewed: boolean;
            orgAutoAcceptEmail: string;
            isAdminAPIEnabled: boolean;
            allowSEOIndexing: boolean;
            lockEventTypeCreationForUsers: boolean;
            adminGetsNoSlotsNotification: boolean;
            orgProfileRedirectsToVerifiedDomain: boolean;
        } | null;
        logoUrl: string | null;
    } | null>;
    static findUniqueNonPlatformOrgsByMatchingAutoAcceptEmail({ email }: {
        email: string;
    }): Promise<(Omit<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    }, "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;
        };
    }) | null>;
    static findCurrentOrg({ userId, orgId }: {
        userId: number;
        orgId: number;
    }): Promise<{
        metadata: {
            requestedSlug?: string | null | undefined;
            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;
        } | null;
        name: string;
        id: number;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
        canAdminImpersonate: boolean;
        organizationSettings: {
            lockEventTypeCreationForUsers: boolean | undefined;
            adminGetsNoSlotsNotification: boolean | undefined;
            allowSEOIndexing: boolean | undefined;
            orgProfileRedirectsToVerifiedDomain: boolean | undefined;
            orgAutoAcceptEmail: string | undefined;
        };
        user: {
            role: import('../../../prisma-client').$Enums.MembershipRole;
            accepted: boolean;
        };
    }>;
    static findTeamsInOrgIamNotPartOf({ userId, parentId }: {
        userId: number;
        parentId: number | null;
    }): Promise<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    }[]>;
    static adminFindById({ id }: {
        id: number;
    }): Promise<{
        metadata: {
            requestedSlug?: string | null | undefined;
            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;
        } | null;
        name: string;
        id: number;
        members: {
            user: {
                name: string | null;
                id: number;
                email: string;
            };
        }[];
        slug: string | null;
        organizationSettings: {
            isOrganizationVerified: boolean;
            isOrganizationConfigured: boolean;
            orgAutoAcceptEmail: string;
        } | null;
        isOrganization: boolean;
    }>;
    static findByMemberEmail({ email }: {
        email: string;
    }): Promise<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    } | null>;
    static findByMemberEmailId({ email }: {
        email: string;
    }): Promise<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    } | null>;
    static findCalVideoLogoByOrgId({ id }: {
        id: number;
    }): Promise<string | null | undefined>;
    static getVerifiedOrganizationByAutoAcceptEmailDomain(domain: string): Promise<{
        id: number;
        organizationSettings: {
            orgAutoAcceptEmail: string;
        } | null;
    } | null>;
    static setSlug({ id, slug }: {
        id: number;
        slug: string;
    }): Promise<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    }>;
    static updateStripeSubscriptionDetails({ id, stripeSubscriptionId, stripeSubscriptionItemId, existingMetadata, }: {
        id: number;
        stripeSubscriptionId: string;
        stripeSubscriptionItemId: string;
        existingMetadata: z.infer<typeof teamMetadataSchema>;
    }): Promise<{
        name: string;
        id: number;
        metadata: import('../../../prisma-client').Prisma.JsonValue;
        bio: string | null;
        theme: string | null;
        slug: string | null;
        parentId: number | null;
        timeZone: string;
        bookingLimits: import('../../../prisma-client').Prisma.JsonValue;
        createdAt: Date;
        weekStart: string;
        hideBranding: boolean;
        timeFormat: number | null;
        brandColor: string | null;
        darkBrandColor: string | null;
        smsLockState: import('../../../prisma-client').$Enums.SMSLockState;
        smsLockReviewedByAdmin: boolean;
        logoUrl: string | null;
        calVideoLogo: string | null;
        appLogo: string | null;
        appIconLogo: string | null;
        isPrivate: boolean;
        hideBookATeamMember: boolean;
        rrResetInterval: import('../../../prisma-client').$Enums.RRResetInterval | null;
        bannerUrl: string | null;
        isOrganization: boolean;
        pendingPayment: boolean;
        isPlatform: boolean;
        createdByOAuthClientId: string | null;
        includeManagedEventsInLimits: boolean;
    }>;
}
//# sourceMappingURL=organization.d.ts.map