/** * Acquires tokens from a Nebius-compatible HTTP metadata endpoint. * * @packageDocumentation */ import { type AuthMetricsInput } from '../metrics.js'; import { Bearer, Receiver, Token } from '../token.js'; import { custom, customJson } from '../util/logging.js'; /** Configures token acquisition from a Nebius-compatible HTTP metadata endpoint. */ export interface IMDSOptions { /** Sets the HTTP attempt count. The default is three. */ maxAttempts?: number; /** Sets linear retry backoff in milliseconds. The default is 200. */ baseBackoffMs?: number; /** Supplies an HTTP implementation. */ fetch?: typeof globalThis.fetch; /** Receives authorization metrics. */ metrics?: AuthMetricsInput; } /** Reads access_token and expires_at from an HTTP token endpoint for each acquisition. */ export declare class IMDSBearer extends Bearer { [custom]: () => string; private readonly endpoint; readonly $type = "nebius.sdk.IMDSBearer"; private readonly metrics; private readonly fetcher; private readonly maxAttempts; private readonly backoffMs; /** * Creates an HTTP metadata token source. * Throws if the endpoint is not a valid HTTP(S) URL or the retry options are invalid. */ constructor(endpoint: string, options?: IMDSOptions); get metricProvider(): string; /** Returns a JSON-safe value for logs. */ [customJson](): object; /** Sets the authorization metrics sink. */ setMetrics(metrics: AuthMetricsInput): void; receiver(): Receiver; /** Fetches a token. Retries HTTP 429 and 5xx responses within one timeout budget. */ fetchToken(timeoutMs?: number): Promise; } //# sourceMappingURL=imds.d.ts.map