web / lib/constants/rate-limits
lib/constants/rate-limits
Rate limit configuration constants for different endpoints.
Defines per-endpoint rate limiting windows (burst, hourly, daily) used by RateLimitService to enforce request limits.
Interfaces
RateLimitWindow
Configuration for a single rate limit window.
Properties
limit
limit:
number
Maximum number of requests allowed in this window
windowMs
windowMs:
number
Time window in milliseconds
name?
optionalname:string
Optional name for this window (e.g., “burst”, “hourly”, “daily”)
RateLimitConfig
Configuration for multi-window rate limiting.
Properties
windows
windows: readonly
RateLimitWindow[] |RateLimitWindow[]
Type Aliases
RateLimitName
RateLimitName = keyof typeof
RATE_LIMITS
Union type of all rate limit configuration names.
Variables
RATE_LIMITS
constRATE_LIMITS:object
Type Declaration
FILE_UPLOAD
readonlyFILE_UPLOAD:object
FILE_UPLOAD.windows
readonlywindows: readonly [{ limit: 1; windowMs: number; name: "burst"; },{ limit: 5; windowMs: number; name: "hourly"; },{ limit: 20; windowMs: number; name: "daily"; }]
PROGRESS_CHECK
readonlyPROGRESS_CHECK:object
PROGRESS_CHECK.windows
readonlywindows: readonly [{ limit: 10; windowMs: 1000; name: "burst"; },{ limit: 3600; windowMs: number; name: "hourly"; }]
IMPORT_RETRY
readonlyIMPORT_RETRY:object
IMPORT_RETRY.windows
readonlywindows: readonly [{ limit: 1; windowMs: number; name: "burst"; },{ limit: 10; windowMs: number; name: "hourly"; },{ limit: 50; windowMs: number; name: "daily"; }]
ADMIN_IMPORT_RESET
readonlyADMIN_IMPORT_RESET:object
ADMIN_IMPORT_RESET.windows
readonlywindows: readonly [{ limit: 5; windowMs: number; name: "burst"; },{ limit: 50; windowMs: number; name: "hourly"; }]
RETRY_RECOMMENDATIONS
readonlyRETRY_RECOMMENDATIONS:object
RETRY_RECOMMENDATIONS.windows
readonlywindows: readonly [{ limit: 10; windowMs: number; name: "burst"; },{ limit: 100; windowMs: number; name: "hourly"; }]
API_GENERAL
readonlyAPI_GENERAL:object
API_GENERAL.windows
readonlywindows: readonly [{ limit: 5; windowMs: 1000; name: "burst"; },{ limit: 50; windowMs: number; name: "hourly"; }]
WEBHOOK_TRIGGER
readonlyWEBHOOK_TRIGGER:object
WEBHOOK_TRIGGER.windows
readonlywindows: readonly [{ limit: 1; windowMs: number; name: "burst"; },{ limit: 5; windowMs: number; name: "hourly"; }]
NEWSLETTER_SUBSCRIBE
readonlyNEWSLETTER_SUBSCRIBE:object
NEWSLETTER_SUBSCRIBE.windows
readonlywindows: readonly [{ limit: 1; windowMs: number; name: "burst"; },{ limit: 3; windowMs: number; name: "hourly"; },{ limit: 10; windowMs: number; name: "daily"; }]
PASSWORD_CHANGE
readonlyPASSWORD_CHANGE:object
PASSWORD_CHANGE.windows
readonlywindows: readonly [{ limit: 3; windowMs: number; name: "burst"; },{ limit: 10; windowMs: number; name: "hourly"; },{ limit: 20; windowMs: number; name: "daily"; }]
EMAIL_CHANGE
readonlyEMAIL_CHANGE:object
EMAIL_CHANGE.windows
readonlywindows: readonly [{ limit: 3; windowMs: number; name: "burst"; },{ limit: 5; windowMs: number; name: "hourly"; },{ limit: 10; windowMs: number; name: "daily"; }]
ACCOUNT_DELETION
readonlyACCOUNT_DELETION:object
ACCOUNT_DELETION.windows
readonlywindows: readonly [{ limit: 3; windowMs: number; name: "hourly"; },{ limit: 5; windowMs: number; name: "daily"; }]
DELETION_PASSWORD_ATTEMPTS
readonlyDELETION_PASSWORD_ATTEMPTS:object
DELETION_PASSWORD_ATTEMPTS.windows
readonlywindows: readonly [{ limit: 5; windowMs: number; name: "burst"; },{ limit: 10; windowMs: number; name: "hourly"; }]
DATA_EXPORT
readonlyDATA_EXPORT:object
DATA_EXPORT.windows
readonlywindows: readonly [{ limit: 1; windowMs: number; name: "hourly"; },{ limit: 3; windowMs: number; name: "daily"; }]