@flagship.io/react-sdk
Version:
Flagship REACT SDK
7 lines (6 loc) • 749 B
TypeScript
import { Visitor, primitive } from "./deps.js";
export declare function useLatestRef<T>(value: T): import("react").MutableRefObject<T>;
export declare function shouldRecreateVisitor(currentVisitor: Visitor | undefined, visitorId: string, isAuthenticated: boolean | undefined): boolean;
export declare function shouldUpdateConsent(currentVisitor: Visitor, hasConsented: boolean | undefined): boolean;
export declare function getAuthenticationAction(currentVisitor: Visitor, isAuthenticated: boolean | undefined): "authenticate" | "unauthenticate" | null;
export declare function updateVisitorData(visitor: Visitor, visitorId: string, context: Record<string, primitive>, hasConsented: boolean | undefined, isAuthenticated: boolean | undefined): void;