UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.

17 lines (16 loc) 626 B
import { ReportingAPI, ReportingAPIResponse } from "./ReportingAPI"; import { Token } from "./Token"; import { Event } from "./Event"; type ThrottleOptions = { maxEventsPerInterval: number; intervalInMs: number; }; export declare class ReportingAPIRateLimitedClientSide implements ReportingAPI { private readonly api; private readonly maxEventsPerInterval; private readonly intervalInMs; private events; constructor(api: ReportingAPI, { maxEventsPerInterval, intervalInMs }: ThrottleOptions); report(token: Token, event: Event, timeoutInMS: number): Promise<ReportingAPIResponse>; } export {};