export default class Throttler { private static readonly throttles; /** * Throttle function; will throw a TooManyRequestsHttpError when the threshold is reached. * * This throttle is adaptive: it will slowly decrease (linear) until it reaches 0 after {@param resetPeriod} ms. * Threshold will hold for {@param holdPeriod} ms. * * @param action a unique action name (can be used multiple times, but it'll account for a single action). * @param max how many times this action can be triggered per id. * @param resetPeriod after how much time in ms the throttle will reach 0. * @param id an identifier of who triggered the action. * @param holdPeriod time in ms after each call before the threshold begins to decrease. * @param jailPeriod time in ms for which the throttle will throw when it is triggered. */ static throttle(action: string, max: number, resetPeriod: number, id: string, holdPeriod?: number, jailPeriod?: number): void; private constructor(); }