import { AxiosError } from 'axios'; import { InternalConfig } from '../config'; import { CustomerInstance } from '../resources/Customers'; export interface TokenCacheEntry { token: string; expires: number; } export interface TokenResponse { token: string; expires: number; } export interface SessionData { id: string; customer: CustomerInstance | null; token: string; refreshToken: string; expires: number; } export declare type TokenType = 'sales_channel' | 'integration'; export declare const setTokenType: (type: TokenType) => void; export declare const getTokenType: () => TokenType; export declare const tokenCache: Map; export declare const INTEGRATION_PREFIX = "integration__"; export declare const cacheKey: () => string; export declare const cacheToken: (token: string, expires: number) => void; export declare const removeCurrentToken: () => void; export declare const getToken: () => TokenCacheEntry; export declare const currentCustomerData: SessionData; export declare const resetSession: () => void; export declare const isCustomerLoggedIn: () => boolean; export declare const getCustomerToken: () => TokenCacheEntry; export declare const getCurrentMarkets: () => string[]; export declare const setCurrentMarkets: (markets: string[]) => void; export declare const getScope: () => string; export declare const getCurrentToken: () => TokenCacheEntry; export declare const refreshCurrentToken: () => Promise; export declare const loginAsIntegration: () => Promise; export declare const refreshIntegration: () => Promise; export declare const loginAsGuest: () => Promise; export declare const refreshGuest: () => Promise; export declare const __resetMarket: () => void; export declare const setMarket: (marketId: string | string[]) => Promise; export declare const getMarket: () => string[]; export declare const isRefreshTokenError: (error: AxiosError) => boolean; export declare const getRefreshTokenInterceptor: (config: Readonly) => any[]; export declare const logoutCustomer: () => void; export declare const loginAsCustomer: (username: string, password: string) => Promise; export declare const refreshCustomer: () => Promise; export declare const useCustomerSession: (accessToken: string, refreshToken: string, scope: string) => Promise; export declare const loadProfile: () => Promise; export declare const getProfile: () => CustomerInstance | null; //# sourceMappingURL=session.d.ts.map