@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.
27 lines (26 loc) • 929 B
TypeScript
//#region ../react/src/realtime/seen-store.d.ts
/**
* Seeds the seen store with initial data, typically from the REST API or SSR.
*/
declare function hydrateConversationSeen(conversationId: string, entries: ConversationSeen[]): void;
/**
* Inserts or updates a seen entry for the provided actor.
*/
declare function upsertConversationSeen(options: {
conversationId: string;
actorType: SeenActorType;
actorId: string;
lastSeenAt: Date;
}): void;
/**
* Applies realtime `conversationSeen` events to the store while optionally
* ignoring the local visitor/user.
*/
declare function applyConversationSeenEvent(event: RealtimeEvent<"conversationSeen">, options?: {
ignoreVisitorId?: string | null;
ignoreUserId?: string | null;
ignoreAiAgentId?: string | null;
}): void;
//#endregion
export { applyConversationSeenEvent, hydrateConversationSeen, upsertConversationSeen };
//# sourceMappingURL=seen-store.d.ts.map