import { IdentityResolution, Options } from '../utils/config'; import { TypeOfAuth } from '../utils/typeOfAuth'; export interface GenerateJWTPayload { email?: string; userID?: string; } export interface WithJWT { setEmail: (email: string, identityResolution?: IdentityResolution, preferUserId?: boolean) => Promise; setUserID: (userId: string, identityResolution?: IdentityResolution, preferUserId?: boolean) => Promise; logout: () => void; refreshJwtToken: (authTypes: string) => Promise; clearRefresh: () => void; setVisitorUsageTracked: (consent: boolean) => void; clearVisitorEventsAndUserData: () => void; } export interface WithoutJWT { setEmail: (email: string, identityResolution?: IdentityResolution) => Promise; setUserID: (userId: string, identityResolution?: IdentityResolution, preferUserId?: boolean) => Promise; logout: () => void; setNewAuthToken: (newToken?: string) => void; clearAuthToken: () => void; setVisitorUsageTracked: (consent: boolean) => void; clearVisitorEventsAndUserData: () => void; } export declare const setUnknownUserId: (userId: string) => Promise; export declare function initialize(authToken: string, generateJWT: (payload: GenerateJWTPayload) => Promise): WithJWT; export declare function initialize(authToken: string): WithoutJWT; export interface WithJWTParams { authToken: string; configOptions: Partial; generateJWT: (payload: GenerateJWTPayload) => Promise; } /** * @deprecated This interface is for testing purposes only and should not be used in production. * Use WithJWTParams instead for proper JWT-based authentication. */ export interface WithoutJWTParams { authToken: string; configOptions: Partial; } export interface InitializeParams { authToken: string; configOptions: Partial; generateJWT?: (payload: GenerateJWTPayload) => Promise; } export declare function initializeWithConfig(initializeParams: WithJWTParams): WithJWT; /** * @deprecated This overload is for testing purposes only and should not be used in production. * Use the WithJWTParams overload instead for proper JWT-based authentication. */ export declare function initializeWithConfig(initializeParams: WithoutJWTParams): WithoutJWT; export declare function setTypeOfAuthForTestingOnly(authType: TypeOfAuth): void;