import { type AuthMetricsInput, type AuthMetricsRecorder } from '../../metrics.js'; import { Bearer, Receiver } from '../../token.js'; import { custom, customJson, Logger } from '../../util/logging.js'; /** * Reads a named token from a shared file cache and refreshes it through another * bearer when required. * * The first fetch prefers a valid cache entry. After an authentication error, * the receiver checks the file again, then asks the wrapped bearer for a fresh * token and writes it back. The wrapped bearer must have a stable name. */ export declare class RenewableFileCacheBearer extends Bearer { [custom]: () => string; private logger?; /** Contains the fully qualified runtime type name. */ readonly $type = "nebius.sdk.RenewableFileCacheBearer"; private readonly _cache; private _wrapped; /** Contains the metrics. */ readonly metrics: AuthMetricsRecorder; /** Minimum remaining lifetime required to accept the first cached token, in milliseconds. */ safetyMargin: number | null; /** * Creates a file-backed cache layer. * * `throttleMs` limits how often this process checks the shared file. * `safetyMarginMs` rejects a token that is too close to expiration. */ constructor(_wrapped: Bearer, safetyMarginMs?: number, cacheFile?: string, throttleMs?: number, logger?: Logger | undefined, metrics?: AuthMetricsInput, provider?: string); /** Returns a JSON-safe value for logs. */ [customJson](): unknown; /** Returns the wrapped bearer. */ get wrapped(): Bearer | undefined; /** Creates a token receiver. */ receiver(): Receiver; /** Sets the metrics. */ setMetrics(metrics: AuthMetricsInput): void; } //# sourceMappingURL=renewable_bearer.d.ts.map