Files
url_tracker_tool/apps/api/dist/middleware/rate-limit.middleware.d.ts
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

25 lines
2.2 KiB
TypeScript

import { Response, NextFunction } from 'express';
import { AuthenticatedRequest } from './auth.middleware';
export interface RateLimitMiddlewareOptions {
type: 'tracking' | 'bulk' | 'export' | 'legacy';
keyGenerator?: (req: AuthenticatedRequest) => string;
skipSuccessfulRequests?: boolean;
skipFailedRequests?: boolean;
onLimitReached?: (req: AuthenticatedRequest, res: Response) => void;
}
export declare function createRateLimitMiddleware(options: RateLimitMiddlewareOptions): (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>>>;
export declare function organizationKeyGenerator(req: AuthenticatedRequest): string;
export declare function projectKeyGenerator(req: AuthenticatedRequest): string;
export declare function addRateLimitStatus(type: 'tracking' | 'bulk' | 'export' | 'legacy'): (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<void>;
export declare const legacyRateLimit: (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>>>;
export declare const trackingRateLimit: (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>>>;
export declare const bulkRateLimit: (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>>>;
export declare const exportRateLimit: (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>>>;
export declare const orgTrackingRateLimit: (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>>>;
export declare const projectTrackingRateLimit: (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>>>;
export declare function requestLogger(options?: {
includeBody?: boolean;
redactionLevel?: 'full' | 'partial';
}): (req: AuthenticatedRequest, res: Response, next: NextFunction) => void;
export declare function rateLimitErrorHandler(error: Error, req: AuthenticatedRequest, res: Response, next: NextFunction): Response<any, Record<string, any>>;
//# sourceMappingURL=rate-limit.middleware.d.ts.map