import * as plugins from '../plugins.js';
import * as authInterfaces from '../data/auth.js';
import * as statsInterfaces from '../data/stats.js';
export interface IReq_GetServerStatistics extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetServerStatistics> {
    method: 'getServerStatistics';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        includeHistory?: boolean;
        timeRange?: '1h' | '6h' | '24h' | '7d' | '30d';
    };
    response: {
        stats: statsInterfaces.IServerStats;
        history?: Array<{
            timestamp: number;
            value: number;
        }>;
    };
}
export interface IReq_GetEmailStatistics extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetEmailStatistics> {
    method: 'getEmailStatistics';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        timeRange?: '1h' | '6h' | '24h' | '7d' | '30d';
        domain?: string;
        includeDetails?: boolean;
    };
    response: {
        stats: statsInterfaces.IEmailStats;
        domainBreakdown?: {
            [domain: string]: statsInterfaces.IEmailStats;
        };
    };
}
export interface IReq_GetDnsStatistics extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetDnsStatistics> {
    method: 'getDnsStatistics';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        timeRange?: '1h' | '6h' | '24h' | '7d' | '30d';
        domain?: string;
        includeQueryTypes?: boolean;
    };
    response: {
        stats: statsInterfaces.IDnsStats;
        domainBreakdown?: {
            [domain: string]: statsInterfaces.IDnsStats;
        };
    };
}
export interface IReq_GetRateLimitStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetRateLimitStatus> {
    method: 'getRateLimitStatus';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        domain?: string;
        ip?: string;
        includeBlocked?: boolean;
    };
    response: {
        limits: statsInterfaces.IRateLimitInfo[];
        globalLimit?: {
            current: number;
            limit: number;
            remaining: number;
        };
    };
}
export interface IReq_GetSecurityMetrics extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetSecurityMetrics> {
    method: 'getSecurityMetrics';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        timeRange?: '1h' | '6h' | '24h' | '7d' | '30d';
        includeDetails?: boolean;
    };
    response: {
        metrics: statsInterfaces.ISecurityMetrics;
        trends?: {
            spam: Array<{
                timestamp: number;
                value: number;
            }>;
            malware: Array<{
                timestamp: number;
                value: number;
            }>;
            phishing: Array<{
                timestamp: number;
                value: number;
            }>;
        };
    };
}
export interface IReq_GetActiveConnections extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetActiveConnections> {
    method: 'getActiveConnections';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        protocol?: 'smtp' | 'smtps' | 'http' | 'https';
        state?: string;
    };
    response: {
        connections: statsInterfaces.IConnectionInfo[];
        summary: {
            total: number;
            byProtocol: {
                [protocol: string]: number;
            };
            byState: {
                [state: string]: number;
            };
        };
    };
}
export interface IReq_GetQueueStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetQueueStatus> {
    method: 'getQueueStatus';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        queueName?: string;
    };
    response: {
        queues: statsInterfaces.IQueueStatus[];
        totalItems: number;
    };
}
export interface IReq_GetHealthStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetHealthStatus> {
    method: 'getHealthStatus';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
        detailed?: boolean;
    };
    response: {
        health: statsInterfaces.IHealthStatus;
    };
}
export interface IReq_GetNetworkStats extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetNetworkStats> {
    method: 'getNetworkStats';
    request: {
        identity?: authInterfaces.IIdentity;
        apiToken?: string;
    };
    response: {
        connectionsByIP: Array<{
            ip: string;
            count: number;
        }>;
        throughputRate: {
            bytesInPerSecond: number;
            bytesOutPerSecond: number;
        };
        topIPs: Array<{
            ip: string;
            count: number;
        }>;
        totalDataTransferred: {
            bytesIn: number;
            bytesOut: number;
        };
        throughputHistory: Array<{
            timestamp: number;
            in: number;
            out: number;
        }>;
        throughputByIP: Array<{
            ip: string;
            in: number;
            out: number;
        }>;
        requestsPerSecond: number;
        requestsTotal: number;
        backends?: statsInterfaces.IBackendInfo[];
        topIPsByBandwidth: Array<{
            ip: string;
            count: number;
            bwIn: number;
            bwOut: number;
        }>;
        topASNs: statsInterfaces.IAsnActivity[];
        domainActivity: statsInterfaces.IDomainActivity[];
        frontendProtocols?: statsInterfaces.IProtocolDistribution | null;
        backendProtocols?: statsInterfaces.IProtocolDistribution | null;
    };
}
