import { EventEmitter } from 'events'; import { AccessTokenData } from '../auth/'; declare enum TOPIC { ACCESS_TOKEN_REFRESH = "AccessTokenStore.TOPIC.ACCESS_TOKEN_REFRESH" } export interface AccessTokenStore { on(event: TOPIC.ACCESS_TOKEN_REFRESH, listener: (accessToken: AccessTokenData) => void): this; } export declare class AccessTokenStore extends EventEmitter { private readonly logger; static readonly TOPIC: typeof TOPIC; accessTokenData?: AccessTokenData; /** * The date at which the token will be invalid. This value should be use with a grain of salt as there might be some time shift between browser and server time * It is suggested to add an error margin */ tokenExpirationDate?: number; /** * Marker token used when opening a new WebSocket connection. * It is used to know we have processed all notifications up to this marker, * any notifications received after the marker is returned from websocket * are considered live notifications * @note This is a random token generated by the client. */ markerToken?: string; constructor(); delete: () => Promise; updateToken: (accessToken: AccessTokenData) => Promise; getNextMarkerToken: () => string; getAccessToken: () => string | undefined; } export {}; //# sourceMappingURL=AccessTokenStore.d.ts.map