import type { ArcjetDecision } from "@arcjet/protocol"; interface HeaderLike { get(name: string): string | null; has(name: string): boolean; set(name: string, value: string): void; } interface ResponseLike { headers: HeaderLike; } interface OutgoingMessageLike { getHeader: (name: string) => string[] | number | string | undefined; headersSent: boolean; hasHeader: (name: string) => boolean; setHeader: (name: string, value: ReadonlyArray | number | string) => unknown; } /** * Decorable value. * * Something that looks like `Headers` (Fetch), * `OutgoingMessage` (Node.js), or * `Response` (Fetch). */ export type ArcjetCanDecorate = HeaderLike | OutgoingMessageLike | ResponseLike; /** * Decorate something based on an Arcjet decision with rate limit headers. * * Sets `RateLimit-Policy` and `RateLimit` and conform to the * [Rate Limit fields for * HTTP](https://ietf-wg-httpapi.github.io/ratelimit-headers/draft-ietf-httpapi-ratelimit-headers.html) * draft specification. * * @param value * Decorable value. * @param decision * Decision from `protect()`. * @returns * Nothing. */ export declare function setRateLimitHeaders(value: ArcjetCanDecorate, decision: ArcjetDecision): void; export {};