import type { MiddlewareOptions, RateLimiter } from '../types'; export interface FastifyLikeInstance { addHook(name: 'onRequest', hook: (request: FastifyRequest, reply: FastifyReply) => void | Promise): void; } export interface FastifyRequest { id?: string; ip?: string; headers: Record; method?: string; url?: string; routerPath?: string; routeConfig?: { url?: string; }; [key: string]: any; } export interface FastifyReply { code?(statusCode: number): this; status?(statusCode: number): this; header?(name: string, value: string | number): this; headers?(values: Record): this; setHeader?(name: string, value: string | number): this; send?(payload: any): void; [key: string]: any; } export type FastifyPluginDone = (err?: Error) => void; export declare function createFastifyPlugin(rateLimiter: RateLimiter, options?: MiddlewareOptions): (instance: FastifyLikeInstance, _opts: unknown, done: FastifyPluginDone) => void;