import { ModelDataProvider } from '../ModelDataProvider'; import { ModelIdentifier } from '../ModelIdentifier'; import { SignedFileItem } from '../types'; export type FetchWithRefreshOptions = { currentSignedUrl: string | undefined; signedFilesBaseUrl: string | undefined; modelIdentifier: ModelIdentifier; fileName: string; fetchFn: (signedUrl: string) => Promise; onUrlRefreshed?: (item: SignedFileItem) => void; }; /** * Fetches a resource through a signed URL, transparently refreshing the URL and retrying once * if the current URL has expired or is otherwise invalid (HTTP 401/403/404). Concurrent refresh * requests for the same file are de-duplicated. Successfully refreshed URLs are cached and * preferred over the originally supplied `currentSignedUrl` on later calls. */ export declare class SignedUrlRefresher { private readonly _dataProvider; private readonly _inFlightRefreshes; private readonly _refreshedSignedUrls; constructor(dataProvider: ModelDataProvider); fetchWithRefresh(options: FetchWithRefreshOptions): Promise; private resolveCurrentSignedUrl; private cacheKey; private tryRefresh; }