UNPKG

@nestjs/throttler

Version:

A Rate-Limiting module for NestJS to work on Express, Fastify, Websockets, Socket.IO, and GraphQL, all rolled up into a simple package.

19 lines (18 loc) 666 B
import { ExecutionContext } from '@nestjs/common'; import { ThrottlerStorageRecord } from './throttler-storage-record.interface'; import { ThrottlerGenerateKeyFunction, ThrottlerGetTrackerFunction, ThrottlerOptions } from './throttler-module-options.interface'; export interface ThrottlerLimitDetail extends ThrottlerStorageRecord { ttl: number; limit: number; key: string; tracker: string; } export interface ThrottlerRequest { context: ExecutionContext; limit: number; ttl: number; throttler: ThrottlerOptions; blockDuration: number; getTracker: ThrottlerGetTrackerFunction; generateKey: ThrottlerGenerateKeyFunction; }