@alxxsck/ai-assistant 3.4.0 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,10 @@ export declare const normalizeChatAttachment: (candidate: unknown) => ChatAttach
32
32
  export declare const normalizeChatAttachments: (values: readonly unknown[] | undefined) => ChatAttachment[];
33
33
  export declare const normalizeMessageForSession: (message: RawMessageData, interactionSessionId: string) => MessageData;
34
34
  export declare const listConversations: (config: WidgetConfig, api: AppApi, cursor?: string, signal?: AbortSignal) => Promise<VersionedCursorPage<ConversationData>>;
35
+ export declare const acknowledgeConversationMessageRead: (config: WidgetConfig, api: AppApi, conversationId: string, messageId: string, readProof: string, signal?: AbortSignal) => Promise<void>;
35
36
  export declare const listConversationMessages: (config: WidgetConfig, api: AppApi, conversationId: string, cursor?: string, signal?: AbortSignal) => Promise<CursorPage<MessageData>>;
37
+ /** Fill every ordinal gap after a disconnect, including gaps larger than one page. */
38
+ export declare const catchUpConversationMessages: (config: WidgetConfig, api: AppApi, conversationId: string, knownOrdinal: number, signal?: AbortSignal) => Promise<CursorPage<MessageData>>;
36
39
  export declare const createConversation: (config: WidgetConfig, api: AppApi, signal?: AbortSignal) => Promise<ConversationData>;
37
40
  export declare const selectConversation: (config: WidgetConfig, api: AppApi, conversationId: string, signal?: AbortSignal) => Promise<ConversationData>;
38
41
  export declare const getConversation: (config: WidgetConfig, api: AppApi, conversationId: string, signal?: AbortSignal) => Promise<ConversationData>;
@@ -26,6 +26,7 @@ export type MessageDelivery = {
26
26
  status: "PENDING" | "DELIVERING" | "DELIVERED" | "READ" | "FAILED" | "CANCELLED";
27
27
  /** Omitted by realtime delivery claims; present in authoritative history. */
28
28
  acceptedAt?: string;
29
+ readAt?: string | null;
29
30
  interactionSessionId?: string | null;
30
31
  };
31
32
  export declare enum MessageStatus {
@@ -60,6 +61,8 @@ export type MessageData = {
60
61
  lastThreadMessageAt: string;
61
62
  createdAt: string;
62
63
  updatedAt: string;
64
+ /** Client-generated stream timestamps must not outrank server snapshots. */
65
+ timestampSource?: "client";
63
66
  attachments: ChatAttachment[];
64
67
  threadParticipants: ChatParticipant[];
65
68
  mentions: [];
@@ -68,6 +71,7 @@ export type MessageData = {
68
71
  forwardCount: number;
69
72
  ordinal?: number;
70
73
  delivery?: MessageDelivery;
74
+ readProof?: string;
71
75
  clientMessageId?: string | null;
72
76
  };
73
77
  /**
@@ -135,6 +139,7 @@ export type RawMessageData = {
135
139
  author?: unknown;
136
140
  attachments?: unknown[];
137
141
  delivery?: MessageDelivery;
142
+ readProof?: string;
138
143
  createdAt: string;
139
144
  updatedAt: string;
140
145
  };
@@ -1,8 +1,8 @@
1
- import { C as A, E as e, S as s, d as E, c } from "./index-DhJtrjs7.js";
1
+ import { C as A, E as e, S as s, d as E, b as n } from "./index-Bxit2PO-.js";
2
2
  export {
3
3
  A as ChatWidgetInstance,
4
4
  e as EXTERNALLY_AVAILABLE_ACTIONS,
5
5
  s as SUPPORTED_LOCALES,
6
6
  E as createMockAttachmentTransport,
7
- c as isExternallyAvailableAction
7
+ n as isExternallyAvailableAction
8
8
  };
@@ -0,0 +1,2 @@
1
+ export type AssistantUiVersion = "old" | "new";
2
+ export declare const ASSISTANT_UI_VERSION: AssistantUiVersion;