UNPKG

@cossistant/next

Version:

Next.js-ready SDK for building AI-powered support/chat widgets. Hooks + primitives, WS-driven, TypeScript-first. Next.js-ready, Tailwind optional.

26 lines 857 B
//#region ../react/src/hooks/use-visitor.d.ts type UseVisitorReturn = { visitor: PublicVisitor | null; setVisitorMetadata: (metadata: VisitorMetadata) => Promise<VisitorResponse | null>; identify: (params: { externalId?: string; email?: string; name?: string; image?: string; metadata?: Record<string, unknown>; }) => Promise<{ contactId: string; visitorId: string; } | null>; }; /** * Exposes the current visitor plus helpers to identify and update metadata. * * Note: Metadata is stored on contacts, not visitors. When you call * setVisitorMetadata, it will update the contact metadata if the visitor * has been identified. If not, you must call identify() first. */ declare function useVisitor(): UseVisitorReturn; //#endregion export { UseVisitorReturn, useVisitor }; //# sourceMappingURL=use-visitor.d.ts.map