import { type StateKey } from "../state/rest-cache.mts"; import { type RateLimitInfo } from "./http-utils.mts"; export interface RestResult { data: T; rateLimit?: RateLimitInfo; } /** * Enables `If-None-Match` conditional requests for a REST call, backed by a * per-PR on-disk cache (see `src/state/rest-cache.mts`). A 304 response * returns the cached body and — unlike a normal request — does not consume * the primary REST rate-limit quota. */ export interface RestRequestOptions { conditional?: { key: StateKey; /** Logical cache name; must be unique per distinct resource + page. */ name: string; headSha?: string; }; } export declare function rest(method: string, path: string, body?: unknown): Promise; export declare function restWithRateLimit(method: string, path: string, body?: unknown, opts?: RestRequestOptions): Promise>;