import type { Prisma } from '../../../prisma-client';
import { z } from "zod";
import type { readonlyPrisma } from '../../../prisma';
type BuildBaseWhereConditionCtxType = {
    userIsOwnerAdminOfParentTeam: boolean;
    userOrganizationId: number | null;
    insightsDb: typeof readonlyPrisma;
};
interface BuildBaseWhereConditionType {
    teamId?: number | null;
    eventTypeId?: number;
    memberUserId?: number;
    userId?: number;
    isAll?: boolean;
    ctx: BuildBaseWhereConditionCtxType;
}
export declare const buildBaseWhereCondition: ({ teamId, eventTypeId, memberUserId, userId, isAll, ctx, }: BuildBaseWhereConditionType) => Promise<{
    whereCondition: Prisma.BookingTimeStatusDenormalizedWhereInput;
}>;
export interface IResultTeamList {
    id: number;
    slug: string | null;
    name: string | null;
    logoUrl: string | null;
    userId?: number;
    isOrg?: boolean;
}
export declare const insightsRouter: import("@trpc/server/dist/unstable-core-do-not-import").CreateRouterInner<import("@trpc/server/dist/unstable-core-do-not-import").RootConfig<{
    ctx: import('../../../trpc/server/createContext').InnerContext;
    meta: object;
    errorShape: {
        message: string;
        code: number;
        data: {
            code: string;
            httpStatus: number;
            path?: string;
            [key: string]: unknown;
        };
    };
    transformer: {
        stringify: (object: any) => string;
        parse: <T = unknown>(string: string) => T;
        serialize: (object: any) => import("superjson/dist/types").SuperJSONResult;
        deserialize: <T_1 = unknown>(payload: import("superjson/dist/types").SuperJSONResult) => T_1;
        registerClass: (v: import("superjson/dist/types").Class, options?: string | import("superjson/dist/class-registry").RegisterOptions | undefined) => void;
        registerSymbol: (v: Symbol, identifier?: string | undefined) => void;
        registerCustom: <I, O extends import("superjson/dist/types").JSONValue>(transformer: Omit<import("superjson/dist/custom-transformer-registry").CustomTransfomer<I, O>, "name">, name: string) => void;
        allowErrorProps: (...props: string[]) => void;
    };
}>, {
    eventsByStatus: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            empty: boolean;
            created: {
                count: number;
                deltaPrevious: number;
            };
            completed: {
                count: number;
                deltaPrevious: number;
            };
            rescheduled: {
                count: number;
                deltaPrevious: number;
            };
            cancelled: {
                count: number;
                deltaPrevious: number;
            };
            rating: {
                count: number;
                deltaPrevious: number;
            };
            no_show: {
                count: number;
                deltaPrevious: number;
            };
            no_show_guest: {
                count: number;
                deltaPrevious: number;
            };
            csat: {
                count: number;
                deltaPrevious: number;
            };
            previousRange: {
                startDate: string;
                endDate: string;
            };
        };
    }>;
    eventsTimeline: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            Month: string;
            Created: number;
            Completed: number;
            Rescheduled: number;
            Cancelled: number;
            "No-Show (Host)": number;
            "No-Show (Guest)": number;
        }[];
    }>;
    popularEventTypes: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: ({
            eventTypeId?: undefined;
            eventTypeName?: undefined;
            count?: undefined;
        } | {
            eventTypeId: number | null;
            eventTypeName: string;
            count: number;
        })[];
    }>;
    averageEventDuration: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            Date: string;
            Average: number;
        }[];
    }>;
    membersWithMostCancelledBookings: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            userId: number | null;
            user: Omit<{
                name: string | null;
                id: number;
                username: string | null;
                email: string;
                avatarUrl: string | null;
            }, "avatarUrl"> & {
                avatarUrl: string;
            };
            emailMd5: string;
            count: number;
        }[];
    }>;
    membersWithMostBookings: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            userId: number | null;
            user: Omit<{
                name: string | null;
                id: number;
                username: string | null;
                email: string;
                avatarUrl: string | null;
            }, "avatarUrl"> & {
                avatarUrl: string;
            };
            emailMd5: string;
            count: number;
        }[];
    }>;
    membersWithLeastBookings: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            userId: number | null;
            user: Omit<{
                name: string | null;
                id: number;
                username: string | null;
                email: string;
                avatarUrl: string | null;
            }, "avatarUrl"> & {
                avatarUrl: string;
            };
            emailMd5: string;
            count: number;
        }[];
    }>;
    teamListForUser: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: void;
        output: IResultTeamList[];
    }>;
    userList: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            isAll: boolean | null;
            teamId?: number | undefined;
        };
        output: {
            name: string | null;
            id: number;
            username: string | null;
            email: string;
            avatarUrl: string | null;
        }[];
    }>;
    eventTypeList: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            isAll?: boolean | undefined;
        };
        output: {
            id: number;
            title: string;
            team: {
                name: string;
            } | null;
            slug: string;
            teamId: number | null;
        }[];
    }>;
    recentRatings: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            userId: number | null;
            user: Omit<{
                name: string | null;
                id: number;
                username: string | null;
                email: string;
                avatarUrl: string | null;
            }, "avatarUrl"> & {
                avatarUrl: string;
            };
            emailMd5: string;
            rating: number | null;
            feedback: string | null;
        }[];
    }>;
    membersWithMostNoShow: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            userId: number | null;
            user: Omit<{
                name: string | null;
                id: number;
                username: string | null;
                email: string;
                avatarUrl: string | null;
            }, "avatarUrl"> & {
                avatarUrl: string;
            };
            emailMd5: string;
            count: number;
        }[];
    }>;
    membersWithHighestRatings: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            userId: number | null;
            user: Omit<{
                name: string | null;
                id: number;
                username: string | null;
                email: string;
                avatarUrl: string | null;
            }, "avatarUrl"> & {
                avatarUrl: string;
            };
            emailMd5: string;
            averageRating: number | null;
        }[];
    }>;
    membersWithLowestRatings: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            userId: number | null;
            user: Omit<{
                name: string | null;
                id: number;
                username: string | null;
                email: string;
                avatarUrl: string | null;
            }, "avatarUrl"> & {
                avatarUrl: string;
            };
            emailMd5: string;
            averageRating: number | null;
        }[];
    }>;
    rawData: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            teamId?: number | null | undefined;
            userId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            eventTypeId?: number | null | undefined;
            offset?: number | undefined;
            limit?: number | undefined;
        };
        output: {
            data: {
                id: number;
                title: string;
                paid: boolean;
                rating: number | null;
                uid: string;
                eventTypeId: number | null;
                startTime: Date;
                endTime: Date;
                createdAt: Date;
                ratingFeedback: string | null;
                noShowHost: boolean | null;
                eventLength: number | null;
                userEmail: string | null;
                userUsername: string | null;
                timeStatus: string | null;
            }[];
            total: number;
        };
    }>;
    getRoutingFormsForFilters: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            isAll: boolean;
            userId?: number | undefined;
            teamId?: number | undefined;
        };
        output: {
            name: string;
            id: string;
            _count: {
                responses: number;
            };
        }[];
    }>;
    routingFormsByStatus: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            isAll: boolean;
            columnFilters: {
                id: string;
                value: {
                    data: string | number;
                    type: import("../../data-table").ColumnFilterType.SINGLE_SELECT;
                } | {
                    data: (string | number)[];
                    type: import("../../data-table").ColumnFilterType.MULTI_SELECT;
                } | {
                    data: {
                        operator: "endsWith" | "startsWith" | "equals" | "contains" | "notEquals" | "notContains" | "isEmpty" | "isNotEmpty";
                        operand: string;
                    };
                    type: import("../../data-table").ColumnFilterType.TEXT;
                } | {
                    data: {
                        operator: "lt" | "lte" | "gt" | "gte" | "eq" | "neq";
                        operand: number;
                    };
                    type: import("../../data-table").ColumnFilterType.NUMBER;
                } | {
                    data: {
                        preset: string;
                        startDate: string | null;
                        endDate: string | null;
                    };
                    type: import("../../data-table").ColumnFilterType.DATE_RANGE;
                };
            }[];
            teamId?: number | undefined;
            userId?: number | undefined;
            memberUserIds?: number[] | undefined;
            routingFormId?: string | undefined;
            sorting?: {
                id: string;
                desc: boolean;
            }[] | undefined;
        };
        output: {
            total: number;
            totalWithoutBooking: number;
            totalWithBooking: number;
        } | null;
    }>;
    routingFormResponses: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            isAll: boolean;
            columnFilters: {
                id: string;
                value: {
                    data: string | number;
                    type: import("../../data-table").ColumnFilterType.SINGLE_SELECT;
                } | {
                    data: (string | number)[];
                    type: import("../../data-table").ColumnFilterType.MULTI_SELECT;
                } | {
                    data: {
                        operator: "endsWith" | "startsWith" | "equals" | "contains" | "notEquals" | "notContains" | "isEmpty" | "isNotEmpty";
                        operand: string;
                    };
                    type: import("../../data-table").ColumnFilterType.TEXT;
                } | {
                    data: {
                        operator: "lt" | "lte" | "gt" | "gte" | "eq" | "neq";
                        operand: number;
                    };
                    type: import("../../data-table").ColumnFilterType.NUMBER;
                } | {
                    data: {
                        preset: string;
                        startDate: string | null;
                        endDate: string | null;
                    };
                    type: import("../../data-table").ColumnFilterType.DATE_RANGE;
                };
            }[];
            offset?: number | undefined;
            limit?: number | undefined;
            teamId?: number | undefined;
            userId?: number | undefined;
            memberUserIds?: number[] | undefined;
            routingFormId?: string | undefined;
            sorting?: {
                id: string;
                desc: boolean;
            }[] | undefined;
        };
        output: {
            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;
                bookingStartTime: Date | null;
                bookingEndTime: Date | null;
                bookingUserId: number | null;
                bookingUserName: string | null;
                bookingUserEmail: string | null;
                bookingUserAvatarUrl: string | null;
                bookingAssignmentReason: string | null;
                bookingAttendees: Prisma.JsonValue;
            }, "response" | "responseLowercase" | "bookingAttendees"> & {
                response: Record<string, import("../lib/types").ResponseValue>;
                responseLowercase: Record<string, import("../lib/types").ResponseValue>;
                bookingAttendees?: {
                    name: string;
                    email: string;
                    timeZone: string;
                }[];
            })[];
        };
    }>;
    routingFormResponsesForDownload: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            isAll: boolean;
            columnFilters: {
                id: string;
                value: {
                    data: string | number;
                    type: import("../../data-table").ColumnFilterType.SINGLE_SELECT;
                } | {
                    data: (string | number)[];
                    type: import("../../data-table").ColumnFilterType.MULTI_SELECT;
                } | {
                    data: {
                        operator: "endsWith" | "startsWith" | "equals" | "contains" | "notEquals" | "notContains" | "isEmpty" | "isNotEmpty";
                        operand: string;
                    };
                    type: import("../../data-table").ColumnFilterType.TEXT;
                } | {
                    data: {
                        operator: "lt" | "lte" | "gt" | "gte" | "eq" | "neq";
                        operand: number;
                    };
                    type: import("../../data-table").ColumnFilterType.NUMBER;
                } | {
                    data: {
                        preset: string;
                        startDate: string | null;
                        endDate: string | null;
                    };
                    type: import("../../data-table").ColumnFilterType.DATE_RANGE;
                };
            }[];
            offset?: number | undefined;
            limit?: number | undefined;
            teamId?: number | undefined;
            userId?: number | undefined;
            memberUserIds?: number[] | undefined;
            routingFormId?: string | undefined;
            sorting?: {
                id: string;
                desc: boolean;
            }[] | undefined;
        };
        output: {
            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;
        };
    }>;
    getRoutingFormFieldOptions: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            isAll: boolean;
            userId?: number | undefined;
            teamId?: number | undefined;
            routingFormId?: string | undefined;
        };
        output: ({
            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;
    }>;
    failedBookingsByField: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            isAll: boolean;
            userId?: number | undefined;
            teamId?: number | undefined;
            routingFormId?: string | undefined;
        };
        output: Record<string, Record<string, {
            optionId: string;
            count: number;
            optionLabel: string;
        }[]>>;
    }>;
    routingFormResponsesHeaders: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            isAll: boolean;
            userId?: number | undefined;
            teamId?: number | undefined;
            routingFormId?: string | undefined;
        };
        output: {
            id: string;
            label: string;
            type: string;
            options: {
                id: string | null;
                label: string;
            }[] | undefined;
        }[];
    }>;
    routedToPerPeriod: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            period: "perDay" | "perWeek" | "perMonth";
            offset?: number | undefined;
            userId?: number | null | undefined;
            eventTypeId?: number | null | undefined;
            teamId?: number | null | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            cursor?: {
                userCursor?: number | undefined;
                periodCursor?: string | undefined;
            } | undefined;
            routingFormId?: string | undefined;
            limit?: number | undefined;
            searchQuery?: string | undefined;
        };
        output: {
            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;
            };
        };
    }>;
    routedToPerPeriodCsv: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: {
            startDate: string;
            endDate: string;
            period: "perDay" | "perWeek" | "perMonth";
            offset?: number | undefined;
            userId?: number | null | undefined;
            eventTypeId?: number | null | undefined;
            teamId?: number | null | undefined;
            limit?: number | undefined;
            memberUserId?: number | null | undefined;
            isAll?: boolean | undefined;
            searchQuery?: string | undefined;
            routingFormId?: string | undefined;
        };
        output: {
            data: string;
            filename: string;
        };
    }>;
    getUserRelevantTeamRoutingForms: import("@trpc/server/dist/unstable-core-do-not-import").QueryProcedure<{
        input: void;
        output: (Omit<{
            id: string;
            description: string | null;
            position: number;
            routes: {
                [key: string]: any;
            } | null;
            createdAt: Date;
            updatedAt: Date;
            name: string;
            fields: {
                [key: string]: any;
            } | null;
            userId: number;
            teamId: number | null;
            disabled: boolean;
            settings: {
                [key: string]: any;
            } | null;
            updatedById: number | null;
        }, "settings" | "fields" | "routes" | "createdAt" | "updatedAt"> & {
            routes: import('../../../app-store/routing-forms/types/types').Routes;
            fields: import('../../../app-store/routing-forms/types/types').Fields;
            settings: z.TypeOf<typeof import('../../../prisma/zod-utils').RoutingFormSettings>;
            createdAt: string;
            updatedAt: string;
            connectedForms: {
                name: string;
                description: string | null;
                id: string;
            }[];
            routers: {
                name: string;
                description: string | null;
                id: string;
            }[];
            teamMembers: import('../../../app-store/routing-forms/types/types').SerializableFormTeamMembers[];
        })[];
    }>;
}>;
export {};
//# sourceMappingURL=trpc-router.d.ts.map