@antzsoft/chat-core 1.4.0 → 1.4.2

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.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ResolvedCompressionConfig, L as LoginCredentials, A as AuthResponse, a as RegisterData, b as AuthTokens, U as User, C as CrossConversationSyncResponse, c as ConversationSyncResponse, d as AppConfig, S as SendMessagePayload, e as CursorPaginatedResponse, M as Message, f as MessageReactionsResponse, P as PaginatedResponse, g as MessageReceiptsResponse, h as ConversationListParams, i as Conversation, j as Participant, k as ConversationUnreadCount, l as UnreadSummary, m as UserPreferences, n as ResolvedConfig, o as PersistStorage, p as PresignedUrlRequest, q as PresignedUrlResponse, F as FileResponse, r as CompletedPart, s as FileType, t as AntzChatConfig, u as UploadableFile, B as BatchUploadResult } from './storage-C_b-SFFH.cjs';
2
- export { v as Attachment, w as CompressedFile, x as CompressionAlgorithm, y as CompressionConfig, z as ConversationType, D as ConversationUpdatedEvent, E as FileSizeLimits, G as LastReaction, H as MENTION_ALL_ID, I as MessageAckEvent, J as MessageContent, K as MessageDeletedEvent, N as MessageDeletedForMeEvent, O as MessageDeliveredEvent, Q as MessageMetadata, T as MessageReaction, V as MessageReceiptEntry, W as MessageReplyReference, X as MessageStarUpdatedEvent, Y as MessageUpdatedEvent, Z as MessagesDeliveredEvent, _ as MultipartPartUrl, $ as MultipartUploadInfo, a0 as NewMessageEvent, a1 as OptimisticAttachment, a2 as PlatformCompressFn, a3 as PlatformUploadFn, a4 as PlatformUploadPartFn, a5 as QuietHours, a6 as ReactionGroup, a7 as ReactionUpdatedEvent, a8 as ReactionUser, a9 as ReadReceiptEvent, aa as ReplyAttachmentSnapshot, ab as ResolvedFileSizeLimits, ac as SendMessageAttachment, ad as SyncDeletedForMe, ae as SyncDeliveredReceipt, af as SyncParticipantChange, ag as SyncReactionEntry, ah as SyncReactions, ai as SyncReadReceipt, aj as SyncStarEntry, ak as SystemMessageMetadata, al as TypingIndicatorEvent, am as UploadConfig, an as UploadProgress, ao as UserStatusEvent, ap as resolveConfig, aq as storageApi, ar as uploadBatch } from './storage-C_b-SFFH.cjs';
1
+ import { R as ResolvedCompressionConfig, L as LoginCredentials, A as AuthResponse, a as RegisterData, b as AuthTokens, U as User, C as CrossConversationSyncResponse, c as ConversationSyncResponse, d as AppConfig, S as SendMessagePayload, M as Message, e as CursorPaginatedResponse, f as MessageReactionsResponse, P as PaginatedResponse, g as MessageReceiptsResponse, h as ConversationListParams, i as Conversation, j as Participant, k as ConversationUnreadCount, l as UnreadSummary, m as UserPreferences, n as ResolvedConfig, o as PersistStorage, p as PresignedUrlRequest, q as PresignedUrlResponse, F as FileResponse, r as CompletedPart, s as FileType, t as AntzChatConfig, u as UploadableFile, B as BatchUploadResult } from './storage-BqygfDAK.cjs';
2
+ export { v as Attachment, w as CompressedFile, x as CompressionAlgorithm, y as CompressionConfig, z as ConversationType, D as ConversationUpdatedEvent, E as FileSizeLimits, G as LastReaction, H as MENTION_ALL_ID, I as MessageAckEvent, J as MessageContent, K as MessageDeletedEvent, N as MessageDeletedForMeEvent, O as MessageDeliveredEvent, Q as MessageForwardReference, T as MessageMetadata, V as MessageReaction, W as MessageReceiptEntry, X as MessageReplyReference, Y as MessageStarUpdatedEvent, Z as MessageUpdatedEvent, _ as MessagesDeliveredEvent, $ as MultipartPartUrl, a0 as MultipartUploadInfo, a1 as NewMessageEvent, a2 as OptimisticAttachment, a3 as PlatformCompressFn, a4 as PlatformUploadFn, a5 as PlatformUploadPartFn, a6 as QuietHours, a7 as ReactionGroup, a8 as ReactionUpdatedEvent, a9 as ReactionUser, aa as ReadReceiptEvent, ab as ReplyAttachmentSnapshot, ac as ResolvedFileSizeLimits, ad as SendMessageAttachment, ae as SyncDeletedForMe, af as SyncDeliveredReceipt, ag as SyncParticipantChange, ah as SyncReactionEntry, ai as SyncReactions, aj as SyncReadReceipt, ak as SyncStarEntry, al as SystemMessageMetadata, am as TypingIndicatorEvent, an as UploadConfig, ao as UploadProgress, ap as UserStatusEvent, aq as resolveConfig, ar as storageApi, as as uploadBatch } from './storage-BqygfDAK.cjs';
3
3
  import { AxiosInstance } from 'axios';
4
4
  import { Socket } from 'socket.io-client';
5
5
  import * as zustand_middleware from 'zustand/middleware';
@@ -75,6 +75,14 @@ interface SendData {
75
75
  replyTo?: string;
76
76
  tempId?: string;
77
77
  }
78
+ /** Matches the server-enforced cap in messages/dto/create-message.dto.ts (MAX_FORWARD_TARGETS). */
79
+ declare const MAX_FORWARD_TARGETS = 5;
80
+ interface ForwardResult {
81
+ conversationId: string;
82
+ success: boolean;
83
+ message?: Message;
84
+ error?: string;
85
+ }
78
86
  declare const messagesApi: {
79
87
  list(conversationId: string, params?: ListMessagesParams): Promise<CursorPaginatedResponse<Message>>;
80
88
  get(messageId: string): Promise<Message>;
@@ -102,6 +110,13 @@ declare const messagesApi: {
102
110
  unpin(messageId: string): Promise<Message>;
103
111
  getPinned(conversationId: string): Promise<Message[]>;
104
112
  getReceipts(messageId: string): Promise<MessageReceiptsResponse>;
113
+ /**
114
+ * Forwards a message into one or more target conversations (max MAX_FORWARD_TARGETS
115
+ * per call, also enforced server-side). Each target is independent — one failing
116
+ * (e.g. no longer a participant) does not block the others; check `success`/`error`
117
+ * per entry in the returned array.
118
+ */
119
+ forward(messageId: string, targetConversationIds: string[]): Promise<ForwardResult[]>;
105
120
  };
106
121
 
107
122
  declare function normalizeConversation(conv: any): Conversation;
@@ -131,6 +146,8 @@ declare const conversationsApi: {
131
146
  unmute(conversationId: string): Promise<void>;
132
147
  pin(conversationId: string): Promise<void>;
133
148
  unpin(conversationId: string): Promise<void>;
149
+ markUnread(conversationId: string): Promise<void>;
150
+ markRead(conversationId: string): Promise<void>;
134
151
  leave(conversationId: string, andDelete?: boolean): Promise<void>;
135
152
  getMembers(conversationId: string, filter?: "deleted" | "all"): Promise<Participant[]>;
136
153
  /**
@@ -455,6 +472,10 @@ interface ChatState {
455
472
  lastSeen: Record<string, string>;
456
473
  replyingTo: Message | null;
457
474
  editingMessage: Message | null;
475
+ /** Message staged in the forward picker, null = picker closed. Unlike replyingTo,
476
+ * this does not fold into the next composer send — forwarding targets a different
477
+ * conversation and needs its own conversation-picker UI. */
478
+ forwardingMessage: Message | null;
458
479
  isSidebarOpen: boolean;
459
480
  isGroupInfoOpen: boolean;
460
481
  isStarredPanelOpen: boolean;
@@ -474,6 +495,7 @@ interface ChatState {
474
495
  setLastSeen: (userId: string, lastSeenAt: string | null) => void;
475
496
  setReplyingTo: (message: Message | null) => void;
476
497
  setEditingMessage: (message: Message | null) => void;
498
+ setForwardingMessage: (message: Message | null) => void;
477
499
  toggleSidebar: () => void;
478
500
  setSidebarOpen: (open: boolean) => void;
479
501
  toggleGroupInfo: () => void;
@@ -654,6 +676,7 @@ declare class AntzChatClient {
654
676
  unpin(messageId: string): Promise<Message>;
655
677
  getPinned(conversationId: string): Promise<Message[]>;
656
678
  getReceipts(messageId: string): Promise<MessageReceiptsResponse>;
679
+ forward(messageId: string, targetConversationIds: string[]): Promise<ForwardResult[]>;
657
680
  };
658
681
  readonly conversations: {
659
682
  list(params?: ConversationListParams): Promise<PaginatedResponse<Conversation>>;
@@ -669,6 +692,8 @@ declare class AntzChatClient {
669
692
  unmute(conversationId: string): Promise<void>;
670
693
  pin(conversationId: string): Promise<void>;
671
694
  unpin(conversationId: string): Promise<void>;
695
+ markUnread(conversationId: string): Promise<void>;
696
+ markRead(conversationId: string): Promise<void>;
672
697
  leave(conversationId: string, andDelete?: boolean): Promise<void>;
673
698
  getMembers(conversationId: string, filter?: "deleted" | "all"): Promise<Participant[]>;
674
699
  getUnreadCount(conversationId: string): Promise<ConversationUnreadCount>;
@@ -727,4 +752,4 @@ declare class AntzChatClient {
727
752
  uploadIcon(conversationId: string, file: UploadableFile): Promise<Conversation>;
728
753
  }
729
754
 
730
- export { AntzChatAuthError, AntzChatClient, AntzChatConfig, AntzChatError, AntzChatNetworkError, AntzChatPermissionError, AntzChatServerError, AntzChatValidationError, AppConfig, AuthResponse, AuthTokens, BatchUploadResult, CompletedPart, Conversation, ConversationListParams, ConversationSyncResponse, ConversationUnreadCount, type CreateDirectData, type CreateGroupData, CrossConversationSyncResponse, CursorPaginatedResponse, FileResponse, FileType, type LastReadEntry, type ListMessagesParams, LoginCredentials, type MentionPart, type MentionSegment, Message, MessageReactionsResponse, MessageReceiptsResponse, type MobileDeviceToken, PaginatedResponse, type ParsedMention, Participant, PersistStorage, PresignedUrlRequest, PresignedUrlResponse, RegisterData, type RegisterDeviceTokenPayload, ResolvedCompressionConfig, ResolvedConfig, type SearchParams, type SendData, SendMessagePayload, type SocketStatus, type StatusListener, type TokenStore, UnreadSummary, type UpdateConversationData, type UpdateProfilePayload, UploadableFile, User, UserPreferences, type WebPushDeviceToken, appConfigApi, authApi, buildMentionText, connectSocket, conversationsApi, createAuthStore, createRestTransitSession, decryptPayload, devicesApi, disconnectSocket, encryptPayload, extractMentionIds, fetchServerKeys, generateEphemeralKey, getApiClient, getAuthStore, getCompressionStrategy, getSessionId, getSessionKey, getSocket, getSocketStatus, initApiClient, initAuthStore, isMentionAll, isTransitEnvelope, messagesApi, normalizeAxiosError, normalizeConversation, onSocketStatus, parseMentions, performHandshake, reconnectSocket, refreshSocketAuth, renderMentionParts, resetAuthStore, resolveSystemMessageText, setApiClientInstance, setTransitSession, socketEmit, syncApi, tryGetSocket, useChatStore, usersApi };
755
+ export { AntzChatAuthError, AntzChatClient, AntzChatConfig, AntzChatError, AntzChatNetworkError, AntzChatPermissionError, AntzChatServerError, AntzChatValidationError, AppConfig, AuthResponse, AuthTokens, BatchUploadResult, CompletedPart, Conversation, ConversationListParams, ConversationSyncResponse, ConversationUnreadCount, type CreateDirectData, type CreateGroupData, CrossConversationSyncResponse, CursorPaginatedResponse, FileResponse, FileType, type ForwardResult, type LastReadEntry, type ListMessagesParams, LoginCredentials, MAX_FORWARD_TARGETS, type MentionPart, type MentionSegment, Message, MessageReactionsResponse, MessageReceiptsResponse, type MobileDeviceToken, PaginatedResponse, type ParsedMention, Participant, PersistStorage, PresignedUrlRequest, PresignedUrlResponse, RegisterData, type RegisterDeviceTokenPayload, ResolvedCompressionConfig, ResolvedConfig, type SearchParams, type SendData, SendMessagePayload, type SocketStatus, type StatusListener, type TokenStore, UnreadSummary, type UpdateConversationData, type UpdateProfilePayload, UploadableFile, User, UserPreferences, type WebPushDeviceToken, appConfigApi, authApi, buildMentionText, connectSocket, conversationsApi, createAuthStore, createRestTransitSession, decryptPayload, devicesApi, disconnectSocket, encryptPayload, extractMentionIds, fetchServerKeys, generateEphemeralKey, getApiClient, getAuthStore, getCompressionStrategy, getSessionId, getSessionKey, getSocket, getSocketStatus, initApiClient, initAuthStore, isMentionAll, isTransitEnvelope, messagesApi, normalizeAxiosError, normalizeConversation, onSocketStatus, parseMentions, performHandshake, reconnectSocket, refreshSocketAuth, renderMentionParts, resetAuthStore, resolveSystemMessageText, setApiClientInstance, setTransitSession, socketEmit, syncApi, tryGetSocket, useChatStore, usersApi };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ResolvedCompressionConfig, L as LoginCredentials, A as AuthResponse, a as RegisterData, b as AuthTokens, U as User, C as CrossConversationSyncResponse, c as ConversationSyncResponse, d as AppConfig, S as SendMessagePayload, e as CursorPaginatedResponse, M as Message, f as MessageReactionsResponse, P as PaginatedResponse, g as MessageReceiptsResponse, h as ConversationListParams, i as Conversation, j as Participant, k as ConversationUnreadCount, l as UnreadSummary, m as UserPreferences, n as ResolvedConfig, o as PersistStorage, p as PresignedUrlRequest, q as PresignedUrlResponse, F as FileResponse, r as CompletedPart, s as FileType, t as AntzChatConfig, u as UploadableFile, B as BatchUploadResult } from './storage-C_b-SFFH.js';
2
- export { v as Attachment, w as CompressedFile, x as CompressionAlgorithm, y as CompressionConfig, z as ConversationType, D as ConversationUpdatedEvent, E as FileSizeLimits, G as LastReaction, H as MENTION_ALL_ID, I as MessageAckEvent, J as MessageContent, K as MessageDeletedEvent, N as MessageDeletedForMeEvent, O as MessageDeliveredEvent, Q as MessageMetadata, T as MessageReaction, V as MessageReceiptEntry, W as MessageReplyReference, X as MessageStarUpdatedEvent, Y as MessageUpdatedEvent, Z as MessagesDeliveredEvent, _ as MultipartPartUrl, $ as MultipartUploadInfo, a0 as NewMessageEvent, a1 as OptimisticAttachment, a2 as PlatformCompressFn, a3 as PlatformUploadFn, a4 as PlatformUploadPartFn, a5 as QuietHours, a6 as ReactionGroup, a7 as ReactionUpdatedEvent, a8 as ReactionUser, a9 as ReadReceiptEvent, aa as ReplyAttachmentSnapshot, ab as ResolvedFileSizeLimits, ac as SendMessageAttachment, ad as SyncDeletedForMe, ae as SyncDeliveredReceipt, af as SyncParticipantChange, ag as SyncReactionEntry, ah as SyncReactions, ai as SyncReadReceipt, aj as SyncStarEntry, ak as SystemMessageMetadata, al as TypingIndicatorEvent, am as UploadConfig, an as UploadProgress, ao as UserStatusEvent, ap as resolveConfig, aq as storageApi, ar as uploadBatch } from './storage-C_b-SFFH.js';
1
+ import { R as ResolvedCompressionConfig, L as LoginCredentials, A as AuthResponse, a as RegisterData, b as AuthTokens, U as User, C as CrossConversationSyncResponse, c as ConversationSyncResponse, d as AppConfig, S as SendMessagePayload, M as Message, e as CursorPaginatedResponse, f as MessageReactionsResponse, P as PaginatedResponse, g as MessageReceiptsResponse, h as ConversationListParams, i as Conversation, j as Participant, k as ConversationUnreadCount, l as UnreadSummary, m as UserPreferences, n as ResolvedConfig, o as PersistStorage, p as PresignedUrlRequest, q as PresignedUrlResponse, F as FileResponse, r as CompletedPart, s as FileType, t as AntzChatConfig, u as UploadableFile, B as BatchUploadResult } from './storage-BqygfDAK.js';
2
+ export { v as Attachment, w as CompressedFile, x as CompressionAlgorithm, y as CompressionConfig, z as ConversationType, D as ConversationUpdatedEvent, E as FileSizeLimits, G as LastReaction, H as MENTION_ALL_ID, I as MessageAckEvent, J as MessageContent, K as MessageDeletedEvent, N as MessageDeletedForMeEvent, O as MessageDeliveredEvent, Q as MessageForwardReference, T as MessageMetadata, V as MessageReaction, W as MessageReceiptEntry, X as MessageReplyReference, Y as MessageStarUpdatedEvent, Z as MessageUpdatedEvent, _ as MessagesDeliveredEvent, $ as MultipartPartUrl, a0 as MultipartUploadInfo, a1 as NewMessageEvent, a2 as OptimisticAttachment, a3 as PlatformCompressFn, a4 as PlatformUploadFn, a5 as PlatformUploadPartFn, a6 as QuietHours, a7 as ReactionGroup, a8 as ReactionUpdatedEvent, a9 as ReactionUser, aa as ReadReceiptEvent, ab as ReplyAttachmentSnapshot, ac as ResolvedFileSizeLimits, ad as SendMessageAttachment, ae as SyncDeletedForMe, af as SyncDeliveredReceipt, ag as SyncParticipantChange, ah as SyncReactionEntry, ai as SyncReactions, aj as SyncReadReceipt, ak as SyncStarEntry, al as SystemMessageMetadata, am as TypingIndicatorEvent, an as UploadConfig, ao as UploadProgress, ap as UserStatusEvent, aq as resolveConfig, ar as storageApi, as as uploadBatch } from './storage-BqygfDAK.js';
3
3
  import { AxiosInstance } from 'axios';
4
4
  import { Socket } from 'socket.io-client';
5
5
  import * as zustand_middleware from 'zustand/middleware';
@@ -75,6 +75,14 @@ interface SendData {
75
75
  replyTo?: string;
76
76
  tempId?: string;
77
77
  }
78
+ /** Matches the server-enforced cap in messages/dto/create-message.dto.ts (MAX_FORWARD_TARGETS). */
79
+ declare const MAX_FORWARD_TARGETS = 5;
80
+ interface ForwardResult {
81
+ conversationId: string;
82
+ success: boolean;
83
+ message?: Message;
84
+ error?: string;
85
+ }
78
86
  declare const messagesApi: {
79
87
  list(conversationId: string, params?: ListMessagesParams): Promise<CursorPaginatedResponse<Message>>;
80
88
  get(messageId: string): Promise<Message>;
@@ -102,6 +110,13 @@ declare const messagesApi: {
102
110
  unpin(messageId: string): Promise<Message>;
103
111
  getPinned(conversationId: string): Promise<Message[]>;
104
112
  getReceipts(messageId: string): Promise<MessageReceiptsResponse>;
113
+ /**
114
+ * Forwards a message into one or more target conversations (max MAX_FORWARD_TARGETS
115
+ * per call, also enforced server-side). Each target is independent — one failing
116
+ * (e.g. no longer a participant) does not block the others; check `success`/`error`
117
+ * per entry in the returned array.
118
+ */
119
+ forward(messageId: string, targetConversationIds: string[]): Promise<ForwardResult[]>;
105
120
  };
106
121
 
107
122
  declare function normalizeConversation(conv: any): Conversation;
@@ -131,6 +146,8 @@ declare const conversationsApi: {
131
146
  unmute(conversationId: string): Promise<void>;
132
147
  pin(conversationId: string): Promise<void>;
133
148
  unpin(conversationId: string): Promise<void>;
149
+ markUnread(conversationId: string): Promise<void>;
150
+ markRead(conversationId: string): Promise<void>;
134
151
  leave(conversationId: string, andDelete?: boolean): Promise<void>;
135
152
  getMembers(conversationId: string, filter?: "deleted" | "all"): Promise<Participant[]>;
136
153
  /**
@@ -455,6 +472,10 @@ interface ChatState {
455
472
  lastSeen: Record<string, string>;
456
473
  replyingTo: Message | null;
457
474
  editingMessage: Message | null;
475
+ /** Message staged in the forward picker, null = picker closed. Unlike replyingTo,
476
+ * this does not fold into the next composer send — forwarding targets a different
477
+ * conversation and needs its own conversation-picker UI. */
478
+ forwardingMessage: Message | null;
458
479
  isSidebarOpen: boolean;
459
480
  isGroupInfoOpen: boolean;
460
481
  isStarredPanelOpen: boolean;
@@ -474,6 +495,7 @@ interface ChatState {
474
495
  setLastSeen: (userId: string, lastSeenAt: string | null) => void;
475
496
  setReplyingTo: (message: Message | null) => void;
476
497
  setEditingMessage: (message: Message | null) => void;
498
+ setForwardingMessage: (message: Message | null) => void;
477
499
  toggleSidebar: () => void;
478
500
  setSidebarOpen: (open: boolean) => void;
479
501
  toggleGroupInfo: () => void;
@@ -654,6 +676,7 @@ declare class AntzChatClient {
654
676
  unpin(messageId: string): Promise<Message>;
655
677
  getPinned(conversationId: string): Promise<Message[]>;
656
678
  getReceipts(messageId: string): Promise<MessageReceiptsResponse>;
679
+ forward(messageId: string, targetConversationIds: string[]): Promise<ForwardResult[]>;
657
680
  };
658
681
  readonly conversations: {
659
682
  list(params?: ConversationListParams): Promise<PaginatedResponse<Conversation>>;
@@ -669,6 +692,8 @@ declare class AntzChatClient {
669
692
  unmute(conversationId: string): Promise<void>;
670
693
  pin(conversationId: string): Promise<void>;
671
694
  unpin(conversationId: string): Promise<void>;
695
+ markUnread(conversationId: string): Promise<void>;
696
+ markRead(conversationId: string): Promise<void>;
672
697
  leave(conversationId: string, andDelete?: boolean): Promise<void>;
673
698
  getMembers(conversationId: string, filter?: "deleted" | "all"): Promise<Participant[]>;
674
699
  getUnreadCount(conversationId: string): Promise<ConversationUnreadCount>;
@@ -727,4 +752,4 @@ declare class AntzChatClient {
727
752
  uploadIcon(conversationId: string, file: UploadableFile): Promise<Conversation>;
728
753
  }
729
754
 
730
- export { AntzChatAuthError, AntzChatClient, AntzChatConfig, AntzChatError, AntzChatNetworkError, AntzChatPermissionError, AntzChatServerError, AntzChatValidationError, AppConfig, AuthResponse, AuthTokens, BatchUploadResult, CompletedPart, Conversation, ConversationListParams, ConversationSyncResponse, ConversationUnreadCount, type CreateDirectData, type CreateGroupData, CrossConversationSyncResponse, CursorPaginatedResponse, FileResponse, FileType, type LastReadEntry, type ListMessagesParams, LoginCredentials, type MentionPart, type MentionSegment, Message, MessageReactionsResponse, MessageReceiptsResponse, type MobileDeviceToken, PaginatedResponse, type ParsedMention, Participant, PersistStorage, PresignedUrlRequest, PresignedUrlResponse, RegisterData, type RegisterDeviceTokenPayload, ResolvedCompressionConfig, ResolvedConfig, type SearchParams, type SendData, SendMessagePayload, type SocketStatus, type StatusListener, type TokenStore, UnreadSummary, type UpdateConversationData, type UpdateProfilePayload, UploadableFile, User, UserPreferences, type WebPushDeviceToken, appConfigApi, authApi, buildMentionText, connectSocket, conversationsApi, createAuthStore, createRestTransitSession, decryptPayload, devicesApi, disconnectSocket, encryptPayload, extractMentionIds, fetchServerKeys, generateEphemeralKey, getApiClient, getAuthStore, getCompressionStrategy, getSessionId, getSessionKey, getSocket, getSocketStatus, initApiClient, initAuthStore, isMentionAll, isTransitEnvelope, messagesApi, normalizeAxiosError, normalizeConversation, onSocketStatus, parseMentions, performHandshake, reconnectSocket, refreshSocketAuth, renderMentionParts, resetAuthStore, resolveSystemMessageText, setApiClientInstance, setTransitSession, socketEmit, syncApi, tryGetSocket, useChatStore, usersApi };
755
+ export { AntzChatAuthError, AntzChatClient, AntzChatConfig, AntzChatError, AntzChatNetworkError, AntzChatPermissionError, AntzChatServerError, AntzChatValidationError, AppConfig, AuthResponse, AuthTokens, BatchUploadResult, CompletedPart, Conversation, ConversationListParams, ConversationSyncResponse, ConversationUnreadCount, type CreateDirectData, type CreateGroupData, CrossConversationSyncResponse, CursorPaginatedResponse, FileResponse, FileType, type ForwardResult, type LastReadEntry, type ListMessagesParams, LoginCredentials, MAX_FORWARD_TARGETS, type MentionPart, type MentionSegment, Message, MessageReactionsResponse, MessageReceiptsResponse, type MobileDeviceToken, PaginatedResponse, type ParsedMention, Participant, PersistStorage, PresignedUrlRequest, PresignedUrlResponse, RegisterData, type RegisterDeviceTokenPayload, ResolvedCompressionConfig, ResolvedConfig, type SearchParams, type SendData, SendMessagePayload, type SocketStatus, type StatusListener, type TokenStore, UnreadSummary, type UpdateConversationData, type UpdateProfilePayload, UploadableFile, User, UserPreferences, type WebPushDeviceToken, appConfigApi, authApi, buildMentionText, connectSocket, conversationsApi, createAuthStore, createRestTransitSession, decryptPayload, devicesApi, disconnectSocket, encryptPayload, extractMentionIds, fetchServerKeys, generateEphemeralKey, getApiClient, getAuthStore, getCompressionStrategy, getSessionId, getSessionKey, getSocket, getSocketStatus, initApiClient, initAuthStore, isMentionAll, isTransitEnvelope, messagesApi, normalizeAxiosError, normalizeConversation, onSocketStatus, parseMentions, performHandshake, reconnectSocket, refreshSocketAuth, renderMentionParts, resetAuthStore, resolveSystemMessageText, setApiClientInstance, setTransitSession, socketEmit, syncApi, tryGetSocket, useChatStore, usersApi };
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-XTQYF5HU.js";
33
33
  import {
34
34
  useChatStore
35
- } from "./chunk-EOL5B7GS.js";
35
+ } from "./chunk-UIYJAOGL.js";
36
36
 
37
37
  // src/config/types.ts
38
38
  function resolveConfig(config) {
@@ -300,6 +300,7 @@ function resolveSystemMessageText(message, currentUserId) {
300
300
  }
301
301
 
302
302
  // src/api/messages.ts
303
+ var MAX_FORWARD_TARGETS = 5;
303
304
  var messagesApi = {
304
305
  async list(conversationId, params = {}) {
305
306
  const { cursor, direction, ...rest } = params;
@@ -393,6 +394,19 @@ var messagesApi = {
393
394
  async getReceipts(messageId) {
394
395
  const { data } = await getApiClient().get(`/messages/${messageId}/receipts`);
395
396
  return data;
397
+ },
398
+ /**
399
+ * Forwards a message into one or more target conversations (max MAX_FORWARD_TARGETS
400
+ * per call, also enforced server-side). Each target is independent — one failing
401
+ * (e.g. no longer a participant) does not block the others; check `success`/`error`
402
+ * per entry in the returned array.
403
+ */
404
+ async forward(messageId, targetConversationIds) {
405
+ const { data } = await getApiClient().post(
406
+ `/messages/${messageId}/forward`,
407
+ { targetConversationIds }
408
+ );
409
+ return data;
396
410
  }
397
411
  };
398
412
 
@@ -506,6 +520,12 @@ var conversationsApi = {
506
520
  async unpin(conversationId) {
507
521
  await getApiClient().post(`/conversations/${conversationId}/unpin`);
508
522
  },
523
+ async markUnread(conversationId) {
524
+ await getApiClient().post(`/conversations/${conversationId}/unread`);
525
+ },
526
+ async markRead(conversationId) {
527
+ await getApiClient().post(`/conversations/${conversationId}/unread/clear`);
528
+ },
509
529
  async leave(conversationId, andDelete) {
510
530
  const url = andDelete ? `/conversations/${conversationId}/leave?delete=true` : `/conversations/${conversationId}/leave`;
511
531
  await getApiClient().post(url);
@@ -828,13 +848,13 @@ async function _doConnect(config, getToken) {
828
848
  });
829
849
  }
830
850
  secureOn(_socket, "read_receipt", (event) => {
831
- import("./chat.store-DLNRJ5ZT.js").then(({ useChatStore: useChatStore2 }) => {
851
+ import("./chat.store-UVTDBPEC.js").then(({ useChatStore: useChatStore2 }) => {
832
852
  const e = event;
833
853
  useChatStore2.getState().setLastRead(e.conversationId, e.messageId, e.readAt);
834
854
  });
835
855
  });
836
856
  secureOn(_socket, "user_online", (event) => {
837
- import("./chat.store-DLNRJ5ZT.js").then(({ useChatStore: useChatStore2 }) => {
857
+ import("./chat.store-UVTDBPEC.js").then(({ useChatStore: useChatStore2 }) => {
838
858
  const store = useChatStore2.getState();
839
859
  const e = event;
840
860
  store.setUserOnline(e.userId);
@@ -842,7 +862,7 @@ async function _doConnect(config, getToken) {
842
862
  });
843
863
  });
844
864
  secureOn(_socket, "user_offline", (event) => {
845
- import("./chat.store-DLNRJ5ZT.js").then(({ useChatStore: useChatStore2 }) => {
865
+ import("./chat.store-UVTDBPEC.js").then(({ useChatStore: useChatStore2 }) => {
846
866
  const e = event;
847
867
  const store = useChatStore2.getState();
848
868
  store.setUserOffline(e.userId);
@@ -1202,6 +1222,7 @@ export {
1202
1222
  AntzChatPermissionError,
1203
1223
  AntzChatServerError,
1204
1224
  AntzChatValidationError,
1225
+ MAX_FORWARD_TARGETS,
1205
1226
  MENTION_ALL_ID,
1206
1227
  appConfigApi,
1207
1228
  authApi,