UNPKG

flamesshield-sdk

Version:

Flames Shield Smart rate limiting for Firebase Cloud Functions to protect your services from excessive requests

18 lines 603 B
export type CheckAndUpdateQuota = () => Promise<boolean>; export interface LogOptions { verbose?: boolean; } export declare class QuotaCheckError extends Error { constructor(message?: string); } export declare class RateLimiter { private readonly checkAndUpdateQuotaCall; private readonly logOptions; constructor(checkAndUpdateQuotaCall: CheckAndUpdateQuota, logOptions?: LogOptions); /** * Checks if the current usage is within the allowed quota and updates the quota. * */ checkAndUpdateQuota(): Promise<boolean>; } //# sourceMappingURL=rate_limiter.d.ts.map