import type { EventListener } from '../common'; type Options = Partial<{ takenFromStorage: false | (() => void); appReference: string; }>; /** * */ export declare class SessionContext implements EventListener { #private; /** * If tokenOrMeta is a string, it's the token itself and will be decoded into the {@link SessionMeta} object * If tokenOrMeta is the {@link SessionMeta} object itself, it's already decoded and will be used as is * @param tokenOrMeta Either the token string or the pre-decoded token payload * @param options Options object */ constructor(tokenOrMeta: string | SessionMeta, frankie2customer?: boolean, options?: Options); on(): void; off(): void; isTakenFromStorage(): boolean; unpersist(): void; get appReference(): string | undefined; get customerID(): string; get customerChildID(): string | null; get organisationName(): string | null; get environment(): string; get sessionId(): string; get entityId(): string | null; get reference(): string | null; get frankie2customer(): boolean; get token(): string | null; get extraData(): Record | null; get expirationEpoch(): number; setFrankie2Customer(value: boolean): void; setToken(token: string): void; setEntityId(entityId: string | null): void; isValid(): boolean; static assembleMeta({ data }: DecodedToken): SessionMeta; static decodeToken(token: string): DecodedToken; static verifyExpiration(decodedToken: DecodedToken): boolean; } export type SessionMeta = Readonly<{ sessionId: string; customerID: string; customerChildID: string | null; organisationName: string | null; environment: string; }> & SomeEntityIdentification; type SomeEntityIdentification = { entityId: string; reference: string | null; } | { reference: string; entityId: string | null; }; type DecodedToken = { data: SessionTokenPayload; exp: number; }; export declare const hasEntityId: (p: ApplicantId) => p is { entityId: string; }; export type ApplicantId = { entityId: string; } | { reference: string; }; export type SessionTokenPayload = { organisation: { customerId: string; customerChildId?: string; name?: string; }; sessionId: string; environment: string; extraData?: Record; frankie2customer: boolean; } & ApplicantId; export {}; //# sourceMappingURL=SessionContext.d.ts.map