import { AxiosError, Method } from 'axios'; /** * Pure token-source selection: prefer the keyring value, then the env value. * Throws a clear, secret-free error when neither is present. Kept pure (no IO) * so every branch is unit-testable; the impure keyring/env reads live in * resolveToken(). */ export declare function resolveApiToken({ keyringValue, envValue, }: { keyringValue?: string | null; envValue?: string | null; }): string; /** * Parse an RFC 7231 `Retry-After` header into a non-negative millisecond delay. * The header is either delta-seconds (a bare integer) OR an HTTP-date — a bare * `parseInt` turned a date into `NaN`, so `setTimeout(NaN)` fired immediately and * defeated the 429 backoff. Returns null when absent or unparseable (including the * obsolete non-IMF-fixdate forms) so the caller falls back to exponential backoff; * clamps to a finite, non-negative delay. */ export declare function parseRetryAfterMs(retryAfter: string | undefined, now?: number): number | null; export declare function sanitizeAxiosError(err: AxiosError): boolean; export declare function wrapLexwareError(err: unknown): unknown; export declare function lexwareRequest(method: Method, path: string, data?: unknown, params?: Record): Promise; export declare function lexwareUpload(path: string, fileBuffer: Buffer, fileName: string, contentType: string, uploadType?: 'voucher'): Promise; export declare function getWebhookPublicKey(): Promise; export declare function __resetWebhookKeyCache(): void; export declare function parseContentDispositionFileName(header: string): string | undefined; export declare function lexwareDownload(path: string, accept?: string): Promise<{ data: Buffer; contentType: string; fileName?: string; }>;