@antzsoft/chat-core 1.4.1 → 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-Pz2Taipp.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-Pz2Taipp.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;
@@ -457,6 +472,10 @@ interface ChatState {
457
472
  lastSeen: Record<string, string>;
458
473
  replyingTo: Message | null;
459
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;
460
479
  isSidebarOpen: boolean;
461
480
  isGroupInfoOpen: boolean;
462
481
  isStarredPanelOpen: boolean;
@@ -476,6 +495,7 @@ interface ChatState {
476
495
  setLastSeen: (userId: string, lastSeenAt: string | null) => void;
477
496
  setReplyingTo: (message: Message | null) => void;
478
497
  setEditingMessage: (message: Message | null) => void;
498
+ setForwardingMessage: (message: Message | null) => void;
479
499
  toggleSidebar: () => void;
480
500
  setSidebarOpen: (open: boolean) => void;
481
501
  toggleGroupInfo: () => void;
@@ -656,6 +676,7 @@ declare class AntzChatClient {
656
676
  unpin(messageId: string): Promise<Message>;
657
677
  getPinned(conversationId: string): Promise<Message[]>;
658
678
  getReceipts(messageId: string): Promise<MessageReceiptsResponse>;
679
+ forward(messageId: string, targetConversationIds: string[]): Promise<ForwardResult[]>;
659
680
  };
660
681
  readonly conversations: {
661
682
  list(params?: ConversationListParams): Promise<PaginatedResponse<Conversation>>;
@@ -731,4 +752,4 @@ declare class AntzChatClient {
731
752
  uploadIcon(conversationId: string, file: UploadableFile): Promise<Conversation>;
732
753
  }
733
754
 
734
- 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-Pz2Taipp.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-Pz2Taipp.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;
@@ -457,6 +472,10 @@ interface ChatState {
457
472
  lastSeen: Record<string, string>;
458
473
  replyingTo: Message | null;
459
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;
460
479
  isSidebarOpen: boolean;
461
480
  isGroupInfoOpen: boolean;
462
481
  isStarredPanelOpen: boolean;
@@ -476,6 +495,7 @@ interface ChatState {
476
495
  setLastSeen: (userId: string, lastSeenAt: string | null) => void;
477
496
  setReplyingTo: (message: Message | null) => void;
478
497
  setEditingMessage: (message: Message | null) => void;
498
+ setForwardingMessage: (message: Message | null) => void;
479
499
  toggleSidebar: () => void;
480
500
  setSidebarOpen: (open: boolean) => void;
481
501
  toggleGroupInfo: () => void;
@@ -656,6 +676,7 @@ declare class AntzChatClient {
656
676
  unpin(messageId: string): Promise<Message>;
657
677
  getPinned(conversationId: string): Promise<Message[]>;
658
678
  getReceipts(messageId: string): Promise<MessageReceiptsResponse>;
679
+ forward(messageId: string, targetConversationIds: string[]): Promise<ForwardResult[]>;
659
680
  };
660
681
  readonly conversations: {
661
682
  list(params?: ConversationListParams): Promise<PaginatedResponse<Conversation>>;
@@ -731,4 +752,4 @@ declare class AntzChatClient {
731
752
  uploadIcon(conversationId: string, file: UploadableFile): Promise<Conversation>;
732
753
  }
733
754
 
734
- 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
 
@@ -834,13 +848,13 @@ async function _doConnect(config, getToken) {
834
848
  });
835
849
  }
836
850
  secureOn(_socket, "read_receipt", (event) => {
837
- import("./chat.store-DLNRJ5ZT.js").then(({ useChatStore: useChatStore2 }) => {
851
+ import("./chat.store-UVTDBPEC.js").then(({ useChatStore: useChatStore2 }) => {
838
852
  const e = event;
839
853
  useChatStore2.getState().setLastRead(e.conversationId, e.messageId, e.readAt);
840
854
  });
841
855
  });
842
856
  secureOn(_socket, "user_online", (event) => {
843
- import("./chat.store-DLNRJ5ZT.js").then(({ useChatStore: useChatStore2 }) => {
857
+ import("./chat.store-UVTDBPEC.js").then(({ useChatStore: useChatStore2 }) => {
844
858
  const store = useChatStore2.getState();
845
859
  const e = event;
846
860
  store.setUserOnline(e.userId);
@@ -848,7 +862,7 @@ async function _doConnect(config, getToken) {
848
862
  });
849
863
  });
850
864
  secureOn(_socket, "user_offline", (event) => {
851
- import("./chat.store-DLNRJ5ZT.js").then(({ useChatStore: useChatStore2 }) => {
865
+ import("./chat.store-UVTDBPEC.js").then(({ useChatStore: useChatStore2 }) => {
852
866
  const e = event;
853
867
  const store = useChatStore2.getState();
854
868
  store.setUserOffline(e.userId);
@@ -1208,6 +1222,7 @@ export {
1208
1222
  AntzChatPermissionError,
1209
1223
  AntzChatServerError,
1210
1224
  AntzChatValidationError,
1225
+ MAX_FORWARD_TARGETS,
1211
1226
  MENTION_ALL_ID,
1212
1227
  appConfigApi,
1213
1228
  authApi,