import { ILOidcLocation } from './location'; import { OidcConfiguration } from './types.js'; export declare const DEFAULT_SW_MESSAGE_TIMEOUT_MS = 5000; export interface ServiceWorkerSignalMessage { type: string; configurationName?: string; data?: unknown; tabId?: string; [key: string]: unknown; } export interface ServiceWorkerSignalOptions { timeoutMs?: number; } export declare const sleepAsync: ({ milliseconds }: { milliseconds: any; }) => Promise; export declare const defaultServiceWorkerUpdateRequireCallback: (location: ILOidcLocation) => (registration: any, stopKeepAlive: () => void) => Promise; export declare const getTabId: (configurationName: string) => string; export declare const registrationCache: Map>; export declare const initWorkerAsync: (configuration: OidcConfiguration, configurationName: string) => Promise<{ clearAsync: (status: any) => Promise; initAsync: (oidcServerConfiguration: any, where: any, oidcConfiguration: OidcConfiguration) => Promise<{ tokens: import('./parseTokens.js').Tokens; status: any; }>; startKeepAliveServiceWorker: () => void; setSessionStateAsync: (sessionState: string) => Promise; getSessionStateAsync: () => Promise; setNonceAsync: (nonce: any) => Promise; getNonceAsync: (fallback?: boolean) => Promise<{ nonce: any; }>; setLoginParams: (data: any) => void; getLoginParams: () => any; getStateAsync: (fallback?: boolean) => Promise; setStateAsync: (state: string) => Promise; getCodeVerifierAsync: (fallback?: boolean) => Promise; setCodeVerifierAsync: (codeVerifier: string) => Promise; setDemonstratingProofOfPossessionNonce: (demonstratingProofOfPossessionNonce: string) => Promise; getDemonstratingProofOfPossessionNonce: () => Promise; setDemonstratingProofOfPossessionJwkAsync: (demonstratingProofOfPossessionJwk: JsonWebKey) => Promise; getDemonstratingProofOfPossessionJwkAsync: () => Promise; signalAsync: (message: ServiceWorkerSignalMessage, options?: ServiceWorkerSignalOptions) => Promise; }>; /** * Sends a typed message to the OIDC service worker for the given * configuration. Wraps `MessageChannel` setup, request/response correlation * and timeouts. * * Resolves with the SW response, rejects on timeout or when no SW is * registered for the configuration. The provided `configurationName` is * used when the message itself does not carry one. */ export declare const signalServiceWorkerAsync: (configuration: OidcConfiguration, configurationName: string, message: ServiceWorkerSignalMessage, options?: ServiceWorkerSignalOptions) => Promise; //# sourceMappingURL=initWorker.d.ts.map