import { AuthUser } from '../lib/rbac';
export type ReportFilters = {
    from?: string;
    to?: string;
    projectId?: string;
    clientId?: string;
    employeeId?: string;
    billingType?: string;
};
export declare function rowsToCsv(rows: Record<string, unknown>[]): string;
export declare function buildReportRows(type: string, user: AuthUser, f: ReportFilters): Promise<Record<string, unknown>[]>;
export declare function buildMyWork(user: AuthUser): Promise<{
    stats: ({
        label: string;
        value: string;
        danger?: undefined;
    } | {
        label: string;
        value: string;
        danger: boolean;
    })[];
    upcoming: {
        id: string;
        code: string;
        title: string;
        dueDate: string;
    }[];
    pending: {
        id: string;
        code: string;
        title: string;
        stage: "Done" | "Inbox" | "In Progress" | "Code Review & QA";
    }[];
    myTasks: {
        id: string;
        code: string;
        title: string;
        stage: "Done" | "Inbox" | "In Progress" | "Code Review & QA";
        dueDate: string | null;
        priority: number;
    }[];
    openBugs: {
        id: string;
        code: string;
        title: string;
        status: string;
    }[];
}>;
export declare function buildDashboard(user: AuthUser): Promise<{
    kind: "super_admin";
    stats: ({
        label: string;
        value: string;
        danger?: undefined;
    } | {
        label: string;
        value: string;
        danger: boolean;
    })[];
    byStage: Record<string, number>;
    workload: {
        name: string;
        role: "Super Admin" | "Project Admin" | "BA" | "Developer" | "Tester / QA";
        hours: number;
        hoursLabel: string;
    }[];
    activities: {
        at: string;
        user: string;
        action: string;
        details: string;
    }[];
    projects?: undefined;
} | {
    kind: "project_admin";
    projects: {
        id: string;
        name: string;
        code: string;
        stats: ({
            label: string;
            value: string;
            danger?: undefined;
        } | {
            label: string;
            value: string;
            danger: boolean;
        })[];
        members: {
            name: string;
            hoursLabel: string;
        }[];
    }[];
    stats?: undefined;
    byStage?: undefined;
    workload?: undefined;
    activities?: undefined;
} | {
    stats: ({
        label: string;
        value: string;
        danger?: undefined;
    } | {
        label: string;
        value: string;
        danger: boolean;
    })[];
    upcoming: {
        id: string;
        code: string;
        title: string;
        dueDate: string;
    }[];
    pending: {
        id: string;
        code: string;
        title: string;
        stage: "Done" | "Inbox" | "In Progress" | "Code Review & QA";
    }[];
    myTasks: {
        id: string;
        code: string;
        title: string;
        stage: "Done" | "Inbox" | "In Progress" | "Code Review & QA";
        dueDate: string | null;
        priority: number;
    }[];
    openBugs: {
        id: string;
        code: string;
        title: string;
        status: string;
    }[];
    kind: "my_work";
    byStage?: undefined;
    workload?: undefined;
    activities?: undefined;
    projects?: undefined;
}>;
type DeadlineItem = {
    itemType: 'task' | 'subtask' | 'bug';
    id: string;
    code: string;
    title: string;
    stage: string;
    internalStatus: string;
    priority: number;
    severity?: string;
    dueDate: string;
    assigneeId: string | null;
    assigneeName: string;
    parentId?: string | null;
    parentCode?: string;
    blocking?: boolean;
    released?: boolean;
    href: string;
};
/** Project-level upcoming / overdue deadlines: tasks, subtasks, and open bugs. */
export declare function buildDeadlineTracking(user: AuthUser): Promise<{
    asOf: string;
    projects: ({
        id: string;
        code: string;
        name: string;
        clientId: string | null;
        status: import(".prisma/client").$Enums.ProjectStatus;
        endDate: string | null;
        nextDeadline: string | null;
        stats: {
            overdue: number;
            upcoming: number;
            total: number;
            tasks: number;
            subtasks: number;
            bugs: number;
        };
        deadlines: {
            date: string;
            label: string;
            kind: string;
            items: DeadlineItem[];
            tasks: DeadlineItem[];
        }[];
    } | null)[];
}>;
export {};
