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;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        userId: number;
        teamId: number;
        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: {
            members: {
                id: number;
                role: import('../../../prisma-client').$Enums.MembershipRole;
                userId: number;
                teamId: number;
                disableImpersonation: boolean;
                accepted: boolean;
            }[];
            parent: {
                name: string;
                id: number;
                metadata: Prisma.JsonValue;
                slug: string | null;
                parentId: number | null;
                logoUrl: string | null;
            } | null;
            eventTypes: {
                users: {
                    name: string | null;
                    id: number;
                    username: string | null;
                    avatarUrl: string | null;
                }[];
                id: number;
                children: ({
                    users: {
                        name: string | null;
                        id: number;
                        username: string | null;
                        avatarUrl: string | null;
                    }[];
                } & {
                    id: number;
                    length: number;
                    title: string;
                    metadata: Prisma.JsonValue;
                    description: string | null;
                    price: number;
                    hidden: boolean;
                    currency: string;
                    slug: string;
                    userId: number | null;
                    position: number;
                    locations: Prisma.JsonValue;
                    offsetStart: number;
                    profileId: number | null;
                    teamId: number | null;
                    useEventLevelSelectedCalendars: boolean;
                    eventName: string | null;
                    parentId: number | null;
                    bookingFields: Prisma.JsonValue;
                    timeZone: string | null;
                    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;
                    canSendCalVideoTranscriptionEmails: 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;
                    allowReschedulingPastBookings: boolean;
                    eventTypeColor: Prisma.JsonValue;
                    rescheduleWithSameRoundRobinHost: boolean;
                    secondaryEmailId: number | null;
                })[];
                length: number;
                title: string;
                metadata: Prisma.JsonValue;
                description: string | null;
                price: number;
                hidden: boolean;
                hosts: ({
                    user: {
                        name: string | null;
                        id: number;
                        username: string | null;
                        avatarUrl: string | null;
                    };
                } & {
                    weight: number | null;
                    userId: number;
                    eventTypeId: number;
                    scheduleId: number | null;
                    createdAt: Date;
                    isFixed: boolean;
                    priority: number | null;
                    weightAdjustment: number | null;
                })[];
                currency: string;
                slug: string;
                userId: number | null;
                position: number;
                locations: Prisma.JsonValue;
                offsetStart: number;
                profileId: number | null;
                teamId: number | null;
                useEventLevelSelectedCalendars: boolean;
                eventName: string | null;
                parentId: number | null;
                bookingFields: Prisma.JsonValue;
                timeZone: string | null;
                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;
                canSendCalVideoTranscriptionEmails: 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;
                allowReschedulingPastBookings: boolean;
                eventTypeColor: Prisma.JsonValue;
                rescheduleWithSameRoundRobinHost: boolean;
                secondaryEmailId: number | 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;
            }[];
        } & {
            name: string;
            id: number;
            metadata: Prisma.JsonValue;
            bio: string | null;
            theme: string | null;
            slug: string | null;
            parentId: number | null;
            timeZone: string;
            bookingLimits: 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;
        };
    } & {
        id: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        userId: number;
        teamId: number;
        disableImpersonation: boolean;
        accepted: boolean;
    })[]>;
    static findAllByUpIdIncludeMinimalEventTypes({ upId }: {
        upId: string;
    }, { where, skipEventTypes }?: {
        where?: Prisma.MembershipWhereInput;
        skipEventTypes?: boolean;
    }): Promise<{
        id: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        team: {
            name: string;
            id: number;
            metadata: Prisma.JsonValue;
            slug: string | null;
            parentId: number | null;
            parent: {
                name: string;
                id: number;
                metadata: Prisma.JsonValue;
                slug: string | null;
                parentId: number | null;
                logoUrl: string | null;
            } | null;
            eventTypes: {
                id: number;
                length: number;
                title: string;
                metadata: Prisma.JsonValue;
                description: string | null;
                price: number;
                hidden: boolean;
                currency: string;
                slug: string;
                userId: number | null;
                position: number;
                locations: Prisma.JsonValue;
                offsetStart: number;
                profileId: number | null;
                teamId: number | null;
                useEventLevelSelectedCalendars: boolean;
                eventName: string | null;
                parentId: number | null;
                bookingFields: Prisma.JsonValue;
                timeZone: string | null;
                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;
                canSendCalVideoTranscriptionEmails: 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;
                allowReschedulingPastBookings: boolean;
                eventTypeColor: Prisma.JsonValue;
                rescheduleWithSameRoundRobinHost: boolean;
                secondaryEmailId: number | null;
            }[];
            logoUrl: string | null;
            isOrganization: boolean;
        };
        userId: number;
        teamId: number;
        disableImpersonation: boolean;
        accepted: boolean;
    }[]>;
    static findAllByUpIdIncludeTeam({ upId }: {
        upId: string;
    }, { where }?: {
        where?: Prisma.MembershipWhereInput;
    }): Promise<({
        team: {
            parent: {
                name: string;
                id: number;
                metadata: Prisma.JsonValue;
                slug: string | null;
                parentId: number | null;
                logoUrl: string | null;
            } | null;
        } & {
            name: string;
            id: number;
            metadata: Prisma.JsonValue;
            bio: string | null;
            theme: string | null;
            slug: string | null;
            parentId: number | null;
            timeZone: string;
            bookingLimits: 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;
        };
    } & {
        id: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        userId: number;
        teamId: number;
        disableImpersonation: boolean;
        accepted: boolean;
    })[]>;
    static findFirstByUserIdAndTeamId({ userId, teamId }: {
        userId: number;
        teamId: number;
    }): Promise<{
        id: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        userId: number;
        teamId: number;
        disableImpersonation: boolean;
        accepted: boolean;
    } | null>;
    static findByTeamIdForAvailability({ teamId }: {
        teamId: number;
    }): Promise<{
        user: 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;
            }[];
        };
        id: number;
        role: import('../../../prisma-client').$Enums.MembershipRole;
        userId: number;
        teamId: number;
        disableImpersonation: boolean;
        accepted: boolean;
    }[]>;
    static findMembershipsForBothOrgAndTeam({ orgId, teamId }: {
        orgId: number;
        teamId: number;
    }): Promise<{
        teamMemberships: {
            id: number;
            role: import('../../../prisma-client').$Enums.MembershipRole;
            userId: number;
            teamId: number;
            disableImpersonation: boolean;
            accepted: boolean;
        }[];
        orgMemberships: {
            id: number;
            role: import('../../../prisma-client').$Enums.MembershipRole;
            userId: number;
            teamId: number;
            disableImpersonation: boolean;
            accepted: boolean;
        }[];
    }>;
}
export {};
//# sourceMappingURL=membership.d.ts.map