import { Prisma } from '../../../prisma-client';
import type { RoutingFormResponsesInput, RoutingFormStatsInput } 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 RoutingFormStatsFilter = RoutingFormStatsInput & {
    organizationId: number | null;
};
type RoutingFormResponsesFilter = RoutingFormResponsesInput & {
    organizationId: number | null;
};
declare class RoutingEventsInsights {
    private static getWhereForTeamOrAllTeams;
    static getRoutingFormStats({ teamId, startDate, endDate, isAll, organizationId, routingFormId, userId, memberUserIds, columnFilters, sorting, }: RoutingFormStatsFilter): 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<{
        name: string;
        id: 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, limit, offset, userId, memberUserIds, columnFilters, sorting, }: RoutingFormResponsesFilter): Promise<{
        total: number;
        data: (Omit<{
            id: number;
            response: Prisma.JsonValue;
            createdAt: Date;
            bookingUid: string | null;
            utm_source: string | null;
            utm_medium: string | null;
            utm_campaign: string | null;
            utm_term: string | null;
            utm_content: string | null;
            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;
            }[];
        })[];
    }>;
    static getRoutingFormPaginatedResponsesForDownload({ teamId, startDate, endDate, isAll, organizationId, routingFormId, limit, offset, userId, memberUserIds, columnFilters, sorting, }: RoutingFormResponsesFilter): Promise<{
        data: {
            utm_source: string;
            utm_medium: string;
            utm_campaign: string;
            utm_term: string;
            utm_content: string;
            "Booking UID": string | null;
            "Booking Link": string;
            "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;
        }[];
        total: number;
    }>;
    static getRoutingFormFieldOptions({ userId, teamId, isAll, routingFormId, organizationId, }: RoutingFormInsightsTeamFilter): Promise<({
        id: string;
        type: string;
        label: string;
        identifier?: string | undefined;
        placeholder?: string | undefined;
        selectText?: string | undefined;
        required?: boolean | undefined;
        deleted?: boolean | undefined;
        options?: {
            id: string | null;
            label: string;
        }[] | undefined;
    } | {
        id: string;
        type: string;
        label: string;
        routerId: string;
        required?: boolean | undefined;
        placeholder?: string | undefined;
        options?: {
            id: string | null;
            label: string;
        }[] | undefined;
        identifier?: 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: {
            id: string | null;
            label: string;
        }[] | 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