@seckav/security-sdk
Version:
SecKav Security SDK - Enterprise-grade security platform with AI-powered threat detection, LLM-powered misconfiguration scanning (Gemini/GPT-4/Claude), end-to-end encryption, behavioral analysis, enhanced file scanning, adaptive rate limiting, GDPR/DPDP/C
72 lines • 2.28 kB
TypeScript
import { AnalyticsResult } from '../types/common';
export interface AnalyticsModuleConfig {
apiUrl: string;
timeout?: number;
onError?: (error: any) => void;
}
/**
* Analytics Module for SecKav SDK
* Handles real-time metrics, analytics, geo-distribution, and threat analysis
*/
export declare class AnalyticsModule {
private config;
constructor(config: AnalyticsModuleConfig);
/**
* Get real-time metrics
*/
getRealTimeMetrics(token: string): Promise<AnalyticsResult>;
/**
* Get comprehensive analytics
*/
getAnalytics(token: string, timeframe?: '1h' | '24h' | '7d' | '30d'): Promise<AnalyticsResult>;
/**
* Get geo-distribution analytics
*/
getGeoDistribution(token: string, timeframe?: '1h' | '24h' | '7d' | '30d'): Promise<AnalyticsResult>;
/**
* Get request statistics
*/
getRequestStats(token: string, timeframe?: '1h' | '24h' | '7d' | '30d'): Promise<AnalyticsResult>;
/**
* Get top endpoints
*/
getTopEndpoints(token: string, timeframe?: '1h' | '24h' | '7d' | '30d'): Promise<AnalyticsResult>;
/**
* Get threat analysis
*/
getThreatAnalysis(token: string, timeframe?: '1h' | '24h' | '7d' | '30d'): Promise<AnalyticsResult>;
/**
* Get dashboard summary
*/
getDashboardSummary(token: string, timeframe?: '1h' | '24h' | '7d' | '30d'): Promise<AnalyticsResult>;
/**
* Track custom event
*/
trackEvent(token: string, eventData: {
ipAddress: string;
endpoint: string;
method: string;
userAgent?: string;
apiKey?: string;
blocked?: boolean;
blockReason?: string;
}): Promise<AnalyticsResult>;
/**
* Get analytics for specific date range
*/
getAnalyticsForDateRange(token: string, startDate: string, endDate: string): Promise<AnalyticsResult>;
/**
* Export analytics data
*/
exportAnalytics(token: string, format?: 'json' | 'csv' | 'xlsx', timeframe?: '1h' | '24h' | '7d' | '30d'): Promise<AnalyticsResult>;
/**
* Get module information
*/
getInfo(): {
name: string;
version: string;
description: string;
apiUrl: string;
};
}
//# sourceMappingURL=Analytics.d.ts.map