import type { ApiContext } from './_shared';
export interface SessionDto {
    id: string;
    loginAt: string;
    logoutAt: string | null;
    ipAddress: string | null;
    userAgent: string | null;
    deviceFingerprint: string | null;
    deviceType: 'Unknown' | 'Desktop' | 'Mobile' | 'Tablet';
    country: string | null;
    city: string | null;
    isActive: boolean;
    duration: string | null;
}
export interface UserSessionsDto {
    activeSessions: SessionDto[];
    history: SessionDto[];
}
export interface LoginDayStats {
    date: string;
    successful: number;
    failed: number;
}
export interface DeviceStats {
    device: string;
    count: number;
}
export interface LocationStats {
    location: string;
    count: number;
}
export interface UserActivityDto {
    totalSuccessfulLogins: number;
    totalFailedLogins: number;
    lastSuccessfulLoginAt: string | null;
    lastSuccessfulLoginIp: string | null;
    lastFailedLoginAt: string | null;
    lastFailedLoginIp: string | null;
    lastFailedLoginReason: string | null;
    loginsByDay: LoginDayStats[];
    deviceStats: DeviceStats[];
    locationStats: LocationStats[];
}
export interface UserDashboardOverviewDto {
    totalUsers: number;
    activeUsers: number;
    inactiveUsers: number;
    newUsers: number;
    totalSessions: number;
    failedLogins: number;
    usersLoggedInRecently: number;
    totalRoles: number;
    totalPermissions: number;
}
export interface UserStatusCountDto {
    status: string;
    count: number;
}
export interface UserRoleDistributionDto {
    roleName: string;
    count: number;
}
export interface UserTypeDistributionDto {
    userType: string;
    count: number;
}
export interface LoginActivityStatsDto {
    totalSuccessful: number;
    totalFailed: number;
    byDay: LoginDayActivityDto[];
}
export interface LoginDayActivityDto {
    date: string;
    successful: number;
    failed: number;
}
export interface UserTrendDto {
    date: string;
    newUsers: number;
    logins: number;
}
export interface RecentUserDto {
    id: string;
    email: string;
    fullName: string;
    createdAt: string;
    lastLoginAt: string | null;
    isActive: boolean;
    userType: string;
}
export interface SecurityAlertDto {
    userId: string;
    email: string;
    fullName: string;
    failedAttempts: number;
    lastAttemptAt: string;
    ipAddresses: string[];
}
export interface ActiveSessionsStatsDto {
    totalActiveSessions: number;
    byBrowser: BrowserStatsDto[];
    byCountry: CountryStatsDto[];
}
export interface BrowserStatsDto {
    browser: string;
    count: number;
}
export interface CountryStatsDto {
    country: string;
    count: number;
}
export interface LatestActiveSessionDto {
    userId: string;
    fullName: string;
    duration: string;
    loginAt: string;
}
export declare const createDashboardApi: (apiContext: ApiContext) => {
    getOverview: (days?: number, config?: {
        signal?: AbortSignal;
    }) => Promise<UserDashboardOverviewDto>;
    getByStatus: (config?: {
        signal?: AbortSignal;
    }) => Promise<UserStatusCountDto[]>;
    getByRole: (config?: {
        signal?: AbortSignal;
    }) => Promise<UserRoleDistributionDto[]>;
    getByType: (config?: {
        signal?: AbortSignal;
    }) => Promise<UserTypeDistributionDto[]>;
    getLoginActivity: (days?: number, config?: {
        signal?: AbortSignal;
    }) => Promise<LoginActivityStatsDto>;
    getTrends: (days?: number, config?: {
        signal?: AbortSignal;
    }) => Promise<UserTrendDto[]>;
    getRecentUsers: (limit?: number, config?: {
        signal?: AbortSignal;
    }) => Promise<RecentUserDto[]>;
    getSecurityAlerts: (threshold?: number, hours?: number, config?: {
        signal?: AbortSignal;
    }) => Promise<SecurityAlertDto[]>;
    getActiveSessions: (config?: {
        signal?: AbortSignal;
    }) => Promise<ActiveSessionsStatsDto>;
    getLatestActiveSessions: (limit?: number, config?: {
        signal?: AbortSignal;
    }) => Promise<LatestActiveSessionDto[]>;
};
//# sourceMappingURL=dashboard.d.ts.map