import { Prisma } from '../../../prisma-client';
import type { RoutingFormResponsesInput } from './raw-data.schema';
import { type ResponseValue } from "../lib/types";
type RoutingFormInsightsTeamFilter = {
    userId?: number | null;
    teamId?: number | null;
    isAll: boolean;
    organizationId?: number | null;
    routingFormId?: string | null;
};
type RoutingFormResponsesFilter = RoutingFormResponsesInput & {
    organizationId: number | null;
};
declare class RoutingEventsInsights {
    private static getWhereForTeamOrAllTeams;
    static getRoutingFormStats({ teamId, startDate, endDate, isAll, organizationId, routingFormId, cursor, limit, userId, memberUserIds, columnFilters, sorting, }: RoutingFormResponsesFilter): Promise<{
        total: number;
        totalWithoutBooking: number;
        totalWithBooking: number;
    }>;
    static getRoutingFormsForFilters({ userId, teamId, isAll, organizationId, }: {
        userId: number;
        teamId?: number;
        isAll: boolean;
        organizationId?: number | undefined;
        routingFormId?: string | undefined;
    }): Promise<{
        id: string;
        name: string;
        _count: {
            responses: number;
        };
    }[]>;
    static getWhereClauseForRoutingFormResponses({ teamId, startDate, endDate, isAll, organizationId, routingFormId, userId, memberUserIds, columnFilters, }: RoutingFormResponsesFilter): Promise<Prisma.RoutingFormResponseWhereInput>;
    static getRoutingFormPaginatedResponses({ teamId, startDate, endDate, isAll, organizationId, routingFormId, cursor, limit, userId, memberUserIds, columnFilters, sorting, }: RoutingFormResponsesFilter): Promise<{
        total: number;
        data: (Omit<{
            id: number;
            bookingUid: string | null;
            response: Prisma.JsonValue;
            createdAt: Date;
            formId: string;
            formName: string;
            bookingStatus: import('../../../prisma-client').$Enums.BookingStatus | null;
            bookingStatusOrder: number | null;
            bookingCreatedAt: Date | null;
            bookingAttendees: Prisma.JsonValue;
            bookingUserId: number | null;
            bookingUserName: string | null;
            bookingUserEmail: string | null;
            bookingUserAvatarUrl: string | null;
            bookingAssignmentReason: string | null;
            bookingStartTime: Date | null;
            bookingEndTime: Date | null;
        }, "response" | "responseLowercase" | "bookingAttendees"> & {
            response: Record<string, ResponseValue>;
            responseLowercase: Record<string, ResponseValue>;
            bookingAttendees?: {
                name: string;
                email: string;
                timeZone: string;
            }[];
        })[];
        nextCursor: number | undefined;
    }>;
    static getRoutingFormPaginatedResponsesForDownload({ teamId, startDate, endDate, isAll, organizationId, routingFormId, cursor, limit, userId, memberUserIds, columnFilters, sorting, }: RoutingFormResponsesFilter): Promise<{
        data: {
            "Response ID": number;
            "Form Name": string;
            "Submitted At": string;
            "Has Booking": boolean;
            "Booking Status": string;
            "Booking Created At": string;
            "Booking Start Time": string;
            "Booking End Time": string;
            "Attendee Name": any;
            "Attendee Email": any;
            "Attendee Timezone": any;
            "Assignment Reason": string;
            "Routed To Name": string;
            "Routed To Email": string;
        }[];
        nextCursor: number | undefined;
    }>;
    static getRoutingFormFieldOptions({ userId, teamId, isAll, routingFormId, organizationId, }: RoutingFormInsightsTeamFilter): Promise<({
        label: string;
        type: string;
        id: string;
        identifier?: string | undefined;
        placeholder?: string | undefined;
        selectText?: string | undefined;
        required?: boolean | undefined;
        deleted?: boolean | undefined;
        options?: {
            label: string;
            id: string | null;
        }[] | undefined;
    } | {
        label: string;
        type: string;
        id: string;
        routerId: string;
        options?: {
            label: string;
            id: string | null;
        }[] | undefined;
        required?: boolean | undefined;
        identifier?: string | undefined;
        placeholder?: string | undefined;
        selectText?: string | undefined;
        deleted?: boolean | undefined;
    })[] | undefined>;
    static getFailedBookingsByRoutingFormGroup({ userId, teamId, isAll, routingFormId, organizationId, }: RoutingFormInsightsTeamFilter): Promise<Record<string, Record<string, {
        optionId: string;
        count: number;
        optionLabel: string;
    }[]>>>;
    static getRoutingFormHeaders({ userId, teamId, isAll, organizationId, routingFormId, }: RoutingFormInsightsTeamFilter): Promise<{
        id: string;
        label: string;
        type: string;
        options: {
            label: string;
            id: string | null;
        }[] | undefined;
    }[]>;
    static routedToPerPeriod({ userId, teamId, isAll, organizationId, routingFormId, startDate: _startDate, endDate: _endDate, period, cursor, userCursor, limit, searchQuery, }: RoutingFormInsightsTeamFilter & {
        period: "perDay" | "perWeek" | "perMonth";
        startDate: string;
        endDate: string;
        cursor?: string;
        userCursor?: number;
        limit?: number;
        searchQuery?: string;
    }): Promise<{
        users: {
            data: {
                performance: "above_average" | "at_average" | "below_average" | "median";
                totalBookings: number;
                id: number;
                name: string | null;
                email: string;
                avatarUrl: string | null;
            }[];
            nextCursor: number | undefined;
        };
        periodStats: {
            data: {
                userId: number;
                period_start: Date;
                total: number;
            }[];
            nextCursor: string | undefined;
        };
    }>;
    static routedToPerPeriodCsv({ userId, teamId, isAll, organizationId, routingFormId, startDate: _startDate, endDate: _endDate, period, searchQuery, }: RoutingFormInsightsTeamFilter & {
        period: "perDay" | "perWeek" | "perMonth";
        startDate: string;
        endDate: string;
        searchQuery?: string;
    }): Promise<{
        "User ID": string;
        Name: string;
        Email: string;
        "Total Bookings": string;
        Performance: "above_average" | "at_average" | "below_average" | "median";
    }[]>;
    static objectToCsv(data: Record<string, string>[]): string;
}
export { RoutingEventsInsights };
//# sourceMappingURL=routing-events.d.ts.map