@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
26 lines • 965 B
TypeScript
export interface RateLimitConfig {
apiUrl: string;
organizationId: string;
apiKey: string;
timeout?: number;
onError?: (error: any) => void;
}
export interface RateLimitResult {
allowed: boolean;
rateLimitHit: boolean;
error?: string;
message?: string;
retryAfter?: number;
policy?: any;
current?: any;
headers?: Record<string, string>;
action?: any;
}
export declare class RateLimitSDK {
private config;
constructor(config: RateLimitConfig);
checkRateLimit(endpoint: string, method: string, clientId?: string, userAgent?: string, ipAddress?: string): Promise<RateLimitResult>;
}
export declare function createRateLimitMiddleware(config: RateLimitConfig): (req: any, res: any, next: any) => Promise<any>;
export declare function createNextRateLimitMiddleware(config: RateLimitConfig): (req: any) => Promise<import("undici-types").Response | null>;
//# sourceMappingURL=rateLimitMiddleware.d.ts.map