import { TtlCache } from "./cache.js"; import { RateLimiter } from "./rate-limit.js"; import { type OperationName } from "./queries.js"; export interface StartggClientOptions { token: string | undefined; apiUrl?: string; timeoutMs?: number; maxRetries?: number; cacheEnabled?: boolean; limiter?: RateLimiter; cache?: TtlCache; fetchFn?: typeof fetch; sleep?: (ms: number) => Promise; /** Injectable jitter source for deterministic tests. Returns [0, 1). */ random?: () => number; } export interface RequestOptions { /** Cache TTL for this request. 0 / undefined = no caching. */ cacheTtlMs?: number; } export declare class StartggClient { private readonly token; private readonly apiUrl; private readonly timeoutMs; private readonly maxRetries; private readonly cacheEnabled; private readonly limiter; private readonly cache; private readonly fetchFn; private readonly sleep; private readonly random; constructor(opts: StartggClientOptions); /** * Execute a named operation and return the GraphQL `data` payload. * Throws StartggError for every failure mode; never leaks the token. */ request(operation: OperationName, variables?: Record, options?: RequestOptions): Promise; private backoffMs; private retryAfterMs; }