@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
165 lines • 3.87 kB
TypeScript
export interface SecKavConfig {
apiUrl: string;
organizationId: string;
apiKey?: string;
jwtToken?: string;
timeout?: number;
features?: {
rateLimit?: boolean;
authentication?: boolean;
organizationManagement?: boolean;
security?: boolean;
analytics?: boolean;
enhancedSecurity?: boolean;
apiFirewall?: boolean;
threatDetection?: boolean;
securityScanning?: boolean;
complianceReporting?: boolean;
gitIntegration?: boolean;
encryption?: boolean;
misconfigurationScanning?: boolean;
};
onError?: (error: any) => void;
debug?: boolean;
}
export interface RateLimitResult {
allowed: boolean;
headers?: Record<string, string>;
retryAfter?: number;
policy?: {
name: string;
limit: number;
window: number;
};
error?: string;
message?: string;
action?: {
type: string;
endpoint?: string;
method?: string;
dashboardUrl?: string;
};
}
export interface AuthResult {
success: boolean;
user?: {
id: string;
email: string;
displayName: string;
role: string;
organizationId?: string;
};
token?: string;
error?: string;
message?: string;
}
export interface ApiKeyResult {
success: boolean;
apiKey?: string;
apiKeys?: Array<{
name: string;
createdAt: string;
}>;
error?: string;
message?: string;
}
export interface OrganizationResult {
success: boolean;
organization?: {
id: string;
name: string;
owner: any;
members: any[];
settings: any;
};
organizations?: any[];
error?: string;
message?: string;
}
export interface SecurityResult {
success: boolean;
settings?: {
security: any;
alerts: any;
};
events?: any[];
data?: any;
error?: string;
message?: string;
}
export interface AnalyticsResult {
success: boolean;
metrics?: {
currentRPS: number;
avgResponseTime: number;
activeConnections: number;
rateLimitHits: number;
securityBlocks: number;
topCountries: any[];
suspiciousActivity: number;
};
analytics?: {
requestStats: any;
geoDistribution: any[];
topEndpoints: any[];
threatAnalysis: any;
timelineData: any[];
};
geoDistribution?: any[];
error?: string;
message?: string;
}
export interface SecKavFeatureInfo {
name: string;
version: string;
enabled: boolean;
description: string;
}
export interface SecuritySettings {
userAgentFiltering?: {
enabled: boolean;
blockedPatterns: string[];
allowedPatterns: string[];
blockUnknownAgents: boolean;
};
basicAuthDetection?: {
enabled: boolean;
blockBasicAuth: boolean;
logBasicAuthAttempts: boolean;
};
geoLocation?: {
enabled: boolean;
blockedCountries: string[];
allowedCountries: string[];
logLocationData: boolean;
};
ipWhitelist?: string[];
ipBlacklist?: string[];
}
export interface AlertSettings {
email?: {
enabled: boolean;
recipients: string[];
thresholds: {
rateLimitViolations: number;
suspiciousActivity: number;
securityIncidents: number;
};
};
slack?: {
enabled: boolean;
channel: string;
thresholds: {
rateLimitViolations: number;
suspiciousActivity: number;
securityIncidents: number;
};
};
webhooks?: {
enabled: boolean;
urls: string[];
events: string[];
retryAttempts: number;
};
}
//# sourceMappingURL=common.d.ts.map