import type { MembershipRole } from '../../../prisma/client';
import { Prisma } from '../../../prisma/client';
type IMembership = {
    teamId: number;
    userId: number;
    accepted: boolean;
    role: MembershipRole;
};
export declare class MembershipRepository {
    static create(data: IMembership): Promise<{
        id: number;
        userId: number;
        teamId: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        disableImpersonation: boolean;
        accepted: boolean;
    }>;
    static createMany(data: IMembership[]): Promise<import('../../../prisma-client/runtime/library').GetBatchResult>;
    /**
     * TODO: Using a specific function for specific tasks so that we don't have to focus on TS magic at the moment. May be try to make it a a generic findAllByProfileId with various options.
     */
    static findAllByUpIdIncludeTeamWithMembersAndEventTypes({ upId }: {
        upId: string;
    }, { where }?: {
        where?: Prisma.MembershipWhereInput;
    }): Promise<({
        team: {
            parent: {
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                parentId: number | null;
                logoUrl: string | null;
            } | null;
            eventTypes: {
                length: number;
                position: number;
                title: string;
                metadata: Prisma.JsonValue;
                hidden: boolean;
                id: number;
                price: number;
                currency: string;
                description: string | null;
                children: ({
                    users: {
                        id: number;
                        name: string | null;
                        username: string | null;
                        avatarUrl: string | null;
                    }[];
                } & {
                    length: number;
                    position: number;
                    title: string;
                    metadata: Prisma.JsonValue;
                    hidden: boolean;
                    id: number;
                    price: number;
                    currency: string;
                    description: string | null;
                    userId: number | null;
                    timeZone: string | null;
                    slug: string;
                    locations: Prisma.JsonValue;
                    offsetStart: number;
                    profileId: number | null;
                    teamId: number | null;
                    useEventLevelSelectedCalendars: boolean;
                    eventName: string | null;
                    parentId: number | null;
                    bookingFields: Prisma.JsonValue;
                    periodType: import('../../../prisma-client').$Enums.PeriodType;
                    periodStartDate: Date | null;
                    periodEndDate: Date | null;
                    periodDays: number | null;
                    periodCountCalendarDays: boolean | null;
                    lockTimeZoneToggleOnBookingPage: boolean;
                    requiresConfirmation: boolean;
                    requiresConfirmationWillBlockSlot: boolean;
                    requiresConfirmationForFreeEmail: boolean;
                    requiresBookerEmailVerification: boolean;
                    autoTranslateDescriptionEnabled: boolean;
                    recurringEvent: Prisma.JsonValue;
                    disableGuests: boolean;
                    hideCalendarNotes: boolean;
                    hideCalendarEventDetails: boolean;
                    minimumBookingNotice: number;
                    beforeEventBuffer: number;
                    afterEventBuffer: number;
                    seatsPerTimeSlot: number | null;
                    onlyShowFirstAvailableSlot: boolean;
                    seatsShowAttendees: boolean | null;
                    seatsShowAvailabilityCount: boolean | null;
                    schedulingType: import('../../../prisma-client').$Enums.SchedulingType | null;
                    scheduleId: number | null;
                    slotInterval: number | null;
                    successRedirectUrl: string | null;
                    forwardParamsSuccessRedirect: boolean | null;
                    bookingLimits: Prisma.JsonValue;
                    durationLimits: Prisma.JsonValue;
                    isInstantEvent: boolean;
                    instantMeetingExpiryTimeOffsetInSeconds: number;
                    instantMeetingScheduleId: number | null;
                    instantMeetingParameters: string[];
                    assignAllTeamMembers: boolean;
                    assignRRMembersUsingSegment: boolean;
                    rrSegmentQueryValue: Prisma.JsonValue;
                    useEventTypeDestinationCalendarEmail: boolean;
                    isRRWeightsEnabled: boolean;
                    maxLeadThreshold: number | null;
                    eventTypeColor: Prisma.JsonValue;
                    rescheduleWithSameRoundRobinHost: boolean;
                    secondaryEmailId: number | null;
                })[];
                userId: number | null;
                timeZone: string | null;
                slug: string;
                locations: Prisma.JsonValue;
                offsetStart: number;
                profileId: number | null;
                teamId: number | null;
                useEventLevelSelectedCalendars: boolean;
                eventName: string | null;
                parentId: number | null;
                bookingFields: Prisma.JsonValue;
                periodType: import('../../../prisma-client').$Enums.PeriodType;
                periodStartDate: Date | null;
                periodEndDate: Date | null;
                periodDays: number | null;
                periodCountCalendarDays: boolean | null;
                lockTimeZoneToggleOnBookingPage: boolean;
                requiresConfirmation: boolean;
                requiresConfirmationWillBlockSlot: boolean;
                requiresConfirmationForFreeEmail: boolean;
                requiresBookerEmailVerification: boolean;
                autoTranslateDescriptionEnabled: boolean;
                recurringEvent: Prisma.JsonValue;
                disableGuests: boolean;
                hideCalendarNotes: boolean;
                hideCalendarEventDetails: boolean;
                minimumBookingNotice: number;
                beforeEventBuffer: number;
                afterEventBuffer: number;
                seatsPerTimeSlot: number | null;
                onlyShowFirstAvailableSlot: boolean;
                seatsShowAttendees: boolean | null;
                seatsShowAvailabilityCount: boolean | null;
                schedulingType: import('../../../prisma-client').$Enums.SchedulingType | null;
                scheduleId: number | null;
                slotInterval: number | null;
                successRedirectUrl: string | null;
                bookingLimits: Prisma.JsonValue;
                durationLimits: Prisma.JsonValue;
                isInstantEvent: boolean;
                instantMeetingExpiryTimeOffsetInSeconds: number;
                instantMeetingScheduleId: number | null;
                instantMeetingParameters: string[];
                assignAllTeamMembers: boolean;
                assignRRMembersUsingSegment: boolean;
                rrSegmentQueryValue: Prisma.JsonValue;
                useEventTypeDestinationCalendarEmail: boolean;
                isRRWeightsEnabled: boolean;
                maxLeadThreshold: number | null;
                eventTypeColor: Prisma.JsonValue;
                rescheduleWithSameRoundRobinHost: boolean;
                secondaryEmailId: number | null;
                hosts: ({
                    user: {
                        id: number;
                        name: string | null;
                        username: string | null;
                        avatarUrl: string | null;
                    };
                } & {
                    eventTypeId: number;
                    userId: number;
                    scheduleId: number | null;
                    createdAt: Date;
                    isFixed: boolean;
                    priority: number | null;
                    weight: number | null;
                    weightAdjustment: number | null;
                })[];
                users: {
                    id: number;
                    name: string | null;
                    username: string | null;
                    avatarUrl: string | null;
                }[];
                hashedLink: {
                    link: string;
                    id: number;
                    eventTypeId: number;
                }[];
                aiPhoneCallConfig: {
                    id: number;
                    enabled: boolean;
                    eventTypeId: number;
                    templateType: string;
                    schedulerName: string | null;
                    generalPrompt: string | null;
                    yourPhoneNumber: string;
                    numberToCall: string;
                    guestName: string | null;
                    guestEmail: string | null;
                    guestCompany: string | null;
                    beginMessage: string | null;
                    llmId: string | null;
                } | null;
            }[];
            members: {
                id: number;
                userId: number;
                teamId: number;
                role: import('../../../prisma-client').$Enums.MembershipRole;
                disableImpersonation: boolean;
                accepted: boolean;
            }[];
        } & {
            metadata: Prisma.JsonValue;
            theme: string | null;
            id: number;
            name: string;
            timeZone: string;
            slug: string | null;
            parentId: number | null;
            bookingLimits: Prisma.JsonValue;
            createdAt: Date;
            bio: string | null;
            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;
            bannerUrl: string | null;
            isOrganization: boolean;
            pendingPayment: boolean;
            isPlatform: boolean;
            createdByOAuthClientId: string | null;
            includeManagedEventsInLimits: boolean;
        };
    } & {
        id: number;
        userId: number;
        teamId: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        disableImpersonation: boolean;
        accepted: boolean;
    })[]>;
    static findAllByUpIdIncludeMinimalEventTypes({ upId }: {
        upId: string;
    }, { where, skipEventTypes }?: {
        where?: Prisma.MembershipWhereInput;
        skipEventTypes?: boolean;
    }): Promise<{
        id: number;
        userId: number;
        teamId: number;
        team: {
            metadata: Prisma.JsonValue;
            id: number;
            name: string;
            parent: {
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                parentId: number | null;
                logoUrl: string | null;
            } | null;
            slug: string | null;
            parentId: number | null;
            eventTypes: {
                length: number;
                position: number;
                title: string;
                metadata: Prisma.JsonValue;
                hidden: boolean;
                id: number;
                price: number;
                currency: string;
                description: string | null;
                userId: number | null;
                timeZone: string | null;
                slug: string;
                locations: Prisma.JsonValue;
                offsetStart: number;
                profileId: number | null;
                teamId: number | null;
                useEventLevelSelectedCalendars: boolean;
                eventName: string | null;
                parentId: number | null;
                bookingFields: Prisma.JsonValue;
                periodType: import('../../../prisma-client').$Enums.PeriodType;
                periodStartDate: Date | null;
                periodEndDate: Date | null;
                periodDays: number | null;
                periodCountCalendarDays: boolean | null;
                lockTimeZoneToggleOnBookingPage: boolean;
                requiresConfirmation: boolean;
                requiresConfirmationWillBlockSlot: boolean;
                requiresConfirmationForFreeEmail: boolean;
                requiresBookerEmailVerification: boolean;
                autoTranslateDescriptionEnabled: boolean;
                recurringEvent: Prisma.JsonValue;
                disableGuests: boolean;
                hideCalendarNotes: boolean;
                hideCalendarEventDetails: boolean;
                minimumBookingNotice: number;
                beforeEventBuffer: number;
                afterEventBuffer: number;
                seatsPerTimeSlot: number | null;
                onlyShowFirstAvailableSlot: boolean;
                seatsShowAttendees: boolean | null;
                seatsShowAvailabilityCount: boolean | null;
                schedulingType: import('../../../prisma-client').$Enums.SchedulingType | null;
                scheduleId: number | null;
                slotInterval: number | null;
                successRedirectUrl: string | null;
                forwardParamsSuccessRedirect: boolean | null;
                bookingLimits: Prisma.JsonValue;
                durationLimits: Prisma.JsonValue;
                isInstantEvent: boolean;
                instantMeetingExpiryTimeOffsetInSeconds: number;
                instantMeetingScheduleId: number | null;
                instantMeetingParameters: string[];
                assignAllTeamMembers: boolean;
                assignRRMembersUsingSegment: boolean;
                rrSegmentQueryValue: Prisma.JsonValue;
                useEventTypeDestinationCalendarEmail: boolean;
                isRRWeightsEnabled: boolean;
                maxLeadThreshold: number | null;
                eventTypeColor: Prisma.JsonValue;
                rescheduleWithSameRoundRobinHost: boolean;
                secondaryEmailId: number | null;
            }[];
            logoUrl: string | null;
            isOrganization: boolean;
        };
        role: import('../../../prisma-client').$Enums.MembershipRole;
        disableImpersonation: boolean;
        accepted: boolean;
    }[]>;
    static findAllByUpIdIncludeTeam({ upId }: {
        upId: string;
    }, { where }?: {
        where?: Prisma.MembershipWhereInput;
    }): Promise<({
        team: {
            parent: {
                metadata: Prisma.JsonValue;
                id: number;
                name: string;
                slug: string | null;
                parentId: number | null;
                logoUrl: string | null;
            } | null;
        } & {
            metadata: Prisma.JsonValue;
            theme: string | null;
            id: number;
            name: string;
            timeZone: string;
            slug: string | null;
            parentId: number | null;
            bookingLimits: Prisma.JsonValue;
            createdAt: Date;
            bio: string | null;
            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;
            bannerUrl: string | null;
            isOrganization: boolean;
            pendingPayment: boolean;
            isPlatform: boolean;
            createdByOAuthClientId: string | null;
            includeManagedEventsInLimits: boolean;
        };
    } & {
        id: number;
        userId: number;
        teamId: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        disableImpersonation: boolean;
        accepted: boolean;
    })[]>;
    static findFirstByUserIdAndTeamId({ userId, teamId }: {
        userId: number;
        teamId: number;
    }): Promise<{
        id: number;
        userId: number;
        teamId: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        disableImpersonation: boolean;
        accepted: boolean;
    } | null>;
    static findByTeamIdForAvailability({ teamId }: {
        teamId: number;
    }): Promise<{
        user: Omit<{
            schedules: {
                id: number;
                timeZone: string | null;
                availability: {
                    date: Date | null;
                    days: number[];
                    startTime: Date;
                    endTime: Date;
                }[];
            }[];
            id: number;
            email: string;
            timeZone: string;
            availability: {
                date: Date | null;
                days: number[];
                id: number;
                eventTypeId: number | null;
                userId: number | null;
                scheduleId: number | null;
                startTime: Date;
                endTime: Date;
            }[];
            selectedCalendars: {
                error: string | null;
                id: string;
                credentialId: number | null;
                eventTypeId: number | null;
                userId: number;
                integration: string;
                externalId: string;
                domainWideDelegationCredentialId: string | null;
                googleChannelId: string | null;
                googleChannelKind: string | null;
                googleChannelResourceId: string | null;
                googleChannelResourceUri: string | null;
                googleChannelExpiration: string | null;
            }[];
            username: 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;
                invalid: boolean | null;
                type: string;
                id: number;
                userId: number | null;
                user: {
                    email: string;
                } | null;
                teamId: number | null;
                appId: string | null;
            }[];
        }, "selectedCalendars"> & {
            allSelectedCalendars: {
                error: string | null;
                id: string;
                credentialId: number | null;
                eventTypeId: number | null;
                userId: number;
                integration: string;
                externalId: string;
                domainWideDelegationCredentialId: string | null;
                googleChannelId: string | null;
                googleChannelKind: string | null;
                googleChannelResourceId: string | null;
                googleChannelResourceUri: string | null;
                googleChannelExpiration: string | null;
            }[];
            userLevelSelectedCalendars: {
                error: string | null;
                id: string;
                credentialId: number | null;
                eventTypeId: number | null;
                userId: number;
                integration: string;
                externalId: string;
                domainWideDelegationCredentialId: string | null;
                googleChannelId: string | null;
                googleChannelKind: string | null;
                googleChannelResourceId: string | null;
                googleChannelResourceUri: string | null;
                googleChannelExpiration: string | null;
            }[];
        };
        id: number;
        userId: number;
        teamId: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        disableImpersonation: boolean;
        accepted: boolean;
    }[]>;
}
export {};
//# sourceMappingURL=membership.d.ts.map